x_ite-node 2.0.23 → 2.0.25

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.
Files changed (2) hide show
  1. package/package.json +4 -3
  2. package/src/index.js +25 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x_ite-node",
3
- "version": "2.0.23",
3
+ "version": "2.0.25",
4
4
  "description": "Pure Node.js Wrapper of X_ITE",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -52,6 +52,7 @@
52
52
  ],
53
53
  "dependencies": {
54
54
  "atob": "^2.1.2",
55
+ "canvas": "^3.2.3",
55
56
  "filereader": "^0.10.3",
56
57
  "jsdom": "27.0.0",
57
58
  "jsdom-global": "^3.0.2",
@@ -63,9 +64,9 @@
63
64
  },
64
65
  "devDependencies": {
65
66
  "@eslint/js": "^10.0.1",
66
- "eslint": "^10.4.1",
67
+ "eslint": "^10.5.0",
67
68
  "globals": "^17.6.0",
68
- "jest": "^30.2.0",
69
+ "jest": "^30.4.2",
69
70
  "shell-tools": "^1.1.9"
70
71
  }
71
72
  }
package/src/index.js CHANGED
@@ -5,6 +5,8 @@ const BlobClass = Blob;
5
5
 
6
6
  require ("jsdom-global") ();
7
7
 
8
+ const { Image } = require ("canvas");
9
+
8
10
  // Preparations
9
11
 
10
12
  const
@@ -86,6 +88,12 @@ Object .defineProperties (window,
86
88
  configurable: true,
87
89
  writable: true,
88
90
  },
91
+ Image:
92
+ {
93
+ value: Image,
94
+ configurable: true,
95
+ writable: true,
96
+ },
89
97
  MutationObserver:
90
98
  {
91
99
  value: class
@@ -239,6 +247,7 @@ Object .defineProperties (global,
239
247
  "Blob",
240
248
  "FileReader",
241
249
  "FontFace",
250
+ "Image",
242
251
  "MutationObserver",
243
252
  "ResizeObserver",
244
253
  ]
@@ -393,6 +402,22 @@ HTMLCanvasElement .prototype .getContext = function (contextType, ... args)
393
402
  }
394
403
  };
395
404
 
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
+
396
421
  // X_ITE
397
422
 
398
423
  const