nexfep 0.7.0 → 0.7.2
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/cli/build.mjs +1 -1
- package/package.json +1 -1
- package/src/WindowManager.d.ts +1 -0
- package/src/WindowManager.js +7 -2
package/cli/build.mjs
CHANGED
|
@@ -101,7 +101,7 @@ export default async function build(args) {
|
|
|
101
101
|
const typerForBuild = new TimeTyper("Building...");
|
|
102
102
|
const result = await new Promise((resolve) => {
|
|
103
103
|
const child = child_process.spawn(
|
|
104
|
-
`npx --yes nexfpack@0.
|
|
104
|
+
`npx --yes nexfpack@0.5.1 ${path.join(NexfpackConfig.output, "nexfpack.config.json")}`,
|
|
105
105
|
{ shell: true },
|
|
106
106
|
);
|
|
107
107
|
child.on("close", (code) => {
|
package/package.json
CHANGED
package/src/WindowManager.d.ts
CHANGED
package/src/WindowManager.js
CHANGED
|
@@ -156,6 +156,7 @@ class WindowPool {
|
|
|
156
156
|
windowCount;
|
|
157
157
|
freeWindowCount;
|
|
158
158
|
localProxys;
|
|
159
|
+
webContext;
|
|
159
160
|
global;
|
|
160
161
|
constructor(app, options) {
|
|
161
162
|
if (os.platform() === "win32") {
|
|
@@ -164,7 +165,9 @@ class WindowPool {
|
|
|
164
165
|
if (!fs.existsSync(userDataDir)) {
|
|
165
166
|
fs.mkdirSync(userDataDir, { recursive: true });
|
|
166
167
|
}
|
|
167
|
-
|
|
168
|
+
this.webContext = app.createWebContext({
|
|
169
|
+
dataDirectory: userDataDir,
|
|
170
|
+
});
|
|
168
171
|
}
|
|
169
172
|
this.onCustomMessage = (window, message, data) => {
|
|
170
173
|
console.log("Get Custom Message:", message, data, "from window", window.id);
|
|
@@ -402,7 +405,9 @@ class WindowPool {
|
|
|
402
405
|
this.__registryLocalProxy(window, proxy.protocolName, proxy.localPath);
|
|
403
406
|
});
|
|
404
407
|
this.freeWindowCount++;
|
|
405
|
-
const webview = window.createWebview(
|
|
408
|
+
const webview = window.createWebview({
|
|
409
|
+
webContext: this.webContext,
|
|
410
|
+
});
|
|
406
411
|
const windowObj = new Window(window, webview, ++this.windowCount, this);
|
|
407
412
|
this.windows.push(windowObj);
|
|
408
413
|
webview.onIpcMessage((data) => {
|