@ecmaos/kernel 0.2.8 → 0.3.0

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.
@@ -1,16 +1,19 @@
1
- import { g as getDefaultExportFromCjs } from "./empty--zdtkf0T.js";
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { g as getDefaultExportFromCjs } from "./__vite-browser-external-ZgWJ_FY-.js";
2
4
  var browser$2;
3
5
  var hasRequiredBrowser;
4
6
  function requireBrowser() {
5
7
  if (hasRequiredBrowser) return browser$2;
6
8
  hasRequiredBrowser = 1;
7
- browser$2 = function() {
9
+ browser$2 = /* @__PURE__ */ __name(function() {
8
10
  throw new Error(
9
11
  "ws does not work in the browser. Browser clients must use the native WebSocket object"
10
12
  );
11
- };
13
+ }, "browser$2");
12
14
  return browser$2;
13
15
  }
16
+ __name(requireBrowser, "requireBrowser");
14
17
  var browserExports = requireBrowser();
15
18
  const browser = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
16
19
  const browser$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -20,4 +23,4 @@ const browser$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
20
23
  export {
21
24
  browser$1 as b
22
25
  };
23
- //# sourceMappingURL=browser-D_CtuxSB.js.map
26
+ //# sourceMappingURL=browser-Bnkgx7wL.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser-D_CtuxSB.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-Bnkgx7wL.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,kCAAY;AAC3B,UAAM,IAAI;AAAA,MACR;AAAA,IAED;AAAA,EACF,GALgB;;;;;;;;;;","x_google_ignoreList":[0]}
package/dist/favicon.ico CHANGED
Binary file
package/dist/icon.jpg ADDED
Binary file
package/dist/icon.png CHANGED
Binary file
@@ -0,0 +1,3 @@
1
+ ZenFS, LGPL-3.0-or-later, Copyright © James Prevett and other ZenFS contributors
2
+ https://github.com/zen-fs/core
3
+
@@ -0,0 +1,157 @@
1
+ # GNU LESSER GENERAL PUBLIC LICENSE
2
+
3
+ Version 3, 29 June 2007
4
+
5
+ Copyright (C) 2007 Free Software Foundation, Inc.
6
+ <https://fsf.org/>
7
+
8
+ Everyone is permitted to copy and distribute verbatim copies of this
9
+ license document, but changing it is not allowed.
10
+
11
+ This version of the GNU Lesser General Public License incorporates the
12
+ terms and conditions of version 3 of the GNU General Public License,
13
+ supplemented by the additional permissions listed below.
14
+
15
+ ## 0. Additional Definitions.
16
+
17
+ As used herein, "this License" refers to version 3 of the GNU Lesser
18
+ General Public License, and the "GNU GPL" refers to version 3 of the
19
+ GNU General Public License.
20
+
21
+ "The Library" refers to a covered work governed by this License, other
22
+ than an Application or a Combined Work as defined below.
23
+
24
+ An "Application" is any work that makes use of an interface provided
25
+ by the Library, but which is not otherwise based on the Library.
26
+ Defining a subclass of a class defined by the Library is deemed a mode
27
+ of using an interface provided by the Library.
28
+
29
+ A "Combined Work" is a work produced by combining or linking an
30
+ Application with the Library. The particular version of the Library
31
+ with which the Combined Work was made is also called the "Linked
32
+ Version".
33
+
34
+ The "Minimal Corresponding Source" for a Combined Work means the
35
+ Corresponding Source for the Combined Work, excluding any source code
36
+ for portions of the Combined Work that, considered in isolation, are
37
+ based on the Application, and not on the Linked Version.
38
+
39
+ The "Corresponding Application Code" for a Combined Work means the
40
+ object code and/or source code for the Application, including any data
41
+ and utility programs needed for reproducing the Combined Work from the
42
+ Application, but excluding the System Libraries of the Combined Work.
43
+
44
+ ## 1. Exception to Section 3 of the GNU GPL.
45
+
46
+ You may convey a covered work under sections 3 and 4 of this License
47
+ without being bound by section 3 of the GNU GPL.
48
+
49
+ ## 2. Conveying Modified Versions.
50
+
51
+ If you modify a copy of the Library, and, in your modifications, a
52
+ facility refers to a function or data to be supplied by an Application
53
+ that uses the facility (other than as an argument passed when the
54
+ facility is invoked), then you may convey a copy of the modified
55
+ version:
56
+
57
+ - a) under this License, provided that you make a good faith effort
58
+ to ensure that, in the event an Application does not supply the
59
+ function or data, the facility still operates, and performs
60
+ whatever part of its purpose remains meaningful, or
61
+ - b) under the GNU GPL, with none of the additional permissions of
62
+ this License applicable to that copy.
63
+
64
+ ## 3. Object Code Incorporating Material from Library Header Files.
65
+
66
+ The object code form of an Application may incorporate material from a
67
+ header file that is part of the Library. You may convey such object
68
+ code under terms of your choice, provided that, if the incorporated
69
+ material is not limited to numerical parameters, data structure
70
+ layouts and accessors, or small macros, inline functions and templates
71
+ (ten or fewer lines in length), you do both of the following:
72
+
73
+ - a) Give prominent notice with each copy of the object code that
74
+ the Library is used in it and that the Library and its use are
75
+ covered by this License.
76
+ - b) Accompany the object code with a copy of the GNU GPL and this
77
+ license document.
78
+
79
+ ## 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that, taken
82
+ together, effectively do not restrict modification of the portions of
83
+ the Library contained in the Combined Work and reverse engineering for
84
+ debugging such modifications, if you also do each of the following:
85
+
86
+ - a) Give prominent notice with each copy of the Combined Work that
87
+ the Library is used in it and that the Library and its use are
88
+ covered by this License.
89
+ - b) Accompany the Combined Work with a copy of the GNU GPL and this
90
+ license document.
91
+ - c) For a Combined Work that displays copyright notices during
92
+ execution, include the copyright notice for the Library among
93
+ these notices, as well as a reference directing the user to the
94
+ copies of the GNU GPL and this license document.
95
+ - d) Do one of the following:
96
+ - 0) Convey the Minimal Corresponding Source under the terms of
97
+ this License, and the Corresponding Application Code in a form
98
+ suitable for, and under terms that permit, the user to
99
+ recombine or relink the Application with a modified version of
100
+ the Linked Version to produce a modified Combined Work, in the
101
+ manner specified by section 6 of the GNU GPL for conveying
102
+ Corresponding Source.
103
+ - 1) Use a suitable shared library mechanism for linking with
104
+ the Library. A suitable mechanism is one that (a) uses at run
105
+ time a copy of the Library already present on the user's
106
+ computer system, and (b) will operate properly with a modified
107
+ version of the Library that is interface-compatible with the
108
+ Linked Version.
109
+ - e) Provide Installation Information, but only if you would
110
+ otherwise be required to provide such information under section 6
111
+ of the GNU GPL, and only to the extent that such information is
112
+ necessary to install and execute a modified version of the
113
+ Combined Work produced by recombining or relinking the Application
114
+ with a modified version of the Linked Version. (If you use option
115
+ 4d0, the Installation Information must accompany the Minimal
116
+ Corresponding Source and Corresponding Application Code. If you
117
+ use option 4d1, you must provide the Installation Information in
118
+ the manner specified by section 6 of the GNU GPL for conveying
119
+ Corresponding Source.)
120
+
121
+ ## 5. Combined Libraries.
122
+
123
+ You may place library facilities that are a work based on the Library
124
+ side by side in a single library together with other library
125
+ facilities that are not Applications and are not covered by this
126
+ License, and convey such a combined library under terms of your
127
+ choice, if you do both of the following:
128
+
129
+ - a) Accompany the combined library with a copy of the same work
130
+ based on the Library, uncombined with any other library
131
+ facilities, conveyed under the terms of this License.
132
+ - b) Give prominent notice with the combined library that part of it
133
+ is a work based on the Library, and explaining where to find the
134
+ accompanying uncombined form of the same work.
135
+
136
+ ## 6. Revised Versions of the GNU Lesser General Public License.
137
+
138
+ The Free Software Foundation may publish revised and/or new versions
139
+ of the GNU Lesser General Public License from time to time. Such new
140
+ versions will be similar in spirit to the present version, but may
141
+ differ in detail to address new problems or concerns.
142
+
143
+ Each version is given a distinguishing version number. If the Library
144
+ as you received it specifies that a certain numbered version of the
145
+ GNU Lesser General Public License "or any later version" applies to
146
+ it, you have the option of following the terms and conditions either
147
+ of that published version or of any later version published by the
148
+ Free Software Foundation. If the Library as you received it does not
149
+ specify a version number of the GNU Lesser General Public License, you
150
+ may choose any version of the GNU Lesser General Public License ever
151
+ published by the Free Software Foundation.
152
+
153
+ If the Library as you received it specifies that a proxy can decide
154
+ whether future versions of the GNU Lesser General Public License shall
155
+ apply, that proxy's public statement of acceptance of any version is
156
+ permanent authorization for you to choose that version for the
157
+ Library.
Binary file
@@ -1,5 +1,7 @@
1
- import { c as chalk, s as semver, p as path } from "./empty--zdtkf0T.js";
2
- const install = async ({ kernel, shell, terminal, args }) => {
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { c as chalk, s as semver, p as path } from "./__vite-browser-external-ZgWJ_FY-.js";
4
+ const install = /* @__PURE__ */ __name(async ({ kernel, shell, terminal, args }) => {
3
5
  const [packageArg, registryArg, reinstallArg] = args;
4
6
  if (!packageArg) {
5
7
  terminal.writeln(chalk.red("Usage: install <package-name>[@version]"));
@@ -11,7 +13,7 @@ const install = async ({ kernel, shell, terminal, args }) => {
11
13
  return 1;
12
14
  }
13
15
  const registry = registryArg || shell.env.get("REGISTRY") || "https://registry.npmjs.org";
14
- const packageName = spec[1];
16
+ const packageName = spec[1]?.replace("vnpm:", "");
15
17
  let version = spec[2] || "latest";
16
18
  if (!packageName) {
17
19
  terminal.writeln(chalk.red("Invalid package name format"));
@@ -79,7 +81,7 @@ const install = async ({ kernel, shell, terminal, args }) => {
79
81
  return 1;
80
82
  }
81
83
  await kernel.filesystem.fs.symlink(binPath, path.join("/usr/bin", packageJson.name));
82
- terminal.writeln(chalk.green(`Linked ${packageJson.name} to ${path.join("/usr/bin", packageJson.name)}`));
84
+ terminal.writeln(chalk.blue(`Linked ${packageJson.name} to ${path.join("/usr/bin", packageJson.name)}`));
83
85
  } else if (typeof packageJson.bin === "object") {
84
86
  for (const bin in packageJson.bin) {
85
87
  const binPath = path.join("/usr/lib", packageName, version, packageJson.bin[bin]);
@@ -88,7 +90,7 @@ const install = async ({ kernel, shell, terminal, args }) => {
88
90
  return 1;
89
91
  }
90
92
  await kernel.filesystem.fs.symlink(binPath, path.join("/usr/bin", bin));
91
- terminal.writeln(chalk.green(`Linked ${bin} to ${path.join("/usr/bin", bin)}`));
93
+ terminal.writeln(chalk.blue(`Linked ${bin} to ${path.join("/usr/bin", bin)}`));
92
94
  }
93
95
  }
94
96
  }
@@ -112,8 +114,8 @@ const install = async ({ kernel, shell, terminal, args }) => {
112
114
  terminal.writeln(chalk.red(`Failed to execute postinstall script for ${packageName}@${version}: ${error}`));
113
115
  return 1;
114
116
  }
115
- };
117
+ }, "install");
116
118
  export {
117
119
  install as default
118
120
  };
