pssdk 3.0.1-rc9 → 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 +1 -1
- package/threadableCI.js +10 -7
- package/worker.js +1 -0
package/package.json
CHANGED
package/threadableCI.js
CHANGED
|
@@ -63,6 +63,9 @@ class TreadableCI {
|
|
|
63
63
|
return this.ci.cancel();
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
close() {
|
|
67
|
+
return this.ci.close();
|
|
68
|
+
}
|
|
66
69
|
/*********************************/
|
|
67
70
|
/******** HELPER METHODS *********/
|
|
68
71
|
/*********************************/
|
|
@@ -77,8 +80,8 @@ class TreadableCI {
|
|
|
77
80
|
return Promise.resolve(params)
|
|
78
81
|
.then(() => this.create(params))
|
|
79
82
|
.then(() => this.save(params))
|
|
80
|
-
.then(() => this.
|
|
81
|
-
.finally(() => this.
|
|
83
|
+
.then(() => this.toObject())
|
|
84
|
+
.finally(() => this.close());
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
/**
|
|
@@ -91,8 +94,8 @@ class TreadableCI {
|
|
|
91
94
|
fetch(params) {
|
|
92
95
|
return Promise.resolve(params)
|
|
93
96
|
.then(() => this.get(params))
|
|
94
|
-
.then(() => this.
|
|
95
|
-
.finally(() => this.
|
|
97
|
+
.then(() => this.toObject())
|
|
98
|
+
.finally(() => this.close());
|
|
96
99
|
}
|
|
97
100
|
|
|
98
101
|
/**
|
|
@@ -106,8 +109,8 @@ class TreadableCI {
|
|
|
106
109
|
return Promise.resolve(params)
|
|
107
110
|
.then(() => this.get(params))
|
|
108
111
|
.then(() => this.save(params))
|
|
109
|
-
.then(() => this.
|
|
110
|
-
.finally(() => this.
|
|
112
|
+
.then(() => this.toObject())
|
|
113
|
+
.finally(() => this.close());
|
|
111
114
|
}
|
|
112
115
|
|
|
113
116
|
/**
|
|
@@ -121,7 +124,7 @@ class TreadableCI {
|
|
|
121
124
|
return Promise.resolve(params)
|
|
122
125
|
.then(() => this.find(params))
|
|
123
126
|
.then(() => this.toArray())
|
|
124
|
-
.finally(() => this.
|
|
127
|
+
.finally(() => this.close());
|
|
125
128
|
}
|
|
126
129
|
}
|
|
127
130
|
|
package/worker.js
CHANGED
|
@@ -5,6 +5,7 @@ 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
|
+
close: ({ ci }) => ci.close(),
|
|
8
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),
|