Skip to content

Commit 27787f4

Browse files
authored
Merge pull request #77 from OpenShock/develop
Switch to shadcn-svelte and fix bugs
2 parents f2183ae + 8ec7aa6 commit 27787f4

494 files changed

Lines changed: 13991 additions & 6436 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ NODE_PATH=src
22

33
PUBLIC_SITE_NAME=OpenShock
44
PUBLIC_SITE_DESCRIPTION=a free and open-source ecosystem to control various shock collars over the internet.
5-
PUBLIC_SITE_DOMAIN=openshock.app
6-
PUBLIC_SITE_SHORT_DOMAIN=openshock.app
7-
PUBLIC_BACKEND_API_DOMAIN=api.openshock.app
85
PUBLIC_GITHUB_PROJECT_URL=https://github.com/OpenShock
96
PUBLIC_DISCORD_INVITE_URL=https://discord.gg/OpenShock
107

11-
PUBLIC_SENTRY_DSN=INVALID
128
PUBLIC_TURNSTILE_SITE_KEY=INVALID
13-
PUBLIC_TURNSTILE_DEV_BYPASS_VALUE=dev-bypass
9+
PUBLIC_TURNSTILE_DEV_BYPASS_VALUE=INVALID

.env.development

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Sentry
2-
PUBLIC_SENTRY_ENABLED=false
3-
PUBLIC_SENTRY_TRACES_SAMPLERATE=1.0
4-
PUBLIC_SENTRY_REPLAYS_SESSION_SAMPLERATE=0.1
5-
PUBLIC_SENTRY_REPLAYS_ONERROR_SAMPLERATE=1.0
1+
PUBLIC_SITE_DOMAIN=openshock.dev
2+
PUBLIC_SITE_SHORT_DOMAIN=openshock.dev
3+
PUBLIC_BACKEND_API_DOMAIN=api.openshock.dev
4+
PUBLIC_GATEWAY_CSP_WILDCARD=*.openshock.dev
5+
6+
PUBLIC_TURNSTILE_DEV_BYPASS_VALUE=dev-bypass

.env.production

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Sentry
2-
PUBLIC_SENTRY_ENABLED=true
3-
PUBLIC_SENTRY_TRACES_SAMPLERATE=0.1
4-
PUBLIC_SENTRY_REPLAYS_SESSION_SAMPLERATE=0.1
5-
PUBLIC_SENTRY_REPLAYS_ONERROR_SAMPLERATE=0.1
1+
PUBLIC_SITE_DOMAIN=openshock.app
2+
PUBLIC_SITE_SHORT_DOMAIN=openshock.app
3+
PUBLIC_BACKEND_API_DOMAIN=api.openshock.app
4+
PUBLIC_GATEWAY_CSP_WILDCARD=*.openshock.app

.env.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
PUBLIC_SITE_DOMAIN=openshock.dev
2+
PUBLIC_SITE_SHORT_DOMAIN=openshock.dev
3+
PUBLIC_BACKEND_API_DOMAIN=api.openshock.dev
4+
PUBLIC_GATEWAY_CSP_WILDCARD=*.openshock.dev
5+
6+
PUBLIC_TURNSTILE_DEV_BYPASS_VALUE=dev-bypass

.github/actions/containerize/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ inputs:
2020
runs:
2121
using: composite
2222
steps:
23-
2423
- name: Set up Docker Buildx
2524
uses: docker/setup-buildx-action@v3
2625

@@ -53,3 +52,5 @@ runs:
5352
push: ${{ inputs.push-image }}
5453
tags: ${{ steps.meta.outputs.tags }}
5554
labels: ${{ steps.meta.outputs.labels }}
55+
build-args: |
56+
GIT_HASH=${{ github.sha }}

.github/workflows/ci-build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: pnpm/action-setup@v4
2121
name: Install pnpm
2222
with:
23-
version: 9
23+
version: 9.12.3
2424
run_install: false
2525

2626
- name: Install Node.js
@@ -43,7 +43,8 @@ jobs:
4343

4444
- name: Test
4545
shell: bash
46-
run: pnpm test
46+
#run: pnpm test # TODO: Fix intehration tests
47+
run: pnpm test:unit
4748

4849
build-container:
4950
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.DS_Store
22
node_modules
3+
.idea
34
/build
45
/.svelte-kit
56
/package

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
node_modules
33
/build
44
/.svelte-kit
5+
/.vscode
56
/package
7+
/src/lib/api/internal
8+
/src/lib/components/ui
9+
/static
610
.env
711
.env.*
812
!.env.example

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"singleQuote": true,
66
"trailingComma": "es5",
77
"printWidth": 100,
8-
"plugins": ["prettier-plugin-svelte"],
8+
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
99
"overrides": [
1010
{ "files": "*.svelte", "options": { "parser": "svelte" } },
1111
{ "files": "package*.json", "options": { "tabWidth": 2, "useTabs": true } }

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
ARG NODE_VERSION=20
2-
ARG PNPM_VERSION=9.12.2
2+
ARG PNPM_VERSION=9.12.3
33
ARG ALPINE_VERSION=3.20
4+
ARG GIT_HASH
45

56
FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS build
67

78
WORKDIR /app
89
ENV DOCKER=true
910
ENV PNPM_VERSION=${PNPM_VERSION}
11+
ENV GIT_HASH=${GIT_HASH}
1012

1113
RUN wget -qO /bin/pnpm "https://github.com/pnpm/pnpm/releases/latest/download/pnpm-linuxstatic-x64" && chmod +x /bin/pnpm
1214

@@ -26,6 +28,7 @@ WORKDIR /app
2628
ENV DOCKER=true
2729
ENV NODE_ENV=production
2830
ENV PNPM_VERSION=${PNPM_VERSION}
31+
ENV GIT_HASH=${GIT_HASH}
2932

3033
RUN wget -qO /bin/pnpm "https://github.com/pnpm/pnpm/releases/latest/download/pnpm-linuxstatic-x64" && chmod +x /bin/pnpm
3134

0 commit comments

Comments
 (0)