@lvce-editor/main-process 6.32.0 → 6.32.1

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.
@@ -5793,24 +5793,11 @@ const showMessageBox = async ({
5793
5793
 
5794
5794
  const getJson = async url => {
5795
5795
  string(url);
5796
- const request = net.request({
5797
- url
5798
- });
5799
- let body = '';
5800
- console.log('start', url);
5801
- await new Promise(resolve => {
5802
- request.on('response', response => {
5803
- response.on('data', chunk => {
5804
- body += chunk.toString();
5805
- });
5806
- response.on('end', () => {
5807
- resolve(undefined);
5808
- });
5809
- });
5810
- request.end();
5811
- });
5812
- const json = JSON.parse(body);
5813
- return json;
5796
+ const response = await net.fetch(url);
5797
+ if (!response.ok) {
5798
+ throw new Error(`Failed to fetch JSON: ${response.status} ${response.statusText}`);
5799
+ }
5800
+ return response.json();
5814
5801
  };
5815
5802
 
5816
5803
  const startLogging = async path => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/main-process",
3
- "version": "6.32.0",
3
+ "version": "6.32.1",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "electron"