bpmn-client 2.2.4 → 2.3.2
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/BPMNClient.js +306 -295
- package/dist/BPMNClient2.js +263 -252
- package/dist/WebService.js +82 -82
- package/dist/cli.js +285 -279
- package/dist/index.js +20 -16
- package/dist/interfaces/API.js +2 -2
- package/dist/interfaces/DataObjects.js +2 -2
- package/dist/interfaces/Enums.js +116 -124
- package/dist/monitor.js +91 -91
- package/dist/remote-import.js +137 -137
- package/dist/setup.js +22 -22
- package/dist/test-raw.js +74 -73
- package/dist/test.js +85 -77
- package/dist/test2.js +52 -78
- package/dist/test3.js +42 -42
- package/dist/testFind.js +30 -0
- package/package.json +1 -1
package/dist/WebService.js
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.WebService = void 0;
|
|
13
|
-
const https = require('https');
|
|
14
|
-
const http = require('http');
|
|
15
|
-
const fs = require("fs");
|
|
16
|
-
const axios = require('axios');
|
|
17
|
-
const FormData = require('form-data');
|
|
18
|
-
class WebService {
|
|
19
|
-
constructor() { }
|
|
20
|
-
invoke(
|
|
21
|
-
return __awaiter(this,
|
|
22
|
-
var data = JSON.stringify(params);
|
|
23
|
-
var url = 'http://' + options.host + ':' + options.port + options.path;
|
|
24
|
-
if (options.port == 443)
|
|
25
|
-
url = 'https://' + options.host + options.path;
|
|
26
|
-
var config = {
|
|
27
|
-
method: options.method,
|
|
28
|
-
url: url,
|
|
29
|
-
headers: options.headers,
|
|
30
|
-
data: data
|
|
31
|
-
};
|
|
32
|
-
let self = this;
|
|
33
|
-
try {
|
|
34
|
-
let response = yield axios(config);
|
|
35
|
-
self.result = response.data;
|
|
36
|
-
return response.data;
|
|
37
|
-
}
|
|
38
|
-
catch (err) {
|
|
39
|
-
console.log('** Connection failed ***', err);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
upload(fileName, path, path2, options) {
|
|
44
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
const title = fileName;
|
|
46
|
-
var url = 'http://' + options.host + ':' + options.port + options.path;
|
|
47
|
-
if (options.port == 443)
|
|
48
|
-
url = 'https://' + options.host + options.path;
|
|
49
|
-
const form = new FormData();
|
|
50
|
-
form.append('title', title);
|
|
51
|
-
const fileContents = fs.createReadStream(path);
|
|
52
|
-
form.append('file', fileContents);
|
|
53
|
-
if (path2 !== null) {
|
|
54
|
-
const fileContents2 = fs.createReadStream(path2);
|
|
55
|
-
form.append('file', fileContents2);
|
|
56
|
-
}
|
|
57
|
-
try {
|
|
58
|
-
const response = yield axios.post(url, form, {
|
|
59
|
-
headers: options.headers
|
|
60
|
-
});
|
|
61
|
-
console.log('Response Status:', response.status, response.data);
|
|
62
|
-
return response.data;
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
console.log('upload failed:', error);
|
|
66
|
-
throw new Error(error.message);
|
|
67
|
-
/*
|
|
68
|
-
if (error.response) { // get response with a status code not in range 2xx
|
|
69
|
-
console.log(error.response.data);
|
|
70
|
-
console.log(error.response.status);
|
|
71
|
-
console.log(error.response.headers);
|
|
72
|
-
} else if (error.request) { // no response
|
|
73
|
-
console.log(error.request);
|
|
74
|
-
} else { // Something wrong in setting up the request
|
|
75
|
-
console.log('Error', error.message);
|
|
76
|
-
}
|
|
77
|
-
console.log(error.config); */
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.WebService = WebService;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.WebService = void 0;
|
|
13
|
+
const https = require('https');
|
|
14
|
+
const http = require('http');
|
|
15
|
+
const fs = require("fs");
|
|
16
|
+
const axios = require('axios');
|
|
17
|
+
const FormData = require('form-data');
|
|
18
|
+
class WebService {
|
|
19
|
+
constructor() { }
|
|
20
|
+
invoke(params_1, options_1) {
|
|
21
|
+
return __awaiter(this, arguments, void 0, function* (params, options, postData = null) {
|
|
22
|
+
var data = JSON.stringify(params);
|
|
23
|
+
var url = 'http://' + options.host + ':' + options.port + options.path;
|
|
24
|
+
if (options.port == 443)
|
|
25
|
+
url = 'https://' + options.host + options.path;
|
|
26
|
+
var config = {
|
|
27
|
+
method: options.method,
|
|
28
|
+
url: url,
|
|
29
|
+
headers: options.headers,
|
|
30
|
+
data: data
|
|
31
|
+
};
|
|
32
|
+
let self = this;
|
|
33
|
+
try {
|
|
34
|
+
let response = yield axios(config);
|
|
35
|
+
self.result = response.data;
|
|
36
|
+
return response.data;
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
console.log('** Connection failed ***', err);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
upload(fileName, path, path2, options) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const title = fileName;
|
|
46
|
+
var url = 'http://' + options.host + ':' + options.port + options.path;
|
|
47
|
+
if (options.port == 443)
|
|
48
|
+
url = 'https://' + options.host + options.path;
|
|
49
|
+
const form = new FormData();
|
|
50
|
+
form.append('title', title);
|
|
51
|
+
const fileContents = fs.createReadStream(path);
|
|
52
|
+
form.append('file', fileContents);
|
|
53
|
+
if (path2 !== null) {
|
|
54
|
+
const fileContents2 = fs.createReadStream(path2);
|
|
55
|
+
form.append('file', fileContents2);
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
const response = yield axios.post(url, form, {
|
|
59
|
+
headers: options.headers
|
|
60
|
+
});
|
|
61
|
+
console.log('Response Status:', response.status, response.data);
|
|
62
|
+
return response.data;
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
console.log('upload failed:', error);
|
|
66
|
+
throw new Error(error.message);
|
|
67
|
+
/*
|
|
68
|
+
if (error.response) { // get response with a status code not in range 2xx
|
|
69
|
+
console.log(error.response.data);
|
|
70
|
+
console.log(error.response.status);
|
|
71
|
+
console.log(error.response.headers);
|
|
72
|
+
} else if (error.request) { // no response
|
|
73
|
+
console.log(error.request);
|
|
74
|
+
} else { // Something wrong in setting up the request
|
|
75
|
+
console.log('Error', error.message);
|
|
76
|
+
}
|
|
77
|
+
console.log(error.config); */
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.WebService = WebService;
|