119
- //# sourceMappingURL=install-Ds1oWgTf.js.map
121
+ //# sourceMappingURL=install-BWxc1crE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-BWxc1crE.js","sources":["../src/tree/lib/commands/install.ts"],"sourcesContent":["import chalk from 'chalk'\nimport path from 'path'\nimport semver from 'semver'\n\nimport { CommandArgs } from './'\n\nconst install = async ({ kernel, shell, terminal, args }: CommandArgs) => {\n const [packageArg, registryArg, reinstallArg] = args as [string, string, boolean]\n if (!packageArg) {\n terminal.writeln(chalk.red('Usage: install <package-name>[@version]'))\n return 1\n }\n\n const spec = packageArg.match(/(@[^/]+\\/[^@]+|[^@]+)(?:@([^/]+))?/)\n if (!spec) {\n terminal.writeln(chalk.red('Invalid package name format'))\n return 1\n }\n\n const registry = registryArg || shell.env.get('REGISTRY') || 'https://registry.npmjs.org'\n const packageName = spec[1]?.replace('vnpm:', '')\n let version = spec[2] || 'latest'\n\n if (!packageName) {\n terminal.writeln(chalk.red('Invalid package name format'))\n return 1\n }\n\n const url = `${registry}/${packageName}`\n const packageInfo = await globalThis.fetch(url)\n const data = await packageInfo.json()\n\n if (!data.versions || !data['dist-tags']) {\n terminal.writeln(chalk.red(`No versions found for ${packageName}`))\n return 1\n }\n\n if (version === 'latest') version = data['dist-tags'].latest\n else version = semver.maxSatisfying(Object.keys(data.versions), version) || version\n\n if (reinstallArg) {\n try {\n const pkgData = JSON.parse(await kernel.filesystem.fs.readFile(path.join('/usr/lib', packageName, version, 'package.json'), 'utf-8'))\n for (const bin in pkgData.bin) await kernel.filesystem.fs.unlink(path.join('/usr/bin', bin))\n await kernel.filesystem.fs.rm(path.join('/usr/lib', packageName, version), { recursive: true, force: true })\n } catch {}\n }\n\n const packagePath = path.join('/usr/lib', packageName, version, 'package.json')\n if (await kernel.filesystem.fs.exists(packagePath)) {\n terminal.writeln(chalk.green(`${packageName} v${version} is already installed`))\n return 0\n }\n\n terminal.writeln(`Installing ${data.name} v${version} from ${registry}...`)\n\n const tarballUrl = data.versions[version]?.dist?.tarball\n const tarballChecksum = data.versions[version]?.dist?.shasum?.toLowerCase()\n if (!tarballUrl || !tarballChecksum) {\n terminal.writeln(chalk.red(`No tarball URL or checksum found for ${packageName} v${version}`))\n return 1\n }\n\n const tarball = await globalThis.fetch(tarballUrl)\n const arrayBuffer = await tarball.arrayBuffer()\n const hashBuffer = await crypto.subtle.digest('SHA-1', arrayBuffer)\n const hashArray = Array.from(new Uint8Array(hashBuffer))\n const downloadChecksum = hashArray.map(b => b.toString(16).padStart(2, '0')).join('')\n\n if (downloadChecksum !== tarballChecksum) {\n terminal.writeln(chalk.red(`Checksum verification failed. Expected ${tarballChecksum} but got ${downloadChecksum}`))\n return 1\n }\n\n const tarballFilename = `${data.name.replace('@', '').replace('/', '-')}-${version}.tar.gz`\n await kernel.filesystem.fs.writeFile(`/tmp/${tarballFilename}`, new Uint8Array(arrayBuffer))\n\n // TODO: Support user packages installed to user's home?\n const extractPath = `/usr/lib/${data.name}/${version}`\n\n await kernel.filesystem.fs.mkdir(extractPath, { mode: 0o755, recursive: true })\n await kernel.filesystem.extractTarball(`/tmp/${tarballFilename}`, extractPath)\n await kernel.filesystem.fs.unlink(`/tmp/${tarballFilename}`)\n terminal.writeln(chalk.green(`Installed ${data.name} v${version} to ${extractPath}`))\n\n const packageData = await kernel.filesystem.fs.readFile(packagePath, 'utf-8')\n const packageJson = JSON.parse(packageData)\n\n try { // execute preinstall script\n if (packageJson.scripts?.['ecmaos:preinstall']) await shell.execute(packageJson.scripts['ecmaos:preinstall'])\n } catch (error) {\n terminal.writeln(chalk.red(`Failed to execute preinstall script for ${packageName}@${version}: ${error}`))\n return 1\n }\n\n try { // link any bins\n if (packageJson.bin) {\n if (typeof packageJson.bin === 'string') {\n const binPath = path.join('/usr/lib', packageName, version, packageJson.bin)\n if (!await kernel.filesystem.fs.exists(binPath)) {\n terminal.writeln(chalk.red(`${binPath} does not exist`))\n return 1\n }\n\n await kernel.filesystem.fs.symlink(binPath, path.join('/usr/bin', packageJson.name))\n terminal.writeln(chalk.blue(`Linked ${packageJson.name} to ${path.join('/usr/bin', packageJson.name)}`))\n } else if (typeof packageJson.bin === 'object') {\n for (const bin in packageJson.bin) {\n const binPath = path.join('/usr/lib', packageName, version, packageJson.bin[bin])\n if (!await kernel.filesystem.fs.exists(binPath)) {\n terminal.writeln(chalk.red(`${binPath} does not exist`))\n return 1\n }\n\n await kernel.filesystem.fs.symlink(binPath, path.join('/usr/bin', bin))\n terminal.writeln(chalk.blue(`Linked ${bin} to ${path.join('/usr/bin', bin)}`))\n }\n }\n }\n } catch (error) {\n terminal.writeln(chalk.red(`Failed to link bins for ${packageName}@${version}: ${error}`))\n }\n\n try { // install dependencies\n if (packageJson.dependencies) {\n for (const dependency in packageJson.dependencies) {\n const packageSpec = `${dependency}${packageJson.dependencies[dependency] ? `@${packageJson.dependencies[dependency]}` : ''}`\n await install({ kernel, shell, terminal, args: [packageSpec, registryArg] })\n }\n }\n } catch (error) {\n terminal.writeln(chalk.red(`Failed to install dependencies for ${packageName}@${version}: ${error}`))\n return 1\n }\n\n try { // execute postinstall script\n if (packageJson.scripts?.['ecmaos:postinstall']) await shell.execute(packageJson.scripts['ecmaos:postinstall'])\n } catch (error) {\n terminal.writeln(chalk.red(`Failed to execute postinstall script for ${packageName}@${version}: ${error}`))\n return 1\n }\n}\n\nexport default install\n"],"names":[],"mappings":";;;AAMA,MAAM,UAAU,8BAAO,EAAE,QAAQ,OAAO,UAAU,WAAwB;AACxE,QAAM,CAAC,YAAY,aAAa,YAAY,IAAI;AAChD,MAAI,CAAC,YAAY;AACf,aAAS,QAAQ,MAAM,IAAI,yCAAyC,CAAC;AAC9D,WAAA;AAAA,EAAA;AAGH,QAAA,OAAO,WAAW,MAAM,oCAAoC;AAClE,MAAI,CAAC,MAAM;AACT,aAAS,QAAQ,MAAM,IAAI,6BAA6B,CAAC;AAClD,WAAA;AAAA,EAAA;AAGT,QAAM,WAAW,eAAe,MAAM,IAAI,IAAI,UAAU,KAAK;AAC7D,QAAM,cAAc,KAAK,CAAC,GAAG,QAAQ,SAAS,EAAE;AAC5C,MAAA,UAAU,KAAK,CAAC,KAAK;AAEzB,MAAI,CAAC,aAAa;AAChB,aAAS,QAAQ,MAAM,IAAI,6BAA6B,CAAC;AAClD,WAAA;AAAA,EAAA;AAGT,QAAM,MAAM,GAAG,QAAQ,IAAI,WAAW;AACtC,QAAM,cAAc,MAAM,WAAW,MAAM,GAAG;AACxC,QAAA,OAAO,MAAM,YAAY,KAAK;AAEpC,MAAI,CAAC,KAAK,YAAY,CAAC,KAAK,WAAW,GAAG;AACxC,aAAS,QAAQ,MAAM,IAAI,yBAAyB,WAAW,EAAE,CAAC;AAC3D,WAAA;AAAA,EAAA;AAGT,MAAI,YAAY,SAAoB,WAAA,KAAK,WAAW,EAAE;AAAA,MACjD,WAAU,OAAO,cAAc,OAAO,KAAK,KAAK,QAAQ,GAAG,OAAO,KAAK;AAE5E,MAAI,cAAc;AACZ,QAAA;AACF,YAAM,UAAU,KAAK,MAAM,MAAM,OAAO,WAAW,GAAG,SAAS,KAAK,KAAK,YAAY,aAAa,SAAS,cAAc,GAAG,OAAO,CAAC;AACpI,iBAAW,OAAO,QAAQ,IAAK,OA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
@@ -1,5 +1,4 @@
1
1
  import { Auth } from '#auth.ts';
