@attraccess/plugin-matter 0.4.0 → 0.5.0

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.
@@ -0,0 +1 @@
1
+ export { r as importShared, t as importSharedLocal, n as importSharedRuntime } from "./_virtual___federation_fn_import-D2E5es2p.js";
@@ -1,4 +1,4 @@
1
- //#region ../../../node_modules/.pnpm/@originjs+vite-plugin-federation@1.4.1/node_modules/@originjs/vite-plugin-federation/dist/satisfy.mjs
1
+ // ../../../node_modules/.pnpm/@originjs+vite-plugin-federation@1.4.1/node_modules/@originjs/vite-plugin-federation/dist/satisfy.mjs
2
2
  var buildIdentifier = "[0-9A-Za-z-]+";
3
3
  var build = `(?:\\+(${buildIdentifier}(?:\\.${buildIdentifier})*))`;
4
4
  var numericIdentifier = "0|[1-9]\\d*";
@@ -221,8 +221,7 @@ function satisfy(version, range) {
221
221
  }
222
222
  return true;
223
223
  }
224
- //#endregion
225
- //#region \0virtual:__federation_fn_import
224
+ // \0virtual:__federation_fn_import
226
225
  var moduleMap = {};
227
226
  var moduleCache = Object.create(null);
228
227
  async function importShared(name, shareScope = "default") {
@@ -257,5 +256,4 @@ function flattenModule(module, name) {
257
256
  moduleCache[name] = module;
258
257
  return module;
259
258
  }
260
- //#endregion
261
259
  export { getSharedFromRuntime as n, importShared as r, getSharedFromLocal as t };
@@ -1,71 +1,4 @@
1
- //#region \0vite/preload-helper.js
2
- var scriptRel = "modulepreload";
3
- var assetsURL = function(dep) {
4
- return "/" + dep;
5
- };
6
- var seen$1 = {};
7
- var __vitePreload = function preload(baseModule, deps, importerUrl) {
8
- let promise = Promise.resolve();
9
- if (deps && deps.length > 0) {
10
- const links = document.getElementsByTagName("link");
11
- const cspNonceMeta = document.querySelector("meta[property=csp-nonce]");
12
- const cspNonce = cspNonceMeta?.nonce || cspNonceMeta?.getAttribute("nonce");
13
- function allSettled(promises) {
14
- return Promise.all(promises.map((p) => Promise.resolve(p).then((value) => ({
15
- status: "fulfilled",
16
- value
17
- }), (reason) => ({
18
- status: "rejected",
19
- reason
20
- }))));
21
- }
22
- function importMetaResolve(specifier) {
23
- if (import.meta.resolve) return import.meta.resolve(specifier);
24
- return new URL(
25
- specifier,
26
- /** #__KEEP__ */
27
- import.meta.url
28
- ).href;
29
- }
30
- promise = allSettled(deps.map((dep) => {
31
- dep = assetsURL(dep, importerUrl);
32
- dep = importMetaResolve(dep);
33
- if (dep in seen$1) return;
34
- seen$1[dep] = true;
35
- const isCss = dep.endsWith(".css");
36
- for (let i = links.length - 1; i >= 0; i--) {
37
- const link = links[i];
38
- if (link.href === dep && (!isCss || link.rel === "stylesheet")) return;
39
- }
40
- const link = document.createElement("link");
41
- link.rel = isCss ? "stylesheet" : scriptRel;
42
- if (!isCss) link.as = "script";
43
- link.crossOrigin = "";
44
- link.href = dep;
45
- if (cspNonce) link.setAttribute("nonce", cspNonce);
46
- document.head.appendChild(link);
47
- if (isCss) return new Promise((res, rej) => {
48
- link.addEventListener("load", res);
49
- link.addEventListener("error", () => rej(/* @__PURE__ */ new Error(`Unable to preload CSS for ${dep}`)));
50
- });
51
- }));
52
- }
53
- function handlePreloadError(err) {
54
- const e = new Event("vite:preloadError", { cancelable: true });
55
- e.payload = err;
56
- window.dispatchEvent(e);
57
- if (!e.defaultPrevented) throw err;
58
- }
59
- return promise.then((res) => {
60
- for (const item of res || []) {
61
- if (item.status !== "rejected") continue;
62
- handlePreloadError(item.reason);
63
- }
64
- return baseModule().catch(handlePreloadError);
65
- });
66
- };
67
- //#endregion
68
- //#region \0virtual:__remoteEntryHelper__remoteEntry.js
1
+ // \0virtual:__remoteEntryHelper__remoteEntry.js
69
2
  var currentImports = {};
70
3
  var exportSet = /* @__PURE__ */ new Set([
71
4
  "Module",
@@ -75,7 +8,7 @@ var exportSet = /* @__PURE__ */ new Set([
75
8
  ]);
76
9
  var moduleMap = { "./plugin": () => {
77
10
  dynamicLoadingCss(["style.css"], false, "./plugin");
78
- return __federation_import("./__federation_expose_Plugin-AcefbZx2.js").then((module) => Object.keys(module).every((item) => exportSet.has(item)) ? () => module.default : () => module);
11
+ return __federation_import("./__federation_expose_Plugin-BhusgEmE.js").then((module) => Object.keys(module).every((item) => exportSet.has(item)) ? () => module.default : () => module);
79
12
  } };
80
13
  var seen = {};
81
14
  var dynamicLoadingCss = (cssFilePaths, dontAppendStylesToHead, exposeItemName) => {
@@ -118,7 +51,7 @@ var dynamicLoadingCss = (cssFilePaths, dontAppendStylesToHead, exposeItemName) =
118
51
  });
119
52
  };
120
53
  async function __federation_import(name) {
121
- currentImports[name] ??= __vitePreload(() => import(name), []);
54
+ currentImports[name] ??= import(name);
122
55
  return currentImports[name];
123
56
  }
124
57
  var get = (module) => {
@@ -136,5 +69,4 @@ var init = (shareScope) => {
136
69
  }
137
70
  });
