Skip to content

Commit

Permalink
Merge branch 'main' into activation
Browse files Browse the repository at this point in the history
  • Loading branch information
r58Playz authored Nov 21, 2024
2 parents 25ec8cb + 80755a0 commit 8cf2b73
Show file tree
Hide file tree
Showing 102 changed files with 2,666 additions and 10,252 deletions.
1 change: 0 additions & 1 deletion .envrc

This file was deleted.

18 changes: 0 additions & 18 deletions .eslintignore

This file was deleted.

30 changes: 0 additions & 30 deletions .eslintrc.js

This file was deleted.

75 changes: 68 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Build anura
name: CI

on: [push]
on: [push, pull_request, workflow_dispatch]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build Anura
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
Expand All @@ -17,9 +21,66 @@ jobs:
- run: git submodule update --init
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run: source "$HOME/.cargo/env" && make static
- run: zip -r anura.zip static/
- uses: actions/upload-artifact@v4

- name: Upload Anura Artifact
uses: actions/upload-artifact@v4
with:
name: Anura static build
path: static/*
retention-days: 90

upload:
name: Upload release
runs-on: ubuntu-latest
needs: build
permissions: write-all
if: github.ref == 'refs/heads/main'

steps:
- name: Delete old release and tag
uses: dev-drprasad/[email protected]
with:
delete_release: true
tag_name: latest
github_token: ${{ github.token }}

- name: Get artifacts
uses: actions/download-artifact@v4
with:
name: Anura static build
path: anura.zip
retention-days: 2
path: ./static

- name: Zip anura Release
run: cd static && zip -r ../anura.zip . && cd ..

- name: Release to GitHub
uses: ncipollo/release-action@v1
with:
name: Continuous Build
tag: latest
commit: main
body: "${{ github.event.head_commit.url }} ${{ github.event.head_commit.message }}"
artifacts: "anura.zip"
prerelease: true

pages:
name: Upload to Github Pages
runs-on: ubuntu-latest
needs: build
permissions: write-all
if: github.ref == 'refs/heads/main'
steps:
- name: Get artifacts
uses: actions/download-artifact@v4
with:
name: Anura static build
path: ./static

- name: upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./static"

- name: deploy to github
id: deployment
uses: actions/deploy-pages@v4
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ server/passkey
package-lock.json
.direnv
result
anuraos-types/
public/config.json
static/
x86_image_wizard/alpine/anurad.c
x86_image_wizard/alpine/anura-run
x86_image_wizard/alpine/xfrog.sh
x86_image_wizard/alpine/xsetrandr.sh
x86_image_wizard/alpine/anuramouse
Expand Down
9 changes: 0 additions & 9 deletions .gitpod.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* @type {import("prettier").Config}
*/
const config = {
tabWidth: 4,
trailingComma: "all",
semi: true,
singleQuote: false,
};

export default config;
3 changes: 0 additions & 3 deletions .prettierrc.json

This file was deleted.

20 changes: 15 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ RUST_FILES=$(shell find v86/src/rust/ -name '*.rs') \
v86/src/rust/gen/jit.rs v86/src/rust/gen/jit0f.rs \
v86/src/rust/gen/analyzer.rs v86/src/rust/gen/analyzer0f.rs

all: submodules build/bootstrap v86dirty v86 build/libs/nfsadapter/nfsadapter.js build/libs/mime/mime.iife.js build/libs/filer/filer.min.js build/libs/comlink/comlink.min.mjs build/libs/workbox/version build/libs/fflate/browser.js bundle public/config.json build/cache-load.json apps/libfileview.lib/icons build/bin/chimerix.ajs build/libs/libcurl/version build/libs/bare-mux/bare.cjs build/uv/uv.bundle.js build/libs/idb-keyval/idb-keyval.js build/assets/matter.css build/libs/dreamland/all.js
all: submodules build/bootstrap \
v86 build/libs/filer/filer.min.js build/libs/mime/mime.iife.js build/libs/nfsadapter/nfsadapter.js build/libs/comlink/comlink.min.mjs build/libs/workbox/version build/libs/idb-keyval/idb-keyval.js \
bundle public/config.json build/cache-load.json build/libs/fflate/browser.js apps/libfileview.lib/icons \
build/bin/chimerix.ajs build/libs/libcurl/version build/libs/bare-mux/bare.cjs build/uv/uv.bundle.js build/assets/matter.css build/libs/dreamland/all.js \