2
- import { BIOSModule } from '@ecmaos/bios';
3
2
  import { BootOptions } from '@ecmaos/types';
4
3
  import { Components } from '#components.ts';
5
4
  import { default as default_2 } from 'node:module';
@@ -30,6 +29,7 @@ import { Storage as Storage_2 } from '#storage.ts';
30
29
  import { Terminal } from '@ecmaos/types';
31
30
  import { Users } from '#users.ts';
32
31
  import { Wasm } from '@ecmaos/types';
32
+ import { WebContainer } from '@webcontainer/api';
33
33
  import { Windows } from '@ecmaos/types';
34
34
  import { Workers } from '@ecmaos/types';
35
35
 
@@ -58,11 +58,12 @@ export declare class Kernel implements Kernel_2 {
58
58
  /** Authentication and authorization service */
59
59
  readonly auth: Auth;
60
60
  /** BIOS module providing low-level functionality */
61
- bios?: BIOSModule;
62
61
  /** Broadcast channel for inter-kernel communication */
63
62
  readonly channel: BroadcastChannel;
64
63
  /** Web Components manager */
65
64
  readonly components: Components;
65
+ /** WebContainer instance */
66
+ container?: WebContainer;
66
67
  /** DOM manipulation service */
67
68
  readonly dom: Dom;
68
69
  /** Map of registered devices and their drivers */
@@ -175,6 +176,7 @@ export declare class Kernel implements Kernel_2 {
175
176
  *
176
177
  * @remarks
177
178
  * Don't expect it to work; this will help develop further emulation layers
179
+ * We still need to resolve the IndexedDB/sync issues before sync fs calls will work
178
180
  *
179
181
  * @param options - Execution options containing script path and shell
180
182
  * @returns Exit code of the script
package/dist/kernel.js CHANGED
@@ -1,4 +1,4 @@
1
- import { K } from "./empty--zdtkf0T.js";
1
+ import { K } from "./__vite-browser-external-ZgWJ_FY-.js";
2
2
  export {
3
3
  K as Kernel
4
4
  };
@@ -1,4 +1,6 @@
1
- import { g as getDefaultExportFromCjs } from "./empty--zdtkf0T.js";
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { g as getDefaultExportFromCjs } from "./__vite-browser-external-ZgWJ_FY-.js";
2
4
  var topbar_min$3 = { exports: {} };
3
5
  /**
4
6
  * @license MIT
@@ -21,25 +23,27 @@ function requireTopbar_min() {
21
23
  for (stop in options.barColors) lineGradient.addColorStop(stop, options.barColors[stop]);
22
24
  ctx.lineWidth = options.barThickness, ctx.beginPath(), ctx.moveTo(0, options.barThickness / 2), ctx.lineTo(Math.ceil(currentProgress * canvas.width), options.barThickness / 2), ctx.strokeStyle = lineGradient, ctx.stroke();
23
25
  }
24
- var canvas, currentProgress, showing, progressTimerId = null, fadeTimerId = null, delayTimerId = null, options = { autoRun: true, barThickness: 3, barColors: { 0: "rgba(26, 188, 156, .9)", ".25": "rgba(52, 152, 219, .9)", ".50": "rgba(241, 196, 15, .9)", ".75": "rgba(230, 126, 34, .9)", "1.0": "rgba(211, 84, 0, .9)" }, shadowBlur: 10, shadowColor: "rgba(0, 0, 0, .6)", className: null }, topbar = { config: function(opts) {
26
+ __name(repaint, "repaint");
27
+ var canvas, currentProgress, showing, progressTimerId = null, fadeTimerId = null, delayTimerId = null, options = { autoRun: true, barThickness: 3, barColors: { 0: "rgba(26, 188, 156, .9)", ".25": "rgba(52, 152, 219, .9)", ".50": "rgba(241, 196, 15, .9)", ".75": "rgba(230, 126, 34, .9)", "1.0": "rgba(211, 84, 0, .9)" }, shadowBlur: 10, shadowColor: "rgba(0, 0, 0, .6)", className: null }, topbar = { config: /* @__PURE__ */ __name(function(opts) {
25
28
  for (var key in opts) options.hasOwnProperty(key) && (options[key] = opts[key]);
26
- }, show: function(handler) {
29
+ }, "config"), show: /* @__PURE__ */ __name(function(handler) {
27
30
  var type, elem;
28
- showing || (handler ? delayTimerId = delayTimerId || setTimeout(() => topbar.show(), handler) : (showing = true, null !== fadeTimerId && window2.cancelAnimationFrame(fadeTimerId), canvas || ((elem = (canvas = document2.createElement("canvas")).style).position = "fixed", elem.top = elem.left = elem.right = elem.margin = elem.padding = 0, elem.zIndex = 100001, elem.display = "none", options.className && canvas.classList.add(options.className), type = "resize", handler = repaint, (elem = window2).addEventListener ? elem.addEventListener(type, handler, false) : elem.attachEvent ? elem.attachEvent("on" + type, handler) : elem["on" + type] = handler), canvas.parentElement || document2.body.appendChild(canvas), canvas.style.opacity = 1, canvas.style.display = "block", topbar.progress(0), options.autoRun && function loop() {
31
+ showing || (handler ? delayTimerId = delayTimerId || setTimeout(() => topbar.show(), handler) : (showing = true, null !== fadeTimerId && window2.cancelAnimationFrame(fadeTimerId), canvas || ((elem = (canvas = document2.createElement("canvas")).style).position = "fixed", elem.top = elem.left = elem.right = elem.margin = elem.padding = 0, elem.zIndex = 100001, elem.display = "none", options.className && canvas.classList.add(options.className), type = "resize", handler = repaint, (elem = window2).addEventListener ? elem.addEventListener(type, handler, false) : elem.attachEvent ? elem.attachEvent("on" + type, handler) : elem["on" + type] = handler), canvas.parentElement || document2.body.appendChild(canvas), canvas.style.opacity = 1, canvas.style.display = "block", topbar.progress(0), options.autoRun && (/* @__PURE__ */ __name(function loop() {
29
32
  progressTimerId = window2.requestAnimationFrame(loop), topbar.progress("+" + 0.05 * Math.pow(1 - Math.sqrt(currentProgress), 2));
30
- }()));
31
- }, progress: function(to) {
33
+ }, "loop"))()));
34
+ }, "show"), progress: /* @__PURE__ */ __name(function(to) {
32
35
  return void 0 === to || ("string" == typeof to && (to = (0 <= to.indexOf("+") || 0 <= to.indexOf("-") ? currentProgress : 0) + parseFloat(to)), currentProgress = 1 < to ? 1 : to, repaint()), currentProgress;
33
- }, hide: function() {
34
- clearTimeout(delayTimerId), delayTimerId = null, showing && (showing = false, null != progressTimerId && (window2.cancelAnimationFrame(progressTimerId), progressTimerId = null), function loop() {
36
+ }, "progress"), hide: /* @__PURE__ */ __name(function() {
37
+ clearTimeout(delayTimerId), delayTimerId = null, showing && (showing = false, null != progressTimerId && (window2.cancelAnimationFrame(progressTimerId), progressTimerId = null), (/* @__PURE__ */ __name(function loop() {
35
38
  return 1 <= topbar.progress("+.1") && (canvas.style.opacity -= 0.05, canvas.style.opacity <= 0.05) ? (canvas.style.display = "none", void (fadeTimerId = null)) : void (fadeTimerId = window2.requestAnimationFrame(loop));
36
- }());
37
- } };
39
+ }, "loop"))());
40
+ }, "hide") };
38
41
  module.exports = topbar;
