@xsai/shared 0.5.0-beta.1 → 0.5.0-beta.3
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/index.js +9 -11
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -86,17 +86,15 @@ const clean = (obj) => Object.fromEntries(
|
|
|
86
86
|
|
|
87
87
|
class DelayedPromise {
|
|
88
88
|
get promise() {
|
|
89
|
-
|
|
90
|
-
this.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
});
|
|
99
|
-
}
|
|
89
|
+
this._promise ??= new Promise((resolve, reject) => {
|
|
90
|
+
if (this.status.type === "resolved") {
|
|
91
|
+
resolve(this.status.value);
|
|
92
|
+
} else if (this.status.type === "rejected") {
|
|
93
|
+
reject(this.status.error);
|
|
94
|
+
}
|
|
95
|
+
this._resolve = resolve;
|
|
96
|
+
this._reject = reject;
|
|
97
|
+
});
|
|
100
98
|
return this._promise;
|
|
101
99
|
}
|
|
102
100
|
_promise;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsai/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.5.0-beta.
|
|
4
|
+
"version": "0.5.0-beta.3",
|
|
5
5
|
"description": "extra-small AI SDK.",
|
|
6
6
|
"author": "Moeru AI",
|
|
7
7
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@moeru/std": "^0.1.0-beta.
|
|
32
|
+
"@moeru/std": "^0.1.0-beta.18"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "pkgroll"
|