ChibraxOS 2

Changes:
- kernel 6.0.2
- Broken init scripts
- Switch to bun for better peroformance an easier ffi
- Removed grup
- Efi support without graphics (at least graphics werent tested)
- Suppression de toutes les dépendance non libc
- new splash
- broken audio
- typescript support
- ls rewritten to be more reliable
This commit is contained in:
Marc
2022-10-22 13:47:33 +02:00
parent db49f8d205
commit 721c919c7b
76 changed files with 2485 additions and 2665 deletions
+1 -3
View File
@@ -2,8 +2,6 @@
/**
* @type {{ [key: string]: string[] }}
*/
const aliases = {
export default {
ls: ["ls", "--color"]
}
module.exports = aliases
@@ -11,4 +11,4 @@ let environment = {
}),
}
module.exports = environment
export default environment
+1 -8
View File
@@ -1,8 +1,6 @@
//@ts-check
const { isAlpha } = require('./utils')
class Lexer{
export default class Lexer{
/**
* @param { string } source
*/
@@ -55,8 +53,3 @@ class Lexer{
// this.tokens.push(Token(tokenType, value))
//}
}
module.exports = {
Lexer
}
@@ -8,6 +8,12 @@
'use strict';
import * as crypto from 'crypto'
import { tmpdir } from 'os';
import * as fs from 'fs'
import * as childProc from 'child_process'
import * as pathUtil from 'path'
var
IS_WIN = process.platform === 'win32',
@@ -15,10 +21,7 @@ var
ALGORITHM_HASH = 'sha256',
DEFAULT_ERR_MSG = 'The current environment doesn\'t support interactive reading from TTY.',
fs = require('fs'),
TTY = process.binding('tty_wrap').TTY,
childProc = require('child_process'),
pathUtil = require('path'),
defaultOptions = {
/* eslint-disable key-spacing */
@@ -91,7 +94,7 @@ function _execFileSync(options, execOptions) {
function getTempfile(name) {
var suffix = '',
filepath, fd;
tempdir = tempdir || require('os').tmpdir();
tempdir = tempdir || tmpdir();
while (true) {
filepath = pathUtil.join(tempdir, name + suffix);
@@ -116,7 +119,6 @@ function _execFileSync(options, execOptions) {
pathStderr = getTempfile('readline-sync.stderr'),
pathExit = getTempfile('readline-sync.exit'),
pathDone = getTempfile('readline-sync.done'),
crypto = require('crypto'),
hostArgs, shellPath, shellArgs, exitCode, extMessage, shasum, decipher, password;
shasum = crypto.createHash(ALGORITHM_HASH);
+1 -33
View File
@@ -1,41 +1,9 @@
//@ts-check
/**
* @param {string} str
* @returns { Promise<string> }
*/
async function getline(str) {
process.stdout.write(str)
process.stdin.resume()
process.stdin.setEncoding('utf8')
let line = ""
return new Promise((res, rej) => {
process.stdin.on('data', function(chunk) {
line += chunk
if (chunk.toString('utf-8').endsWith('\n')) {
process.stdin.pause()
res(line.substring(0, line.length -1))
}
})
process.stdin.on('error', function(err) {
rej(err)
})
})
}
/**
* @param { string } str
* @returns
*/
function isAlpha(str){
export function isAlpha(str){
return /^[a-zA-Z]*$/.test(str)
}
module.exports = {
isAlpha, getline
}