pssdk 3.0.1-rc8 → 3.1.0-rc1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pssdk",
3
- "version": "3.0.1-rc8",
3
+ "version": "3.1.0-rc1",
4
4
  "description": "PSSDK to Integrate with Peoplesoft Component Interfaces via GraalNodeJs",
5
5
  "keywords": [
6
6
  "pssdk",
package/threadableCI.js CHANGED
@@ -41,8 +41,12 @@ class TreadableCI {
41
41
  }
42
42
 
43
43
  toJSON() {
44
+ return this.ci.toJSON();
45
+ }
46
+
47
+ toObject() {
44
48
  return this.pool
45
- .run({ ci: this.ci }, { name: 'toJSON' });
49
+ .run({ ci: this.ci }, { name: 'toObject' });
46
50
  }
47
51
 
48
52
  toArray() {
@@ -59,6 +63,9 @@ class TreadableCI {
59
63
  return this.ci.cancel();
60
64
  }
61
65
 
66
+ close() {
67
+ return this.ci.close();
68
+ }
62
69
  /*********************************/
63
70
  /******** HELPER METHODS *********/
64
71
  /*********************************/
@@ -73,8 +80,8 @@ class TreadableCI {
73
80
  return Promise.resolve(params)
74
81
  .then(() => this.create(params))
75
82
  .then(() => this.save(params))
76
- .then(() => this.toJSON())
77
- .finally(() => this.cancel());
83
+ .then(() => this.toObject())
84
+ .finally(() => this.close());
78
85
  }
79
86
 
80
87
  /**
@@ -87,8 +94,8 @@ class TreadableCI {
87
94
  fetch(params) {
88
95
  return Promise.resolve(params)
89
96
  .then(() => this.get(params))
90
- .then(() => this.toJSON())
91
- .finally(() => this.cancel());
97
+ .then(() => this.toObject())
98
+ .finally(() => this.close());
92
99
  }
93
100
 
94
101
  /**
@@ -102,8 +109,8 @@ class TreadableCI {
102
109
  return Promise.resolve(params)
103
110
  .then(() => this.get(params))
104
111
  .then(() => this.save(params))
105
- .then(() => this.toJSON())
106
- .finally(() => this.cancel());
112
+ .then(() => this.toObject())
113
+ .finally(() => this.close());
107
114
  }
108
115
 
109
116
  /**
@@ -117,7 +124,7 @@ class TreadableCI {
117
124
  return Promise.resolve(params)
118
125
  .then(() => this.find(params))
119
126
  .then(() => this.toArray())
120
- .finally(() => this.cancel());
127
+ .finally(() => this.close());
121
128
  }
122
129
  }
123
130
 
package/worker.js CHANGED
@@ -5,7 +5,8 @@ module.exports = {
5
5
  create: ({ ci, params }) => ci.create(params),
6
6
  save: ({ ci, params }) => ci.save(params),
7
7
  cancel: ({ ci }) => ci.cancel(),
8
- toJSON: ({ ci }) => JSON.parse(JSON.stringify(ci.toProxyObject())),
8
+ close: ({ ci }) => ci.close(),
9
+ toObject: ({ ci }) => JSON.parse(JSON.stringify(ci.toProxyObject())),
9
10
  toArray: ({ ci }) => JSON.parse(JSON.stringify(ci.toProxyArrayOfProxyObjects())),
10
11
  execute: ({ ci, methodName, params }) => ci.execute(methodName, params),
11
12
  insert: ({ ci, params }) => ci.create(params).save(params),