@all-smart/all-smart-tools 1.0.13 → 1.0.14

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.
@@ -1,16 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
- <component name="PublishConfigData" autoUpload="Always" serverName="local" remoteFilesAllowedToDisappearOnAutoupload="false" confirmBeforeUploading="false">
3
+ <component name="PublishConfigData" autoUpload="Always" remoteFilesAllowedToDisappearOnAutoupload="false" confirmBeforeUploading="false">
4
4
  <option name="confirmBeforeUploading" value="false" />
5
- <serverData>
6
- <paths name="local">
7
- <serverdata>
8
- <mappings>
9
- <mapping deploy="/" local="$PROJECT_DIR$" web="/" />
10
- </mappings>
11
- </serverdata>
12
- </paths>
13
- </serverData>
14
5
  <option name="myAutoUpload" value="ALWAYS" />
15
6
  </component>
16
7
  </project>
package/LICENSE.MD CHANGED
@@ -40,9 +40,9 @@ and the **Licensee**
40
40
 
41
41
 
42
42
  10. __Signature__
43
- This Agreement shall automatically come into force as soon as the Licensee uses the "ALL SMART Tools" software.
43
+ This Agr13eement shall automatically come into force as soon as the Licensee uses the "ALL SMART Tools" software.
44
44
 
45
45
  LICENSOR
46
46
  Christoph Gerle
47
- Schwabenstr. 40
48
- 87668 Rieden, Germany
47
+ Dorfstr. 10
48
+ 86842 Türkheim, Germany
package/main.js CHANGED
@@ -109,7 +109,12 @@ class asTools {
109
109
  async checkLicenseKey(){
110
110
  try {
111
111
 
112
- const responseValidate = await axios.get(`${baseUrl}/wp-json/lmfwc/v2/licenses/${this.adapter.config.licenseKey}`, {
112
+ const licenseKey = this.adapter.config.licenseKey ? this.adapter.config.licenseKey.trim() : '';
113
+ if (!licenseKey) {
114
+ this.adapter.log.warn('License Key is empty');
115
+ return false;
116
+ }
117
+ const responseValidate = await axios.get(`${baseUrl}/wp-json/lmfwc/v2/licenses/${encodeURIComponent(licenseKey)}`, {
113
118
  headers: {
114
119
  authorization: `Basic ${Buffer.from(`${key1}:${key2}`).toString('base64')}`,
115
120
  }
@@ -153,7 +158,12 @@ class asTools {
153
158
 
154
159
  async activateLicenseKey(){
155
160
  try {
156
- const response = await axios.get(`${baseUrl}/wp-json/lmfwc/v2/licenses/activate/${this.adapter.config.licenseKey}`, {
161
+ const licenseKey = this.adapter.config.licenseKey ? this.adapter.config.licenseKey.trim() : '';
162
+ if (!licenseKey) {
163
+ this.adapter.log.warn('License Key is empty, activation not possible');
164
+ return false;
165
+ }
166
+ const response = await axios.get(`${baseUrl}/wp-json/lmfwc/v2/licenses/activate/${encodeURIComponent(licenseKey)}`, {
157
167
  headers: {
158
168
  authorization: `Basic ${Buffer.from(`${key1}:${key2}`).toString('base64')}`,
159
169
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@all-smart/all-smart-tools",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -9,7 +9,7 @@
9
9
  "author": "Christoph Gerle",
10
10
  "license": "SEE LICENSE IN LICENSE.MD",
11
11
  "dependencies": {
12
- "axios": "^1.6.5"
12
+ "axios": "1.20.0"
13
13
  },
14
14
  "devDependencies": {},
15
15
  "description": ""
@@ -1,10 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="WebServers">
4
- <option name="servers">
5
- <webServer id="d117c297-54c1-40da-9610-cce0b85b1a74" name="local" url="http://localhost">
6
- <fileTransfer mountedRoot="$PROJECT_DIR$/../ioBroker.we-are-one/node_modules/all-smart-tools" accessType="MOUNT" port="0" />
7
- </webServer>
8
- </option>
9
- </component>
10
- </project>