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

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.
Files changed (2) hide show
  1. package/main.js +3 -3
  2. package/package.json +1 -1
package/main.js CHANGED
@@ -22,6 +22,7 @@ class asTools {
22
22
  async main() {
23
23
  this.checkLxc();
24
24
  this.checkDocker();
25
+ await this.createAdapterStorageObject();
25
26
  }
26
27
 
27
28
  async onMessage(obj) {
@@ -64,7 +65,7 @@ class asTools {
64
65
  }
65
66
 
66
67
  async createAdapterStorageObject(){
67
- await this.adapter.setObjectNotExistsAsync(`${this.adapter.namespace.replace(/\.\d/g, '')}.storage`, {
68
+ await this.adapter.setForeignObjectNotExistsAsync(`${this.adapter.namespace.replace(/\.\d/g, '')}.storage`, {
68
69
  "type": "config",
69
70
  "common": {
70
71
  "name": "Adapter storage",
@@ -72,12 +73,11 @@ class asTools {
72
73
  "expert": true
73
74
  },
74
75
  "native": {}
75
- })
76
+ });
76
77
  }
77
78
 
78
79
  async block() {
79
80
  return new Promise(async (resolve, reject) => {
80
- await this.createAdapterStorageObject();
81
81
  const check = async () => {
82
82
  const adapterObject = await this.adapter.getForeignObjectAsync(`${this.adapter.namespace.replace(/\.\d/g, '')}.storage`);
83
83
  if (adapterObject.native.licenseCertificate) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@all-smart/all-smart-tools",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"