Skip to content

Commit

Permalink
Merge dev to stable (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
tnfAngel authored Dec 27, 2024
2 parents 5982621 + b21bcaf commit b48e779
Show file tree
Hide file tree
Showing 51 changed files with 1,316 additions and 788 deletions.
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## SERVER:
# Set log verbosity [3]:integer
# (0=none <- 1=error <- 2=warn <- 3=info <- 4=debug)
#LOGLEVEL=3

# Port for the server [3000]:integer
#PORT=3000
6 changes: 2 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ LICENSE text
NEWS text
readme text
*README* text
TODO text

# Templates
*.dot text
Expand Down Expand Up @@ -95,8 +96,7 @@ readme text
.gitattributes text
.gitconfig text
.htaccess text
*.lock text -diff
*.lockb binary diff=lockb
*.lock text eol=lf -diff
package.json text eol=lf
package-lock.json text eol=lf -diff
pnpm-lock.yaml text eol=lf -diff
Expand Down Expand Up @@ -184,8 +184,6 @@ Procfile text
# Executables
*.exe binary
*.pyc binary
**/.yarn/releases/** binary
**/.yarn/plugins/** binary

# RC files (like .babelrc or .eslintrc)
*.*rc text
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ updates:
schedule:
interval: weekly
labels:
- dependency:gha
- dependency:gha
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
container:
if: ${{ github.repository_owner == 'jspaste' && inputs.image-action != 'none' }}
name: Build container image
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io

Expand All @@ -34,7 +34,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit

Expand Down Expand Up @@ -66,12 +66,12 @@ jobs:
echo "tags=${TAGS[*]}" >>"$GITHUB_OUTPUT"
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Setup production dependencies
run: bun install --frozen-lockfile --production
- name: Setup dependencies
run: bun install --frozen-lockfile

- name: Run build:server
run: bun run build:server
Expand Down Expand Up @@ -106,8 +106,8 @@ jobs:

- if: ${{ inputs.image-action == 'build-release' }}
name: Attest image
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
uses: actions/attest-build-provenance@7668571508540a607bdfd90a87a560489fe372eb # v2.1.0
with:
subject-name: ${{ env.REGISTRY }}/${{ steps.build-image.outputs.image }}
subject-name: "${{ env.REGISTRY }}/${{ steps.build-image.outputs.image }}"
subject-digest: ${{ steps.push-image.outputs.digest }}
push-to-registry: false
push-to-registry: false
87 changes: 0 additions & 87 deletions .github/workflows/security.yml

This file was deleted.

17 changes: 7 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,28 @@ permissions:
contents: read

jobs:
lint:
test:
name: Test
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit

- name: Setup Bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1

- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Setup production dependencies
run: bun install --frozen-lockfile --production
- name: Setup dependencies
run: bun install --frozen-lockfile

- name: Run build:server
run: bun run build:server

- name: Setup development dependencies
run: bun install --frozen-lockfile

- name: Run lint
run: bun run lint
run: bun run lint
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
FROM docker.io/oven/bun:1-distroless
WORKDIR /frontend/

COPY --chown=nonroot ./dist ./
COPY --chown=nonroot ./dist/ ./
COPY --chown=nonroot ./LICENSE ./

LABEL org.opencontainers.image.url="https://jspaste.eu" \
org.opencontainers.image.source="https://github.com/jspaste/frontend" \
org.opencontainers.image.title="@jspaste/frontend" \
org.opencontainers.image.description="The frontend for JSPaste" \
org.opencontainers.image.documentation="https://docs.jspaste.eu" \
org.opencontainers.image.licenses="EUPL-1.2"

ENV NODE_ENV=production

USER nonroot

EXPOSE 3000

ENTRYPOINT ["bun", "run", "./server/index.js"]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Frontend

This repository contains the frontend code for [JSPaste](https://jspaste.eu).

## Supported Browsers

In case you are using an older browser than the ones listed, please do not open issues about it.

- Chromium >= 111
- Firefox >= 121
- Safari >= 16

*Last checked commit
[`f79a767`](https://github.com/jspaste/frontend/commit/f79a767b799fd8f6e90488f82751e8ada032321c) on 26 December 2024*
5 changes: 3 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.3/schema.json",
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"files": {
"ignore": ["./dist/**", "*.spec.ts"],
"ignoreUnknown": true
Expand All @@ -26,7 +26,8 @@
"noStaticOnlyClass": "off"
},
"suspicious": {
"noAssignInExpressions": "off"
"noAssignInExpressions": "off",
"noConsoleLog": "error"
}
}
},
Expand Down
Loading

0 comments on commit b48e779

Please sign in to comment.