full: all rootfs-alpine

Expand Down Expand Up @@ -147,9 +150,6 @@ build/lib/v86.wasm: $(RUST_FILES) v86/build/softfloat.o v86/build/zstddeclib.o v
cd v86; make build/v86.wasm
cp v86/build/v86.wasm build/lib/v86.wasm

v86dirty:
touch v86timestamp # makes it "dirty" and forces recompilation

build/cache-load.json: FORCE
(find apps/ -type f && cd build/ && find lib/ -type f && find libs/ -type f && find uv/ -type f && find assets/ -type f && find bundle.css -type f && cd ../public/ && find . -type f)| grep -v -e node_modules -e \.map -e \.d\.ts -e "/\." -e "uv/" -e "workbox/" | jq -Rnc '[inputs]' > build/cache-load.json

Expand All @@ -162,10 +162,20 @@ watch: bundle FORCE
bundle: tsc css lint milestone
mkdir -p build/artifacts

ANURA_VERSION = $(shell jq -r '.version' package.json)

tsc:
mkdir -p build/artifacts
cp -r src/* build/artifacts
npx tsc
mkdir -p anuraos-types
cd anuraos-types/; \
mkdir -p lib/
cd build/; \
(find lib -type f -name "*.d.ts" -exec cp --parents {} ../anuraos-types/ \;)
(cd build && find lib -type f -name "*.d.ts") | sed 's/ \+/\n/g' | sed 's|.*|/// <reference path="&" />|' > anuraos-types/index.d.ts
jq '.version = "$(ANURA_VERSION)"' types-package.json > anuraos-types/package.json

css: src/*.css
# shopt -s globstar; cat src/**/*.css | npx postcss --use autoprefixer -o build/bundle.css
shopt -s globstar; cat src/**/*.css > build/bundle.css
Expand All @@ -185,7 +195,7 @@ static: all
cp -r public/* static/

server: FORCE
cd server; npx ts-node server.ts
cd server; node server.js

# v86 imports
v86/src/rust/gen/jit.rs:
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ Anura shows as more of a proof-of-concept with what's possible on the modern web
- Make sure you have `Docker` installed and running.
- Run `make rootfs`
- Make sure to add yourself to the Docker group using `usermod -a -G docker $USER`
- (Special Use Case) In the event that you should need to override/manually add the initrd and kernel, remember to keep track of the file names of initrd and vmlinuz in build/images/(rootfs)-boot/. Then, copy them to the Anura root directory and rename them to initrd.img and bzimage respectively.(See the extended instructions [here](./documentation/Kernel_Override.md).)

### Running Anura Locally

Expand Down
18 changes: 9 additions & 9 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

### Supported Versions

| Version | Supported |
| ------- | --------- |
| 2.0.0 ||
| 1.2.1 | :x: |
| 1.2.0 | :x: |
| 1.1.1 | :x: |
| 1.1.0 | :x: |
| 1.0.0 | :x: |
| Version | Supported |
| ----------------- | --------- |
| 2.0.0 (Idol) ||
| 1.2.1 | :x: |
| 1.2.0 (Whalefall) | :x: |
| 1.1.1 | :x: |
| 1.1.0 | :x: |
| 1.0.0 (Lag Train) | :x: |

## Reporting a Vulnerability

In the case that you somehow manage to find a vulnerability in Anura please contact security@mercurywork.shop
In the case that you somehow manage to find a vulnerability in Anura please [create a GitHub security advisory.](https://docs.github.com/en/code-security/security-advisories/working-with-repository-security-advisories/creating-a-repository-security-advisory)

REMEMBER: Please DO NOT report vulnerabilities in the repository Issues tab.

Expand Down
2 changes: 1 addition & 1 deletion aboutproxy
4 changes: 4 additions & 0 deletions apps/fsapp.app/GUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ addContextMenuItem("Refresh", function () {
reload();
});

newcontextmenu.addItem("Download", function () {
download();
});

appcontextmenu.addItem("Install (Session)", function () {
installSession();
});
Expand Down
Loading

0 comments on commit 8cf2b73

Please sign in to comment.