js-dos 8.1.3 → 8.1.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js-dos",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.4",
|
|
4
4
|
"description": "Full-featured DOS player with multiple emulator backends",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@typescript-eslint/parser": "^6.20.0",
|
|
36
36
|
"autoprefixer": "^10.4.17",
|
|
37
37
|
"daisyui": "^3.9.3",
|
|
38
|
-
"emulators": "8.1.
|
|
38
|
+
"emulators": "8.1.3",
|
|
39
39
|
"eslint": "^8.56.0",
|
|
40
40
|
"eslint-config-google": "^0.14.0",
|
|
41
41
|
"postcss": "^8.4.33",
|
|
@@ -50,6 +50,7 @@ export class Drive {
|
|
|
50
50
|
preloadQueue: number[] = [];
|
|
51
51
|
|
|
52
52
|
originReadMode: boolean;
|
|
53
|
+
readOnly = false;
|
|
53
54
|
|
|
54
55
|
public constructor(endpoint: string,
|
|
55
56
|
owner: string,
|
|
@@ -140,7 +141,8 @@ export class Drive {
|
|
|
140
141
|
}
|
|
141
142
|
socket.removeEventListener("message", onPreloadMessage);
|
|
142
143
|
socket.addEventListener("message", onMessage);
|
|
143
|
-
this.
|
|
144
|
+
this.readOnly = mode !== "write";
|
|
145
|
+
this.openFn(true, !this.readOnly,
|
|
144
146
|
(Number.parseInt(sizeStr) ?? 2 * 1024 * 1024) * 1024,
|
|
145
147
|
this.preloadQueue,
|
|
146
148
|
aheadRange);
|
|
@@ -304,6 +306,8 @@ export class Drive {
|
|
|
304
306
|
this.readBuffer[5 + i * 4 + 3] = (origin >> 24) & 0xFF;
|
|
305
307
|
}
|
|
306
308
|
socket.send(this.readBuffer.slice(0, sectors.length * 4 + 5).buffer);
|
|
309
|
+
} else if (this.readOnly) {
|
|
310
|
+
request.resolve(0);
|
|
307
311
|
} else {
|
|
308
312
|
const { sectors, buffer, resolve } = request;
|
|
309
313
|
this.stats.write += this.sectorSize;
|
|
@@ -596,9 +596,9 @@ callsites@^3.0.0:
|
|
|
596
596
|
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
|
|
597
597
|
|
|
598
598
|
caniuse-lite@^1.0.30001517:
|
|
599
|
-
version "1.0.
|
|
600
|
-
resolved "https://registry.
|
|
601
|
-
integrity sha512-
|
|
599
|
+
version "1.0.30001632"
|
|
600
|
+
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz"
|
|
601
|
+
integrity sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==
|
|
602
602
|
|
|
603
603
|
chalk@^4.0.0, chalk@^4.1.0:
|
|
604
604
|
version "4.1.2"
|
package/src/vite-env.d.ts
CHANGED
|
@@ -39,8 +39,10 @@ function useLog(ci: CommandInterface): void {
|
|
|
39
39
|
} else if (msgType === "log" && args[0]?.indexOf("sockdrive:") !== -1) {
|
|
40
40
|
const drive = args[0].substring(args[0].indexOf(" ") + 1, args[0].indexOf(","));
|
|
41
41
|
dispatch(uiSlice.actions.cloudSaves(false));
|
|
42
|
-
if (args[0]?.indexOf("write=
|
|
42
|
+
if (args[0]?.indexOf("write=") !== -1) {
|
|
43
43
|
console.log("drive", drive, "config:", args[0]);
|
|
44
|
+
}
|
|
45
|
+
if (args[0]?.indexOf("write=false") !== -1) {
|
|
44
46
|
dispatch(uiSlice.actions.readOnlyWarning(true));
|
|
45
47
|
}
|
|
46
48
|
if (args[0]?.indexOf("preload=") !== -1) {
|
|
@@ -13,7 +13,6 @@ declare const emulators: Emulators;
|
|
|
13
13
|
export function PreRunWindow() {
|
|
14
14
|
const account = useSelector((state: State) => state.auth.account);
|
|
15
15
|
const emuVersion = useSelector((state: State) => state.dos.emuVersion);
|
|
16
|
-
const lang = useSelector((state: State) => state.i18n.lang);
|
|
17
16
|
const dispatch = useDispatch();
|
|
18
17
|
const t = useT();
|
|
19
18
|
|
|
@@ -22,9 +21,7 @@ export function PreRunWindow() {
|
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
function openPremiumPage() {
|
|
25
|
-
window.open(
|
|
26
|
-
"https://dos.zone/ru/blog/premium-subscription/" :
|
|
27
|
-
"https://dos.zone/blog/premium-subscription/", "_blank");
|
|
24
|
+
window.open("https://js-dos.com/cloud-overview.html", "_blank");
|
|
28
25
|
}
|
|
29
26
|
|
|
30
27
|
return <div class="pre-run-window">
|
|
@@ -82,7 +79,8 @@ export function PreRunWindow() {
|
|
|
82
79
|
<MouseSensitiviySlider class="mt-4 w-full max-w-sm" />
|
|
83
80
|
<VolumeSlider class="w-full max-w-sm" />
|
|
84
81
|
|
|
85
|
-
<div class="text-center mt-8">emu
|
|
82
|
+
<div class="text-center mt-8">jsdos/emu version:
|
|
83
|
+
<span class="text-ellipsis overflow-hidden">{JSDOS_VERSION}/{emuVersion}</span></div>
|
|
86
84
|
</div>;
|
|
87
85
|
}
|
|
88
86
|
|