@ecmaos/kernel 0.2.1 → 0.2.3

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 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 an already (mostly) sandboxed foundation, offering some measure of security by default as well as rich developer tooling. 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, such 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
- [![API Reference](https://img.shields.io/badge/API-Reference-success)](https://docs.ecmaos.sh)
17
18
  [![Version](https://img.shields.io/github/package-json/v/ecmaos/ecmaos?color=success)](https://www.npmjs.com/package/@ecmaos/kernel)
18
19
  [![Site Status](https://img.shields.io/website?url=https%3A%2F%2Fecmaos.sh)](https://ecmaos.sh)
19
20
  [![Created](https://img.shields.io/github/created-at/ecmaos/ecmaos?style=flat&label=created&color=success)](https://github.com/ecmaos/ecmaos/pulse)
20
21
  [![Last Commit](https://img.shields.io/github/last-commit/ecmaos/ecmaos.svg)](https://github.com/ecmaos/ecmaos/commit/main)
22
+ [![API Reference](https://img.shields.io/badge/API-Reference-success)](https://docs.ecmaos.sh)
23
+ [![GitHub license](https://img.shields.io/badge/license-MIT+Apache2.0-success)](https://github.com/ecmaos/ecmaos/blob/main/LICENSE)
21
24
 
22
- [![Open issues](https://img.shields.io/github/issues/ecmaos/ecmaos.svg)](https://github.com/ecmaos/ecmaos/issues)
23
- [![Closed issues](https://img.shields.io/github/issues-closed/ecmaos/ecmaos.svg)](https://github.com/ecmaos/ecmaos/issues?q=is%3Aissue+is%3Aclosed)
24
- [![Open PRs](https://img.shields.io/github/issues-pr-raw/ecmaos/ecmaos.svg?label=PRs)](https://github.com/ecmaos/ecmaos/pulls)
25
- [![Closed PRs](https://img.shields.io/github/issues-pr-closed/ecmaos/ecmaos.svg?label=PRs)](https://github.com/ecmaos/ecmaos/pulls?q=is%3Apr+is%3Aclosed)
25
+ [![Open issues](https://img.shields.io/github/issues/ecmaos/ecmaos.svg?logo=github)](https://github.com/ecmaos/ecmaos/issues)
26
+ [![Closed issues](https://img.shields.io/github/issues-closed/ecmaos/ecmaos.svg?logo=github)](https://github.com/ecmaos/ecmaos/issues?q=is%3Aissue+is%3Aclosed)
27
+ [![Open PRs](https://img.shields.io/github/issues-pr-raw/ecmaos/ecmaos.svg?logo=github&label=PRs)](https://github.com/ecmaos/ecmaos/pulls)
28
+ [![Closed PRs](https://img.shields.io/github/issues-pr-closed/ecmaos/ecmaos.svg?logo=github&label=PRs)](https://github.com/ecmaos/ecmaos/pulls?q=is%3Apr+is%3Aclosed)
26
29
 
27
- [![Star on GitHub](https://img.shields.io/github/stars/ecmaos/ecmaos?style=flat&logo=github&label=⭐️)](https://github.com/ecmaos/ecmaos/stargazers)
28
- [![Sponsors](https://img.shields.io/github/sponsors/mathiscode?color=red)](https://github.com/sponsors/mathiscode)
29
- [![Contributors](https://img.shields.io/github/contributors/ecmaos/ecmaos?color=yellow)](https://github.com/ecmaos/ecmaos/graphs/contributors)
30
- [![GitHub license](https://img.shields.io/badge/license-MIT+Apache2.0-blue)](https://github.com/ecmaos/ecmaos/blob/main/LICENSE)
30
+ [![Star on GitHub](https://img.shields.io/github/stars/ecmaos/ecmaos?style=flat&logo=github&label=⭐️%20stars)](https://github.com/ecmaos/ecmaos/stargazers)
31
+ [![GitHub forks](https://img.shields.io/github/forks/ecmaos/ecmaos?style=flat&logo=github&label=🔀%20forks)](https://github.com/ecmaos/ecmaos/forks)
32
+ [![GitHub watchers](https://img.shields.io/github/watchers/ecmaos/ecmaos?style=flat&logo=github&label=👀%20watchers)](https://github.com/ecmaos/ecmaos/watchers)
33
+ [![Sponsors](https://img.shields.io/github/sponsors/mathiscode?color=red&logo=github&label=💖%20sponsors)](https://github.com/sponsors/mathiscode)
34
+ [![Contributors](https://img.shields.io/github/contributors/ecmaos/ecmaos?color=yellow&logo=github&label=👥%20contributors)](https://github.com/ecmaos/ecmaos/graphs/contributors)
31
35
 
32
36
  [![Discord](https://img.shields.io/discord/1311804229127508081?label=discord&logo=discord&logoColor=white)](https://discord.gg/ZJYGkbVsCh)
33
37
  [![Matrix](https://img.shields.io/matrix/ecmaos:matrix.org.svg?label=%23ecmaos%3Amatrix.org&logo=matrix&logoColor=white)](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
 
@@ -62,7 +67,7 @@ The goal is to create a kernel and supporting apps that tie together modern web
62
67
  - Its default export (or exported `main` function) will be called with the `ProcessEntryParams` object
63
68
  - They can be installed from the terminal using the `install` command, e.g. `# install @ecmaos-apps/boilerplate`
64
69
  - Run the installed app: `# /usr/bin/boilerplate arg1 arg2` *(absolute path not required)*
65
- - During development, it can be useful to run a [Verdaccio](https://github.com/verdaccio/verdaccio) server to test local packages: `# install @myscope/mypackage --registry http://localhost:4873`
70
+ - During development, it can be useful to run a [Verdaccio](https://github.com/verdaccio/verdaccio) server to test local packages
66
71
  - To publish to Verdaccio, run `# npm publish --registry http://localhost:4873` in your app's development environment
67
72
  - Then to install from your local registry, run `# install @myscope/mypackage --registry http://localhost:4873`
68
73
 
@@ -74,18 +79,22 @@ 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, BIOS, as well as the main `@ecmaos/types` package
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
81
86
  - Some builtin commands that exist now will be moved into separate apps over time
82
87
 
83
88
  - `Devices`
84
- - Devices get loaded on boot, e.g. /dev/bluetooth, /dev/random, /dev/battery, etc.
89
+ - Devices get loaded on boot, e.g. `/dev/bluetooth`, `/dev/random`, `/dev/battery`, etc.
85
90
  - A device can support being "run" by a user, e.g. `# /dev/battery status`
86
- - Devices may also be directly read/written, and will behave accordingly (or have no effect)
91
+ - Devices may also be directly read/written using `fs` methods, and will behave accordingly (or have no effect if not supported)
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)
@@ -1,18 +1,18 @@
1
1
  {
2
- "_browser-Bg2k_w8R.js": {
3
- "file": "browser-Bg2k_w8R.js",
2
+ "_browser-jvtvvRnm.js": {
3
+ "file": "browser-jvtvvRnm.js",
4
4
  "name": "browser",
5
5
  "isDynamicEntry": true,
6
6
  "imports": [
7
- "_empty-DV8na5Rc.js"
7
+ "_empty-D1k8eaRb.js"
8
8
  ]
9
9
  },
10
- "_empty-DV8na5Rc.js": {
11
- "file": "empty-DV8na5Rc.js",
10
+ "_empty-D1k8eaRb.js": {
11
+ "file": "empty-D1k8eaRb.js",
12
12
  "name": "empty",
13
13
  "dynamicImports": [
14
- "_topbar.min-cv6_CM7b.js",
15
- "_browser-Bg2k_w8R.js",
14
+ "_topbar.min-qHiqBD75.js",
15
+ "_browser-jvtvvRnm.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-cv6_CM7b.js": {
25
- "file": "topbar.min-cv6_CM7b.js",
24
+ "_topbar.min-qHiqBD75.js": {
25
+ "file": "topbar.min-qHiqBD75.js",
26
26
  "name": "topbar.min",
27
27
  "isDynamicEntry": true,
28
28
  "imports": [
29
- "_empty-DV8na5Rc.js"
29
+ "_empty-D1k8eaRb.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-DV8na5Rc.js"
44
+ "_empty-D1k8eaRb.js"
45
45
  ]
46
46
  },
47
47
  "src/tree/lib/commands/install.ts": {
48
- "file": "install-BIXZ5bsq.js",
48
+ "file": "install-DvXm00-p.js",
49
49
  "name": "install",
50
50
  "src": "src/tree/lib/commands/install.ts",
51
51
  "isDynamicEntry": true,
52
52
  "imports": [
53
- "_empty-DV8na5Rc.js"
53
+ "_empty-D1k8eaRb.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-DV8na5Rc.js"
62
+ "_empty-D1k8eaRb.js"
63
63
  ]
64
64
  }
65
65
  }
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs } from "./empty-DV8na5Rc.js";
1
+ import { g as getDefaultExportFromCjs } from "./empty-D1k8eaRb.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-Bg2k_w8R.js.map
23
+ //# sourceMappingURL=browser-jvtvvRnm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser-Bg2k_w8R.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]}
1
+ {"version":3,"file":"browser-jvtvvRnm.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-cv6_CM7b.js").then((n) => n.t);
22012
+ const { default: topbar } = await import("./topbar.min-qHiqBD75.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 {ZenFS.credentials} The filesystem credentials.
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-Bg2k_w8R.js").then((n) => n.b)).default;
50612
+ WebSocket2 = (await import("./browser-jvtvvRnm.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-BIXZ5bsq.js");
67524
+ const { default: install } = await import("./install-DvXm00-p.js");
67525
67525
  return await install({ kernel, shell, terminal, args: [argv.package, argv.registry] });
67526
67526
  }
67527
67527
  }),
@@ -72187,7 +72187,10 @@ instance.setDefaultNamespace;
72187
72187
  instance.hasLoadedNamespace;
72188
72188
  instance.loadNamespaces;
72189
72189
  instance.loadLanguages;
72190
- const resources = {};
72190
+ const en = { "common": {}, "kernel": { "kernel": { "madeBy": "Made with ❤️ by", "panic": "Uh oh, kernel panic! Check the logs for more details.", "permissionNotificationDenied": "Notification permission denied", "modules": { "blacklisted": "Skipping blacklisted module {{module}}" } } } };
72191
+ const resources = {
72192
+ "en": en
72193
+ };
72191
72194
  const DefaultI18nOptions = {
72192
72195
  resources,
72193
72196
  lng: "en",
@@ -80483,7 +80486,7 @@ var createBIOS = (() => {
80483
80486
  return moduleRtn;
80484
80487
  };
80485
80488
  })();
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.0", "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" };
80489
+ 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.2", "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
80490
  var define_import_meta_env_AUTHOR_default = { name: "Jay Mathis", email: "code@mathis.network", url: "https://github.com/mathiscode" };
80488
80491
  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
80492
  var define_import_meta_env_TIPS_default = ["You can 'run' some devices that offer a CLI - for example, '/dev/battery --help'"];
@@ -80527,7 +80530,7 @@ class Kernel {
80527
80530
  /** Name of the kernel */
80528
80531
  __publicField(this, "name", "@ecmaos/kernel");
80529
80532
  /** Version string of the kernel */
80530
- __publicField(this, "version", "0.2.0");
80533
+ __publicField(this, "version", "0.2.2");
80531
80534
  /** Authentication and authorization service */
80532
80535
  __publicField(this, "auth");
80533
80536
  /** BIOS module providing low-level functionality */
@@ -80681,7 +80684,7 @@ class Kernel {
80681
80684
  } catch (error) {
80682
80685
  this.log?.error(`Failed to load figlet font ${figletFont}: ${error.message}`);
80683
80686
  }
80684
- this.terminal.writeln(`${this.terminal.createSpecialLink("https://ecmaos.sh", "@ecmaos/kernel")} v${"0.2.0"}`);
80687
+ this.terminal.writeln(`${this.terminal.createSpecialLink("https://ecmaos.sh", "@ecmaos/kernel")} v${"0.2.2"}`);
80685
80688
  this.terminal.writeln(`${t2("kernel.madeBy")} ${this.terminal.createSpecialLink(
80686
80689
  define_import_meta_env_AUTHOR_default?.url || "https://github.com/mathiscode",
80687
80690
  `${define_import_meta_env_AUTHOR_default?.name} <${define_import_meta_env_AUTHOR_default?.email}>`
@@ -80700,13 +80703,13 @@ class Kernel {
80700
80703
  spinner.start();
80701
80704
  if (logoFiglet) console.log(`%c${logoFiglet}`, "color: green");
80702
80705
  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.0"}`);
80706
+ this.log.info(`${"@ecmaos/kernel"} v${"0.2.2"}`);
80704
80707
  if (Notification?.permission === "default") Notification.requestPermission();
80705
80708
  if (Notification?.permission === "denied") this.log?.warn(t2("kernel.permissionNotificationDenied"));
80706
80709
  this.intervals.set("title-blink", () => {
80707
80710
  globalThis.document.title = globalThis.document.title.includes("_") ? "ecmaos# " : "ecmaos# _";
80708
80711
  }, 600);
80709
- this.toast.success(`${"@ecmaos/kernel"} v${"0.2.0"}`);
80712
+ this.toast.success(`${"@ecmaos/kernel"} v${"0.2.2"}`);
80710
80713
  }
80711
80714
  await this.configure({ filesystem: Filesystem.options() });
80712
80715
  const requiredPaths = [
@@ -80904,6 +80907,7 @@ class Kernel {
80904
80907
  */
80905
80908
  async execute(options) {
80906
80909
  try {
80910
+ const terminal = options.terminal || this.terminal;
80907
80911
  if (!await this.filesystem.exists(options.command)) {
80908
80912
  this.log?.error(`File not found for execution: ${options.command}`);
80909
80913
  return -1;
@@ -80941,7 +80945,6 @@ class Kernel {
80941
80945
  exitCode = exitCode ?? 0;
80942
80946
  options.shell.env.set("?", exitCode.toString());
80943
80947
  this.events.dispatch(KernelEvents.EXECUTE, { command: options.command, args: options.args, exitCode });
80944
- const terminal = options.terminal || this.terminal;
80945
80948
  if (header.type !== "bin" || header.namespace !== "app") terminal.write(ansi$5.erase.inLine(2) + terminal.prompt());
80946
80949
  return exitCode;
80947
80950
  } catch (error) {
@@ -81044,14 +81047,16 @@ class Kernel {
81044
81047
  });
81045
81048
  try {
81046
81049
  shell.setPositionalParameters([`/dev/${device.pkg.name}`, ...args]);
81047
- return await deviceProcess.start();
81050
+ await deviceProcess.start();
81048
81051
  } catch (error) {
81049
81052
  this.log?.error(error);
81050
81053
  this.terminal.writeln(chalk$1.red(error.message));
81051
81054
  return -2;
81052
81055
  } finally {
81053
81056
  deviceProcess = null;
81057
+ this.terminal.write(ansi$5.erase.inLine(2) + this.terminal.prompt());
81054
81058
  }
81059
+ return 0;
81055
81060
  }
81056
81061
  /**
81057
81062
  * Executes a node script (or tries to)
@@ -81295,7 +81300,7 @@ class Kernel {
81295
81300
  memory: "?",
81296
81301
  platform: navigator.userAgentData?.platform || navigator?.platform || navigator.userAgent,
81297
81302
  querystring: location.search,
81298
- version: `${"@ecmaos/kernel"} ${"0.2.0"}`,
81303
+ version: `${"@ecmaos/kernel"} ${"0.2.2"}`,
81299
81304
  language: navigator.language,
81300
81305
  host: location.host,
81301
81306
  userAgent: navigator.userAgent,
@@ -81366,4 +81371,4 @@ export {
81366
81371
  getDefaultExportFromCjs$2 as g,
81367
81372
  process$1$1 as p
81368
81373
  };
81369
- //# sourceMappingURL=empty-DV8na5Rc.js.map
81374
+ //# sourceMappingURL=empty-D1k8eaRb.js.map