39
42
  }).call(topbar_min$2, window, document);
40
43
  })(topbar_min$3);
41
44
  return topbar_min$3.exports;
42
45
  }
46
+ __name(requireTopbar_min, "requireTopbar_min");
43
47
  var topbar_minExports = requireTopbar_min();
44
48
  const topbar_min = /* @__PURE__ */ getDefaultExportFromCjs(topbar_minExports);
45
49
  const topbar_min$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -49,4 +53,4 @@ const topbar_min$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
49
53
  export {
50
54
  topbar_min$1 as t
51
55
  };
52
- //# sourceMappingURL=topbar.min-CDkSVOxV.js.map
56
+ //# sourceMappingURL=topbar.min-DHDDU9sh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"topbar.min-CDkSVOxV.js","sources":["../node_modules/.pnpm/topbar@3.0.0/node_modules/topbar/topbar.min.js"],"sourcesContent":["/**\n * @license MIT\n * topbar 3.0.0\n * http://buunguyen.github.io/topbar\n * Copyright (c) 2024 Buu Nguyen\n */\n(function(window,document){\"use strict\";function repaint(){canvas.width=window.innerWidth,canvas.height=5*options.barThickness;var ctx=canvas.getContext(\"2d\");ctx.shadowBlur=options.shadowBlur,ctx.shadowColor=options.shadowColor;var stop,lineGradient=ctx.createLinearGradient(0,0,canvas.width,0);for(stop in options.barColors)lineGradient.addColorStop(stop,options.barColors[stop]);ctx.lineWidth=options.barThickness,ctx.beginPath(),ctx.moveTo(0,options.barThickness/2),ctx.lineTo(Math.ceil(currentProgress*canvas.width),options.barThickness/2),ctx.strokeStyle=lineGradient,ctx.stroke()}var canvas,currentProgress,showing,progressTimerId=null,fadeTimerId=null,delayTimerId=null,options={autoRun:!0,barThickness:3,barColors:{0:\"rgba(26, 188, 156, .9)\",\".25\":\"rgba(52, 152, 219, .9)\",\".50\":\"rgba(241, 196, 15, .9)\",\".75\":\"rgba(230, 126, 34, .9)\",\"1.0\":\"rgba(211, 84, 0, .9)\"},shadowBlur:10,shadowColor:\"rgba(0, 0, 0, .6)\",className:null},topbar={config:function(opts){for(var key in opts)options.hasOwnProperty(key)&&(options[key]=opts[key])},show:function(handler){var type,elem;showing||(handler?delayTimerId=delayTimerId||setTimeout(()=>topbar.show(),handler):(showing=!0,null!==fadeTimerId&&window.cancelAnimationFrame(fadeTimerId),canvas||((elem=(canvas=document.createElement(\"canvas\")).style).position=\"fixed\",elem.top=elem.left=elem.right=elem.margin=elem.padding=0,elem.zIndex=100001,elem.display=\"none\",options.className&&canvas.classList.add(options.className),type=\"resize\",handler=repaint,(elem=window).addEventListener?elem.addEventListener(type,handler,!1):elem.attachEvent?elem.attachEvent(\"on\"+type,handler):elem[\"on\"+type]=handler),canvas.parentElement||document.body.appendChild(canvas),canvas.style.opacity=1,canvas.style.display=\"block\",topbar.progress(0),options.autoRun&&function loop(){progressTimerId=window.requestAnimationFrame(loop),topbar.progress(\"+\"+.05*Math.pow(1-Math.sqrt(currentProgress),2))}()))},progress:function(to){return void 0===to||(\"string\"==typeof to&&(to=(0<=to.indexOf(\"+\")||0<=to.indexOf(\"-\")?currentProgress:0)+parseFloat(to)),currentProgress=1<to?1:to,repaint()),currentProgress},hide:function(){clearTimeout(delayTimerId),delayTimerId=null,showing&&(showing=!1,null!=progressTimerId&&(window.cancelAnimationFrame(progressTimerId),progressTimerId=null),function loop(){return 1<=topbar.progress(\"+.1\")&&(canvas.style.opacity-=.05,canvas.style.opacity<=.05)?(canvas.style.display=\"none\",void(fadeTimerId=null)):void(fadeTimerId=window.requestAnimationFrame(loop))}())}};\"object\"==typeof module&&\"object\"==typeof module.exports?module.exports=topbar:\"function\"==typeof define&&define.amd?define(function(){return topbar}):this.topbar=topbar}).call(this,window,document);"],"names":["window","document","this"],"mappings":";;;;;;;;;;;;;;AAMA,KAAC,SAASA,SAAOC,WAAS;AAAc,eAAS,UAAS;AAAC,e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* @license MIT\n * topbar 3.0.0\n * http://buunguyen.github.io/topbar\n * Copyright (c) 2024 Buu Nguyen\n */\n(function(window,document){\"use strict\";function repaint(){canvas.width=window.innerWidth,canvas.height=5*options.barThickness;var ctx=canvas.getContext(\"2d\");ctx.shadowBlur=options.shadowBlur,ctx.shadowColor=options.shadowColor;var stop,lineGradient=ctx.createLinearGradient(0,0,canvas.width,0);for(stop in options.barColors)lineGradient.addColorStop(stop,options.barColors[stop]);ctx.lineWidth=options.barThickness,ctx.beginPath(),ctx.moveTo(0,options.barThickness/2),ctx.lineTo(Math.ceil(currentProgress*canvas.width),options.barThickness/2),ctx.strokeStyle=lineGradient,ctx.stroke()}var canvas,currentProgress,showing,progressTimerId=null,fadeTimerId=null,delayTimerId=null,options={autoRun:!0,barThickness:3,barColors:{0:\"rgba(26, 188, 156, .9)\",\".25\":\"rgba(52, 152, 219, .9)\",\".50\":\"rgba(241, 196, 15, .9)\",\".75\":\"rgba(230, 126, 34, .9)\",\"1.0\":\"rgba(211, 84, 0, .9)\"},shadowBlur:10,shadowColor:\"rgba(0, 0, 0, .6)\",className:null},topbar={config:function(opts){for(var key in opts)options.hasOwnProperty(key)&&(options[key]=opts[key])},show:function(handler){var type,elem;showing||(handler?delayTimerId=delayTimerId||setTimeout(()=>topbar.show(),handler):(showing=!0,null!==fadeTimerId&&window.cancelAnimationFrame(fadeTimerId),canvas||((elem=(canvas=document.createElement(\"canvas\")).style).position=\"fixed\",elem.top=elem.left=elem.right=elem.margin=elem.padding=0,elem.zIndex=100001,elem.display=\"none\",options.className&&canvas.classList.add(options.className),type=\"resize\",handler=repaint,(elem=window).addEventListener?elem.addEventListener(type,handler,!1):elem.attachEvent?elem.attachEvent(\"on\"+type,handler):elem[\"on\"+type]=handler),canvas.parentElement||document.body.appendChild(canvas),canvas.style.opacity=1,canvas.style.display=\"block\",topbar.progress(0),options.autoRun&&function loop(){progressTimerId=window.requestAnimationFrame(loop),topbar.progress(\"+\"+.05*Math.pow(1-Math.sqrt(currentProgress),2))}()))},progress:function(to){return void 0===to||(\"string\"==typeof to&&(to=(0<=to.indexOf(\"+\")||0<=to.indexOf(\"-\")?currentProgress:0)+parseFloat(to)),currentProgress=1<to?1:to,repaint()),currentProgress},hide:function(){clearTimeout(delayTimerId),delayTimerId=null,showing&&(showing=!1,null!=progressTimerId&&(window.cancelAnimationFrame(progressTimerId),progressTimerId=null),function loop(){return 1<=topbar.progress(\"+.1\")&&(canvas.style.opacity-=.05,canvas.style.opacity<=.05)?(canvas.style.display=\"none\",void(fadeTimerId=null)):void(fadeTimerId=window.requestAnimationFrame(loop))}())}};\"object\"==typeof module&&\"object\"==typeof module.exports?module.exports=topbar:\"function\"==typeof define&&define.amd?define(function(){return topbar}):this.topbar=topbar}).call(this,window,document);"],"names":["window","document","this"],"mappings":";;;;;;;;;;;;;;;;AAMA,KAAC,SAASA,SAAOC,WAAS;AAAc,eAAS,UAAS;AAAC,eAAO,QAAMD,QAAO,YAAW,OAAO,SAAO,IAAE,QAAQ;AAAa,YAAI,MAAI,OAAO,WAAW,IAAI;AAAE,YAAI,aAAW,QAAQ,YAAW,IAAI,cAAY,QAAQ;AAAY,YAAI,MAAK,eAAa,IAAI,qBAAqB,GAAE,GAAE,OAAO,OAAM,CAAC;AAAE,aAAI,QAAQ,QAAQ,UAAU,cAAa,aAAa,MAAK,QAAQ,UAAU,IAAI,CAAC;AAAE,YAAI,YAAU,QAAQ,cAAa,IAAI,aAAY,IAAI,OAAO,GAAE,QAAQ,eAAa,CAAC,GAAE,IAAI,OAAO,KAAK,KAAK,kBAAgB,OAAO,KAAK,GAAE,QAAQ,eAAa,CAAC,GAAE,IAAI,cAAY,cAAa,IAAI;MAAQ;AAAzhB;AAA0hB,UAAI,QAAO,iBAAgB,SAAQ,kBAAgB,MAAK,cAAY,MAAK,eAAa,MAAK,UAAQ,EAAC,SAAQ,MAAG,cAAa,GAAE,WAAU,EAAC,GAAE,2BAA0B,OAAM,2BAA0B,OAAM,2BAA0B,OAAM,2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AAE,IAAG,kBAAgB,IAAE,KAAG,IAAE,IAAG,QAAS,IAAE;AAAA,MAAe,GAA1L,aAA4L,MAAK,kCAAU;AAAC,qBAAa,YAAY,GAAE,eAAa,MAAK,YAAU,UAAQ,OAAG,QAAM,oBAAkBA,QAAO,qBAAqB,eAAe,GAAE,kBAAgB,QAAM,gCAAS,OAAM;AAAC,iBAAO,KAAG,OAAO,SAAS,KAAK,MAAI,OAAO,MAAM,WAAS,MAAI,OAAO,MAAM,WAAS,SAAM,OAAO,MAAM,UAAQ,QAAO,MAAK,cAAY,SAAO,MAAK,cAAYA,QAAO,sBAAsB,IAAI;AAAA,QAAE,GAAjN,SAAoN;AAAA,MAAC,GAA7X,QAA8X;AAA2D,uBAAe;AAAA,IAAiG,GAAG,KAAKE,cAAK,QAAO,QAAQ;AAAA;;;;;;;;;;","x_google_ignoreList":[0]}
package/dist/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { K as Kernel } from "./empty--zdtkf0T.js";
1
+ import { K as Kernel } from "./__vite-browser-external-ZgWJ_FY-.js";
2
2
  const username = "root";
