@ecmaos/kernel 0.2.1 → 0.2.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/README.md +21 -12
- package/dist/.vite/manifest.json +14 -14
- package/dist/{browser-Bg2k_w8R.js → browser-CH-1j4CC.js} +2 -2
- package/dist/{browser-Bg2k_w8R.js.map → browser-CH-1j4CC.js.map} +1 -1
- package/dist/{empty-DV8na5Rc.js → empty-C_utvVBb.js} +15 -13
- package/dist/empty-C_utvVBb.js.map +1 -0
- package/dist/{install-BIXZ5bsq.js → install-vMOoUe2p.js} +2 -2
- package/dist/{install-BIXZ5bsq.js.map → install-vMOoUe2p.js.map} +1 -1
- package/dist/kernel.d.ts +0 -8
- package/dist/kernel.js +1 -1
- package/dist/{topbar.min-cv6_CM7b.js → topbar.min-DTxqjRf-.js} +2 -2
- package/dist/{topbar.min-cv6_CM7b.js.map → topbar.min-DTxqjRf-.js.map} +1 -1
- package/dist/ui.d.ts +0 -8
- package/dist/ui.js +1 -1
- package/dist/ui.js.map +1 -1
- package/package.json +4 -4
- package/dist/empty-DV8na5Rc.js.map +0 -1
package/README.md
CHANGED
|
@@ -8,26 +8,30 @@
|
|
|
8
8
|
|
|
9
9
|
[ecmaOS](https://ecmaos.sh) is a [browser-based operating system kernel](https://global.discourse-cdn.com/spiceworks/original/4X/8/7/b/87b7be8e7e2cd932affe5449dba69dc16e30d721.gif) and suite of applications written primarily in TypeScript, AssemblyScript, and C++. It's the successor of [web3os](https://github.com/web3os-org/kernel).
|
|
10
10
|
|
|
11
|
-
The goal is to create a kernel and supporting apps that tie together modern web technologies and utilities to form an "operating system" that can run on modern browsers, not just to create a "desktop experience". Its main use case is to provide a consistent environment for running web apps, but it has features that allow for more powerful custom scenarios. The kernel could also be repurposed as a platform for custom applications, games, and more.
|
|
11
|
+
The goal is to create a kernel and supporting apps that tie together modern web technologies and utilities to form an "operating system" that can run on modern browsers, not just to create a "desktop experience". It offers the ability to run a wide variety of apps on top of a (mostly) sandboxed foundation, offering some measure of security by default. Its main use case is to provide a consistent environment for running web apps, but it has features that allow for more powerful custom scenarios. The kernel could also be repurposed as a platform for custom applications, games, and more.
|
|
12
|
+
|
|
13
|
+
---
|
|
12
14
|
|
|
13
15
|
> *"The computer can be used as a tool to liberate and protect people, rather than to control them."*
|
|
14
16
|
> — Hal Finney
|
|
15
17
|
|
|
16
|
-
[](https://docs.ecmaos.sh)
|
|
17
18
|
[](https://www.npmjs.com/package/@ecmaos/kernel)
|
|
18
19
|
[](https://ecmaos.sh)
|
|
19
20
|
[](https://github.com/ecmaos/ecmaos/pulse)
|
|
20
21
|
[](https://github.com/ecmaos/ecmaos/commit/main)
|
|
22
|
+
[](https://docs.ecmaos.sh)
|
|
23
|
+
[](https://github.com/ecmaos/ecmaos/blob/main/LICENSE)
|
|
21
24
|
|
|
22
|
-
[](https://github.com/ecmaos/ecmaos/issues)
|
|
23
|
-
[](https://github.com/ecmaos/ecmaos/issues?q=is%3Aissue+is%3Aclosed)
|
|
24
|
-
[](https://github.com/ecmaos/ecmaos/pulls)
|
|
25
|
-
[](https://github.com/ecmaos/ecmaos/pulls?q=is%3Apr+is%3Aclosed)
|
|
25
|
+
[](https://github.com/ecmaos/ecmaos/issues)
|
|
26
|
+
[](https://github.com/ecmaos/ecmaos/issues?q=is%3Aissue+is%3Aclosed)
|
|
27
|
+
[](https://github.com/ecmaos/ecmaos/pulls)
|
|
28
|
+
[](https://github.com/ecmaos/ecmaos/pulls?q=is%3Apr+is%3Aclosed)
|
|
26
29
|
|
|
27
|
-
[](https://github.com/ecmaos/ecmaos/stargazers)
|
|
31
|
+
[](https://github.com/ecmaos/ecmaos/network)
|
|
32
|
+
[](https://github.com/ecmaos/ecmaos/watchers)
|
|
33
|
+
[](https://github.com/sponsors/mathiscode)
|
|
34
|
+
[](https://github.com/ecmaos/ecmaos/graphs/contributors)
|
|
31
35
|
|
|
32
36
|
[](https://discord.gg/ZJYGkbVsCh)
|
|
33
37
|
[](https://matrix.to/#/#ecmaos:matrix.org)
|
|
@@ -36,7 +40,7 @@ The goal is to create a kernel and supporting apps that tie together modern web
|
|
|
36
40
|
|
|
37
41
|
## Features
|
|
38
42
|
|
|
39
|
-
- TypeScript, WebAssembly, AssemblyScript, C++
|
|
43
|
+
- TypeScript, WebAssembly, AssemblyScript, Rust, C++
|
|
40
44
|
- Filesystem supporting multiple backends powered by [zenfs](https://github.com/zen-fs/core)
|
|
41
45
|
- Terminal interface powered by [xterm.js](https://xtermjs.org)
|
|
42
46
|
- Pseudo-streams, allowing redirection and piping
|
|
@@ -51,6 +55,7 @@ The goal is to create a kernel and supporting apps that tie together modern web
|
|
|
51
55
|
- Internationalization framework for translating text powered by [i18next](https://www.i18next.com)
|
|
52
56
|
- Window manager powered by [WinBox](https://github.com/nextapps-de/winbox)
|
|
53
57
|
- `BIOS`: A C++ module compiled to WebAssembly with [Emscripten](https://emscripten.org) providing performance-critical functionality
|
|
58
|
+
- `Jaffa`: A [Tauri](https://tauri.app) app for running ecmaOS in a desktop or mobile environment
|
|
54
59
|
- `Metal`: An API server for allowing connections to physical systems from ecmaOS using [Hono](https://hono.dev)
|
|
55
60
|
- `SWAPI`: An API server running completely inside a service worker using [Hono](https://hono.dev)
|
|
56
61
|
|
|
@@ -74,7 +79,7 @@ The goal is to create a kernel and supporting apps that tie together modern web
|
|
|
74
79
|
|
|
75
80
|
- `Core`
|
|
76
81
|
- Core modules provide the system's essential functionality; this includes the kernel itself
|
|
77
|
-
- Other core modules include Metal, SWAPI,
|
|
82
|
+
- Other core modules include BIOS, Jaffa, Metal, SWAPI, as well as the main `@ecmaos/types` package
|
|
78
83
|
|
|
79
84
|
- `Commands`
|
|
80
85
|
- Commands are small utilities that aren't quite full Apps, provided by the shell
|
|
@@ -86,6 +91,10 @@ The goal is to create a kernel and supporting apps that tie together modern web
|
|
|
86
91
|
- Devices may also be directly read/written, and will behave accordingly (or have no effect)
|
|
87
92
|
- An individual device module can provide multiple device drivers, e.g. `/dev/usb` provides `/dev/usb-mydevice-0001-0002`
|
|
88
93
|
|
|
94
|
+
- `Jaffa`
|
|
95
|
+
- Jaffa is a [Tauri](https://tauri.app) wrapper for the ecmaOS kernel
|
|
96
|
+
- It's used to tie the kernel into a desktop or mobile environment, allowing for native functionality
|
|
97
|
+
|
|
89
98
|
- `Kernel`
|
|
90
99
|
- Authentication (WebAuthn)
|
|
91
100
|
- Components (Web Components/Custom Elements)
|
package/dist/.vite/manifest.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_browser-
|
|
3
|
-
"file": "browser-
|
|
2
|
+
"_browser-CH-1j4CC.js": {
|
|
3
|
+
"file": "browser-CH-1j4CC.js",
|
|
4
4
|
"name": "browser",
|
|
5
5
|
"isDynamicEntry": true,
|
|
6
6
|
"imports": [
|
|
7
|
-
"_empty-
|
|
7
|
+
"_empty-C_utvVBb.js"
|
|
8
8
|
]
|
|
9
9
|
},
|
|
10
|
-
"_empty-
|
|
11
|
-
"file": "empty-
|
|
10
|
+
"_empty-C_utvVBb.js": {
|
|
11
|
+
"file": "empty-C_utvVBb.js",
|
|
12
12
|
"name": "empty",
|
|
13
13
|
"dynamicImports": [
|
|
14
|
-
"_topbar.min-
|
|
15
|
-
"_browser-
|
|
14
|
+
"_topbar.min-DTxqjRf-.js",
|
|
15
|
+
"_browser-CH-1j4CC.js",
|
|
16
16
|
"src/tree/lib/commands/install.ts",
|
|
17
17
|
"node_modules/.pnpm/figlet@1.8.0/node_modules/figlet/importable-fonts/Poison.js"
|
|
18
18
|
]
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"file": "kernel.css",
|
|
22
22
|
"src": "_kernel.css"
|
|
23
23
|
},
|
|
24
|
-
"_topbar.min-
|
|
25
|
-
"file": "topbar.min-
|
|
24
|
+
"_topbar.min-DTxqjRf-.js": {
|
|
25
|
+
"file": "topbar.min-DTxqjRf-.js",
|
|
26
26
|
"name": "topbar.min",
|
|
27
27
|
"isDynamicEntry": true,
|
|
28
28
|
"imports": [
|
|
29
|
-
"_empty-
|
|
29
|
+
"_empty-C_utvVBb.js"
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"node_modules/.pnpm/figlet@1.8.0/node_modules/figlet/importable-fonts/Poison.js": {
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
"src": "src/tree/kernel.ts",
|
|
42
42
|
"isEntry": true,
|
|
43
43
|
"imports": [
|
|
44
|
-
"_empty-
|
|
44
|
+
"_empty-C_utvVBb.js"
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"src/tree/lib/commands/install.ts": {
|
|
48
|
-
"file": "install-
|
|
48
|
+
"file": "install-vMOoUe2p.js",
|
|
49
49
|
"name": "install",
|
|
50
50
|
"src": "src/tree/lib/commands/install.ts",
|
|
51
51
|
"isDynamicEntry": true,
|
|
52
52
|
"imports": [
|
|
53
|
-
"_empty-
|
|
53
|
+
"_empty-C_utvVBb.js"
|
|
54
54
|
]
|
|
55
55
|
},
|
|
56
56
|
"src/ui.ts": {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"src": "src/ui.ts",
|
|
60
60
|
"isEntry": true,
|
|
61
61
|
"imports": [
|
|
62
|
-
"_empty-
|
|
62
|
+
"_empty-C_utvVBb.js"
|
|
63
63
|
]
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs } from "./empty-
|
|
1
|
+
import { g as getDefaultExportFromCjs } from "./empty-C_utvVBb.js";
|
|
2
2
|
var browser$2;
|
|
3
3
|
var hasRequiredBrowser;
|
|
4
4
|
function requireBrowser() {
|
|
@@ -20,4 +20,4 @@ const browser$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
20
20
|
export {
|
|
21
21
|
browser$1 as b
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=browser-
|
|
23
|
+
//# sourceMappingURL=browser-CH-1j4CC.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-
|
|
1
|
+
{"version":3,"file":"browser-CH-1j4CC.js","sources":["../node_modules/.pnpm/ws@8.18.0/node_modules/ws/browser.js"],"sourcesContent":["'use strict';\n\nmodule.exports = function () {\n throw new Error(\n 'ws does not work in the browser. Browser clients must use the native ' +\n 'WebSocket object'\n );\n};\n"],"names":["browser"],"mappings":";;;;;;AAEAA,cAAiB,WAAY;AAC3B,UAAM,IAAI;AAAA,MACR;AAAA,IAED;AAAA,EACF;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -22009,7 +22009,7 @@ class Dom {
|
|
|
22009
22009
|
}
|
|
22010
22010
|
async topbar(show) {
|
|
22011
22011
|
if (!this._topbar) return;
|
|
22012
|
-
const { default: topbar } = await import("./topbar.min-
|
|
22012
|
+
const { default: topbar } = await import("./topbar.min-DTxqjRf-.js").then((n) => n.t);
|
|
22013
22013
|
this._topbarShow = show ?? !this._topbarShow;
|
|
22014
22014
|
if (this._topbarShow) topbar.show();
|
|
22015
22015
|
else topbar.hide();
|
|
@@ -27121,7 +27121,7 @@ class Filesystem {
|
|
|
27121
27121
|
return this._fs.constants;
|
|
27122
27122
|
}
|
|
27123
27123
|
/**
|
|
27124
|
-
* @returns
|
|
27124
|
+
* @returns The filesystem credentials.
|
|
27125
27125
|
*/
|
|
27126
27126
|
get credentials() {
|
|
27127
27127
|
return credentials;
|
|
@@ -50609,7 +50609,7 @@ async function createSimpleWebSocket(url) {
|
|
|
50609
50609
|
case "node": {
|
|
50610
50610
|
let WebSocket2;
|
|
50611
50611
|
try {
|
|
50612
|
-
WebSocket2 = (await import("./browser-
|
|
50612
|
+
WebSocket2 = (await import("./browser-CH-1j4CC.js").then((n) => n.b)).default;
|
|
50613
50613
|
} catch (error) {
|
|
50614
50614
|
try {
|
|
50615
50615
|
WebSocket2 = __require("ws");
|
|
@@ -67521,7 +67521,7 @@ const TerminalCommands = (kernel, shell, terminal) => {
|
|
|
67521
67521
|
{ name: "registry", type: String, description: "The registry to use", defaultValue: "https://registry.npmjs.org" }
|
|
67522
67522
|
],
|
|
67523
67523
|
run: async (argv) => {
|
|
67524
|
-
const { default: install } = await import("./install-
|
|
67524
|
+
const { default: install } = await import("./install-vMOoUe2p.js");
|
|
67525
67525
|
return await install({ kernel, shell, terminal, args: [argv.package, argv.registry] });
|
|
67526
67526
|
}
|
|
67527
67527
|
}),
|
|
@@ -80483,7 +80483,7 @@ var createBIOS = (() => {
|
|
|
80483
80483
|
return moduleRtn;
|
|
80484
80484
|
};
|
|
80485
80485
|
})();
|
|
80486
|
-
const __vite_import_meta_env__ = { "AUTHOR": { "name": "Jay Mathis", "email": "code@mathis.network", "url": "https://github.com/mathiscode" }, "BASE_URL": "/", "DESCRIPTION": "ecmaOS: Micro-kernel and framework for web technologies", "DEV": false, "HOMEPAGE": "https://ecmaos.sh", "KNOWN_ISSUES": ["Don't expect any sort of POSIX compliance at this stage", "Most commands/devices are very basic implementations, not complete reproductions", "stdin/stdout/stderr streams and redirection can be wonky and don't work everywhere, but are coming along", "Lots of unfinished work; watch your step"], "MODE": "production", "NAME": "@ecmaos/kernel", "PROD": true, "REPOSITORY": "https://github.com/ecmaos/ecmaos", "SSR": false, "TIPS": ["You can 'run' some devices that offer a CLI - for example, '/dev/battery --help'"], "VERSION": "0.2.
|
|
80486
|
+
const __vite_import_meta_env__ = { "AUTHOR": { "name": "Jay Mathis", "email": "code@mathis.network", "url": "https://github.com/mathiscode" }, "BASE_URL": "/", "DESCRIPTION": "ecmaOS: Micro-kernel and framework for web technologies", "DEV": false, "HOMEPAGE": "https://ecmaos.sh", "KNOWN_ISSUES": ["Don't expect any sort of POSIX compliance at this stage", "Most commands/devices are very basic implementations, not complete reproductions", "stdin/stdout/stderr streams and redirection can be wonky and don't work everywhere, but are coming along", "Lots of unfinished work; watch your step"], "MODE": "production", "NAME": "@ecmaos/kernel", "PROD": true, "REPOSITORY": "https://github.com/ecmaos/ecmaos", "SSR": false, "TIPS": ["You can 'run' some devices that offer a CLI - for example, '/dev/battery --help'"], "VERSION": "0.2.1", "VITE_APP_SHOW_DEFAULT_LOGIN": "true", "VITE_AUTOLOGIN_PASSWORD": "root", "VITE_AUTOLOGIN_USERNAME": "root", "VITE_KERNEL_INTERVALS_PROC": "1000", "VITE_KERNEL_MODULES": "http://localhost:3000/build/release.js", "VITE_METAL_SOCKET": "ws://localhost:30445/socket", "VITE_PORT": "30443" };
|
|
80487
80487
|
var define_import_meta_env_AUTHOR_default = { name: "Jay Mathis", email: "code@mathis.network", url: "https://github.com/mathiscode" };
|
|
80488
80488
|
var define_import_meta_env_KNOWN_ISSUES_default = ["Don't expect any sort of POSIX compliance at this stage", "Most commands/devices are very basic implementations, not complete reproductions", "stdin/stdout/stderr streams and redirection can be wonky and don't work everywhere, but are coming along", "Lots of unfinished work; watch your step"];
|
|
80489
80489
|
var define_import_meta_env_TIPS_default = ["You can 'run' some devices that offer a CLI - for example, '/dev/battery --help'"];
|
|
@@ -80527,7 +80527,7 @@ class Kernel {
|
|
|
80527
80527
|
/** Name of the kernel */
|
|
80528
80528
|
__publicField(this, "name", "@ecmaos/kernel");
|
|
80529
80529
|
/** Version string of the kernel */
|
|
80530
|
-
__publicField(this, "version", "0.2.
|
|
80530
|
+
__publicField(this, "version", "0.2.1");
|
|
80531
80531
|
/** Authentication and authorization service */
|
|
80532
80532
|
__publicField(this, "auth");
|
|
80533
80533
|
/** BIOS module providing low-level functionality */
|
|
@@ -80681,7 +80681,7 @@ class Kernel {
|
|
|
80681
80681
|
} catch (error) {
|
|
80682
80682
|
this.log?.error(`Failed to load figlet font ${figletFont}: ${error.message}`);
|
|
80683
80683
|
}
|
|
80684
|
-
this.terminal.writeln(`${this.terminal.createSpecialLink("https://ecmaos.sh", "@ecmaos/kernel")} v${"0.2.
|
|
80684
|
+
this.terminal.writeln(`${this.terminal.createSpecialLink("https://ecmaos.sh", "@ecmaos/kernel")} v${"0.2.1"}`);
|
|
80685
80685
|
this.terminal.writeln(`${t2("kernel.madeBy")} ${this.terminal.createSpecialLink(
|
|
80686
80686
|
define_import_meta_env_AUTHOR_default?.url || "https://github.com/mathiscode",
|
|
80687
80687
|
`${define_import_meta_env_AUTHOR_default?.name} <${define_import_meta_env_AUTHOR_default?.email}>`
|
|
@@ -80700,13 +80700,13 @@ class Kernel {
|
|
|
80700
80700
|
spinner.start();
|
|
80701
80701
|
if (logoFiglet) console.log(`%c${logoFiglet}`, "color: green");
|
|
80702
80702
|
console.log(`%c${"https://github.com/ecmaos/ecmaos"}`, "color: blue; text-decoration: underline; font-size: 16px");
|
|
80703
|
-
this.log.info(`${"@ecmaos/kernel"} v${"0.2.
|
|
80703
|
+
this.log.info(`${"@ecmaos/kernel"} v${"0.2.1"}`);
|
|
80704
80704
|
if (Notification?.permission === "default") Notification.requestPermission();
|
|
80705
80705
|
if (Notification?.permission === "denied") this.log?.warn(t2("kernel.permissionNotificationDenied"));
|
|
80706
80706
|
this.intervals.set("title-blink", () => {
|
|
80707
80707
|
globalThis.document.title = globalThis.document.title.includes("_") ? "ecmaos# " : "ecmaos# _";
|
|
80708
80708
|
}, 600);
|
|
80709
|
-
this.toast.success(`${"@ecmaos/kernel"} v${"0.2.
|
|
80709
|
+
this.toast.success(`${"@ecmaos/kernel"} v${"0.2.1"}`);
|
|
80710
80710
|
}
|
|
80711
80711
|
await this.configure({ filesystem: Filesystem.options() });
|
|
80712
80712
|
const requiredPaths = [
|
|
@@ -80904,6 +80904,7 @@ class Kernel {
|
|
|
80904
80904
|
*/
|
|
80905
80905
|
async execute(options) {
|
|
80906
80906
|
try {
|
|
80907
|
+
const terminal = options.terminal || this.terminal;
|
|
80907
80908
|
if (!await this.filesystem.exists(options.command)) {
|
|
80908
80909
|
this.log?.error(`File not found for execution: ${options.command}`);
|
|
80909
80910
|
return -1;
|
|
@@ -80941,7 +80942,6 @@ class Kernel {
|
|
|
80941
80942
|
exitCode = exitCode ?? 0;
|
|
80942
80943
|
options.shell.env.set("?", exitCode.toString());
|
|
80943
80944
|
this.events.dispatch(KernelEvents.EXECUTE, { command: options.command, args: options.args, exitCode });
|
|
80944
|
-
const terminal = options.terminal || this.terminal;
|
|
80945
80945
|
if (header.type !== "bin" || header.namespace !== "app") terminal.write(ansi$5.erase.inLine(2) + terminal.prompt());
|
|
80946
80946
|
return exitCode;
|
|
80947
80947
|
} catch (error) {
|
|
@@ -81044,14 +81044,16 @@ class Kernel {
|
|
|
81044
81044
|
});
|
|
81045
81045
|
try {
|
|
81046
81046
|
shell.setPositionalParameters([`/dev/${device.pkg.name}`, ...args]);
|
|
81047
|
-
|
|
81047
|
+
await deviceProcess.start();
|
|
81048
81048
|
} catch (error) {
|
|
81049
81049
|
this.log?.error(error);
|
|
81050
81050
|
this.terminal.writeln(chalk$1.red(error.message));
|
|
81051
81051
|
return -2;
|
|
81052
81052
|
} finally {
|
|
81053
81053
|
deviceProcess = null;
|
|
81054
|
+
this.terminal.write(ansi$5.erase.inLine(2) + this.terminal.prompt());
|
|
81054
81055
|
}
|
|
81056
|
+
return 0;
|
|
81055
81057
|
}
|
|
81056
81058
|
/**
|
|
81057
81059
|
* Executes a node script (or tries to)
|
|
@@ -81295,7 +81297,7 @@ class Kernel {
|
|
|
81295
81297
|
memory: "?",
|
|
81296
81298
|
platform: navigator.userAgentData?.platform || navigator?.platform || navigator.userAgent,
|
|
81297
81299
|
querystring: location.search,
|
|
81298
|
-
version: `${"@ecmaos/kernel"} ${"0.2.
|
|
81300
|
+
version: `${"@ecmaos/kernel"} ${"0.2.1"}`,
|
|
81299
81301
|
language: navigator.language,
|
|
81300
81302
|
host: location.host,
|
|
81301
81303
|
userAgent: navigator.userAgent,
|
|
@@ -81366,4 +81368,4 @@ export {
|
|
|
81366
81368
|
getDefaultExportFromCjs$2 as g,
|
|
81367
81369
|
process$1$1 as p
|
|
81368
81370
|
};
|
|
81369
|
-
//# sourceMappingURL=empty-
|
|
81371
|
+
//# sourceMappingURL=empty-C_utvVBb.js.map
|