Skip to content

Commit

Permalink
Merge pull request #2 from titaniumnetwork-dev/deno
Browse files Browse the repository at this point in the history
Node => Deno
  • Loading branch information
MotorTruck1221 authored Dec 16, 2024
2 parents 7ed6410 + 7f426ab commit ea01696
Show file tree
Hide file tree
Showing 53 changed files with 6,123 additions and 10,303 deletions.
12 changes: 12 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "titaniumnetwork-dev/incognito" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"privatePackages": { "version": true, "tag": true }
}
10 changes: 0 additions & 10 deletions .env.example

This file was deleted.

33 changes: 11 additions & 22 deletions .github/ISSUE_TEMPLATE/ISSUE-TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,25 @@ assignees: ''

**Note: for support questions, please use our [Discord](https://discord.gg/unblock)**. This repository's issues are reserved for feature requests and bug reports.

* **I'm submitting a ...**
- [ ] bug report
- [ ] feature request
- [ ] support request => Please do not submit support request here, see note at the top of this template.
- **I'm submitting a ...**
- [ ] bug report
- [ ] feature request
- [ ] support request => Please do not submit support request here, see note at the top of this template.

* **Do you want to request a *feature* or report a *bug*?**
- **Do you want to request a _feature_ or report a _bug_?**

- **What is the current behavior?**

- **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem**

* **What is the current behavior?**
- **What is the expected behavior?**

- **What is the motivation / use case for changing the behavior?**

- **Please tell us about your environment:**

* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem**



* **What is the expected behavior?**



* **What is the motivation / use case for changing the behavior?**



* **Please tell us about your environment:**

- Version: 2.0.0-beta.X
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
- Language: [all | TypeScript X.X | ES6/7 | ES5 | Dart]


* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
- **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Communtiy Support
url: https://discord.gg/unblock
about: Please ask and answer questions here.
- name: Communtiy Support
url: https://discord.gg/unblock
about: Please ask and answer questions here.
24 changes: 8 additions & 16 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
* **Please check if the PR fulfills these requirements**
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- **Please check if the PR fulfills these requirements**

* [ ] Tests for the changes have been added (for bug fixes / features)
* [ ] Docs have been added / updated (for bug fixes / features)

* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
- **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)

- **What is the current behavior?** (You can also link to an open issue here)

- **What is the new behavior (if this is a feature change)?**

* **What is the current behavior?** (You can also link to an open issue here)
- **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)



* **What is the new behavior (if this is a feature change)?**



* **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)



* **Other information**:
- **Other information**:
84 changes: 42 additions & 42 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
name: Build Docker image
on:
push:
tags:
- v*
workflow_dispatch:
push:
tags:
- v*
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push:
name: Build and push Docker image to registry
runs-on: ubuntu-latest
if: github.repository_owner == 'titaniumnetwork-dev'
permissions:
contents: write
packages: write
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup docker buildx
uses: docker/setup-buildx-action@v3
- name: Login To registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/titaniumnetwork-dev/incognito
- name: Build and push
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
name: incognito
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-and-push:
name: Build and push Docker image to registry
runs-on: ubuntu-latest
if: github.repository_owner == 'titaniumnetwork-dev'
permissions:
contents: write
packages: write
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup docker buildx
uses: docker/setup-buildx-action@v3
- name: Login To registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/titaniumnetwork-dev/incognito
- name: Build and push
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
name: incognito
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
branches:
- main
workflow_dispatch:

defaults:
run:
shell: bash

env:
FORCE_COLOR: true

jobs:
changelog:
name: Release TAG
if: ${{ github.repository_owner == 'titaniumnetwork-dev' }}
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: 2.1.4

- name: Install dependencies
run: deno install --allow-scripts

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
version: deno task changeset:version
publish: deno task changeset:publish
commit: "[ci] release"
title: "[ci] release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ pnpm-debug.log*
.env
.env.production

#Config stuff
config.toml

# macOS-specific files
.DS_Store

Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 1.0.0
- The initial rewrite to Astro. Includes:
- Fully static
- Easier to build
- Feels/is faster to use
- Fixes some bugs
- Among tons of other stuff

# 1.0.1
- Fixes the games and apps page looking weird

# 1.0.2
- Fixes Dockerfile issues

# 1.0.3
- Turns off Rammerhead by default for now
- Docker env fixes again
- SEO

# 1.0.4
- Bumps RH
- Fixes issues with bare-server-node

# 1.1.0
- Switches to Deno (mostly)
- General bug fixes
- Removes Rammerhead as an option and replaces it with Scramjet (coming soon)
- Removes bare server and adds libcurl as an option
- Adds a different Deno native server (Hono) - Command: `deno task start:standalone`
- Removes Masqr
- No more SSR, it's purely statically generated
- CI fixes and other general improvements
- Configuration is done via TOML over a bunch of environment vars
- Removes Biome in place of Deno's native formatter
- A better roadmap of what should be done in the future.
23 changes: 13 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
FROM node:21-alpine
FROM denoland/deno:debian-2.1.4

WORKDIR /app

COPY package*.json .
COPY deno.jsonc .
COPY . .

RUN apk update
RUN apk add python3 py3-pip alpine-sdk openssl-dev build-base python3-dev
RUN python3 -m pip install setuptools --break-system-packages
RUN npm i -g pnpm
RUN pnpm install
RUN pnpm run build
EXPOSE 8080
ENTRYPOINT ["pnpm"]
CMD ["start"]
RUN apt update
RUN apt install -y python3 python3-pip libssl-dev build-essential python3-dev nodejs
RUN cp -n config.example.toml config.toml
RUN deno install --allow-scripts
RUN deno task build
RUN export TERM=xterm-256color
ENV PORT="8000" # this is to make sure it's set at 8000.
VOLUME /app
EXPOSE 8000
ENTRYPOINT ["deno", "task"]
CMD ["start", "--color"]
Loading

0 comments on commit ea01696

Please sign in to comment.