14 Commits

Author SHA1 Message Date
CI 578dccd0cf release v1.0.8 [skip ci] 2026-03-12 19:42:02 +00:00
keligrubb 0ecad475ef patch: fix release file (#22)
Push / release-docker-helm (push) Successful in 4m16s
Reviewed-on: #22
2026-03-12 19:39:15 +00:00
keligrubb d5789b79a6 patch: swap to stdlib sqlite3 (#21)
Push / release-docker-helm (push) Failing after 2m39s
Reviewed-on: #21
2026-03-12 19:17:26 +00:00
CI 45ce90f3cc release v1.0.7 [skip ci] 2026-03-06 02:30:45 +00:00
renovate-bot 3a817625c5 chore(deps): update docker/build-push-action action to v7 (#19)
Push / release-docker-helm (push) Successful in 3m33s
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [docker/build-push-action](https://github.com/docker/build-push-action) | action | major | `v6` → `v7` |

---

### Release Notes

<details>
<summary>docker/build-push-action (docker/build-push-action)</summary>

### [`v7`](https://github.com/docker/build-push-action/compare/v6...v7)

[Compare Source](https://github.com/docker/build-push-action/compare/v6...v7)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41Ni4xIiwidXBkYXRlZEluVmVyIjoiNDMuNTYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: #19
Reviewed-by: Keli Grubb <keligrubb324@gmail.com>
Co-authored-by: Renovate Bot <renovate@keligrubb.com>
Co-committed-by: Renovate Bot <renovate@keligrubb.com>
2026-03-06 02:28:31 +00:00
CI d5abea48b3 release v1.0.6 [skip ci] 2026-03-05 15:37:20 +00:00
keligrubb 1da69ac272 patch: fix docker login during push stage (#18)
Push / release-docker-helm (push) Successful in 4m24s
Co-authored-by: Madison Grubb <madison@elastiflow.com>
Reviewed-on: #18
2026-03-05 15:34:32 +00:00
CI bd2092a3ea release v1.0.5 [skip ci] 2026-03-05 14:55:05 +00:00
keligrubb afb6fb8ac7 patch: fix deploy pipeline stages for token registry uploads (#17)
Push / release-docker-helm (push) Failing after 2m56s
Co-authored-by: Madison Grubb <madison@elastiflow.com>
Reviewed-on: #17
2026-03-05 14:52:10 +00:00
CI 414e9f4c33 release v1.0.4 [skip ci] 2026-03-04 20:04:05 +00:00
keligrubb 10035221fb patch: fix deploy pipeline (#15)
Push / release-docker-helm (push) Failing after 2m15s
Co-authored-by: Madison Grubb <madison@elastiflow.com>
Reviewed-on: #15
2026-03-04 20:01:50 +00:00
keligrubb 52a6f4368c patch: migrate to gitea actions (#14)
Push / release-docker-helm (push) Failing after 2s
Co-authored-by: Madison Grubb <madison@elastiflow.com>
Reviewed-on: #14
2026-03-04 19:49:16 +00:00
CI e774dbc301 release v1.0.3 [skip ci] 2026-02-23 03:45:37 +00:00
renovate-bot 5bf582f3ad fix(deps): update dependency vue-router to v5 (#12)
ci/woodpecker/push/push Pipeline was successful
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [vue-router](https://router.vuejs.org) ([source](https://github.com/vuejs/router)) | [`^4.4.0` → `^5.0.0`](https://renovatebot.com/diffs/npm/vue-router/4.6.4/5.0.3) | ![age](https://developer.mend.io/api/mc/badges/age/npm/vue-router/5.0.3?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vue-router/4.6.4/5.0.3?slim=true) |

---

### Release Notes

<details>
<summary>vuejs/router (vue-router)</summary>

### [`v5.0.3`](https://github.com/vuejs/router/releases/tag/v5.0.3)

[Compare Source](https://github.com/vuejs/router/compare/v5.0.2...v5.0.3)

#####    🚨 Breaking Changes

- **experimental**:
  - Make miss() throw internally and return never  -  by [@&#8203;posva](https://github.com/posva) [<samp>(077e1)</samp>](https://github.com/vuejs/router/commit/077e1740)
  - Add reroute() and deprecate NavigationResult  -  by [@&#8203;posva](https://github.com/posva) [<samp>(308db)</samp>](https://github.com/vuejs/router/commit/308db14a)
  - Remove selectNavigationResult  -  by [@&#8203;posva](https://github.com/posva) [<samp>(9e88a)</samp>](https://github.com/vuejs/router/commit/9e88aed4)

#####    🚀 Features

- Support \_parent in nested folders  -  by [@&#8203;posva](https://github.com/posva) [<samp>(0a37f)</samp>](https://github.com/vuejs/router/commit/0a37f474)
- Warn on \_parent conflict  -  by [@&#8203;posva](https://github.com/posva) [<samp>(182fe)</samp>](https://github.com/vuejs/router/commit/182fe03a)
- Set \_parent as non matchable by default  -  by [@&#8203;posva](https://github.com/posva) [<samp>(8f91c)</samp>](https://github.com/vuejs/router/commit/8f91c99f)
- Warn on conflicting components for routes  -  by [@&#8203;posva](https://github.com/posva) [<samp>(34ace)</samp>](https://github.com/vuejs/router/commit/34aceb98)
- Use type module  -  by [@&#8203;posva](https://github.com/posva) [<samp>(dc9ff)</samp>](https://github.com/vuejs/router/commit/dc9ffe81)
- Add deprecation warning for next() callback in navigation guards  -  by [@&#8203;posva](https://github.com/posva) [<samp>(797f5)</samp>](https://github.com/vuejs/router/commit/797f55de)
- Extract alias from definePage  -  by [@&#8203;posva](https://github.com/posva) [<samp>(835df)</samp>](https://github.com/vuejs/router/commit/835df1ff)
- Display aliases in logs  -  by [@&#8203;posva](https://github.com/posva) [<samp>(7aa60)</samp>](https://github.com/vuejs/router/commit/7aa607fc)
- Deprecate new NavigationResult(to) in favor of reroute(to)  -  by [@&#8203;posva](https://github.com/posva) [<samp>(382e3)</samp>](https://github.com/vuejs/router/commit/382e34b4)
- **experimental**:
  - Handle aliasOf in resolvers  -  by [@&#8203;posva](https://github.com/posva) [<samp>(8fe45)</samp>](https://github.com/vuejs/router/commit/8fe453c9)
  - Generate aliases from override in resolver  -  by [@&#8203;posva](https://github.com/posva) [<samp>(a00ac)</samp>](https://github.com/vuejs/router/commit/a00ac355)
  - Warn against non absolute aliases  -  by [@&#8203;posva](https://github.com/posva) [<samp>(476c6)</samp>](https://github.com/vuejs/router/commit/476c6697)

#####    🐞 Bug Fixes

- Avoid non matchable routes in auto-routes ��-  by [@&#8203;posva](https://github.com/posva) [<samp>(48649)</samp>](https://github.com/vuejs/router/commit/48649030)
- Handle quotes in d.ts  -  by [@&#8203;posva](https://github.com/posva) [<samp>(d7764)</samp>](https://github.com/vuejs/router/commit/d7764700)
- Avoid route entry in map for \_parent  -  by [@&#8203;posva](https://github.com/posva) [<samp>(1dfcc)</samp>](https://github.com/vuejs/router/commit/1dfccf82)
- Handle nested groups  -  by [@&#8203;posva](https://github.com/posva) [<samp>(4a4be)</samp>](https://github.com/vuejs/router/commit/4a4bed94)
- Stable route ordering for group folders with same path  -  by [@&#8203;posva](https://github.com/posva) [<samp>(1db94)</samp>](https://github.com/vuejs/router/commit/1db9467c)
- Correct route ordering for group nodes with inflated scores  -  by [@&#8203;posva](https://github.com/posva) [<samp>(515f4)</samp>](https://github.com/vuejs/router/commit/515f4843)
- Cleanup old route overrides  -  by [@&#8203;posva](https://github.com/posva) [<samp>(b28a7)</samp>](https://github.com/vuejs/router/commit/b28a71e2)
- Remove name from \_parent.vue files  -  by [@&#8203;posva](https://github.com/posva) [<samp>(6e8f1)</samp>](https://github.com/vuejs/router/commit/6e8f1a11)
- **ci**:
  - Format sponsor files before change detection  -  by [@&#8203;posva](https://github.com/posva) [<samp>(f68d6)</samp>](https://github.com/vuejs/router/commit/f68d6fad)
  - Use manual git commit in update-sponsors  -  by [@&#8203;posva](https://github.com/posva) [<samp>(8ee99)</samp>](https://github.com/vuejs/router/commit/8ee992cb)
- **experimental**:
  - Resolve TS errors in resolver/router type hierarchy  -  by [@&#8203;posva](https://github.com/posva) [<samp>(a86f1)</samp>](https://github.com/vuejs/router/commit/a86f1f3a)
- **types**:
  - Relax RouteMapGeneric constraint for interface-based RouteNamedMap  -  by [@&#8203;YevheniiKotyrlo](https://github.com/YevheniiKotyrlo) in [#&#8203;2624](https://github.com/vuejs/router/issues/2624) [<samp>(cdf7b)</samp>](https://github.com/vuejs/router/commit/cdf7b442)
- **volar**:
  - Use `ts.getTokenPosOfNode` instead of `node.getStart`  -  by [@&#8203;KazariEX](https://github.com/KazariEX) in [#&#8203;2630](https://github.com/vuejs/router/issues/2630) [<samp>(0b050)</samp>](https://github.com/vuejs/router/commit/0b0504bd)

#####    🏎 Performance

- Avoid merging empty object in record  -  by [@&#8203;posva](https://github.com/posva) [<samp>(4213e)</samp>](https://github.com/vuejs/router/commit/4213eb66)

#####     [View changes on GitHub](https://github.com/vuejs/router/compare/v5.0.2...v5.0.3)

### [`v5.0.2`](https://github.com/vuejs/router/releases/tag/v5.0.2)

[Compare Source](https://github.com/vuejs/router/compare/v5.0.1...v5.0.2)

#####    🐞 Bug Fixes

- Remove devtools from iife build  -  by [@&#8203;posva](https://github.com/posva) [<samp>(58c03)</samp>](https://github.com/vuejs/router/commit/58c033c0)
- Loose version check vue-router  -  by [@&#8203;posva](https://github.com/posva) [<samp>(90e4b)</samp>](https://github.com/vuejs/router/commit/90e4bb80)
- **volar**: Empty options  -  by [@&#8203;posva](https://github.com/posva) [<samp>(02275)</samp>](https://github.com/vuejs/router/commit/022758a7)

#####     [View changes on GitHub](https://github.com/vuejs/router/compare/v5.0.1...v5.0.2)

### [`v5.0.1`](https://github.com/vuejs/router/releases/tag/v5.0.1)

[Compare Source](https://github.com/vuejs/router/compare/v5.0.0...v5.0.1)

#####    🐞 Bug Fixes

- **volar**: Make typed plugin work with vue-tsc  -  by [@&#8203;peter50216](https://github.com/peter50216) in [#&#8203;2607](https://github.com/vuejs/router/issues/2607) [<samp>(7845e)</samp>](https://github.com/vuejs/router/commit/7845e327)

#####     [View changes on GitHub](https://github.com/vuejs/router/compare/v5.0.0...v5.0.1)

### [`v5.0.0`](https://github.com/vuejs/router/releases/tag/v5.0.0)

[Compare Source](https://github.com/vuejs/router/compare/v4.6.4...v5.0.0)

Vue Router 5 is a *boring* release, it merges [unplugin-vue-router](https://uvr.esm.is) into the core package with no breaking changes. The only exception is that the *iife* build no longer includes `@vue/devtools-api` because it has been upgraded to v8 and does not expose an IIFE build itself. You can track that change in [this issue](https://github.com/vuejs/devtools/issues/989). See [the migration guide](https://router.vuejs.org/guide/migration/v4-to-v5.html) for instructions on how to upgrade from unplugin-vue-router to Vue Router 5.

#####    🚀 Features

- **experimental**: Query params are optional by default  -  by [@&#8203;posva](https://github.com/posva) [<samp>(78913)</samp>](https://github.com/vuejs/router/commit/78913551)
- Add volar plugins  -  by [@&#8203;posva](https://github.com/posva) [<samp>(530ac)</samp>](https://github.com/vuejs/router/commit/530ac53e)
- Add data loaders as experimental  -  by [@&#8203;posva](https://github.com/posva) [<samp>(ab895)</samp>](https://github.com/vuejs/router/commit/ab89513d)
- Add route json schema  -  by [@&#8203;posva](https://github.com/posva) [<samp>(20675)</samp>](https://github.com/vuejs/router/commit/2067515a)
- Upgrade devtools-api to v7  -  by [@&#8203;posva](https://github.com/posva) [<samp>(17b84)</samp>](https://github.com/vuejs/router/commit/17b841b8)
- Upgrade devtools to v8  -  by [@&#8203;posva](https://github.com/posva) [<samp>(b8aa2)</samp>](https://github.com/vuejs/router/commit/b8aa2395)
- Runtime error on missing param parsers  -  by [@&#8203;posva](https://github.com/posva) [<samp>(3444b)</samp>](https://github.com/vuejs/router/commit/3444bc94)
- **volar**: Allow rootDir option  -  by [@&#8203;posva](https://github.com/posva) [<samp>(df65a)</samp>](https://github.com/vuejs/router/commit/df65a864)

#####    🐞 Bug Fixes

- Avoid breaking older browsers support  -  by [@&#8203;posva](https://github.com/posva) [<samp>(c7ba4)</samp>](https://github.com/vuejs/router/commit/c7ba4507)
- Trigger navigation guards when keep-alive component is reactivated for different route  -  by [@&#8203;babu-ch](https://github.com/babu-ch) and [@&#8203;posva](https://github.com/posva) in [#&#8203;2604](https://github.com/vuejs/router/issues/2604) [<samp>(c7735)</samp>](https://github.com/vuejs/router/commit/c7735d30)
- Add automatic types for param parsers  -  by [@&#8203;posva](https://github.com/posva) [<samp>(0fb5d)</samp>](https://github.com/vuejs/router/commit/0fb5da34)
- Param parsers when dts is not at root  -  by [@&#8203;posva](https://github.com/posva) [<samp>(16b39)</samp>](https://github.com/vuejs/router/commit/16b39ff7)
- Expose resolveOptions for unplugin  -  by [@&#8203;posva](https://github.com/posva) [<samp>(35543)</samp>](https://github.com/vuejs/router/commit/355431b6)
- Escape tildes in paths  -  by [@&#8203;posva](https://github.com/posva) [<samp>(aac2e)</samp>](https://github.com/vuejs/router/commit/aac2e265)
- **volar**: Upgrade config read  -  by [@&#8203;posva](https://github.com/posva) [<samp>(e3024)</samp>](https://github.com/vuejs/router/commit/e3024d19)

#####     [View changes on GitHub](https://github.com/vuejs/router/compare/v4.6.4...v5.0.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4zMS4xIiwidXBkYXRlZEluVmVyIjoiNDMuMzEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://git.keligrubb.com/keligrubb/kestrelos/pulls/12
Co-authored-by: Renovate Bot <renovate@keligrubb.com>
Co-committed-by: Renovate Bot <renovate@keligrubb.com>
2026-02-23 03:44:55 +00:00
11 changed files with 2906 additions and 3904 deletions
+85
View File
@@ -0,0 +1,85 @@
name: PR
on:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: https://git.keligrubb.com/actions/checkout@v6
- name: Setup Node.js
uses: https://git.keligrubb.com/actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
test:
runs-on: ubuntu-latest
steps:
- uses: https://git.keligrubb.com/actions/checkout@v6
- name: Setup Node.js
uses: https://git.keligrubb.com/actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
e2e:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.58.2-noble
steps:
- uses: https://git.keligrubb.com/actions/checkout@v6
- name: Setup Node.js
uses: https://git.keligrubb.com/actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Generate dev cert
run: ./scripts/gen-dev-cert.sh
- name: Run e2e tests
run: npm run test:e2e
env:
NODE_TLS_REJECT_UNAUTHORIZED: "0"
docker-build:
runs-on: ubuntu-latest
steps:
- uses: https://git.keligrubb.com/actions/checkout@v6
- name: Set Docker image tag
id: image
run: |
REGISTRY="${GITHUB_SERVER_URL#https://}"
REGISTRY="${REGISTRY#http://}"
echo "tag=${REGISTRY}/${{ github.repository }}:latest" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: https://git.keligrubb.com/actions/docker-setup-buildx-action@v4
- name: Build (dry run)
uses: https://git.keligrubb.com/actions/docker-build-push-action@v7
with:
context: .
push: false
tags: ${{ steps.image.outputs.tag }}
+63
View File
@@ -0,0 +1,63 @@
name: Push
on:
push:
branches: [main]
jobs:
release-docker-helm:
runs-on: ubuntu-latest
steps:
- uses: https://git.keligrubb.com/actions/checkout@v6
with:
token: ${{ secrets.KESTRELOS_REPO_TOKEN }}
- name: Release (bump, tag, push, create release)
env:
CI_REPO_OWNER: ${{ github.actor }}
CI_REPO_NAME: ${{ github.event.repository.name }}
CI_FORGE_URL: ${{ github.server_url }}
CI_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
GITEA_REPO_TOKEN: ${{ secrets.KESTRELOS_REPO_TOKEN }}
run: |
sudo apt-get update -qq && sudo apt-get install -y -qq git wget
./scripts/release.sh
- name: Log in to container registry
uses: https://git.keligrubb.com/actions/docker-login-action@v4
with:
registry: git.keligrubb.com
username: ${{ github.actor }}
password: ${{ secrets.KESTRELOS_REPO_TOKEN }}
- name: Set up Docker Buildx
uses: https://git.keligrubb.com/actions/docker-setup-buildx-action@v4
- name: Build Docker image
uses: https://git.keligrubb.com/actions/docker-build-push-action@v7
with:
context: .
load: true
tags: kestrelos:built
- name: Push Docker image (all tags from .tags)
run: |
REGISTRY="git.keligrubb.com"
IMAGE="$REGISTRY/${{ github.repository }}"
while read -r tag; do
docker tag kestrelos:built "$IMAGE:$tag"
docker push "$IMAGE:$tag"
done < .tags
- name: Set up Helm
uses: https://git.keligrubb.com/actions/setup-helm@v4
- name: Package and push Helm chart
env:
GITEA_REPO_TOKEN: ${{ secrets.KESTRELOS_REPO_TOKEN }}
run: |
helm package helm/kestrelos
for f in kestrelos-*.tgz; do
curl -sf -u "${{ github.actor }}:$GITEA_REPO_TOKEN" -X POST --upload-file "$f" \
"${{ github.server_url }}/api/packages/${{ github.actor }}/helm/api/charts"
done
-41
View File
@@ -1,41 +0,0 @@
when:
- event: pull_request
steps:
- name: install
image: node:24-slim
depends_on: []
commands:
- npm ci
- name: lint
image: node:24-slim
depends_on: [install]
commands:
- npm run lint
- name: test
image: node:24-slim
depends_on: [install]
commands:
- npm run test
- name: e2e
image: mcr.microsoft.com/playwright:v1.58.2-noble
depends_on: [install]
commands:
- ./scripts/gen-dev-cert.sh
- npm run test:e2e
environment:
NODE_TLS_REJECT_UNAUTHORIZED: "0"
- name: docker-build
image: woodpeckerci/plugin-kaniko
depends_on: []
settings:
repo: ${CI_REPO_OWNER}/${CI_REPO_NAME}
registry: git.keligrubb.com
tags: latest
dry-run: true
single-snapshot: true
cleanup: true
-36
View File
@@ -1,36 +0,0 @@
when:
- event: push
branch: main
steps:
- name: release
image: alpine
commands:
- apk add --no-cache git
- ./scripts/release.sh
environment:
GITEA_REPO_TOKEN:
from_secret: gitea_repo_token
- name: docker
image: woodpeckerci/plugin-kaniko
depends_on: [release]
settings:
repo: ${CI_REPO_OWNER}/${CI_REPO_NAME}
registry: git.keligrubb.com
username: ${CI_REPO_OWNER}
password:
from_secret: gitea_registry_token
single-snapshot: true
cleanup: true
- name: helm
image: alpine/helm
depends_on: [release]
environment:
GITEA_REGISTRY_TOKEN:
from_secret: gitea_registry_token
commands:
- apk add --no-cache curl
- helm package helm/kestrelos
- curl -sf -u $CI_REPO_OWNER:$GITEA_REGISTRY_TOKEN -X POST --upload-file kestrelos-*.tgz https://git.keligrubb.com/api/packages/$CI_REPO_OWNER/helm/api/charts
+24
View File
@@ -1,3 +1,27 @@
## [1.0.8] - 2026-03-12
### Changed
- fix release file (#22)
## [1.0.7] - 2026-03-06
### Changed
- chore(deps): update docker/build-push-action action to v7 (#19)
## [1.0.6] - 2026-03-05
### Changed
- fix docker login during push stage (#18)
## [1.0.5] - 2026-03-05
### Changed
- fix deploy pipeline stages for token registry uploads (#17)
## [1.0.4] - 2026-03-04
### Changed
- fix deploy pipeline (#15)
## [1.0.3] - 2026-02-23
### Changed
- fix(deps): update dependency vue-router to v5 (#12)
## [1.0.2] - 2026-02-22
### Changed
- chore(deps): update dependency eslint to v10 (#10)
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: kestrelos
description: KestrelOS TOC for OSINT feeds - map, camera feeds, offline tiles
type: application
version: 1.0.2
appVersion: "1.0.2"
version: 1.0.8
appVersion: "1.0.8"
+1 -1
View File
@@ -2,7 +2,7 @@ replicaCount: 1
image:
repository: git.keligrubb.com/keligrubb/kestrelos
tag: 1.0.2
tag: 1.0.8
pullPolicy: IfNotPresent
service:
+2610 -3790
View File
File diff suppressed because it is too large Load Diff
+2 -3
View File
@@ -1,6 +1,6 @@
{
"name": "kestrelos",
"version": "1.0.2",
"version": "1.0.8",
"private": true,
"type": "module",
"scripts": {
@@ -31,9 +31,8 @@
"nuxt": "^4.0.0",
"openid-client": "^6.8.2",
"qrcode": "^1.5.4",
"sqlite3": "^5.1.7",
"vue": "^3.4.0",
"vue-router": "^4.4.0",
"vue-router": "^5.0.0",
"ws": "^8.18.0"
},
"devDependencies": {
+33 -7
View File
@@ -3,8 +3,21 @@ set -e
# version
msg="${CI_COMMIT_MESSAGE:-}"
# optional PR body (written by workflow from Gitea API when this commit is a merged PR)
if [ -f .ci_pr_body ]; then
CI_PR_DESCRIPTION=$(cat .ci_pr_body); rm -f .ci_pr_body
else
CI_PR_DESCRIPTION=""
fi
export CI_PR_DESCRIPTION
bump=patch
echo "$msg" | grep -qi minor: && bump=minor
# Conventional commits: chore/fix => patch, feat => minor
echo "$msg" | grep -Eqi '(^|[[:space:]])(fix|chore)(\([^)]*\))?:' && bump=patch
echo "$msg" | grep -Eqi '(^|[[:space:]])feat(\([^)]*\))?:' && bump=minor
# Conventional commits breaking change: type!:
echo "$msg" | grep -Eqi '(^|[[:space:]])[a-zA-Z]+(\([^)]*\))?!:' && bump=major
# Explicit bump prefixes still supported (but never downgrade a major bump)
echo "$msg" | grep -qi minor: && [ "$bump" != "major" ] && bump=minor
echo "$msg" | grep -qi major: && bump=major
cur=$(awk '/"version"/ { match($0, /[0-9]+\.[0-9]+\.[0-9]+/); print substr($0, RSTART, RLENGTH); exit }' package.json)
major=$(echo "$cur" | cut -d. -f1); minor=$(echo "$cur" | cut -d. -f2); patch=$(echo "$cur" | cut -d. -f3)
@@ -12,9 +25,21 @@ case "$bump" in major) major=$((major+1)); minor=0; patch=0 ;; minor) minor=$((m
newVersion="$major.$minor.$patch"
[ -z "$cur" ] && { echo "error: could not read version from package.json"; exit 1; }
# changelog entry (strip prefix from first line)
changelogEntry=$(echo "$msg" | head -1 | awk '{sub(/^[mM]ajor:[ \t]*/,""); sub(/^[mM]inor:[ \t]*/,""); sub(/^[pP]atch:[ \t]*/,""); print}')
# changelog entry (strip explicit bump prefixes & any conventional-commit type(scope):); optional PR description enriches it
changelogEntry=$(
echo "$msg" \
| head -1 \
| sed -E 's/^[[:space:]]*[mM]ajor:[[:space:]]*//; s/^[[:space:]]*[mM]inor:[[:space:]]*//; s/^[[:space:]]*[pP]atch:[[:space:]]*//' \
| sed -E 's/^[[:space:]]*[a-zA-Z]+(\([^)]*\))?:[[:space:]]*//'
)
[ -z "$changelogEntry" ] && changelogEntry="Release v$newVersion"
if [ -n "$CI_PR_DESCRIPTION" ]; then
changelogFull="- $changelogEntry
$CI_PR_DESCRIPTION"
else
changelogFull="- $changelogEntry"
fi
# bump files
awk -v v="$newVersion" '/"version"/ { sub(/[0-9]+\.[0-9]+\.[0-9]+/, v) } { print }' package.json > package.json.tmp && mv package.json.tmp package.json
@@ -24,10 +49,11 @@ awk -v v="$newVersion" '/^ tag:/ { $0 = " tag: " v }; { print }' helm/kestrelo
# changelog
new="## [$newVersion] - $(date +%Y-%m-%d)
### Changed
- $changelogEntry
$changelogFull
"
{ [ ! -f CHANGELOG.md ] && printf '# Changelog\n\n'; printf '%s' "$new"; [ -f CHANGELOG.md ] && cat CHANGELOG.md; } > CHANGELOG.md.tmp && mv CHANGELOG.md.tmp CHANGELOG.md
# Create CHANGELOG.md if missing (first release); otherwise prepend new entry to existing content.
{ [ ! -f CHANGELOG.md ] && printf '# Changelog\n\n'; printf '%s' "$new"; [ -f CHANGELOG.md ] && cat CHANGELOG.md || true; } > CHANGELOG.md.tmp && mv CHANGELOG.md.tmp CHANGELOG.md
# git
git config user.email "ci@kestrelos" && git config user.name "CI"
@@ -35,7 +61,7 @@ git add package.json helm/kestrelos/Chart.yaml helm/kestrelos/values.yaml CHANGE
git commit -m "release v$newVersion [skip ci]"
url="https://${CI_REPO_OWNER}:${GITEA_REPO_TOKEN}@${CI_FORGE_URL#https://}/${CI_REPO_OWNER}/${CI_REPO_NAME}.git"
git tag "v$newVersion"
# artifact for kaniko (tag list)
# artifact for docker (tag list)
printf '%s\n%s\n' "$newVersion" "latest" > .tags
retry() { n=0; while ! "$@"; do n=$((n+1)); [ $n -ge 3 ] && return 1; sleep 2; done; }
retry git push "$url" HEAD:main "v$newVersion"
@@ -43,7 +69,7 @@ retry git push "$url" HEAD:main "v$newVersion"
# gitea release
body="## Changelog
### Changed
- $changelogEntry
$changelogFull
## Installation
- [Docker image](${CI_FORGE_URL}/${CI_REPO_OWNER}/-/packages/container/${CI_REPO_NAME})
+86 -24
View File
@@ -1,14 +1,12 @@
import { join, dirname } from 'node:path'
import { mkdirSync, existsSync } from 'node:fs'
import { randomBytes, randomUUID } from 'node:crypto'
import { createRequire } from 'node:module'
import { promisify } from 'node:util'
import { randomBytes } from 'node:crypto'
import { hashPassword } from './password.js'
import { registerCleanup } from './shutdown.js'
// Resolve from project root so bundled server (e.g. .output) finds node_modules/sqlite3
const requireFromRoot = createRequire(join(process.cwd(), 'package.json'))
const sqlite3 = requireFromRoot('sqlite3')
const { DatabaseSync } = requireFromRoot('node:sqlite')
const SCHEMA_VERSION = 4
const DB_BUSY_TIMEOUT_MS = 5000
@@ -144,7 +142,6 @@ const initDb = async (db, run, all, get) => {
catch {
// WAL not supported (e.g., network filesystem)
}
db.configure('busyTimeout', DB_BUSY_TIMEOUT_MS)
await run(SCHEMA.schema_version)
await run(SCHEMA.users)
@@ -168,7 +165,7 @@ const initDb = async (db, run, all, get) => {
await run(
'INSERT INTO users (id, identifier, password_hash, role, created_at, auth_provider, oidc_issuer, oidc_sub) VALUES (?, ?, ?, ?, ?, ?, ?, ?)',
[crypto.randomUUID(), identifier, hashPassword(plainPassword), 'admin', new Date().toISOString(), 'local', null, null],
[randomUUID(), identifier, hashPassword(plainPassword), 'admin', new Date().toISOString(), 'local', null, null],
)
if (!email || !password) {
@@ -181,37 +178,104 @@ const initDb = async (db, run, all, get) => {
export async function getDb() {
if (dbInstance) return dbInstance
const db = new sqlite3.Database(getDbPath(), (err) => {
if (err) {
const sqliteDb = (() => {
try {
return new DatabaseSync(getDbPath(), { timeout: DB_BUSY_TIMEOUT_MS })
}
catch (err) {
console.error('[db] Failed to open database:', err.message)
throw err
}
})
})()
const run = promisify(db.run.bind(db))
const all = promisify(db.all.bind(db))
const get = promisify(db.get.bind(db))
const run = (sql, params = []) =>
new Promise((resolve, reject) => {
const stmt = sqliteDb.prepare(sql)
try {
stmt.run(...params)
resolve()
}
catch (error) {
reject(error)
}
finally {
try {
stmt.finalize()
}
catch {
// ignore finalize errors
}
}
})
const all = (sql, params = []) =>
new Promise((resolve, reject) => {
const stmt = sqliteDb.prepare(sql)
try {
const rows = stmt.all(...params)
resolve(rows)
}
catch (error) {
reject(error)
}
finally {
try {
stmt.finalize()
}
catch {
// ignore finalize errors
}
}
})
const get = (sql, params = []) =>
new Promise((resolve, reject) => {
const stmt = sqliteDb.prepare(sql)
try {
const row = stmt.get(...params)
resolve(row)
}
catch (error) {
reject(error)
}
finally {
try {
stmt.finalize()
}
catch {
// ignore finalize errors
}
}
})
const wrappedDb = {
close(callback) {
try {
sqliteDb.close()
if (typeof callback === 'function') callback(null)
}
catch (error) {
if (typeof callback === 'function') callback(error)
else throw error
}
},
}
try {
await initDb(db, run, all, get)
await initDb(wrappedDb, run, all, get)
}
catch (error) {
db.close()
wrappedDb.close()
console.error('[db] Database initialization failed:', error.message)
throw error
}
dbInstance = { db, run, all, get }
dbInstance = { db: wrappedDb, run, all, get }
registerCleanup(async () => {
if (dbInstance) {
try {
await new Promise((resolve, reject) => {
dbInstance.db.close((err) => {
if (err) reject(err)
else resolve()
})
})
dbInstance.db.close()
}
catch (error) {
console.error('[db] Error closing database during shutdown:', error?.message)
@@ -290,9 +354,7 @@ export async function withTransaction(db, callback) {
export function closeDb() {
if (!dbInstance) return
try {
dbInstance.db.close((err) => {
if (err) console.error('[db] Error closing database:', err.message)
})
dbInstance.db.close()
}
catch (error) {
console.error('[db] Error closing database:', error.message)