@camstack/server 1.2.943 → 1.2.945
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/CHANGELOG.md +26 -0
- package/closure-pins.json +350 -0
- package/dist/api/core/auth-sessions.procedures.js +18 -0
- package/dist/api/core/auth.router.js +19 -6
- package/dist/api/server-upload.js +17 -1
- package/dist/api/trpc/generated-cap-mounts.js +18 -1
- package/dist/api/trpc/generated-cap-routers.js +2662 -2542
- package/dist/auth/native-return.js +9 -3
- package/dist/auth/sso-routes.js +5 -1
- package/dist/core/addon/instance-lifecycle.js +4 -1
- package/dist/core/auth/handoff-code.service.js +35 -1
- package/dist/server-root/index.js +313 -70
- package/package.json +15 -11
- package/system/assets/apps-aggregator/icon.svg +5 -0
- package/system/dist/{action-index-B_cLRwXJ.js → action-index-Bcnb-jyg.js} +9 -1
- package/system/dist/{action-index-B1fgpQBt.mjs → action-index-DwPHO2nz.mjs} +9 -1
- package/system/dist/{addon-settings.cap-CZ4MC7ha.mjs → addon-settings.cap-CHpmuaQG.mjs} +1 -1
- package/system/dist/{addon-settings.cap-DrLdMFIe.js → addon-settings.cap-nZVHPo3X.js} +1 -1
- package/system/dist/{alert-episode-Be--PngO.mjs → alert-episode-D-1VUUkZ.mjs} +1 -1
- package/system/dist/{alert-episode-Bqktmt-i.js → alert-episode-DaQ3prSe.js} +1 -1
- package/system/dist/apps.cap-Bqb9NpYx.mjs +130 -0
- package/system/dist/apps.cap-CLjgnuUe.js +141 -0
- package/system/dist/{base-addon-CRsXtYFG.js → base-addon-BG7p06Hb.js} +136 -15
- package/system/dist/{base-addon-BcS6r1cT.mjs → base-addon-BcVoYZbC.mjs} +136 -15
- package/system/dist/{base-device-DAdWzDOl.js → base-device-DeSNiwZ4.js} +4 -4
- package/system/dist/{base-device-DJXF5eDN.mjs → base-device-w_MD0Bf4.mjs} +4 -4
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +3 -3
- package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
- package/system/dist/builtins/apps-aggregator/aggregate-apps.d.ts +24 -0
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.d.ts +16 -0
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.js +109 -0
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.mjs +103 -0
- package/system/dist/builtins/apps-aggregator/index.d.ts +1 -0
- package/system/dist/builtins/apps-aggregator/index.js +8 -0
- package/system/dist/builtins/apps-aggregator/index.mjs +2 -0
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +3 -3
- package/system/dist/builtins/camera-grid/index.mjs +3 -3
- package/system/dist/builtins/composer/composer.addon.js +7 -7
- package/system/dist/builtins/composer/composer.addon.mjs +7 -7
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/actions-store.d.ts +2 -0
- package/system/dist/builtins/core-blocks/block-supervisor.d.ts +16 -4
- package/system/dist/builtins/core-blocks/core-block-store.d.ts +2 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +1018 -323
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +986 -291
- package/system/dist/builtins/core-blocks/migrations/index.d.ts +5 -2
- package/system/dist/builtins/core-blocks/migrations/tag-ids.d.ts +42 -0
- package/system/dist/builtins/core-blocks/migrations/tags-as-records.d.ts +47 -0
- package/system/dist/builtins/core-blocks/record-kinds.d.ts +12 -1
- package/system/dist/builtins/core-blocks/runs-api.d.ts +3 -1
- package/system/dist/builtins/core-blocks/runs-ledger.d.ts +3 -1
- package/system/dist/builtins/core-blocks/scheduler/scheduler-store.d.ts +2 -0
- package/system/dist/builtins/core-blocks/tags-service.d.ts +52 -27
- package/system/dist/builtins/core-blocks/tags-wiring.d.ts +2 -0
- package/system/dist/builtins/core-notifier/core-notifier.addon.js +76 -67
- package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +76 -67
- package/system/dist/builtins/device-history/device-history.addon.js +4 -4
- package/system/dist/builtins/device-history/device-history.addon.mjs +4 -4
- package/system/dist/builtins/device-manager/device-manager.addon.js +1618 -755
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1604 -741
- package/system/dist/builtins/device-manager/device-meta-actions.d.ts +13 -136
- package/system/dist/builtins/device-manager/device-meta-types.d.ts +5 -1
- package/system/dist/builtins/device-manager/device-provider-context.d.ts +9 -0
- package/system/dist/builtins/device-manager/device-row-store.d.ts +21 -4
- package/system/dist/builtins/device-manager/device-search.d.ts +6 -0
- package/system/dist/builtins/device-manager/location-alignment.d.ts +9 -2
- package/system/dist/builtins/device-manager/migrate-device.d.ts +7 -2
- package/system/dist/builtins/device-manager/migrate-hardware-state.d.ts +132 -1
- package/system/dist/builtins/device-manager/migrations/device-tag-ids.d.ts +25 -0
- package/system/dist/builtins/device-manager/migrations/index.d.ts +16 -0
- package/system/dist/builtins/device-manager/migrations/orphan-children.d.ts +33 -0
- package/system/dist/builtins/device-manager/migrations/ports.d.ts +17 -0
- package/system/dist/builtins/device-manager/migrations/rooms-as-records.d.ts +52 -0
- package/system/dist/builtins/device-manager/record-kinds.d.ts +3 -1
- package/system/dist/builtins/device-manager/removal-cleanup.d.ts +7 -0
- package/system/dist/builtins/device-manager/room-actions.d.ts +27 -0
- package/system/dist/builtins/device-manager/room-store.d.ts +19 -0
- package/system/dist/builtins/device-manager/tag-names.d.ts +32 -0
- package/system/dist/builtins/device-manager/wireable-enum-catalog.d.ts +18 -0
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +2 -2
- package/system/dist/builtins/loki-logging/index.mjs +2 -2
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/migrations/migration-engine.d.ts +3 -1
- package/system/dist/builtins/sqlite-storage/migrations/migrations-provider.d.ts +1 -0
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +15 -10
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +15 -10
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +2 -2
- package/system/dist/builtins/system-config/system-config.addon.mjs +2 -2
- package/system/dist/builtins/winston-logging/index.js +2 -2
- package/system/dist/builtins/winston-logging/index.mjs +2 -2
- package/system/dist/{command-catalog-C29hVOOg.js → command-catalog-A_ONlLfF.js} +1 -1
- package/system/dist/{command-catalog-xAeqxbZk.mjs → command-catalog-CZDlLhxO.mjs} +1 -1
- package/system/dist/{composition-sources-Do5qM6EB.js → composition-sources-D1nPv7dJ.js} +1 -1
- package/system/dist/{composition-sources-C327LGFn.mjs → composition-sources-DubMf_ii.mjs} +1 -1
- package/system/dist/{core-blocks.cap-CdTGUKtr.js → core-blocks.cap-DEYCvF9J.js} +125 -373
- package/system/dist/{core-blocks.cap-DLkEfV5b.mjs → core-blocks.cap-sW5HLDlB.mjs} +109 -327
- package/system/dist/{device-manager.cap-DJs8izI6.js → device-manager.cap-B9qVf7ag.js} +163 -22
- package/system/dist/{device-manager.cap-eYrj1Ezp.mjs → device-manager.cap-CV4KGp3e.mjs} +134 -17
- package/system/dist/{error.cap-CU1FB6uE.mjs → error.cap-B8l7L8e4.mjs} +7 -1
- package/system/dist/{error.cap-BuKbL3Ac.js → error.cap-BqlvgBJd.js} +7 -1
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +7 -7
- package/system/dist/{legacy-integration-rows-door-CdqYAj-o.js → legacy-integration-rows-door-BK8eoGlF.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-LSgpClpX.mjs → legacy-integration-rows-door-CwzC5XNk.mjs} +1 -1
- package/system/dist/{migration-DGAc6ywR.mjs → migration-BvbfW9g-.mjs} +6 -0
- package/system/dist/{migration-BOQlFZCN.js → migration-CHPdAdNh.js} +6 -0
- package/system/dist/{prefix-walk-Mtij0NNT.mjs → named-entity-store-Cq2oVrN5.mjs} +195 -89
- package/system/dist/{prefix-walk-BFnw8NBu.js → named-entity-store-O_hi1y_o.js} +244 -90
- package/system/dist/{notification-rules.cap-BUIuYPlQ.mjs → notification-rules.cap-ClvK6QT1.mjs} +10 -5
- package/system/dist/{notification-rules.cap-BJKUjizS.js → notification-rules.cap-uSLoe2pA.js} +10 -5
- package/system/dist/{notification-targets-DMW7xgR2.js → notification-targets-ChqpBbtR.js} +2 -2
- package/system/dist/{notification-targets-4bGYH5J7.mjs → notification-targets-DUA6-F2t.mjs} +2 -2
- package/system/dist/{device-row-store-CTocYKqC.mjs → record-kinds-BD2xv4Pd.mjs} +222 -93
- package/system/dist/{device-row-store-C0P2H18h.js → record-kinds-BV8Gcpsx.js} +246 -93
- package/system/dist/records/named-entity-store.d.ts +60 -0
- package/system/dist/{rename-composition-block-D9Uc1AF7.js → rename-composition-block-C60O0P16.js} +137 -33
- package/system/dist/{rename-composition-block-Cdh-dRmY.mjs → rename-composition-block-DcX3vkwS.mjs} +137 -33
- package/system/dist/{retention-source.cap-C6Hy0hlM.js → retention-source.cap-A-TMhU5O.js} +1 -1
- package/system/dist/{retention-source.cap-550kkyp5.mjs → retention-source.cap-Ct07pM30.mjs} +1 -1
- package/system/dist/{storage-admin.cap-Ci4QbL6P.mjs → storage-admin.cap-C54s9_B9.mjs} +8 -2
- package/system/dist/{storage-admin.cap-DqW1ol4j.js → storage-admin.cap-DSPHi7ut.js} +8 -2
- package/system/dist/{stream-catalog.cap-CjEQFknc.js → stream-catalog.cap-7WPsugOy.js} +1 -1
- package/system/dist/{stream-catalog.cap-DVniDdRD.mjs → stream-catalog.cap-CzwRDaqT.mjs} +1 -1
- package/system/dist/{tag-BxLazvVb.js → tag-BLraBqvp.js} +12 -0
- package/system/dist/{tag-uZBAq6ox.mjs → tag-DU8pm9Bi.mjs} +7 -1
- package/system/dist/time-window-B6UhCArd.js +679 -0
- package/system/dist/time-window-BnUBULgu.mjs +578 -0
- package/system/dist/{wal-maintenance-BgYiAy5b.js → wal-maintenance-CkPfVApC.js} +0 -0
- package/system/dist/{wal-maintenance-Bey5ChBb.mjs → wal-maintenance-u84_1sVl.mjs} +0 -0
- package/system/package.json +16 -1
- /package/system/dist/{constants-Ba3FTIHl.js → constants-Ba3FTIHl2.js} +0 -0
- /package/system/dist/{constants-DB4piTD5.mjs → constants-DB4piTD52.mjs} +0 -0
|
@@ -1,70 +1,89 @@
|
|
|
1
|
-
import { t as BaseAddon } from "../../base-addon-
|
|
1
|
+
import { t as BaseAddon } from "../../base-addon-BcVoYZbC.mjs";
|
|
2
2
|
import { Z as errMsg } from "../../scoped-settings-DVWUIP7Z.mjs";
|
|
3
|
-
import { i as notificationTargetKinds, n as buildNotificationTargetInstances, r as listNotificationTargets, t as NotificationTargetStore } from "../../notification-targets-
|
|
4
|
-
import { f as notificationOutputCapability, l as NotificationFieldSchema, o as AlarmPanelStatusSchema, r as NcScheduleSchema, s as AlarmStateSchema } from "../../notification-rules.cap-
|
|
3
|
+
import { i as notificationTargetKinds, n as buildNotificationTargetInstances, r as listNotificationTargets, t as NotificationTargetStore } from "../../notification-targets-DUA6-F2t.mjs";
|
|
4
|
+
import { f as notificationOutputCapability, l as NotificationFieldSchema, o as AlarmPanelStatusSchema, r as NcScheduleSchema, s as AlarmStateSchema } from "../../notification-rules.cap-ClvK6QT1.mjs";
|
|
5
|
+
import { _ as zoneOnlySite, h as weekdayKeyOfIndex, i as isWithinTimeWindow, l as isKnownTimeZone } from "../../time-window-BnUBULgu.mjs";
|
|
5
6
|
import { t as integrationInstancesCapability } from "../../integration-instances.cap-BWttO42A.mjs";
|
|
6
7
|
import { z } from "zod";
|
|
7
8
|
import { createHash, randomUUID } from "node:crypto";
|
|
8
|
-
//#region ../types/dist/esm/
|
|
9
|
-
var WEEKDAY_TO_DAY = {
|
|
10
|
-
Sun: 0,
|
|
11
|
-
Mon: 1,
|
|
12
|
-
Tue: 2,
|
|
13
|
-
Wed: 3,
|
|
14
|
-
Thu: 4,
|
|
15
|
-
Fri: 5,
|
|
16
|
-
Sat: 6
|
|
17
|
-
};
|
|
9
|
+
//#region ../types/dist/esm/time/clock-range.mjs
|
|
18
10
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
11
|
+
* Stored clock ranges (numeric weekdays, minutes of the day) read as a
|
|
12
|
+
* {@link TimeWindow}. Two stored formats, a notification schedule window and a
|
|
13
|
+
* recording band, keep their shape and ask "is this instant inside" of the one
|
|
14
|
+
* evaluator, {@link judgeTimeWindow}, through this adapter.
|
|
23
15
|
*/
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
16
|
+
var MINUTES_PER_DAY = 1440;
|
|
17
|
+
var MINUTES_PER_HOUR = 60;
|
|
18
|
+
function clockOfMinute(minuteOfDay) {
|
|
19
|
+
const wrapped = minuteOfDay % MINUTES_PER_DAY;
|
|
20
|
+
return {
|
|
21
|
+
kind: "clock",
|
|
22
|
+
hh: Math.floor(wrapped / MINUTES_PER_HOUR),
|
|
23
|
+
mm: wrapped % MINUTES_PER_HOUR
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** A numeric weekday list as keys; a number outside 0-6 is dropped. */
|
|
27
|
+
function weekdayKeysOf(days) {
|
|
28
|
+
const keys = [];
|
|
29
|
+
for (const day of days) {
|
|
30
|
+
const key = weekdayKeyOfIndex(day);
|
|
31
|
+
if (key !== void 0) keys.push(key);
|
|
39
32
|
}
|
|
40
|
-
|
|
41
|
-
return made;
|
|
33
|
+
return keys;
|
|
42
34
|
}
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
else if (p.type === "hour") hour = Number(p.value);
|
|
55
|
-
else if (p.type === "minute") minute = Number(p.value);
|
|
56
|
-
const day = weekday !== void 0 ? WEEKDAY_TO_DAY[weekday] : void 0;
|
|
57
|
-
if (day !== void 0 && hour !== void 0 && minute !== void 0) return {
|
|
58
|
-
day,
|
|
59
|
-
minute: hour * 60 + minute
|
|
60
|
-
};
|
|
61
|
-
} catch {}
|
|
35
|
+
/**
|
|
36
|
+
* The window of a stored clock range. `startMinute` is inclusive and
|
|
37
|
+
* `endMinute` exclusive; `endMinute` may be 1440 (the end of the day), and
|
|
38
|
+
* `startMinute > endMinute` crosses midnight. `startMinute === endMinute` is
|
|
39
|
+
* the WHOLE local day on `days` (what a recording band means by it); a caller
|
|
40
|
+
* for which equal ends mean "empty" must not build a window (the notification
|
|
41
|
+
* schedule skips it). `days` undefined = every day.
|
|
42
|
+
*/
|
|
43
|
+
function clockRangeWindow(days, startMinute, endMinute) {
|
|
44
|
+
const daysPart = days === void 0 ? {} : { days: weekdayKeysOf(days) };
|
|
45
|
+
if (startMinute === endMinute) return daysPart;
|
|
62
46
|
return {
|
|
63
|
-
|
|
64
|
-
|
|
47
|
+
...daysPart,
|
|
48
|
+
between: {
|
|
49
|
+
from: clockOfMinute(startMinute),
|
|
50
|
+
to: clockOfMinute(endMinute)
|
|
51
|
+
}
|
|
65
52
|
};
|
|
66
53
|
}
|
|
67
54
|
/**
|
|
55
|
+
* Is `atMs` inside the stored clock range on `site`. Same arguments as
|
|
56
|
+
* {@link clockRangeWindow}; the answer is the shared evaluator's.
|
|
57
|
+
*/
|
|
58
|
+
function isWithinClockRange(days, startMinute, endMinute, atMs, site) {
|
|
59
|
+
return isWithinTimeWindow(clockRangeWindow(days, startMinute, endMinute), atMs, site);
|
|
60
|
+
}
|
|
61
|
+
var hostZone;
|
|
62
|
+
/**
|
|
63
|
+
* The host's IANA zone, resolved once and cached for the life of the process.
|
|
64
|
+
* The cache can be stale only if the host zone changes while running (a TZ edit
|
|
65
|
+
* or a laptop crossing zones); a restart picks the new zone up. A DST change is
|
|
66
|
+
* not a zone change and never stales it.
|
|
67
|
+
*/
|
|
68
|
+
function hostTimeZone() {
|
|
69
|
+
hostZone ??= new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
70
|
+
return hostZone;
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region ../types/dist/esm/notification/schedule.mjs
|
|
74
|
+
/** An absent or unknown IANA name reads the host zone. */
|
|
75
|
+
function scheduleZone(timezone) {
|
|
76
|
+
return timezone !== void 0 && isKnownTimeZone(timezone) ? timezone : hostTimeZone();
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* A window with no listed day, or whose start equals its end, is EMPTY in this
|
|
80
|
+
* vocabulary (it never matches); the shared model would read equal ends as a
|
|
81
|
+
* whole day, so such a window is not handed to it.
|
|
82
|
+
*/
|
|
83
|
+
function isEmptyWindow(w) {
|
|
84
|
+
return w.days.length === 0 || w.startMinute === w.endMinute;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
68
87
|
* Is the schedule active at `atMs`? No schedule = always active. Windows
|
|
69
88
|
* are OR'd; a window with `startMinute > endMinute` crosses midnight (it
|
|
70
89
|
* starts on a listed day and spills into the next). `invert` flips the
|
|
@@ -72,18 +91,8 @@ function localDayMinute(atMs, timezone) {
|
|
|
72
91
|
*/
|
|
73
92
|
function isScheduleActive(schedule, atMs) {
|
|
74
93
|
if (schedule === void 0) return true;
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
let inside = false;
|
|
78
|
-
for (const w of schedule.windows) if (w.startMinute <= w.endMinute) {
|
|
79
|
-
if (w.days.includes(day) && minute >= w.startMinute && minute < w.endMinute) {
|
|
80
|
-
inside = true;
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
} else if (w.days.includes(day) && minute >= w.startMinute || w.days.includes(prevDay) && minute < w.endMinute) {
|
|
84
|
-
inside = true;
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
94
|
+
const site = zoneOnlySite(scheduleZone(schedule.timezone));
|
|
95
|
+
const inside = schedule.windows.some((w) => !isEmptyWindow(w) && isWithinClockRange(w.days, w.startMinute, w.endMinute, atMs, site));
|
|
87
96
|
return schedule.invert === true ? !inside : inside;
|
|
88
97
|
}
|
|
89
98
|
//#endregion
|
|
@@ -3,15 +3,15 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_base_addon = require("../../base-addon-
|
|
6
|
+
const require_base_addon = require("../../base-addon-BG7p06Hb.js");
|
|
7
7
|
const require_scoped_settings = require("../../scoped-settings-CylSSq_8.js");
|
|
8
8
|
const require_record_kind = require("../../record-kind-DoBfYHCs.js");
|
|
9
|
-
const require_device_manager_cap = require("../../device-manager.cap-
|
|
10
|
-
const require_retention_source_cap = require("../../retention-source.cap-
|
|
9
|
+
const require_device_manager_cap = require("../../device-manager.cap-B9qVf7ag.js");
|
|
10
|
+
const require_retention_source_cap = require("../../retention-source.cap-A-TMhU5O.js");
|
|
11
11
|
const require_quantity = require("../../quantity-lY1KiTSZ.js");
|
|
12
12
|
const require_device_type = require("../../device-type-Cnc0NiSX.js");
|
|
13
13
|
const require_history_catalog = require("../../history-catalog-CiTMP3-E.js");
|
|
14
|
-
const require_command_catalog = require("../../command-catalog-
|
|
14
|
+
const require_command_catalog = require("../../command-catalog-A_ONlLfF.js");
|
|
15
15
|
const require_capture_engine = require("../../capture-engine-D_1IJmMs.js");
|
|
16
16
|
const require_retention = require("../../retention-xcjk_k1w.js");
|
|
17
17
|
let node_crypto = require("node:crypto");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { b as EventCategory, m as emitReadiness, t as BaseAddon } from "../../base-addon-
|
|
1
|
+
import { b as EventCategory, m as emitReadiness, t as BaseAddon } from "../../base-addon-BcVoYZbC.mjs";
|
|
2
2
|
import { P as RecordTooLargeError, Z as errMsg, k as InvalidRecordError } from "../../scoped-settings-DVWUIP7Z.mjs";
|
|
3
3
|
import { s as defineRecordKinds } from "../../record-kind-ub6NXqfh.mjs";
|
|
4
|
-
import { t as DEVICE_TOMBSTONE_RETENTION_MS } from "../../device-manager.cap-
|
|
5
|
-
import { a as deviceRemovalHookCapability, c as DeviceTransitionSchema, i as deviceRunsCapability, n as deviceTransitionsCapability, o as DEVICE_HISTORY_ENERGY_KEY, r as DeviceRunSchema, s as deviceHistoryCapability, t as retentionSourceCapability } from "../../retention-source.cap-
|
|
4
|
+
import { t as DEVICE_TOMBSTONE_RETENTION_MS } from "../../device-manager.cap-CV4KGp3e.mjs";
|
|
5
|
+
import { a as deviceRemovalHookCapability, c as DeviceTransitionSchema, i as deviceRunsCapability, n as deviceTransitionsCapability, o as DEVICE_HISTORY_ENERGY_KEY, r as DeviceRunSchema, s as deviceHistoryCapability, t as retentionSourceCapability } from "../../retention-source.cap-Ct07pM30.mjs";
|
|
6
6
|
import { i as isReadingQuantity, r as historyUnitFor } from "../../quantity-D3g5SxsZ.mjs";
|
|
7
7
|
import { r as DeviceType } from "../../device-type-TUGqGmaI.mjs";
|
|
8
8
|
import { a as wattMillisecondsToKwh, n as HISTORY_ITEM_CATALOG, t as HISTORY_CATALOG } from "../../history-catalog-A_dzXNpv.mjs";
|
|
9
|
-
import { t as auditedFields } from "../../command-catalog-
|
|
9
|
+
import { t as auditedFields } from "../../command-catalog-CZDlLhxO.mjs";
|
|
10
10
|
import { a as catalogMetrics, c as DeviceDirectory, d as identityOf, f as subjectIdOf, i as capSeriesKey, l as isRealDeviceType, m as parseConfirmedStateChanged, n as CaptureEngine, o as readPath, r as capItemSeriesKey, s as readUnit, t as CAP_KEY_PREFIX, u as SeriesRegistry } from "../../capture-engine-B2MmoNND.mjs";
|
|
11
11
|
import { a as FIVE_MINUTES_MS, c as bucketEndOf, i as DAY_MS, l as bucketStartOf, n as RetentionJob, o as HOUR_MS, r as DepartureTracker, s as ROLLUP_GRACE_MS, t as DEFAULT_RETENTION, u as floorTo } from "../../retention-CQs8QR1B.mjs";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|