vtb-appit 0.1.7 → 0.1.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/appit.js +15 -0
- package/package.json +1 -1
package/appit.js
CHANGED
|
@@ -51,6 +51,7 @@ class Appit {
|
|
|
51
51
|
try {
|
|
52
52
|
const historyFile = fs.readFileSync(this.historyPath, {encoding: 'utf8'});
|
|
53
53
|
this.history = { ...defaultHistory, ...JSON.parse(historyFile) };
|
|
54
|
+
this.history.errors = [];
|
|
54
55
|
this.log('info', 'History loaded from file');
|
|
55
56
|
} catch(e) {
|
|
56
57
|
this.history = defaultHistory;
|
|
@@ -96,6 +97,7 @@ class Appit {
|
|
|
96
97
|
const steps = [
|
|
97
98
|
{ name: 'excursion', fn: () => this.excursion() },
|
|
98
99
|
{ name: 'labels', fn: () => this.labels() },
|
|
100
|
+
{ name: 'explores', fn: () => this.explores() },
|
|
99
101
|
{ name: 'ships', fn: () => this.ships() },
|
|
100
102
|
{ name: 'places', fn: () => this.places() },
|
|
101
103
|
{ name: 'organizations', fn: () => this.organizations() },
|
|
@@ -192,6 +194,14 @@ class Appit {
|
|
|
192
194
|
}
|
|
193
195
|
}
|
|
194
196
|
|
|
197
|
+
async explores()
|
|
198
|
+
{
|
|
199
|
+
let explores = this.transformer.explores()
|
|
200
|
+
if(explores) {
|
|
201
|
+
await this.saveExplores(this.transformer.workspace_id, explores);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
195
205
|
async settings()
|
|
196
206
|
{
|
|
197
207
|
let settings = this.transformer.settings()
|
|
@@ -1731,6 +1741,11 @@ class Appit {
|
|
|
1731
1741
|
return await this.request('PUT', `workspaces/${workspace_id}/excursions/${this.history.excursionId}/settings`, data);
|
|
1732
1742
|
}
|
|
1733
1743
|
|
|
1744
|
+
async saveExplores(workspace_id, data)
|
|
1745
|
+
{
|
|
1746
|
+
return await this.request('POST', `workspaces/${workspace_id}/excursions/${this.history.excursionId}/explores`, data);
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1734
1749
|
sleep(delay) {
|
|
1735
1750
|
return new Promise((resolve) => setTimeout(resolve, delay))
|
|
1736
1751
|
}
|