@digital-alchemy/hass 0.3.7 → 0.3.9

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  This repository contains generic extensions for interacting with Home Assistant, including websocket & REST API adapters, entity & event management, backup workflows, and more.
4
4
 
5
5
  - Extended docs: https://docs.digital-alchemy.app/Hass
6
- - [Discord](https://discord.com/invite/mtWHk36upW)
6
+ - [Discord](https://discord.gg/JkZ35Gv97Y)
7
7
 
8
8
  ## ⭐ Features
9
9
  ### 📝 First-class Editor Experiences
@@ -38,9 +38,9 @@ export declare function WebsocketAPI({ context, event, hass, config, internal, l
38
38
  * Applications probably want a higher level function than this
39
39
  */
40
40
  sendMessage: <RESPONSE_VALUE extends unknown = unknown>(data: {
41
- [key: string]: unknown;
42
41
  type: `${HASSIO_WS_COMMAND}`;
43
42
  id?: number;
43
+ [key: string]: unknown;
44
44
  }, waitForResponse?: boolean, subscription?: () => void) => Promise<RESPONSE_VALUE>;
45
45
  /**
46
46
  * remove the current socket connection to home assistant
package/dist/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from "./dynamic";
2
2
  export * from "./extensions";
3
3
  export * from "./hass.module";
4
4
  export * from "./helpers";
5
+ export * from "./quickboot.module";
package/dist/index.js CHANGED
@@ -5,4 +5,5 @@ tslib_1.__exportStar(require("./dynamic"), exports);
5
5
  tslib_1.__exportStar(require("./extensions"), exports);
6
6
  tslib_1.__exportStar(require("./hass.module"), exports);
7
7
  tslib_1.__exportStar(require("./helpers"), exports);
8
+ tslib_1.__exportStar(require("./quickboot.module"), exports);
8
9
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,uDAA6B;AAC7B,wDAA8B;AAC9B,oDAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,uDAA6B;AAC7B,wDAA8B;AAC9B,oDAA0B;AAC1B,6DAAmC"}
@@ -0,0 +1,6 @@
1
+ import { TServiceParams } from "@digital-alchemy/core";
2
+ /**
3
+ * Use from the node command line to probe apis
4
+ * Not for normal application usage
5
+ */
6
+ export declare function QuickBoot(name: string): Promise<TServiceParams>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QuickBoot = void 0;
4
+ const core_1 = require("@digital-alchemy/core");
5
+ const _1 = require(".");
6
+ /**
7
+ * Use from the node command line to probe apis
8
+ * Not for normal application usage
9
+ */
10
+ async function QuickBoot(name) {
11
+ let out;
12
+ const app = (0, core_1.CreateApplication)({
13
+ libraries: [_1.LIB_HASS],
14
+ // @ts-expect-error fake app, name used for loading credentials
15
+ name,
16
+ services: {
17
+ Loader(params) {
18
+ out = params;
19
+ },
20
+ },
21
+ });
22
+ await app.bootstrap();
23
+ return out;
24
+ }
25
+ exports.QuickBoot = QuickBoot;
26
+ //# sourceMappingURL=quickboot.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quickboot.module.js","sourceRoot":"","sources":["../src/quickboot.module.ts"],"names":[],"mappings":";;;AAAA,gDAA0E;AAE1E,wBAA6B;AAE7B;;;GAGG;AACI,KAAK,UAAU,SAAS,CAAC,IAAY;IAC1C,IAAI,GAAmB,CAAC;IACxB,MAAM,GAAG,GAAG,IAAA,wBAAiB,EAAC;QAC5B,SAAS,EAAE,CAAC,WAAQ,CAAC;QACrB,+DAA+D;QAC/D,IAAI;QACJ,QAAQ,EAAE;YACR,MAAM,CAAC,MAAsB;gBAC3B,GAAG,GAAG,MAAM,CAAC;YACf,CAAC;SACF;KACF,CAAC,CAAC;IACH,MAAM,GAAG,CAAC,SAAS,EAAE,CAAC;IACtB,OAAO,GAAG,CAAC;AACb,CAAC;AAdD,8BAcC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@digital-alchemy/hass",
3
3
  "repository": "https://github.com/Digital-Alchemy-TS/hass",
4
4
  "homepage": "https://docs.digital-alchemy.app/Hass",
5
- "version": "0.3.7",
5
+ "version": "0.3.9",
6
6
  "scripts": {
7
7
  "build": "rm -rf dist/; tsc",
8
8
  "lint": "eslint src",
@@ -25,41 +25,41 @@
25
25
  },
26
26
  "license": "MIT",
27
27
  "dependencies": {
28
- "@digital-alchemy/core": "^0.3.8",
28
+ "@digital-alchemy/core": "^0.3.11",
29
29
  "dayjs": "^1.11.10",
30
- "prom-client": "^15.1.0",
30
+ "prom-client": "^15.1.1",
31
31
  "ws": "^8.16.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@cspell/eslint-plugin": "^8.6.1",
34
+ "@cspell/eslint-plugin": "^8.7.0",
35
35
  "@types/figlet": "^1.5.8",
36
36
  "@types/jest": "^29.5.12",
37
37
  "@types/js-yaml": "^4.0.9",
38
38
  "@types/minimist": "^1.2.5",
39
39
  "@types/mute-stream": "^0.0.4",
40
- "@types/node": "^20.11.30",
40
+ "@types/node": "^20.12.7",
41
41
  "@types/uuid": "^9.0.8",
42
42
  "@types/ws": "^8.5.10",
43
- "@typescript-eslint/eslint-plugin": "7.3.1",
44
- "@typescript-eslint/parser": "7.3.1",
43
+ "@typescript-eslint/eslint-plugin": "7.6.0",
44
+ "@typescript-eslint/parser": "7.6.0",
45
45
  "eslint": "8.57.0",
46
46
  "eslint-config-prettier": "9.1.0",
47
47
  "eslint-plugin-import": "^2.29.1",
48
- "eslint-plugin-jsonc": "^2.14.1",
48
+ "eslint-plugin-jsonc": "^2.15.1",
49
49
  "eslint-plugin-no-unsanitized": "^4.0.2",
50
50
  "eslint-plugin-prettier": "^5.1.3",
51
- "eslint-plugin-security": "^2.1.1",
52
- "eslint-plugin-simple-import-sort": "^12.0.0",
53
- "eslint-plugin-sonarjs": "^0.24.0",
51
+ "eslint-plugin-security": "^3.0.0",
52
+ "eslint-plugin-simple-import-sort": "^12.1.0",
53
+ "eslint-plugin-sonarjs": "^0.25.1",
54
54
  "eslint-plugin-sort-keys-fix": "^1.1.2",
55
- "eslint-plugin-unicorn": "^51.0.1",
55
+ "eslint-plugin-unicorn": "^52.0.0",
56
56
  "jest": "^29.7.0",
57
57
  "jest-environment-node": "^29.7.0",
58
58
  "npm-check-updates": "^16.14.18",
59
59
  "prettier": "^3.2.5",
60
60
  "ts-jest": "^29.1.2",
61
- "tsx": "^4.7.1",
62
- "type-fest": "^4.14.0",
63
- "typescript": "^5.4.3"
61
+ "tsx": "^4.7.2",
62
+ "type-fest": "^4.15.0",
63
+ "typescript": "^5.4.5"
64
64
  }
65
65
  }