ti2-tourplan 1.0.71 → 1.0.72

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/index.js +17 -18
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -87,24 +87,23 @@ class BuyerPlugin {
87
87
  data = data.replace(xmlOptions.dtd.name, `Request SYSTEM "${xmlOptions.dtd.name}"`);
88
88
  let replyObj;
89
89
  let errorStr;
90
- // can't use proxy because of the static IP thing, darn
91
- // if (this.xmlProxyUrl) {
92
- // // use pyfilematch xmlproxy
93
- // try {
94
- // replyObj = R.path(['data'], await axios({
95
- // method: 'post',
96
- // url: `${this.xmlProxyUrl}/xmlproxy`,
97
- // data: {
98
- // url: endpoint,
99
- // data,
100
- // headers: getHeaders({ length: `${data.length}` }),
101
- // },
102
- // }));
103
- // } catch (err) {
104
- // console.log('error in calling pyfilematch xmlproxy', err);
105
- // errorStr = `error in calling pyfilematch xmlproxy: ${err}`;
106
- // }
107
- // }
90
+ if (this.xmlProxyUrl) {
91
+ // use pyfilematch xmlproxy to avoid passing large payloads back and forth
92
+ try {
93
+ replyObj = R.path(['data'], await axios({
94
+ method: 'post',
95
+ url: `${this.xmlProxyUrl}/xmlproxy`,
96
+ data: {
97
+ url: endpoint,
98
+ data,
99
+ headers: getHeaders({ length: `${data.length}` }),
100
+ },
101
+ }));
102
+ } catch (err) {
103
+ console.log('error in calling pyfilematch xmlproxy', err);
104
+ errorStr = `error in calling pyfilematch xmlproxy: ${err}`;
105
+ }
106
+ }
108
107
  if (!replyObj) {
109
108
  // in case of error /xmlproxy, fallback to call tourplan directly
110
109
  // and then use pyfilematch xml2json to parse the xml
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ti2-tourplan",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
4
4
  "description": "Tourplan's TI2 Plugin",
5
5
  "main": "index.js",
6
6
  "scripts": {