pssdk 3.0.1-rc.7 → 3.0.1-rc10

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-rc.7",
3
+ "version": "3.0.1-rc10",
4
4
  "description": "PSSDK to Integrate with Peoplesoft Component Interfaces via GraalNodeJs",
5
5
  "keywords": [
6
6
  "pssdk",
package/threadableCI.js CHANGED
@@ -41,17 +41,17 @@ class TreadableCI {
41
41
  }
42
42
 
43
43
  toJSON() {
44
- let result;
44
+ return this.ci.toJSON();
45
+ }
46
+
47
+ toObject() {
45
48
  return this.pool
46
- .run({ ci: this.ci, result }, { name: 'toJSON' })
47
- .then(() => result);
49
+ .run({ ci: this.ci }, { name: 'toObject' });
48
50
  }
49
51
 
50
52
  toArray() {
51
- let result;
52
53
  return this.pool
53
- .run({ ci: this.ci, result }, { name: 'toList' })
54
- .then(() => result);
54
+ .run({ ci: this.ci }, { name: 'toArray' });
55
55
  }
56
56
 
57
57
  setInteractiveMode(params) {
@@ -77,7 +77,7 @@ class TreadableCI {
77
77
  return Promise.resolve(params)
78
78
  .then(() => this.create(params))
79
79
  .then(() => this.save(params))
80
- .then(() => this.toJSON())
80
+ .then(() => this.toObject())
81
81
  .finally(() => this.cancel());
82
82
  }
83
83
 
@@ -91,7 +91,7 @@ class TreadableCI {
91
91
  fetch(params) {
92
92
  return Promise.resolve(params)
93
93
  .then(() => this.get(params))
94
- .then(() => this.toJSON())
94
+ .then(() => this.toObject())
95
95
  .finally(() => this.cancel());
96
96
  }
97
97
 
@@ -106,7 +106,7 @@ class TreadableCI {
106
106
  return Promise.resolve(params)
107
107
  .then(() => this.get(params))
108
108
  .then(() => this.save(params))
109
- .then(() => this.toJSON())
109
+ .then(() => this.toObject())
110
110
  .finally(() => this.cancel());
111
111
  }
112
112
 
package/worker.js CHANGED
@@ -5,9 +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, result }) => result = ci.toJSON(),
9
- toList: ({ ci, result }) => result = ci.toList(),
8
+ toObject: ({ ci }) => JSON.parse(JSON.stringify(ci.toProxyObject())),
9
+ toArray: ({ ci }) => JSON.parse(JSON.stringify(ci.toProxyArrayOfProxyObjects())),
10
10
  execute: ({ ci, methodName, params }) => ci.execute(methodName, params),
11
11
  insert: ({ ci, params }) => ci.create(params).save(params),
12
12
  };
13
-