@dimensional-innovations/electron-background 2.3.0 → 2.3.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.
@@ -32,8 +32,8 @@ class AutoUpdater {
32
32
  this.enabled = enabled;
33
33
  this.options = options;
34
34
  }
35
- afterLoad({ log }) {
36
- return __awaiter(this, void 0, void 0, function* () {
35
+ afterLoad(_a) {
36
+ return __awaiter(this, arguments, void 0, function* ({ log }) {
37
37
  const { channel } = this.options;
38
38
  if (this.enabled && channel) {
39
39
  this.startAutoUpdater(channel);
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -104,8 +114,8 @@ class FullScreenBrowserWindow extends DefaultBrowserWindow {
104
114
  super(options);
105
115
  this.enabled = enabled;
106
116
  }
107
- beforeLoad({ browserWindow }) {
108
- return __awaiter(this, void 0, void 0, function* () {
117
+ beforeLoad(_a) {
118
+ return __awaiter(this, arguments, void 0, function* ({ browserWindow }) {
109
119
  if (!this.enabled) {
110
120
  return;
111
121
  }
package/dist/DevTools.js CHANGED
@@ -35,8 +35,8 @@ class DevTools {
35
35
  this.devTools = devTools;
36
36
  this.enabled = enabled;
37
37
  }
38
- beforeLoad({ browserWindow }) {
39
- return __awaiter(this, void 0, void 0, function* () {
38
+ beforeLoad(_a) {
39
+ return __awaiter(this, arguments, void 0, function* ({ browserWindow }) {
40
40
  if (!this.enabled) {
41
41
  return;
42
42
  }
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.createFileProtocol = exports.StaticFileDir = void 0;
12
+ exports.StaticFileDir = void 0;
13
+ exports.createFileProtocol = createFileProtocol;
13
14
  const electron_1 = require("electron");
14
15
  const path_1 = require("path");
15
16
  /**
@@ -51,4 +52,3 @@ function createFileProtocol(scheme, sourceDirectory) {
51
52
  respond({ path });
52
53
  });
53
54
  }
54
- exports.createFileProtocol = createFileProtocol;
package/dist/init.js CHANGED
@@ -12,7 +12,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.init = exports.InitContext = void 0;
15
+ exports.InitContext = void 0;
16
+ exports.init = init;
16
17
  const electron_1 = require("electron");
17
18
  const electron_log_1 = __importDefault(require("electron-log"));
18
19
  /**
@@ -64,8 +65,8 @@ function runPluginPhase(plugins, phase, context, logger) {
64
65
  * @param options - Options used to define how the application is initialized.
65
66
  * @returns - The final state of the init context, including the created browser window for additional setup.
66
67
  */
67
- function init({ appUrl, browserWindowOptions = { height: 1920, width: 1080, backgroundColor: '#000' }, plugins = [], }) {
68
- return __awaiter(this, void 0, void 0, function* () {
68
+ function init(_a) {
69
+ return __awaiter(this, arguments, void 0, function* ({ appUrl, browserWindowOptions = { height: 1920, width: 1080, backgroundColor: '#000' }, plugins = [], }) {
69
70
  process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true';
70
71
  electron_1.app.on('window-all-closed', electron_1.app.quit);
71
72
  process.on('message', (data) => {
@@ -93,4 +94,3 @@ function init({ appUrl, browserWindowOptions = { height: 1920, width: 1080, back
93
94
  return context;
94
95
  });
95
96
  }
96
- exports.init = init;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimensional-innovations/electron-background",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "the background script for electron apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",