@wiotp/sdk 0.8.4 → 0.8.6
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/BaseClient.js +226 -0
- package/dist/BaseConfig.js +179 -0
- package/dist/api/ApiClient.js +505 -0
- package/dist/api/ApiErrors.js +75 -0
- package/dist/api/DscClient.js +328 -0
- package/dist/api/LecClient.js +47 -0
- package/dist/api/MgmtClient.js +76 -0
- package/dist/api/RegistryClient.js +225 -0
- package/dist/api/RulesClient.js +104 -0
- package/dist/api/StateClient.js +721 -0
- package/dist/application/ApplicationClient.js +356 -0
- package/dist/application/ApplicationConfig.js +240 -0
- package/dist/application/index.js +20 -0
- package/dist/bundled/wiotp-bundle.js +47217 -0
- package/dist/bundled/wiotp-bundle.min.js +41 -0
- package/dist/device/DeviceClient.js +100 -0
- package/dist/device/DeviceConfig.js +201 -0
- package/dist/device/index.js +20 -0
- package/dist/gateway/GatewayClient.js +129 -0
- package/dist/gateway/GatewayConfig.js +44 -0
- package/dist/gateway/index.js +20 -0
- package/dist/index.js +97 -0
- package/dist/util.js +44 -0
- package/package.json +2 -2
package/dist/util.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.generateUUID = generateUUID;
|
|
7
|
+
exports.isBoolean = isBoolean;
|
|
8
|
+
exports.isBrowser = void 0;
|
|
9
|
+
exports.isDefined = isDefined;
|
|
10
|
+
exports.isNode = void 0;
|
|
11
|
+
exports.isNumber = isNumber;
|
|
12
|
+
exports.isString = isString;
|
|
13
|
+
/**
|
|
14
|
+
*****************************************************************************
|
|
15
|
+
Copyright (c) 2014, 2019 IBM Corporation and other Contributors.
|
|
16
|
+
All rights reserved. This program and the accompanying materials
|
|
17
|
+
are made available under the terms of the Eclipse Public License v1.0
|
|
18
|
+
which accompanies this distribution, and is available at
|
|
19
|
+
http://www.eclipse.org/legal/epl-v10.html
|
|
20
|
+
*****************************************************************************
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
function isString(value) {
|
|
25
|
+
return typeof value === 'string';
|
|
26
|
+
}
|
|
27
|
+
function isNumber(value) {
|
|
28
|
+
return typeof value === 'number';
|
|
29
|
+
}
|
|
30
|
+
function isBoolean(value) {
|
|
31
|
+
return typeof value === 'boolean';
|
|
32
|
+
}
|
|
33
|
+
function isDefined(value) {
|
|
34
|
+
return value !== undefined && value !== null;
|
|
35
|
+
}
|
|
36
|
+
var isBrowser = exports.isBrowser = new Function("try {return this===window;}catch(e){ return false;}");
|
|
37
|
+
var isNode = exports.isNode = new Function("try {return this===global;}catch(e){return false;}");
|
|
38
|
+
function generateUUID() {
|
|
39
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
40
|
+
var r = Math.random() * 16 | 0,
|
|
41
|
+
v = c == 'x' ? r : r & 0x3 | 0x8;
|
|
42
|
+
return v.toString(16);
|
|
43
|
+
});
|
|
44
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wiotp/sdk",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "SDK for developing device, gateway, and application clients for IBM Watson IoT Platform",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"axios": "^1.
|
|
17
|
+
"axios": "^1.12.0",
|
|
18
18
|
"bluebird": "^3.7.2",
|
|
19
19
|
"btoa": "^1.2.1",
|
|
20
20
|
"concat-stream": "^2.0.0",
|