x_ite-node 2.0.25 → 2.0.27
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 +2 -3
- package/src/index.js +8 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x_ite-node",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.27",
|
|
4
4
|
"description": "Pure Node.js Wrapper of X_ITE",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -52,9 +52,8 @@
|
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"atob": "^2.1.2",
|
|
55
|
-
"canvas": "^3.2.3",
|
|
56
55
|
"filereader": "^0.10.3",
|
|
57
|
-
"jsdom": "
|
|
56
|
+
"jsdom": "29.1.1",
|
|
58
57
|
"jsdom-global": "^3.0.2",
|
|
59
58
|
"node-fetch": "^2.7.0",
|
|
60
59
|
"node-localstorage": "^3.0.5",
|
package/src/index.js
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
// Restore it later.
|
|
4
4
|
const BlobClass = Blob;
|
|
5
|
+
const URLClass = URL;
|
|
5
6
|
|
|
6
7
|
require ("jsdom-global") ();
|
|
7
8
|
|
|
8
|
-
const { Image } = require ("canvas");
|
|
9
|
-
|
|
10
9
|
// Preparations
|
|
11
10
|
|
|
12
11
|
const
|
|
@@ -88,12 +87,6 @@ Object .defineProperties (window,
|
|
|
88
87
|
configurable: true,
|
|
89
88
|
writable: true,
|
|
90
89
|
},
|
|
91
|
-
Image:
|
|
92
|
-
{
|
|
93
|
-
value: Image,
|
|
94
|
-
configurable: true,
|
|
95
|
-
writable: true,
|
|
96
|
-
},
|
|
97
90
|
MutationObserver:
|
|
98
91
|
{
|
|
99
92
|
value: class
|
|
@@ -114,6 +107,12 @@ Object .defineProperties (window,
|
|
|
114
107
|
configurable: true,
|
|
115
108
|
writable: true,
|
|
116
109
|
},
|
|
110
|
+
URL:
|
|
111
|
+
{
|
|
112
|
+
value: URLClass,
|
|
113
|
+
configurable: true,
|
|
114
|
+
writable: true,
|
|
115
|
+
},
|
|
117
116
|
atob:
|
|
118
117
|
{
|
|
119
118
|
value: require ("atob"),
|
|
@@ -247,9 +246,9 @@ Object .defineProperties (global,
|
|
|
247
246
|
"Blob",
|
|
248
247
|
"FileReader",
|
|
249
248
|
"FontFace",
|
|
250
|
-
"Image",
|
|
251
249
|
"MutationObserver",
|
|
252
250
|
"ResizeObserver",
|
|
251
|
+
"URL",
|
|
253
252
|
]
|
|
254
253
|
.map (name => [name,
|
|
255
254
|
{
|
|
@@ -402,22 +401,6 @@ HTMLCanvasElement .prototype .getContext = function (contextType, ... args)
|
|
|
402
401
|
}
|
|
403
402
|
};
|
|
404
403
|
|
|
405
|
-
Object .defineProperties (URL,
|
|
406
|
-
{
|
|
407
|
-
createObjectURL:
|
|
408
|
-
{
|
|
409
|
-
value: blob => "",
|
|
410
|
-
configurable: true,
|
|
411
|
-
writable: true,
|
|
412
|
-
},
|
|
413
|
-
revokeObjectURL:
|
|
414
|
-
{
|
|
415
|
-
value: Function .prototype,
|
|
416
|
-
configurable: true,
|
|
417
|
-
writable: true,
|
|
418
|
-
},
|
|
419
|
-
});
|
|
420
|
-
|
|
421
404
|
// X_ITE
|
|
422
405
|
|
|
423
406
|
const
|