@kohost/api-client 0.6.4 → 0.6.5-alpha.3
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/dist/bundle.js +1 -1
- package/dist/bundle.node.js +1898 -0
- package/package.json +17 -9
- package/src/client.js +5 -2
- package/src/methods/Group.js +1 -0
- package/webpack.config.js +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kohost/api-client",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5-alpha.3",
|
|
4
4
|
"description": "HTTP client to interact with Kohost APIs",
|
|
5
5
|
"main": "dist/bundle.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,19 +23,27 @@
|
|
|
23
23
|
"author": "Ian Rogers",
|
|
24
24
|
"license": "ISC",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
26
|
+
"assert": "^2.0.0",
|
|
27
|
+
"axios": "^0.24.0",
|
|
28
|
+
"browserify-zlib": "^0.2.0",
|
|
29
|
+
"clean-webpack-plugin": "^4.0.0",
|
|
30
|
+
"https-browserify": "^1.0.0",
|
|
31
|
+
"lodash": "^4.17.21",
|
|
32
|
+
"os-browserify": "^0.3.0",
|
|
33
|
+
"stream-browserify": "^3.0.0",
|
|
34
|
+
"stream-http": "^3.2.0",
|
|
35
|
+
"tty-browserify": "0.0.1",
|
|
36
|
+
"util": "^0.12.4"
|
|
29
37
|
},
|
|
30
38
|
"devDependencies": {
|
|
31
|
-
"@babel/core": "^7.
|
|
32
|
-
"babel-loader": "^8.2.
|
|
39
|
+
"@babel/core": "^7.16.5",
|
|
40
|
+
"babel-loader": "^8.2.3",
|
|
33
41
|
"eslint": "^7.32.0",
|
|
34
42
|
"husky": "^4.3.8",
|
|
35
|
-
"prettier": "^2.
|
|
43
|
+
"prettier": "^2.5.1",
|
|
36
44
|
"pretty-quick": "^2.0.2",
|
|
37
|
-
"webpack": "^
|
|
38
|
-
"webpack-cli": "^
|
|
45
|
+
"webpack": "^5.65.0",
|
|
46
|
+
"webpack-cli": "^4.9.1"
|
|
39
47
|
},
|
|
40
48
|
"husky": {
|
|
41
49
|
"hooks": {
|
package/src/client.js
CHANGED
|
@@ -28,7 +28,7 @@ import Subscriptions from "./methods/Subscriptions";
|
|
|
28
28
|
import Thermostat from "./methods/Thermostat";
|
|
29
29
|
import User from "./methods/User";
|
|
30
30
|
|
|
31
|
-
class
|
|
31
|
+
class KohostAPIClient {
|
|
32
32
|
constructor(url) {
|
|
33
33
|
this.config = {
|
|
34
34
|
url: url,
|
|
@@ -79,6 +79,9 @@ class KohostAPI {
|
|
|
79
79
|
this.Group.Room.Security.Cameras = this.bindMethods(
|
|
80
80
|
Group.Room.Security.Cameras
|
|
81
81
|
);
|
|
82
|
+
this.Group.Room.Security.Alarms = this.bindMethods(
|
|
83
|
+
Group.Room.Security.Alarms
|
|
84
|
+
);
|
|
82
85
|
this.HotelRoom = this.bindMethods(HotelRoom);
|
|
83
86
|
|
|
84
87
|
this.HotelRoom.Room = this.bindMethods(HotelRoom.Room);
|
|
@@ -255,6 +258,6 @@ class KohostAPI {
|
|
|
255
258
|
}
|
|
256
259
|
}
|
|
257
260
|
|
|
258
|
-
const API = new
|
|
261
|
+
const API = new KohostAPIClient();
|
|
259
262
|
|
|
260
263
|
export default API;
|
package/src/methods/Group.js
CHANGED
package/webpack.config.js
CHANGED
|
@@ -13,6 +13,19 @@ const serverConfig = {
|
|
|
13
13
|
const clientConfig = {
|
|
14
14
|
target: "web", // <=== can be omitted as default is 'web'
|
|
15
15
|
entry: "./src/client.js",
|
|
16
|
+
resolve: {
|
|
17
|
+
modules: ["node_modules"],
|
|
18
|
+
fallback: {
|
|
19
|
+
http: require.resolve("stream-http"),
|
|
20
|
+
https: require.resolve("https-browserify"),
|
|
21
|
+
stream: require.resolve("stream-browserify"),
|
|
22
|
+
assert: require.resolve("assert/"),
|
|
23
|
+
tty: require.resolve("tty-browserify"),
|
|
24
|
+
util: require.resolve("util/"),
|
|
25
|
+
os: require.resolve("os-browserify/browser"),
|
|
26
|
+
zlib: require.resolve("browserify-zlib"),
|
|
27
|
+
},
|
|
28
|
+
},
|
|
16
29
|
output: {
|
|
17
30
|
path: path.resolve(__dirname, "dist"),
|
|
18
31
|
filename: "bundle.js",
|