@lvce-editor/main-process 2.24.0 → 2.26.0

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.
@@ -1066,54 +1066,54 @@ var hasRequiredLib$1;
1066
1066
  function requireLib$1 () {
1067
1067
  if (hasRequiredLib$1) return lib;
1068
1068
  hasRequiredLib$1 = 1;
1069
- (function (exports) {
1069
+ (function (exports$1) {
1070
1070
 
1071
- Object.defineProperty(exports, "__esModule", {
1071
+ Object.defineProperty(exports$1, "__esModule", {
1072
1072
  value: true
1073
1073
  });
1074
- Object.defineProperty(exports, "isIdentifierChar", {
1074
+ Object.defineProperty(exports$1, "isIdentifierChar", {
1075
1075
  enumerable: true,
1076
1076
  get: function () {
1077
1077
  return _identifier.isIdentifierChar;
1078
1078
  }
1079
1079
  });
1080
- Object.defineProperty(exports, "isIdentifierName", {
1080
+ Object.defineProperty(exports$1, "isIdentifierName", {
1081
1081
  enumerable: true,
1082
1082
  get: function () {
1083
1083
  return _identifier.isIdentifierName;
1084
1084
  }
1085
1085
  });
1086
- Object.defineProperty(exports, "isIdentifierStart", {
1086
+ Object.defineProperty(exports$1, "isIdentifierStart", {
1087
1087
  enumerable: true,
1088
1088
  get: function () {
1089
1089
  return _identifier.isIdentifierStart;
1090
1090
  }
1091
1091
  });
1092
- Object.defineProperty(exports, "isKeyword", {
1092
+ Object.defineProperty(exports$1, "isKeyword", {
1093
1093
  enumerable: true,
1094
1094
  get: function () {
1095
1095
  return _keyword.isKeyword;
1096
1096
  }
1097
1097
  });
1098
- Object.defineProperty(exports, "isReservedWord", {
1098
+ Object.defineProperty(exports$1, "isReservedWord", {
1099
1099
  enumerable: true,
1100
1100
  get: function () {
1101
1101
  return _keyword.isReservedWord;
1102
1102
  }
1103
1103
  });
1104
- Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
1104
+ Object.defineProperty(exports$1, "isStrictBindOnlyReservedWord", {
1105
1105
  enumerable: true,
1106
1106
  get: function () {
1107
1107
  return _keyword.isStrictBindOnlyReservedWord;
1108
1108
  }
1109
1109
  });
1110
- Object.defineProperty(exports, "isStrictBindReservedWord", {
1110
+ Object.defineProperty(exports$1, "isStrictBindReservedWord", {
1111
1111
  enumerable: true,
1112
1112
  get: function () {
1113
1113
  return _keyword.isStrictBindReservedWord;
1114
1114
  }
1115
1115
  });
1116
- Object.defineProperty(exports, "isStrictReservedWord", {
1116
+ Object.defineProperty(exports$1, "isStrictReservedWord", {
1117
1117
  enumerable: true,
1118
1118
  get: function () {
1119
1119
  return _keyword.isStrictReservedWord;
@@ -3326,8 +3326,8 @@ const join = (...paths) => {
3326
3326
  return NodePath.join(...paths);
3327
3327
  };
3328
3328
 
3329
- const __dirname = dirname(fileURLToPath(import.meta.url));
3330
- const root = process.env.LVCE_ROOT || join(__dirname, '../../../../..');
3329
+ const __dirname$1 = dirname(fileURLToPath(import.meta.url));
3330
+ const root = process.env.LVCE_ROOT || join(__dirname$1, '../../../../..');
3331
3331
 
3332
3332
  const {
3333
3333
  env,
@@ -4000,17 +4000,17 @@ var hasRequiredBrowser;
4000
4000
  function requireBrowser () {
4001
4001
  if (hasRequiredBrowser) return browser.exports;
4002
4002
  hasRequiredBrowser = 1;
4003
- (function (module, exports) {
4003
+ (function (module, exports$1) {
4004
4004
  /**
4005
4005
  * This is the web browser implementation of `debug()`.
4006
4006
  */
4007
4007
 
4008
- exports.formatArgs = formatArgs;
4009
- exports.save = save;
4010
- exports.load = load;
4011
- exports.useColors = useColors;
4012
- exports.storage = localstorage();
4013
- exports.destroy = (() => {
4008
+ exports$1.formatArgs = formatArgs;
4009
+ exports$1.save = save;
4010
+ exports$1.load = load;
4011
+ exports$1.useColors = useColors;
4012
+ exports$1.storage = localstorage();
4013
+ exports$1.destroy = (() => {
4014
4014
  let warned = false;
4015
4015
  return () => {
4016
4016
  if (!warned) {
@@ -4024,7 +4024,7 @@ function requireBrowser () {
4024
4024
  * Colors.
4025
4025
  */
4026
4026
 
4027
- exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
4027
+ exports$1.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
4028
4028
 
4029
4029
  /**
4030
4030
  * Currently only WebKit-based Web Inspectors, Firefox >= v31,
@@ -4103,7 +4103,7 @@ function requireBrowser () {
4103
4103
  *
4104
4104
  * @api public
4105
4105
  */
4106
- exports.log = console.debug || console.log || (() => {});
4106
+ exports$1.log = console.debug || console.log || (() => {});
4107
4107
 
4108
4108
  /**
4109
4109
  * Save `namespaces`.
@@ -4114,9 +4114,9 @@ function requireBrowser () {
4114
4114
  function save(namespaces) {
4115
4115
  try {
4116
4116
  if (namespaces) {
4117
- exports.storage.setItem('debug', namespaces);
4117
+ exports$1.storage.setItem('debug', namespaces);
4118
4118
  } else {
4119
- exports.storage.removeItem('debug');
4119
+ exports$1.storage.removeItem('debug');
4120
4120
  }
4121
4121
  } catch (error) {
4122
4122
  // Swallow
@@ -4133,7 +4133,7 @@ function requireBrowser () {
4133
4133
  function load() {
4134
4134
  let r;
4135
4135
  try {
4136
- r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG');
4136
+ r = exports$1.storage.getItem('debug') || exports$1.storage.getItem('DEBUG');
4137
4137
  } catch (error) {
4138
4138
  // Swallow
4139
4139
  // XXX (@Qix-) should we be logging these?
@@ -4167,7 +4167,7 @@ function requireBrowser () {
4167
4167
  // XXX (@Qix-) should we be logging these?
4168
4168
  }
4169
4169
  }
4170
- module.exports = requireCommon()(exports);
4170
+ module.exports = requireCommon()(exports$1);
4171
4171
  const {
4172
4172
  formatters
4173
4173
  } = module.exports;
@@ -4324,7 +4324,7 @@ var hasRequiredNode;
4324
4324
  function requireNode () {
4325
4325
  if (hasRequiredNode) return node.exports;
4326
4326
  hasRequiredNode = 1;
4327
- (function (module, exports) {
4327
+ (function (module, exports$1) {
4328
4328
  const tty = require$$1;
4329
4329
  const util = require$$1$1;
4330
4330
 
@@ -4332,25 +4332,25 @@ function requireNode () {
4332
4332
  * This is the Node.js implementation of `debug()`.
4333
4333
  */
4334
4334
 
4335
- exports.init = init;
4336
- exports.log = log;
4337
- exports.formatArgs = formatArgs;
4338
- exports.save = save;
4339
- exports.load = load;
4340
- exports.useColors = useColors;
4341
- exports.destroy = util.deprecate(() => {}, 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
4335
+ exports$1.init = init;
4336
+ exports$1.log = log;
4337
+ exports$1.formatArgs = formatArgs;
4338
+ exports$1.save = save;
4339
+ exports$1.load = load;
4340
+ exports$1.useColors = useColors;
4341
+ exports$1.destroy = util.deprecate(() => {}, 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
4342
4342
 
4343
4343
  /**
4344
4344
  * Colors.
4345
4345
  */
4346
4346
 
4347
- exports.colors = [6, 2, 3, 4, 5, 1];
4347
+ exports$1.colors = [6, 2, 3, 4, 5, 1];
4348
4348
  try {
4349
4349
  // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
4350
4350
  // eslint-disable-next-line import/no-extraneous-dependencies
4351
4351
  const supportsColor = requireSupportsColor();
4352
4352
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
4353
- exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
4353
+ exports$1.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
4354
4354
  }
4355
4355
  } catch (error) {
4356
4356
  // Swallow - we only care if `supports-color` is available; it doesn't have to be.
@@ -4362,7 +4362,7 @@ function requireNode () {
4362
4362
  * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
4363
4363
  */
4364
4364
 
4365
- exports.inspectOpts = Object.keys(process.env).filter(key => {
4365
+ exports$1.inspectOpts = Object.keys(process.env).filter(key => {
4366
4366
  return /^debug_/i.test(key);
4367
4367
  }).reduce((obj, key) => {
4368
4368
  // Camel-case
@@ -4390,7 +4390,7 @@ function requireNode () {
4390
4390
  */
4391
4391
 
4392
4392
  function useColors() {
4393
- return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
4393
+ return 'colors' in exports$1.inspectOpts ? Boolean(exports$1.inspectOpts.colors) : tty.isatty(process.stderr.fd);
4394
4394
  }
4395
4395
 
4396
4396
  /**
@@ -4415,7 +4415,7 @@ function requireNode () {
4415
4415
  }
4416
4416
  }
4417
4417
  function getDate() {
4418
- if (exports.inspectOpts.hideDate) {
4418
+ if (exports$1.inspectOpts.hideDate) {
4419
4419
  return '';
4420
4420
  }
4421
4421
  return new Date().toISOString() + ' ';
@@ -4426,7 +4426,7 @@ function requireNode () {
4426
4426
  */
4427
4427
 
4428
4428
  function log(...args) {
4429
- return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
4429
+ return process.stderr.write(util.formatWithOptions(exports$1.inspectOpts, ...args) + '\n');
4430
4430
  }
4431
4431
 
4432
4432
  /**
@@ -4465,12 +4465,12 @@ function requireNode () {
4465
4465
 
4466
4466
  function init(debug) {
4467
4467
  debug.inspectOpts = {};
4468
- const keys = Object.keys(exports.inspectOpts);
4468
+ const keys = Object.keys(exports$1.inspectOpts);
4469
4469
  for (let i = 0; i < keys.length; i++) {
4470
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
4470
+ debug.inspectOpts[keys[i]] = exports$1.inspectOpts[keys[i]];
4471
4471
  }
4472
4472
  }
4473
- module.exports = requireCommon()(exports);
4473
+ module.exports = requireCommon()(exports$1);
4474
4474
  const {
4475
4475
  formatters
4476
4476
  } = module.exports;
@@ -5327,6 +5327,15 @@ const handleRequest = request => {
5327
5327
 
5328
5328
  const isSessionCacheEnabled = isProduction;
5329
5329
 
5330
+ const onHeadersReceivedCallback = (details, callback) => {
5331
+ callback({
5332
+ responseHeaders: {
5333
+ 'Access-Control-Allow-Origin': ['*'],
5334
+ ...details.responseHeaders
5335
+ }
5336
+ });
5337
+ };
5338
+
5330
5339
  // TODO maybe create a separate session for webviews
5331
5340
  const createElectronSession = () => {
5332
5341
  const sessionId = getSessionId();
@@ -5335,6 +5344,10 @@ const createElectronSession = () => {
5335
5344
  });
5336
5345
  session.setPermissionRequestHandler(handlePermissionRequest$1);
5337
5346
  session.setPermissionCheckHandler(handlePermissionCheck$1);
5347
+ const filter = {
5348
+ urls: ['https://*.github.com/*', 'https://release-assets.githubusercontent.com/*']
5349
+ };
5350
+ session.webRequest.onHeadersReceived(filter, onHeadersReceivedCallback);
5338
5351
  handle(session.protocol, scheme, handleRequest);
5339
5352
  return session;
5340
5353
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/main-process",
3
- "version": "2.24.0",
3
+ "version": "2.26.0",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "electron"
@@ -14,7 +14,7 @@
14
14
  "type": "module",
15
15
  "main": "dist/mainProcessMain.js",
16
16
  "dependencies": {
17
- "electron": "39.0.0"
17
+ "electron": "39.1.1"
18
18
  },
19
19
  "engines": {
20
20
  "node": ">=22"