138
71
  };
139
- //#endregion
140
72
  export { dynamicLoadingCss, get, init };
@@ -1,6 +1,6 @@
1
- /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
2
  @layer properties {
3
- @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
3
+ @supports (((-webkit-hyphens: none)) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
4
4
  *, :before, :after, ::backdrop {
5
5
  --tw-divide-y-reverse: 0;
6
6
  --tw-border-style: solid;
@@ -90,10 +90,6 @@
90
90
  flex-shrink: 0;
91
91
  }
92
92
 
93
- .mt\:cursor-pointer {
94
- cursor: pointer;
95
- }
96
-
97
93
  .mt\:list-disc {
98
94
  list-style-type: disc;
99
95
  }
@@ -233,49 +229,6 @@
233
229
  user-select: all;
234
230
  }
235
231
 
236
- .mt\:file\:mr-3::file-selector-button {
237
- margin-right: calc(var(--mt-spacing) * 3);
238
- }
239
-
240
- .mt\:file\:cursor-pointer::file-selector-button {
241
- cursor: pointer;
242
- }
243
-
244
- .mt\:file\:rounded-lg::file-selector-button {
245
- border-radius: calc(var(--radius) * 1);
246
- }
247
-
248
- .mt\:file\:border-0::file-selector-button {
249
- border-style: var(--tw-border-style);
250
- border-width: 0;
251
- }
252
-
253
- .mt\:file\:bg-default::file-selector-button {
254
- background-color: var(--default);
255
- }
256
-
257
- .mt\:file\:px-3::file-selector-button {
258
- padding-inline: calc(var(--mt-spacing) * 3);
259
- }
260
-
261
- .mt\:file\:py-1\.5::file-selector-button {
262
- padding-block: calc(var(--mt-spacing) * 1.5);
263
- }
264
-
265
- .mt\:file\:text-sm::file-selector-button {
266
- font-size: var(--mt-text-sm);
267
- line-height: var(--tw-leading, var(--mt-text-sm--line-height));
268
- }
269
-
270
- .mt\:file\:font-medium::file-selector-button {
271
- --tw-font-weight: var(--mt-font-weight-medium);
272
- font-weight: var(--mt-font-weight-medium);
273
- }
274
-
275
- .mt\:file\:text-foreground::file-selector-button {
276
- color: var(--foreground);
277
- }
278
-
279
232
  @media (min-width: 40rem) {
280
233
  .mt\:sm\:grid-cols-2 {
281
234
  grid-template-columns: repeat(2, minmax(0, 1fr));
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@attraccess/plugin-matter",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Official Attraccess integration for Matter devices. Connects to the Matter sidecar; no device features yet.",
5
- "license": "AGPL-3.0-only",
5
+ "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/Attraccess/Attraccess.git",
@@ -22,27 +22,29 @@
22
22
  "access": "public"
23
23
  },
24
24
  "peerDependencies": {
25
- "@attraccess/plugins-backend-sdk": "^1.9.0",
26
- "@attraccess/plugins-frontend-sdk": "^1.9.0",
27
- "@attraccess/plugins-frontend-ui": "^1.11.0-0"
25
+ "@attraccess/plugins-backend-sdk": "^2.0.0-0",
26
+ "@attraccess/plugins-frontend-sdk": "^2.0.0-0",
27
+ "@attraccess/plugins-frontend-ui": "^2.0.0-0"
28
28
  },
29
29
  "attraccess": {
30
30
  "displayName": "Matter",
31
31
  "description": "Matter device support for Attraccess. Secure connection to the Matter sidecar; device features follow.",
32
- "host": "^1.11.0-0",
32
+ "host": "^2.0.0-0",
33
33
  "backend": "dist/index.js",
34
34
  "frontend": "frontend/remoteEntry.js",
35
- "migrations": "dist/migrations.js",
36
35
  "styles": "frontend/style.css",
36
+ "dashboardPaths": [
37
+ "/matter"
38
+ ],
37
39
  "permissions": [
38
- "DATABASE_ACCESS",
40
+ "PLUGIN_STORAGE",
39
41
  "MANAGE_SECRETS"
40
42
  ],
41
43
  "sdk": {
42
- "backend": "^1.9.0",
43
- "frontend": "^1.9.0"
44
+ "backend": "^2.0.0-0",
45
+ "frontend": "^2.0.0-0"
44
46
  },
45
- "publishedCommit": "f1a7ce7d2895bbe85e0fc94088a045c7768200be"
47
+ "publishedCommit": "aba5a1a9b7e143c00bc771d59018684546f0f336"
46
48
  },
47
- "gitHead": "f1a7ce7d2895bbe85e0fc94088a045c7768200be"
49
+ "gitHead": "aba5a1a9b7e143c00bc771d59018684546f0f336"
48
50
  }
@@ -1,328 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // backend/migrations.ts
21
- var migrations_exports = {};
22
- __export(migrations_exports, {
23
- CreateMatterBackup1793900002000: () => CreateMatterBackup1793900002000,
24
- CreateMatterConnection1793900000000: () => CreateMatterConnection1793900000000,
25
- CreateMatterDeviceModel1793900001000: () => CreateMatterDeviceModel1793900001000
26
- });
27
- module.exports = __toCommonJS(migrations_exports);
28
-
29
- // backend/migrations/1793900000000-create-matter-connection.ts
30
- var CreateMatterConnection1793900000000 = class {
31
- constructor() {
32
- this.name = "CreateMatterConnection1793900000000";
33
- }
34
- async up(queryRunner) {
35
- await queryRunner.query(
36
- `CREATE TABLE IF NOT EXISTS "plugin_matter_connection" (
37
- "id" integer PRIMARY KEY NOT NULL,
38
- "url" varchar NOT NULL,
39
- "encrypted_credential" text NOT NULL,
40
- "ca_certificate" text,
41
- "credential_updated_at" varchar NOT NULL,
42
- "updated_at" varchar NOT NULL,
43
- "updated_by" integer,
44
- CONSTRAINT "CHK_plugin_matter_connection_singleton" CHECK ("id" = 1)
45
- )`
46
- );
47
- }
48
- async down(queryRunner) {
49
- await queryRunner.query(`DROP TABLE "plugin_matter_connection"`);
50
- }
51
- };
52
-
53
- // backend/migrations/1793900001000-create-matter-device-model.ts
54
- var CreateMatterDeviceModel1793900001000 = class {
55
- constructor() {
56
- this.name = "CreateMatterDeviceModel1793900001000";
57
- }
58
- async up(queryRunner) {
59
- await queryRunner.query(
60
- `CREATE TABLE "plugin_matter_fabrics" (
61
- "id" varchar PRIMARY KEY NOT NULL,
62
- "fabric_id" varchar NOT NULL,
63
- "label" varchar,
64
- "first_seen_at" varchar NOT NULL,
65
- "last_seen_at" varchar NOT NULL,
66
- "status" varchar NOT NULL,
67
- "retired_at" varchar,
68
- CONSTRAINT "CHK_plugin_matter_fabrics_status" CHECK ("status" IN ('active', 'absent'))
69
- )`
70
- );
71
- await queryRunner.query(
72
- `CREATE UNIQUE INDEX "UQ_plugin_matter_fabrics_live" ON "plugin_matter_fabrics" ("fabric_id") WHERE "retired_at" IS NULL`
73
- );
74
- await queryRunner.query(
75
- `CREATE TABLE "plugin_matter_nodes" (
76
- "id" varchar PRIMARY KEY NOT NULL,
77
- "fabric_ref" varchar NOT NULL,
78
- "node_id" varchar NOT NULL,
79
- "vendor_id" integer,
80
- "product_id" integer,
81
- "vendor_name" varchar,
82
- "product_name" varchar,
83
- "serial_number" varchar,
84
- "unique_id" varchar,
85
- "hardware_version" integer,
86
- "software_version" integer,
87
- "software_version_string" varchar,
88
- "attestation_status" varchar,
89
- "attestation_checked_at" varchar,
90
- "display_name" varchar(100),
91
- "description" varchar(500),
92
- "location" varchar(100),
93
- "lifecycle_state" varchar NOT NULL,
94
- "detached_reason" varchar,
95
- "reachable" boolean,
96
- "first_seen_at" varchar NOT NULL,
97
- "last_seen_at" varchar NOT NULL,
98
- "claimed_at" varchar,
99
- "claimed_by" integer,
100
- "detached_at" varchar,
101
- "archived_at" varchar,
102
- "archived_by" integer,
103
- "removed_at" varchar,
104
- "removed_by" integer,
105
- "removal_reason" varchar,
106
- "merged_into" varchar,
107
- "created_at" varchar NOT NULL,
108
- "updated_at" varchar NOT NULL,
109
- CONSTRAINT "CHK_plugin_matter_nodes_lifecycle" CHECK ("lifecycle_state" IN ('unclaimed', 'claimed', 'detached', 'archived', 'removed')),
110
- CONSTRAINT "CHK_plugin_matter_nodes_detached_reason" CHECK ("detached_reason" IS NULL OR "detached_reason" IN ('absent_from_sidecar', 'fabric_mismatch', 'fabric_absent')),
111
- CONSTRAINT "CHK_plugin_matter_nodes_removal_reason" CHECK ("removal_reason" IS NULL OR "removal_reason" IN ('force_removed', 'merged', 'replaced')),
112
- CONSTRAINT "CHK_plugin_matter_nodes_attestation" CHECK ("attestation_status" IS NULL OR "attestation_status" IN ('verified', 'unverified', 'failed', 'unknown'))
113
- )`
114
- );
115
- await queryRunner.query(
116
- `CREATE UNIQUE INDEX "UQ_plugin_matter_nodes_live_identity" ON "plugin_matter_nodes" ("fabric_ref", "node_id") WHERE "removed_at" IS NULL`
117
- );
118
- await queryRunner.query(
119
- `CREATE INDEX "IDX_plugin_matter_nodes_lifecycle" ON "plugin_matter_nodes" ("lifecycle_state")`
120
- );
121
- await queryRunner.query(
122
- `CREATE TABLE "plugin_matter_endpoints" (
123
- "id" varchar PRIMARY KEY NOT NULL,
124
- "node_ref" varchar NOT NULL,
125
- "endpoint_id" integer NOT NULL,
126
- "parent_endpoint_id" integer,
127
- "device_types" text NOT NULL,
128
- "profile" varchar NOT NULL,
129
- "display_name" varchar(100),
130
- "description" varchar(500),
131
- "location" varchar(100),
132
- "bridged" boolean,
133
- "bridged_unique_id" varchar,
134
- "bridged_node_label" varchar,
135
- "bridged_vendor_name" varchar,
136
- "bridged_product_name" varchar,
137
- "bridged_serial_number" varchar,
138
- "bridged_reachable" boolean,
139
- "first_seen_at" varchar NOT NULL,
140
- "last_seen_at" varchar NOT NULL,
141
- "removed_at" varchar,
142
- "removal_reason" varchar,
143
- CONSTRAINT "CHK_plugin_matter_endpoints_range" CHECK ("endpoint_id" BETWEEN 0 AND 65534),
144
- CONSTRAINT "CHK_plugin_matter_endpoints_removal_reason" CHECK ("removal_reason" IS NULL OR "removal_reason" IN ('absent_from_sidecar', 'replaced', 'force_removed', 'merged'))
145
- )`
146
- );
147
- await queryRunner.query(
148
- `CREATE UNIQUE INDEX "UQ_plugin_matter_endpoints_live" ON "plugin_matter_endpoints" ("node_ref", "endpoint_id") WHERE "removed_at" IS NULL`
149
- );
150
- await queryRunner.query(
151
- `CREATE TABLE "plugin_matter_endpoint_clusters" (
152
- "id" varchar PRIMARY KEY NOT NULL,
153
- "endpoint_ref" varchar NOT NULL,
154
- "cluster_id" integer NOT NULL,
155
- "role" varchar NOT NULL,
156
- "revision" integer,
157
- "feature_map" integer,
158
- "attribute_ids" text NOT NULL,
159
- "accepted_command_ids" text NOT NULL,
160
- "removed_at" varchar,
161
- CONSTRAINT "CHK_plugin_matter_endpoint_clusters_role" CHECK ("role" IN ('server', 'client'))
162
- )`
163
- );
164
- await queryRunner.query(
165
- `CREATE UNIQUE INDEX "UQ_plugin_matter_endpoint_clusters_live" ON "plugin_matter_endpoint_clusters" ("endpoint_ref", "cluster_id", "role") WHERE "removed_at" IS NULL`
166
- );
167
- await queryRunner.query(
168
- `CREATE TABLE "plugin_matter_endpoint_capabilities" (
169
- "id" varchar PRIMARY KEY NOT NULL,
170
- "endpoint_ref" varchar NOT NULL,
171
- "capability" varchar NOT NULL,
172
- "source_cluster_id" integer NOT NULL,
173
- "details" text NOT NULL
174
- )`
175
- );
176
- await queryRunner.query(
177
- `CREATE UNIQUE INDEX "UQ_plugin_matter_endpoint_capabilities" ON "plugin_matter_endpoint_capabilities" ("endpoint_ref", "capability")`
178
- );
179
- await queryRunner.query(
180
- `CREATE TABLE "plugin_matter_endpoint_state" (
181
- "id" varchar PRIMARY KEY NOT NULL,
182
- "endpoint_ref" varchar NOT NULL,
183
- "state_key" varchar NOT NULL,
184
- "reported_value" text,
185
- "reported_at" varchar,
186
- "received_at" varchar,
187
- "source" varchar,
188
- "quality" varchar,
189
- "stale_after_ms" integer NOT NULL DEFAULT 600000,
190
- "requested_value" text,
191
- "requested_at" varchar,
192
- "requested_by" integer,
193
- "request_id" varchar,
194
- "correlation_id" varchar,
195
- "command_state" varchar NOT NULL DEFAULT 'none',
196
- "accepted_at" varchar,
197
- "command_reported_at" varchar,
198
- "external_change_at" varchar,
199
- "external_change_value" text,
200
- "fault_code" varchar,
201
- "fault_message" varchar,
202
- "fault_at" varchar,
203
- "updated_at" varchar NOT NULL,
204
- CONSTRAINT "CHK_plugin_matter_endpoint_state_command" CHECK ("command_state" IN ('none', 'requested', 'accepted', 'reported', 'uncertain', 'failed')),
205
- CONSTRAINT "CHK_plugin_matter_endpoint_state_quality" CHECK ("quality" IS NULL OR "quality" IN ('good', 'uncertain', 'fault', 'unavailable')),
206
- CONSTRAINT "CHK_plugin_matter_endpoint_state_source" CHECK ("source" IS NULL OR "source" IN ('subscription_report', 'read', 'command_response'))
207
- )`
208
- );
209
- await queryRunner.query(
210
- `CREATE UNIQUE INDEX "UQ_plugin_matter_endpoint_state_key" ON "plugin_matter_endpoint_state" ("endpoint_ref", "state_key")`
211
- );
212
- await queryRunner.query(
213
- `CREATE TABLE "plugin_matter_commands" (
214
- "request_id" varchar PRIMARY KEY NOT NULL,
215
- "endpoint_ref" varchar NOT NULL,
216
- "cluster_id" integer NOT NULL,
217
- "command_id" integer NOT NULL,
218
- "state_key" varchar,
219
- "requested_at" varchar NOT NULL,
220
- "requested_by" integer,
221
- "correlation_id" varchar,
222
- "outcome" varchar NOT NULL,
223
- "accepted_at" varchar,
224
- "reported_at" varchar,
225
- "failure_code" varchar,
226
- CONSTRAINT "CHK_plugin_matter_commands_outcome" CHECK ("outcome" IN ('requested', 'accepted', 'reported', 'uncertain', 'failed'))
227
- )`
228
- );
229
- await queryRunner.query(
230
- `CREATE INDEX "IDX_plugin_matter_commands_requested_at" ON "plugin_matter_commands" ("requested_at", "request_id")`
231
- );
232
- await queryRunner.query(
233
- `CREATE TABLE "plugin_matter_reconciliation_status" (
234
- "id" integer PRIMARY KEY NOT NULL,
235
- "last_started_at" varchar,
236
- "last_finished_at" varchar,
237
- "last_result" varchar,
238
- "last_summary" text,
239
- "sidecar_fabric_id" varchar,
240
- CONSTRAINT "CHK_plugin_matter_reconciliation_status_singleton" CHECK ("id" = 1),
241
- CONSTRAINT "CHK_plugin_matter_reconciliation_status_result" CHECK ("last_result" IS NULL OR "last_result" IN ('applied', 'skipped_unavailable', 'skipped_non_authoritative', 'failed'))
242
- )`
243
- );
244
- }
245
- async down(queryRunner) {
246
- await queryRunner.query(`DROP TABLE "plugin_matter_reconciliation_status"`);
247
- await queryRunner.query(`DROP TABLE "plugin_matter_commands"`);
248
- await queryRunner.query(`DROP TABLE "plugin_matter_endpoint_state"`);
249
- await queryRunner.query(`DROP TABLE "plugin_matter_endpoint_capabilities"`);
250
- await queryRunner.query(`DROP TABLE "plugin_matter_endpoint_clusters"`);
251
- await queryRunner.query(`DROP TABLE "plugin_matter_endpoints"`);
252
- await queryRunner.query(`DROP TABLE "plugin_matter_nodes"`);
253
- await queryRunner.query(`DROP TABLE "plugin_matter_fabrics"`);
254
- }
255
- };
256
-
257
- // backend/migrations/1793900002000-create-matter-backup.ts
258
- var CreateMatterBackup1793900002000 = class {
259
- constructor() {
260
- this.name = "CreateMatterBackup1793900002000";
261
- }
262
- async up(queryRunner) {
263
- await queryRunner.query(`ALTER TABLE "plugin_matter_fabrics" ADD COLUMN "fabric_generation" integer`);
264
- await queryRunner.query(`ALTER TABLE "plugin_matter_fabrics" ADD COLUMN "storage_instance_id" varchar`);
265
- await queryRunner.query(`ALTER TABLE "plugin_matter_fabrics" ADD COLUMN "root_cert_fingerprint" varchar`);
266
- await queryRunner.query(`ALTER TABLE "plugin_matter_fabrics" ADD COLUMN "recorded_at" varchar`);
267
- await queryRunner.query(
268
- `CREATE TABLE "plugin_matter_recovery_keys" (
269
- "id" varchar PRIMARY KEY NOT NULL,
270
- "key_id" varchar NOT NULL,
271
- "encrypted_key" text NOT NULL,
272
- "created_at" varchar NOT NULL,
273
- "acknowledged_at" varchar,
274
- "retired_at" varchar
275
- )`
276
- );
277
- await queryRunner.query(
278
- `CREATE UNIQUE INDEX "UQ_plugin_matter_recovery_keys_current" ON "plugin_matter_recovery_keys" ((1)) WHERE "retired_at" IS NULL`
279
- );
280
- await queryRunner.query(
281
- `CREATE UNIQUE INDEX "UQ_plugin_matter_recovery_keys_key_id" ON "plugin_matter_recovery_keys" ("key_id")`
282
- );
283
- await queryRunner.query(
284
- `CREATE TABLE "plugin_matter_backups" (
285
- "id" varchar PRIMARY KEY NOT NULL,
286
- "created_at" varchar NOT NULL,
287
- "trigger" varchar NOT NULL,
288
- "actor" integer,
289
- "outcome" varchar NOT NULL,
290
- "reason" varchar,
291
- "size_bytes" integer,
292
- "sha256" varchar,
293
- "format_version" integer,
294
- "plugin_version" varchar,
295
- "sidecar_version" varchar,
296
- "matter_js_version" varchar,
297
- "storage_schema_version" integer,
298
- "plugin_migration" varchar,
299
- "fabric_id" varchar,
300
- "root_cert_fingerprint" varchar,
301
- "fabric_generation" integer,
302
- "storage_instance_id" varchar,
303
- "recovery_key_id" varchar,
304
- "consistent" boolean,
305
- "blob" blob,
306
- CONSTRAINT "CHK_plugin_matter_backups_outcome" CHECK ("outcome" IN ('succeeded', 'failed')),
307
- CONSTRAINT "CHK_plugin_matter_backups_trigger" CHECK ("trigger" IN ('manual', 'fabric_created', 'restore', 'daily', 'fabric_changed', 'pre_restore'))
308
- )`
309
- );
310
- await queryRunner.query(
311
- `CREATE INDEX "IDX_plugin_matter_backups_created_at" ON "plugin_matter_backups" ("created_at")`
312
- );
313
- }
314
- async down(queryRunner) {
315
- await queryRunner.query(`DROP TABLE "plugin_matter_backups"`);
316
- await queryRunner.query(`DROP TABLE "plugin_matter_recovery_keys"`);
317
- await queryRunner.query(`ALTER TABLE "plugin_matter_fabrics" DROP COLUMN "recorded_at"`);
318
- await queryRunner.query(`ALTER TABLE "plugin_matter_fabrics" DROP COLUMN "root_cert_fingerprint"`);
319
- await queryRunner.query(`ALTER TABLE "plugin_matter_fabrics" DROP COLUMN "storage_instance_id"`);
320
- await queryRunner.query(`ALTER TABLE "plugin_matter_fabrics" DROP COLUMN "fabric_generation"`);
321
- }
322
- };
323
- // Annotate the CommonJS export names for ESM import in node:
324
- 0 && (module.exports = {
325
- CreateMatterBackup1793900002000,
326
- CreateMatterConnection1793900000000,
327
- CreateMatterDeviceModel1793900001000
328
- });
@@ -1,2 +0,0 @@
1
- import { n as getSharedFromRuntime, r as importShared, t as getSharedFromLocal } from "./_virtual___federation_fn_import-BXODRNto.js";
2
- export { importShared, getSharedFromLocal as importSharedLocal, getSharedFromRuntime as importSharedRuntime };