3
3
  const password = "root";
4
4
  const socket = "ws://localhost:30445/socket";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ecmaos/kernel",
3
3
  "description": "ecmaOS: Micro-kernel and framework for web technologies",
4
- "version": "0.2.8",
4
+ "version": "0.3.0",
5
5
  "license": "MIT+Apache-2.0",
6
6
  "homepage": "https://ecmaos.sh",
7
7
  "repository": "https://github.com/ecmaos/ecmaos",
@@ -22,6 +22,7 @@
22
22
  "email": "code@mathis.network"
23
23
  },
24
24
  "knownIssues": [
25
+ "It's best to stick to Chromium-based browsers for the most features",
25
26
  "Keyboard is broken on mobile; ecmaOS is not mobile-friendly at this time",
26
27
  "Don't expect any sort of POSIX compliance at this stage",
27
28
  "Most commands/devices are very basic implementations, not complete reproductions",
@@ -33,6 +34,7 @@
33
34
  "If it ever fails to boot, check your logs or try clearing all data",
34
35
  "You can run some devices that offer a CLI - e.g. '/dev/battery --help'",
35
36
  "Use the 'install' command to install packages - e.g. 'install @ecmaos-apps/news'",
37
+ "You can install any NPM package - e.g. 'install jquery'",
36
38
  "Use the 'news' command to see the latest news about ecmaOS",
37
39
  "Type 'ls /bin' to see all built-in commands"
38
40
  ],
