@attraccess/plugin-shelly 0.1.0 → 0.2.0-nightly.1197.2

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-CLiHEWPT.js").then((module) => Object.keys(module).every((item) => exportSet.has(item)) ? () => module.default : () => module);
11
+ return __federation_import("./__federation_expose_Plugin-BlvPZQ52.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-border-style: solid;
6
6
  --tw-font-weight: initial;
@@ -31,10 +31,6 @@
31
31
  margin-top: var(--sh-spacing);
32
32
  }
33
33
 
34
- .sh\:mr-2 {
35
- margin-right: calc(var(--sh-spacing) * 2);
36
- }
37
-
38
34
  .sh\:block {
39
35
  display: block;
40
36
  }
@@ -51,10 +47,6 @@
51
47
  display: none;
52
48
  }
53
49
 
54
- .sh\:inline {
55
- display: inline;
56
- }
57
-
58
50
  .sh\:h-4 {
59
51
  height: calc(var(--sh-spacing) * 4);
60
52
  }
@@ -119,10 +111,6 @@
119
111
  flex-direction: column;
120
112
  }
121
113
 
122
- .sh\:flex-row {
123
- flex-direction: row;
124
- }
125
-
126
114
  .sh\:flex-wrap {
127
115
  flex-wrap: wrap;
128
116
  }
@@ -250,10 +238,6 @@
250
238
  padding-bottom: calc(var(--sh-spacing) * 6);
251
239
  }
252
240
 
253
- .sh\:text-end {
254
- text-align: end;
255
- }
256
-
257
241
  .sh\:text-lg {
258
242
  font-size: var(--sh-text-lg);
259
243
  line-height: var(--tw-leading, var(--sh-text-lg--line-height));
@@ -292,10 +276,6 @@
292
276
  color: var(--accent-soft-foreground);
293
277
  }
294
278
 
295
- .sh\:text-danger {
296
- color: var(--danger);
297
- }
298
-
299
279
  .sh\:text-foreground {
300
280
  color: var(--foreground);
301
281
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@attraccess/plugin-shelly",
3
- "version": "0.1.0",
3
+ "version": "0.2.0-nightly.1197.2",
4
4
  "description": "Official Attraccess integration for Shelly devices.",
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,26 +22,28 @@
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": "Shelly",
31
31
  "description": "Control and monitor Shelly devices from Attraccess.",
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
+ "/shelly"
38
+ ],
37
39
  "permissions": [
38
- "DATABASE_ACCESS"
40
+ "PLUGIN_STORAGE"
39
41
  ],
40
42
  "sdk": {
41
- "backend": "^1.9.0",
42
- "frontend": "^1.9.0"
43
+ "backend": "^2.0.0-0",
44
+ "frontend": "^2.0.0-0"
43
45
  },
44
- "publishedCommit": "f1a7ce7d2895bbe85e0fc94088a045c7768200be"
46
+ "publishedCommit": "2080d34f3b92ed143ac355d5928ec9ec1e0d1cdd"
45
47
  },
46
- "gitHead": "f1a7ce7d2895bbe85e0fc94088a045c7768200be"
48
+ "gitHead": "2080d34f3b92ed143ac355d5928ec9ec1e0d1cdd"
47
49
  }
@@ -1,57 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
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
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
20
-
21
- // backend/migrations.ts
22
- var migrations_exports = {};
23
- __export(migrations_exports, {
24
- CreateShellyDevices1749470400000: () => CreateShellyDevices1749470400000
25
- });
26
- module.exports = __toCommonJS(migrations_exports);
27
-
28
- // backend/migrations/1749470400000-create-shelly-devices.ts
29
- var CreateShellyDevices1749470400000 = class {
30
- constructor() {
31
- __publicField(this, "name", "CreateShellyDevices1749470400000");
32
- }
33
- async up(queryRunner) {
34
- await queryRunner.query(
35
- `CREATE TABLE IF NOT EXISTS "plugin_shelly_devices" (
36
- "id" integer PRIMARY KEY AUTOINCREMENT NOT NULL,
37
- "name" varchar NOT NULL,
38
- "ip_address" varchar NOT NULL,
39
- "generation" integer,
40
- "model" varchar,
41
- "auth_state" varchar NOT NULL DEFAULT ('unknown'),
42
- "last_probe_at" varchar,
43
- "last_probe_error" varchar,
44
- "created_at" varchar NOT NULL,
45
- "updated_at" varchar NOT NULL,
46
- CONSTRAINT "UQ_plugin_shelly_devices_ip_address" UNIQUE ("ip_address")
47
- )`
48
- );
49
- }
50
- async down(queryRunner) {
51
- await queryRunner.query(`DROP TABLE "plugin_shelly_devices"`);
52
- }
53
- };
54
- // Annotate the CommonJS export names for ESM import in node:
55
- 0 && (module.exports = {
56
- CreateShellyDevices1749470400000
57
- });
@@ -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 };