From 275b3948d2ee5a9efa18639718274c621e88b063 Mon Sep 17 00:00:00 2001 From: Zoe Codez Date: Wed, 12 Jun 2024 23:16:21 -0500 Subject: [PATCH 1/4] bumps --- package-lock.json | 43 ++++++++++++++++++++++++++++++++----------- package.json | 4 ++-- src/mock/generator.ts | 2 ++ src/synapse.module.ts | 7 ++----- 4 files changed, 38 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8902a75..ed8503a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "@digital-alchemy/synapse", - "version": "0.3.7", + "version": "0.3.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@digital-alchemy/synapse", - "version": "0.3.7", + "version": "0.3.8", "license": "MIT", "dependencies": { - "@digital-alchemy/core": "^0.3.17", + "@digital-alchemy/core": "^24.6.1", "@digital-alchemy/fastify-extension": "^0.3.3", - "@digital-alchemy/hass": "^0.3.31", + "@digital-alchemy/hass": "^24.6.2", "bonjour": "^3.5.0", "dayjs": "^1.11.11" }, @@ -1107,9 +1107,9 @@ } }, "node_modules/@digital-alchemy/core": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@digital-alchemy/core/-/core-0.3.17.tgz", - "integrity": "sha512-GjWigpJ5v8I78jn+w6GFGeH4KrBblBW1PZ2FBj96KKCPTc+ipPFWLkTeyHXD/61xesgGfVNfD8xHnU4WqQfHJg==", + "version": "24.6.1", + "resolved": "https://registry.npmjs.org/@digital-alchemy/core/-/core-24.6.1.tgz", + "integrity": "sha512-Lb2A5UmFBZb/13dViJiBrLQ1pSq+uw4I+ftlKyIyjTBO41SCLLNyg9iUWEzW+ioTPllE8o8c4O74ZBSpqtBcxg==", "dependencies": { "chalk": "^5.3.0", "dayjs": "^1.11.10", @@ -1144,12 +1144,33 @@ "node": ">=20" } }, + "node_modules/@digital-alchemy/fastify-extension/node_modules/@digital-alchemy/core": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@digital-alchemy/core/-/core-0.3.18.tgz", + "integrity": "sha512-70CIaG8+v1l9cW5tDrgIVxLlDYditGmjkWlSlgz9UtbNlOYuGxDLG1dXTNJ/6vH48n1tcl080E4xeDJ4fyG30w==", + "dependencies": { + "chalk": "^5.3.0", + "dayjs": "^1.11.10", + "ini": "^4.1.2", + "js-yaml": "^4.1.0", + "minimist": "^1.2.8", + "node-cache": "^5.1.2", + "node-cron": "^3.0.3", + "prom-client": "^15.1.0" + }, + "engines": { + "node": ">=20" + }, + "optionalDependencies": { + "redis": "^4.6.13" + } + }, "node_modules/@digital-alchemy/hass": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@digital-alchemy/hass/-/hass-0.3.31.tgz", - "integrity": "sha512-vRTiFTAUeuHrYucK0OIu4onYGuYLoMj70kZPFDjRbWxsXhZA2jf++8X99ULnkd8e+JEj12kyRg3f4dTVDBF6Jw==", + "version": "24.6.2", + "resolved": "https://registry.npmjs.org/@digital-alchemy/hass/-/hass-24.6.2.tgz", + "integrity": "sha512-meT5mNiZpWa87ezh7M/3W7kgxrnSctyeJDrcpCe25ZeJlmqRimcSGoOyr+CYuuiG2g8MhIhPVqxaw2Yt9jwY1A==", "dependencies": { - "@digital-alchemy/core": "^0.3.15", + "@digital-alchemy/core": "^24.6.1", "dayjs": "^1.11.11", "prom-client": "^15.1.2", "ws": "^8.17.0" diff --git a/package.json b/package.json index 53a72d6..b8c165a 100644 --- a/package.json +++ b/package.json @@ -25,9 +25,9 @@ }, "license": "MIT", "dependencies": { - "@digital-alchemy/core": "^0.3.17", + "@digital-alchemy/core": "^24.6.1", "@digital-alchemy/fastify-extension": "^0.3.3", - "@digital-alchemy/hass": "^0.3.31", + "@digital-alchemy/hass": "^24.6.2", "bonjour": "^3.5.0", "dayjs": "^1.11.11" }, diff --git a/src/mock/generator.ts b/src/mock/generator.ts index 94dd03c..f26bfb3 100644 --- a/src/mock/generator.ts +++ b/src/mock/generator.ts @@ -19,9 +19,11 @@ export function EntityGenerator({ scheduler, synapse, context, logger }: TServic suggested_object_id: "magic_the_sensor", unit_of_measurement: "ft/s", }); + sensor.onUpdate(() => { // }); + const binary_sensor = synapse.binary_sensor({ context, device_class: "window", diff --git a/src/synapse.module.ts b/src/synapse.module.ts index 7fc4761..3519ae8 100644 --- a/src/synapse.module.ts +++ b/src/synapse.module.ts @@ -95,11 +95,7 @@ export const LIB_SYNAPSE = CreateLibrary({ type: "number", }, METADATA: { - description: [ - "A string to uniquely identify this application", - "Should be unique within home assistant, such as a uuid", - "Default value calculated from hostname + username + app_name", - ], + description: "Extra data to describe the app + build default device from", type: "internal", } as InternalConfig, METADATA_HOST: { @@ -120,6 +116,7 @@ export const LIB_SYNAPSE = CreateLibrary({ }, PUBLISH_BONJOUR: { default: true, + description: "Publish mDNS discovery topics to allow zeroconf discovery", type: "boolean", }, }, From 2d007a0cd3d803267ca194823e805ff41fbce225 Mon Sep 17 00:00:00 2001 From: Zoe Codez Date: Wed, 12 Jun 2024 23:20:45 -0500 Subject: [PATCH 2/4] bumps --- package-lock.json | 33 ++++++--------------------------- package.json | 2 +- 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index ed8503a..45c8edb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@digital-alchemy/core": "^24.6.1", - "@digital-alchemy/fastify-extension": "^0.3.3", + "@digital-alchemy/fastify-extension": "^24.6.1", "@digital-alchemy/hass": "^24.6.2", "bonjour": "^3.5.0", "dayjs": "^1.11.11" @@ -1128,43 +1128,22 @@ } }, "node_modules/@digital-alchemy/fastify-extension": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@digital-alchemy/fastify-extension/-/fastify-extension-0.3.3.tgz", - "integrity": "sha512-aVw+TIAPnYqmsmyDz4P2hk2pGUWW+UUisj6JlWuOf10Y5QWO+sJXnjuf4JJrnpDIXU5N6otrhXbRVW24QMvuMg==", + "version": "24.6.1", + "resolved": "https://registry.npmjs.org/@digital-alchemy/fastify-extension/-/fastify-extension-24.6.1.tgz", + "integrity": "sha512-FkKezM3jZWS1nFdhGE33zo/4Jle6cXS3bW8k3JvhUnwfO/KWUo1cTOJcderlLyXa0Wyf4Qnr3mmMI+HG3+eWAw==", "dependencies": { - "@digital-alchemy/core": "^0.3.8", + "@digital-alchemy/core": "^24.6.1", "@fastify/auth": "^4.6.1", "@fastify/basic-auth": "^5.1.1", "@fastify/jwt": "^8.0.0", "dayjs": "^1.11.10", "fastify": "^4.26.2", - "prom-client": "^15.1.0" + "prom-client": "^15.1.1" }, "engines": { "node": ">=20" } }, - "node_modules/@digital-alchemy/fastify-extension/node_modules/@digital-alchemy/core": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@digital-alchemy/core/-/core-0.3.18.tgz", - "integrity": "sha512-70CIaG8+v1l9cW5tDrgIVxLlDYditGmjkWlSlgz9UtbNlOYuGxDLG1dXTNJ/6vH48n1tcl080E4xeDJ4fyG30w==", - "dependencies": { - "chalk": "^5.3.0", - "dayjs": "^1.11.10", - "ini": "^4.1.2", - "js-yaml": "^4.1.0", - "minimist": "^1.2.8", - "node-cache": "^5.1.2", - "node-cron": "^3.0.3", - "prom-client": "^15.1.0" - }, - "engines": { - "node": ">=20" - }, - "optionalDependencies": { - "redis": "^4.6.13" - } - }, "node_modules/@digital-alchemy/hass": { "version": "24.6.2", "resolved": "https://registry.npmjs.org/@digital-alchemy/hass/-/hass-24.6.2.tgz", diff --git a/package.json b/package.json index b8c165a..e1e28bd 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "license": "MIT", "dependencies": { "@digital-alchemy/core": "^24.6.1", - "@digital-alchemy/fastify-extension": "^0.3.3", + "@digital-alchemy/fastify-extension": "^24.6.1", "@digital-alchemy/hass": "^24.6.2", "bonjour": "^3.5.0", "dayjs": "^1.11.11" From c3acd190250c62913ae6a7350b030f5c1be44855 Mon Sep 17 00:00:00 2001 From: Zoe Codez Date: Wed, 12 Jun 2024 23:21:16 -0500 Subject: [PATCH 3/4] bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e1e28bd..0ab8669 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@digital-alchemy/synapse", "repository": "https://github.com/Digital-Alchemy-TS/synapse", "homepage": "https://docs.digital-alchemy.app/Synapse", - "version": "0.3.8", + "version": "24.06.1", "scripts": { "build": "rm -rf dist; tsc", "test": "./scripts/test.sh", From 7308596c238a82e93dba01de196ee0ab4f1d06a4 Mon Sep 17 00:00:00 2001 From: Zoe Codez Date: Wed, 12 Jun 2024 23:21:57 -0500 Subject: [PATCH 4/4] readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d1f626c..89202ad 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Welcome to `@digital-alchemy/synapse`! This project builds on the functions provided by `@digital-alchemy/hass` to provide the ability to generate entities within your Home Assistant install. With the help of a [custom component](https://github.com/Digital-Alchemy-TS/synapse-extension), you can gate logic behind switches, report states with sensors, attach functions to buttons, and more! -- [Extended docs](https://docs.digital-alchemy.app/Synapse) +- [Extended docs](https://docs.digital-alchemy.app) - [Discord](https://discord.gg/JkZ35Gv97Y) ## 💾 Install @@ -21,10 +21,11 @@ Then add to your application / library ```typescript import { LIB_SYNAPSE } from "@digital-alchemy/synapse"; import { LIB_HASS } from "@digital-alchemy/hass"; +import { LIB_FASTIFY } from "@digital-alchemy/fastify-extension"; // application const MY_APP = CreateApplication({ - libraries: [LIB_SYNAPSE, LIB_HASS], + libraries: [LIB_SYNAPSE, LIB_HASS, LIB_FASTIFY], name: "home_automation", })