@@ -143,10 +145,10 @@
143
145
  "@xterm/addon-search": "^0.15.0",
144
146
  "@xterm/addon-serialize": "^0.13.0",
145
147
  "@xterm/xterm": "^5.5.0",
146
- "@zenfs/archives": "^1.0.0",
147
- "@zenfs/core": "^1.6.6",
148
- "@zenfs/dom": "^1.0.7",
149
- "@zenfs/emscripten": "^1.0.0",
148
+ "@zenfs/archives": "^1.3.1",
149
+ "@zenfs/core": "^2.4.2",
150
+ "@zenfs/dom": "^1.2.5",
151
+ "@zenfs/emscripten": "^1.0.5",
150
152
  "@zip.js/zip.js": "^2.7.52",
151
153
  "ansi-escape-sequences": "^6.2.3",
152
154
  "chalk": "^5.3.0",
@@ -168,11 +170,11 @@
168
170
  "winbox": "^0.2.82",
169
171
  "@ecmaos-devices/audio": "^0.0.2",
170
172
  "@ecmaos-devices/battery": "^0.0.2",
171
- "@ecmaos-devices/geo": "^0.0.2",
172
173
  "@ecmaos-devices/bluetooth": "^0.0.2",
174
+ "@ecmaos-devices/gamepad": "^0.0.2",
175
+ "@ecmaos-devices/geo": "^0.0.2",
173
176
  "@ecmaos-devices/gpu": "^0.0.2",
174
177
  "@ecmaos-devices/hid": "^0.0.2",
175
- "@ecmaos-devices/gamepad": "^0.0.2",
176
178
  "@ecmaos-devices/midi": "^0.0.2",
177
179
  "@ecmaos-devices/presentation": "^0.0.2",
178
180
  "@ecmaos-devices/sensors": "^0.0.2",
package/LICENSE DELETED
@@ -1,7 +0,0 @@
1
- # Dual MIT/Apache-2.0 License
2
-
3
- Copyright (c) 2024-2025 Jay Mathis <code@mathis.network>
4
-
5
- Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).
6
-
7
- Downstream projects and end users may choose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.