@swf2es/desktop 0.0.0-stage → 0.1.14
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/LICENSE +202 -0
- package/README.md +132 -2
- package/dist/launch/electron.d.ts +14 -0
- package/dist/launch/electron.d.ts.map +1 -0
- package/dist/launch/electron.js +40 -0
- package/dist/launch/electron.js.map +1 -0
- package/dist/launch/launch.d.ts +3 -0
- package/dist/launch/launch.d.ts.map +1 -0
- package/dist/launch/launch.js +69 -0
- package/dist/launch/launch.js.map +1 -0
- package/dist/main/addresses.d.ts +7 -0
- package/dist/main/addresses.d.ts.map +1 -0
- package/dist/main/addresses.js +155 -0
- package/dist/main/addresses.js.map +1 -0
- package/dist/main/air.d.ts +71 -0
- package/dist/main/air.d.ts.map +1 -0
- package/dist/main/air.js +216 -0
- package/dist/main/air.js.map +1 -0
- package/dist/main/connections.d.ts +38 -0
- package/dist/main/connections.d.ts.map +1 -0
- package/dist/main/connections.js +103 -0
- package/dist/main/connections.js.map +1 -0
- package/dist/main/decompress.d.ts +51 -0
- package/dist/main/decompress.d.ts.map +1 -0
- package/dist/main/decompress.js +184 -0
- package/dist/main/decompress.js.map +1 -0
- package/dist/main/files.d.ts +9 -0
- package/dist/main/files.d.ts.map +1 -0
- package/dist/main/files.js +120 -0
- package/dist/main/files.js.map +1 -0
- package/dist/main/main.d.ts +2 -0
- package/dist/main/main.d.ts.map +1 -0
- package/dist/main/main.js +979 -0
- package/dist/main/main.js.map +1 -0
- package/dist/main/network.d.ts +182 -0
- package/dist/main/network.d.ts.map +1 -0
- package/dist/main/network.js +909 -0
- package/dist/main/network.js.map +1 -0
- package/dist/main/policy.d.ts +103 -0
- package/dist/main/policy.d.ts.map +1 -0
- package/dist/main/policy.js +481 -0
- package/dist/main/policy.js.map +1 -0
- package/dist/main/protocol.d.ts +14 -0
- package/dist/main/protocol.d.ts.map +1 -0
- package/dist/main/protocol.js +216 -0
- package/dist/main/protocol.js.map +1 -0
- package/dist/main/sandbox.d.ts +67 -0
- package/dist/main/sandbox.d.ts.map +1 -0
- package/dist/main/sandbox.js +182 -0
- package/dist/main/sandbox.js.map +1 -0
- package/dist/main/settings.d.ts +37 -0
- package/dist/main/settings.d.ts.map +1 -0
- package/dist/main/settings.js +88 -0
- package/dist/main/settings.js.map +1 -0
- package/dist/main/sockets.d.ts +10 -0
- package/dist/main/sockets.d.ts.map +1 -0
- package/dist/main/sockets.js +71 -0
- package/dist/main/sockets.js.map +1 -0
- package/dist/preload/preload.cjs +91 -0
- package/dist/preload/preload.cjs.map +1 -0
- package/dist/preload/preload.d.cts +2 -0
- package/dist/preload/preload.d.cts.map +1 -0
- package/dist/preload/prompt.cjs +12 -0
- package/dist/preload/prompt.cjs.map +1 -0
- package/dist/preload/prompt.d.cts +2 -0
- package/dist/preload/prompt.d.cts.map +1 -0
- package/dist/renderer/air.d.ts +14 -0
- package/dist/renderer/air.d.ts.map +1 -0
- package/dist/renderer/air.js +83 -0
- package/dist/renderer/air.js.map +1 -0
- package/dist/renderer/files.d.ts +4 -0
- package/dist/renderer/files.d.ts.map +1 -0
- package/dist/renderer/files.js +58 -0
- package/dist/renderer/files.js.map +1 -0
- package/dist/renderer/index.d.ts +7 -0
- package/dist/renderer/index.d.ts.map +1 -0
- package/dist/renderer/index.js +126 -0
- package/dist/renderer/index.js.map +1 -0
- package/dist/renderer/network.d.ts +6 -0
- package/dist/renderer/network.d.ts.map +1 -0
- package/dist/renderer/network.js +39 -0
- package/dist/renderer/network.js.map +1 -0
- package/dist/renderer/open-url.d.ts +10 -0
- package/dist/renderer/open-url.d.ts.map +1 -0
- package/dist/renderer/open-url.js +38 -0
- package/dist/renderer/open-url.js.map +1 -0
- package/dist/renderer/sockets.d.ts +4 -0
- package/dist/renderer/sockets.d.ts.map +1 -0
- package/dist/renderer/sockets.js +36 -0
- package/dist/renderer/sockets.js.map +1 -0
- package/dist/renderer/stage3d.d.ts +3 -0
- package/dist/renderer/stage3d.d.ts.map +1 -0
- package/dist/renderer/stage3d.js +26 -0
- package/dist/renderer/stage3d.js.map +1 -0
- package/dist/shared/api.d.ts +205 -0
- package/dist/shared/api.d.ts.map +1 -0
- package/dist/shared/api.js +5 -0
- package/dist/shared/api.js.map +1 -0
- package/package.json +46 -3
- package/src/launch/electron.ts +44 -0
- package/src/launch/launch.ts +72 -0
- package/src/launch/tsconfig.json +14 -0
- package/src/main/addresses.ts +184 -0
- package/src/main/air.ts +275 -0
- package/src/main/connections.ts +125 -0
- package/src/main/decompress.ts +219 -0
- package/src/main/files.ts +147 -0
- package/src/main/main.ts +1146 -0
- package/src/main/network.ts +1205 -0
- package/src/main/policy.ts +630 -0
- package/src/main/protocol.ts +237 -0
- package/src/main/sandbox.ts +213 -0
- package/src/main/settings.ts +117 -0
- package/src/main/sockets.ts +81 -0
- package/src/main/tsconfig.json +15 -0
- package/src/preload/preload.cts +110 -0
- package/src/preload/prompt.cts +11 -0
- package/src/preload/tsconfig.json +12 -0
- package/src/renderer/air.ts +100 -0
- package/src/renderer/files.ts +65 -0
- package/src/renderer/index.ts +145 -0
- package/src/renderer/network.ts +56 -0
- package/src/renderer/open-url.ts +50 -0
- package/src/renderer/sockets.ts +42 -0
- package/src/renderer/stage3d.ts +27 -0
- package/src/renderer/tsconfig.json +17 -0
- package/src/shared/api.ts +204 -0
- package/src/shared/tsconfig.json +11 -0
- package/static/icon.png +0 -0
- package/static/index.html +22 -0
- package/static/open-url.html +21 -0
- package/static/style.css +96 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// What the app remembers between runs, in settings.json under its user
|
|
2
|
+
// data: a playerglobal.abc the user chose, and the SWFs opened last.
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
const RECENT = 10;
|
|
7
|
+
const strings = (value) => Array.isArray(value) ? value.filter((v) => typeof v === "string") : [];
|
|
8
|
+
export class SettingsFile {
|
|
9
|
+
path;
|
|
10
|
+
current;
|
|
11
|
+
constructor(directory) {
|
|
12
|
+
this.path = join(directory, "settings.json");
|
|
13
|
+
this.current = this.read();
|
|
14
|
+
}
|
|
15
|
+
get settings() {
|
|
16
|
+
return this.current;
|
|
17
|
+
}
|
|
18
|
+
/** The playerglobal.abc the user chose, where it still is; builtin.abc ships with the player. */
|
|
19
|
+
libraries() {
|
|
20
|
+
return { playerglobal: this.found(this.current.playerglobal) };
|
|
21
|
+
}
|
|
22
|
+
/** Whether it was saved; it holds for this run either way. */
|
|
23
|
+
setLibrary(name, path) {
|
|
24
|
+
return this.update({ [name]: path });
|
|
25
|
+
}
|
|
26
|
+
setStage3D(enabled) {
|
|
27
|
+
return this.update({ stage3D: enabled });
|
|
28
|
+
}
|
|
29
|
+
/** `path` opened: first in the recent list. */
|
|
30
|
+
opened(path) {
|
|
31
|
+
this.update({
|
|
32
|
+
recent: [path, ...this.current.recent.filter((p) => p !== path)].slice(0, RECENT),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/** Whether `swf` is always allowed a socket to `endpoint`, "host:port". */
|
|
36
|
+
socketAllowed(swf, endpoint) {
|
|
37
|
+
return Object.hasOwn(this.current.sockets, swf) && this.current.sockets[swf].includes(endpoint);
|
|
38
|
+
}
|
|
39
|
+
/** Allow `swf` a socket to `endpoint` from now on: whether that was saved. */
|
|
40
|
+
allowSocket(swf, endpoint) {
|
|
41
|
+
const allowed = Object.hasOwn(this.current.sockets, swf) ? this.current.sockets[swf] : [];
|
|
42
|
+
return this.update({ sockets: { ...this.current.sockets, [swf]: [...allowed, endpoint] } });
|
|
43
|
+
}
|
|
44
|
+
clearRecent() {
|
|
45
|
+
this.update({ recent: [] });
|
|
46
|
+
}
|
|
47
|
+
found(path) {
|
|
48
|
+
return path && existsSync(path) ? path : null;
|
|
49
|
+
}
|
|
50
|
+
read() {
|
|
51
|
+
try {
|
|
52
|
+
const read = JSON.parse(readFileSync(this.path, "utf8"));
|
|
53
|
+
const text = (value) => (typeof value === "string" ? value : undefined);
|
|
54
|
+
return {
|
|
55
|
+
stage3D: read.stage3D === true,
|
|
56
|
+
playerglobal: text(read.playerglobal),
|
|
57
|
+
recent: strings(read.recent),
|
|
58
|
+
sockets: Object.fromEntries(Object.entries(typeof read.sockets === "object" && read.sockets !== null ? read.sockets : {}).map(([swf, endpoints]) => [swf, strings(endpoints)])),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
// None yet, or unreadable: start again rather than refuse to start.
|
|
63
|
+
return { stage3D: false, recent: [], sockets: {} };
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Apply `change`, and write the settings: whether they were written. A
|
|
68
|
+
* user data directory that cannot be written keeps them for this run.
|
|
69
|
+
*/
|
|
70
|
+
update(change) {
|
|
71
|
+
this.current = { ...this.current, ...change };
|
|
72
|
+
// Written whole and renamed into place, so a crash never leaves half a
|
|
73
|
+
// file, under a name no other write shares.
|
|
74
|
+
const temporary = `${this.path}.${process.pid}.${randomUUID()}.tmp`;
|
|
75
|
+
try {
|
|
76
|
+
mkdirSync(dirname(this.path), { recursive: true });
|
|
77
|
+
writeFileSync(temporary, `${JSON.stringify(this.current, null, 2)}\n`);
|
|
78
|
+
renameSync(temporary, this.path);
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
console.error(`swf2es: settings not saved to ${this.path}: ${error}`);
|
|
83
|
+
rmSync(temporary, { force: true });
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/main/settings.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,qEAAqE;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,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,CAAC;YACnD,aAAa,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;YACvE,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACjC,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,iCAAiC,IAAI,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC;YACtE,MAAM,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACnC,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type IpcMainEvent } from "electron";
|
|
2
|
+
/**
|
|
3
|
+
* Carry socket messages from pages that `trusted` accepts, each connection
|
|
4
|
+
* made only as `permit` allows it, to the address it gives where it gives
|
|
5
|
+
* one; null refuses it.
|
|
6
|
+
*/
|
|
7
|
+
export declare function bridgeSockets(trusted: (event: IpcMainEvent) => boolean, permit: (host: string, port: number) => Promise<{
|
|
8
|
+
address?: string;
|
|
9
|
+
} | null>): void;
|
|
10
|
+
//# sourceMappingURL=sockets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sockets.d.ts","sourceRoot":"","sources":["../../src/main/sockets.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAA6B,MAAM,UAAU,CAAC;AAGxE;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,OAAO,EACzC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,GAC3E,IAAI,CAkEN"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// flash.net.Socket's TCP connections, made here for the page, which has
|
|
2
|
+
// no network of its own beyond fetch, and carried over IPC. Each page's
|
|
3
|
+
// connections (connections.ts) close as it navigates, reloads or goes.
|
|
4
|
+
import { ipcMain } from "electron";
|
|
5
|
+
import { Connections, validEndpoint } from "./connections.js";
|
|
6
|
+
/**
|
|
7
|
+
* Carry socket messages from pages that `trusted` accepts, each connection
|
|
8
|
+
* made only as `permit` allows it, to the address it gives where it gives
|
|
9
|
+
* one; null refuses it.
|
|
10
|
+
*/
|
|
11
|
+
export function bridgeSockets(trusted, permit) {
|
|
12
|
+
const pages = new Map();
|
|
13
|
+
const connectionsOf = (contents) => {
|
|
14
|
+
const known = pages.get(contents);
|
|
15
|
+
if (known) {
|
|
16
|
+
return known;
|
|
17
|
+
}
|
|
18
|
+
const connections = new Connections((id, event) => {
|
|
19
|
+
if (!contents.isDestroyed()) {
|
|
20
|
+
contents.send("socket:event", id, event);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
pages.set(contents, connections);
|
|
24
|
+
contents.on("did-start-navigation", (details) => {
|
|
25
|
+
if (details.isMainFrame && !details.isSameDocument) {
|
|
26
|
+
connections.closeAll();
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
contents.once("destroyed", () => {
|
|
30
|
+
connections.closeAll();
|
|
31
|
+
pages.delete(contents);
|
|
32
|
+
});
|
|
33
|
+
return connections;
|
|
34
|
+
};
|
|
35
|
+
ipcMain.on("socket:connect", (event, id, host, port) => {
|
|
36
|
+
if (!trusted(event) || typeof id !== "number") {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const connections = connectionsOf(event.sender);
|
|
40
|
+
if (!validEndpoint(host, port)) {
|
|
41
|
+
connections.refuse(id);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const generation = connections.generation;
|
|
45
|
+
void permit(host, port)
|
|
46
|
+
.catch(() => null)
|
|
47
|
+
.then((allowed) => {
|
|
48
|
+
// The page that asked may have gone while the user was asked.
|
|
49
|
+
if (connections.generation !== generation) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (allowed) {
|
|
53
|
+
connections.connect(id, host, port, allowed.address);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
connections.refuse(id);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
ipcMain.on("socket:send", (event, id, bytes) => {
|
|
61
|
+
if (trusted(event) && typeof id === "number" && bytes instanceof Uint8Array) {
|
|
62
|
+
pages.get(event.sender)?.send(id, bytes);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
ipcMain.on("socket:close", (event, id) => {
|
|
66
|
+
if (trusted(event) && typeof id === "number") {
|
|
67
|
+
pages.get(event.sender)?.close(id);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=sockets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sockets.js","sourceRoot":"","sources":["../../src/main/sockets.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,wEAAwE;AACxE,uEAAuE;AACvE,OAAO,EAAqB,OAAO,EAAoB,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9D;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,OAAyC,EACzC,MAA4E;IAE5E,MAAM,KAAK,GAAG,IAAI,GAAG,EAA4B,CAAC;IAElD,MAAM,aAAa,GAAG,CAAC,QAAqB,EAAe,EAAE;QAC3D,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAClC,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,CAAC,EAAE,EAAE,KAAK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,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;YAChB,8DAA8D;YAC9D,IAAI,WAAW,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;gBAC1C,OAAO;YACT,CAAC;YAED,IAAI,OAAO,EAAE,CAAC;gBACZ,WAAW,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YACvD,CAAC;iBAAM,CAAC;gBACN,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACzB,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,EAAW,EAAE,KAAc,EAAE,EAAE;QAC/D,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,KAAK,YAAY,UAAU,EAAE,CAAC;YAC5E,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,EAAE,CAAC,cAAc,EAAE,CAAC,KAAK,EAAE,EAAW,EAAE,EAAE;QAChD,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE,CAAC;YAC7C,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;QACrC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const { contextBridge, ipcRenderer, webUtils } = require("electron");
|
|
4
|
+
let nextSocket = 1;
|
|
5
|
+
let nextRequest = 1;
|
|
6
|
+
/** The requests waiting for their response, by number. */
|
|
7
|
+
const responses = new Map();
|
|
8
|
+
ipcRenderer.on("net:response", (_event, id, response) => responses.get(id)?.(response));
|
|
9
|
+
const api = {
|
|
10
|
+
files: {
|
|
11
|
+
browse: (filters, multiple) => ipcRenderer.invoke("files:browse", filters, multiple),
|
|
12
|
+
save: (name) => ipcRenderer.invoke("files:save", name),
|
|
13
|
+
read: (id) => ipcRenderer.invoke("files:read", id),
|
|
14
|
+
write: (id, bytes) => ipcRenderer.invoke("files:write", id, bytes),
|
|
15
|
+
release: (id) => ipcRenderer.send("files:release", id),
|
|
16
|
+
},
|
|
17
|
+
start: () => ipcRenderer.invoke("desktop:start"),
|
|
18
|
+
onOpen: (listener) => {
|
|
19
|
+
ipcRenderer.on("desktop:open", (_event, movie) => listener(movie));
|
|
20
|
+
},
|
|
21
|
+
onClose: (listener) => {
|
|
22
|
+
ipcRenderer.on("desktop:close", () => listener());
|
|
23
|
+
},
|
|
24
|
+
openDialog: () => ipcRenderer.send("desktop:open-dialog"),
|
|
25
|
+
openUrlDialog: () => ipcRenderer.send("desktop:open-url-dialog"),
|
|
26
|
+
// The page never sees the path, only the URL the shell gives back.
|
|
27
|
+
openDropped: (file) => ipcRenderer.send("desktop:open-path", webUtils.getPathForFile(file)),
|
|
28
|
+
chooseLibrary: (name) => ipcRenderer.send("desktop:choose-library", name),
|
|
29
|
+
sockets: {
|
|
30
|
+
connect: (host, port) => {
|
|
31
|
+
const id = nextSocket++;
|
|
32
|
+
ipcRenderer.send("socket:connect", id, String(host), Number(port));
|
|
33
|
+
return id;
|
|
34
|
+
},
|
|
35
|
+
send: (id, bytes) => ipcRenderer.send("socket:send", id, bytes),
|
|
36
|
+
close: (id) => ipcRenderer.send("socket:close", id),
|
|
37
|
+
onEvent: (listener) => {
|
|
38
|
+
ipcRenderer.on("socket:event", (_event, id, event) => listener(id, event));
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
network: {
|
|
42
|
+
fetch: (request, cancel) => {
|
|
43
|
+
const id = nextRequest++;
|
|
44
|
+
cancel(() => ipcRenderer.send("net:abort", id));
|
|
45
|
+
// The response comes as a message of its own, before the answer that says it went.
|
|
46
|
+
return new Promise((resolve, reject) => {
|
|
47
|
+
responses.set(id, (response) => {
|
|
48
|
+
responses.delete(id);
|
|
49
|
+
resolve(response);
|
|
50
|
+
});
|
|
51
|
+
ipcRenderer.invoke("net:fetch", id, request).then(({ delivered }) => {
|
|
52
|
+
if (!delivered) {
|
|
53
|
+
responses.delete(id);
|
|
54
|
+
reject(new Error("swf2es: the request was refused"));
|
|
55
|
+
}
|
|
56
|
+
}, (error) => {
|
|
57
|
+
responses.delete(id);
|
|
58
|
+
reject(error);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
loadPolicyFile: (url) => ipcRenderer.send("net:policy-file", String(url)),
|
|
63
|
+
},
|
|
64
|
+
// Synchronous where File and NativeWindow read: their properties answer at once.
|
|
65
|
+
air: {
|
|
66
|
+
stat: (path) => ipcRenderer.sendSync("air:stat", String(path)),
|
|
67
|
+
list: (path) => ipcRenderer.sendSync("air:list", String(path)),
|
|
68
|
+
read: (path) => ipcRenderer.invoke("air:read", String(path)),
|
|
69
|
+
readSync: (path) => ipcRenderer.sendSync("air:read-sync", String(path)),
|
|
70
|
+
getItem: (name) => ipcRenderer.sendSync("air:item-get", String(name)),
|
|
71
|
+
setItem: (name, bytes) => ipcRenderer.sendSync("air:item-set", String(name), bytes),
|
|
72
|
+
removeItem: (name) => ipcRenderer.sendSync("air:item-remove", String(name)),
|
|
73
|
+
resetItems: () => ipcRenderer.sendSync("air:items-reset"),
|
|
74
|
+
writeSync: (path, bytes, offset, length) => ipcRenderer.sendSync("air:write-sync", String(path), bytes, Number(offset), Number(length)),
|
|
75
|
+
createDirectory: (path) => ipcRenderer.sendSync("air:create-directory", String(path)),
|
|
76
|
+
remove: (path) => ipcRenderer.sendSync("air:remove", String(path)),
|
|
77
|
+
move: (from, to) => ipcRenderer.sendSync("air:move", String(from), String(to)),
|
|
78
|
+
window: () => ipcRenderer.sendSync("air:window"),
|
|
79
|
+
setBounds: (bounds) => ipcRenderer.send("air:set-bounds", bounds),
|
|
80
|
+
setTitle: (title) => ipcRenderer.send("air:set-title", String(title)),
|
|
81
|
+
minimize: () => ipcRenderer.send("air:window-do", "minimize"),
|
|
82
|
+
maximize: () => ipcRenderer.send("air:window-do", "maximize"),
|
|
83
|
+
restore: () => ipcRenderer.send("air:window-do", "restore"),
|
|
84
|
+
activate: () => ipcRenderer.send("air:window-do", "activate"),
|
|
85
|
+
setVisible: (visible) => ipcRenderer.send("air:window-do", visible ? "show" : "hide"),
|
|
86
|
+
close: () => ipcRenderer.send("air:window-do", "close"),
|
|
87
|
+
exit: (code) => ipcRenderer.send("air:exit", Number(code) | 0),
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
contextBridge.exposeInMainWorld("swf2esDesktop", api);
|
|
91
|
+
//# sourceMappingURL=preload.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preload.cjs","sourceRoot":"","sources":["../../src/preload/preload.cts"],"names":[],"mappings":";;AAWA,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAA8B,CAAC;AAElG,IAAI,UAAU,GAAG,CAAC,CAAC;AACnB,IAAI,WAAW,GAAG,CAAC,CAAC;AACpB,0DAA0D;AAC1D,MAAM,SAAS,GAAG,IAAI,GAAG,EAA+C,CAAC;AACzE,WAAW,CAAC,EAAE,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,EAAU,EAAE,QAAyB,EAAE,EAAE,CAC/E,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAC9B,CAAC;AAEF,MAAM,GAAG,GAAe;IACtB,KAAK,EAAE;QACL,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,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,CAAC;QAC7D,QAAQ,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC;QAC7D,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC;QAC3D,QAAQ,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC;QAC7D,UAAU,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;QACrF,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC;QACvD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC/D;CACF,CAAC;AAEF,aAAa,CAAC,iBAAiB,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preload.d.cts","sourceRoot":"","sources":["../../src/preload/preload.cts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// The URL dialog's one way to the main process, window.swf2esPrompt: what
|
|
4
|
+
// to show first, and the user's answer. Apart from the player's page and
|
|
5
|
+
// its API, so that nothing a SWF runs can open a URL.
|
|
6
|
+
const { contextBridge, ipcRenderer } = require("electron");
|
|
7
|
+
contextBridge.exposeInMainWorld("swf2esPrompt", {
|
|
8
|
+
initial: () => ipcRenderer.invoke("prompt:initial"),
|
|
9
|
+
/** The URL to open, or null for none. */
|
|
10
|
+
answer: (url) => ipcRenderer.send("prompt:answer", url === null ? null : String(url)),
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=prompt.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.cjs","sourceRoot":"","sources":["../../src/preload/prompt.cts"],"names":[],"mappings":";;AAAA,0EAA0E;AAC1E,yEAAyE;AACzE,sDAAsD;AACtD,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,UAAU,CAA8B,CAAC;AAExF,aAAa,CAAC,iBAAiB,CAAC,cAAc,EAAE;IAC9C,OAAO,EAAE,GAAoB,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,gBAAgB,CAAC;IACpE,yCAAyC;IACzC,MAAM,EAAE,CAAC,GAAkB,EAAE,EAAE,CAC7B,WAAW,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;CACvE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.d.cts","sourceRoot":"","sources":["../../src/preload/prompt.cts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AirApplication, EncryptedStoreHost, FileSystemHost } from "@swf2es/player";
|
|
2
|
+
import type { AirLaunch, DesktopAir } from "../shared/api.js";
|
|
3
|
+
/** The player's view of `launch`: its application and window, and its file system. */
|
|
4
|
+
export declare function airHosts(launch: AirLaunch, air: DesktopAir): {
|
|
5
|
+
application: AirApplication;
|
|
6
|
+
fileSystem: FileSystemHost;
|
|
7
|
+
encryptedStore: EncryptedStoreHost;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The native path an app:, app-storage: or file: URL names in `launch`;
|
|
11
|
+
* null for any other URL. The shell judges what it may read.
|
|
12
|
+
*/
|
|
13
|
+
export declare function airPath(launch: AirLaunch, url: string): string | null;
|
|
14
|
+
//# sourceMappingURL=air.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"air.d.ts","sourceRoot":"","sources":["../../src/renderer/air.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9D,sFAAsF;AACtF,wBAAgB,QAAQ,CACtB,MAAM,EAAE,SAAS,EACjB,GAAG,EAAE,UAAU,GACd;IACD,WAAW,EAAE,cAAc,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC;IAC3B,cAAc,EAAE,kBAAkB,CAAC;CACpC,CA6CA;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA0BrE"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/** The player's view of `launch`: its application and window, and its file system. */
|
|
2
|
+
export function airHosts(launch, air) {
|
|
3
|
+
return {
|
|
4
|
+
application: {
|
|
5
|
+
descriptor: launch.descriptor,
|
|
6
|
+
id: launch.id,
|
|
7
|
+
arguments: launch.arguments,
|
|
8
|
+
currentDirectory: launch.currentDirectory,
|
|
9
|
+
window: {
|
|
10
|
+
bounds: () => air.window().bounds,
|
|
11
|
+
setBounds: (bounds) => air.setBounds(bounds),
|
|
12
|
+
title: () => air.window().title,
|
|
13
|
+
setTitle: (title) => air.setTitle(title),
|
|
14
|
+
displayState: () => air.window().displayState,
|
|
15
|
+
minimize: () => air.minimize(),
|
|
16
|
+
maximize: () => air.maximize(),
|
|
17
|
+
restore: () => air.restore(),
|
|
18
|
+
active: () => air.window().active,
|
|
19
|
+
activate: () => air.activate(),
|
|
20
|
+
visible: () => air.window().visible,
|
|
21
|
+
setVisible: (visible) => air.setVisible(visible),
|
|
22
|
+
close: () => air.close(),
|
|
23
|
+
stageOffset: () => air.window().contentOffset,
|
|
24
|
+
},
|
|
25
|
+
exit: (code) => air.exit(code),
|
|
26
|
+
},
|
|
27
|
+
fileSystem: {
|
|
28
|
+
separator: launch.separator,
|
|
29
|
+
directories: launch.directories,
|
|
30
|
+
stat: (path) => air.stat(path),
|
|
31
|
+
list: (path) => air.list(path),
|
|
32
|
+
read: (path) => air.readSync(path),
|
|
33
|
+
// A copy of the bytes alone: IPC would carry all of a view's buffer.
|
|
34
|
+
write: (path, bytes, offset, length) => air.writeSync(path, bytes.slice(), offset, length),
|
|
35
|
+
createDirectory: (path) => air.createDirectory(path),
|
|
36
|
+
remove: (path) => air.remove(path),
|
|
37
|
+
move: (from, to) => air.move(from, to),
|
|
38
|
+
},
|
|
39
|
+
encryptedStore: {
|
|
40
|
+
getItem: (name) => air.getItem(name),
|
|
41
|
+
// A copy of the bytes alone: IPC would carry all of a view's buffer.
|
|
42
|
+
setItem: (name, bytes) => air.setItem(name, bytes.slice()),
|
|
43
|
+
removeItem: (name) => air.removeItem(name),
|
|
44
|
+
reset: () => air.resetItems(),
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The native path an app:, app-storage: or file: URL names in `launch`;
|
|
50
|
+
* null for any other URL. The shell judges what it may read.
|
|
51
|
+
*/
|
|
52
|
+
export function airPath(launch, url) {
|
|
53
|
+
const m = /^(app|app-storage|file):(.*)$/i.exec(url);
|
|
54
|
+
if (!m) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
const sep = launch.separator;
|
|
58
|
+
let rest;
|
|
59
|
+
try {
|
|
60
|
+
// A query or a fragment is no part of the file's name.
|
|
61
|
+
rest = decodeURIComponent(m[2].replace(/[?#].*$/, ""));
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
switch (m[1].toLowerCase()) {
|
|
67
|
+
case "app":
|
|
68
|
+
return join(launch.directories.application, rest, sep);
|
|
69
|
+
case "app-storage":
|
|
70
|
+
return join(launch.directories.applicationStorage, rest, sep);
|
|
71
|
+
default: {
|
|
72
|
+
// file:///path, or file:///C:/path on Windows.
|
|
73
|
+
const path = rest.replace(/^\/\/[^/]*/, "");
|
|
74
|
+
return sep === "\\" ? path.replace(/^\/([A-Za-z]:)/, "$1").replaceAll("/", "\\") : path;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/** `rest`, a URL's path, under `base`, a directory: its segments joined by `sep`. */
|
|
79
|
+
function join(base, rest, sep) {
|
|
80
|
+
const segments = rest.split("/").filter((s) => s !== "" && s !== ".");
|
|
81
|
+
return [base.replace(/[\\/]+$/, ""), ...segments].join(sep);
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=air.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"air.js","sourceRoot":"","sources":["../../src/renderer/air.ts"],"names":[],"mappings":"AAQA,sFAAsF;AACtF,MAAM,UAAU,QAAQ,CACtB,MAAiB,EACjB,GAAe;IAMf,OAAO;QACL,WAAW,EAAE;YACX,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;YACzC,MAAM,EAAE;gBACN,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM;gBACjC,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC;gBAC5C,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK;gBAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC;gBACxC,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MA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Y,GAAG,QAAQ,CA6DxD"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export function shellFiles(files) {
|
|
2
|
+
const collected = new FinalizationRegistry((id) => files.release(id));
|
|
3
|
+
return {
|
|
4
|
+
async browse(filters, multiple, signal) {
|
|
5
|
+
const selected = await files.browse(filters, multiple);
|
|
6
|
+
if (signal.aborted) {
|
|
7
|
+
for (const file of selected) {
|
|
8
|
+
files.release(file.id);
|
|
9
|
+
}
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
signal.addEventListener("abort", () => {
|
|
13
|
+
for (const file of selected) {
|
|
14
|
+
files.release(file.id);
|
|
15
|
+
}
|
|
16
|
+
}, { once: true });
|
|
17
|
+
return selected.map((file) => {
|
|
18
|
+
const selectedFile = {
|
|
19
|
+
...file,
|
|
20
|
+
async read(signal) {
|
|
21
|
+
signal.throwIfAborted();
|
|
22
|
+
const bytes = await files.read(file.id);
|
|
23
|
+
signal.throwIfAborted();
|
|
24
|
+
return new Uint8Array(bytes);
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
collected.register(selectedFile, file.id);
|
|
28
|
+
return selectedFile;
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
async save(name, signal) {
|
|
32
|
+
const file = await files.save(name);
|
|
33
|
+
if (!file) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
if (signal.aborted) {
|
|
37
|
+
files.release(file.id);
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
const release = () => files.release(file.id);
|
|
41
|
+
signal.addEventListener("abort", release, { once: true });
|
|
42
|
+
return {
|
|
43
|
+
name: file.name,
|
|
44
|
+
async write(bytes, signal) {
|
|
45
|
+
try {
|
|
46
|
+
signal.throwIfAborted();
|
|
47
|
+
await files.write(file.id, bytes);
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
signal.removeEventListener("abort", release);
|
|
51
|
+
release();
|
|
52
|
+
}
|
|
53
|
+
},
|
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