From 0451c30d6eb102c82df41f0fd8d958f098f28462 Mon Sep 17 00:00:00 2001
From: Prad Nukala
Date: Tue, 1 Oct 2024 17:02:54 -0400
Subject: [PATCH] feat: Implement session management
---
.github/workflows/version-bump.yml | 24 +++++++++---------
CHANGELOG.md | 36 ---------------------------
pkg/nebula/components/home/hero.templ | 2 +-
pkl/orm.pkl | 20 +++++++++++++++
4 files changed, 33 insertions(+), 49 deletions(-)
diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml
index 1b8e85ddd..b16571d10 100644
--- a/.github/workflows/version-bump.yml
+++ b/.github/workflows/version-bump.yml
@@ -22,24 +22,24 @@ jobs:
- name: Run tests
run: make test
- check-protos:
- name: "Check Protobuf Breaking Changes"
+ check-proto-changes:
+ name: "Check Proto Changes"
runs-on: ubuntu-latest
- continue-on-error: true
outputs:
- has_breaking_changes: ${{ steps.check_breaking.outputs.has_breaking_changes }}
+ proto_changed: ${{ steps.check_proto.outputs.proto_changed }}
steps:
- uses: actions/checkout@v4
- - uses: bufbuild/buf-setup-action@v1
- - id: check_breaking
- uses: bufbuild/buf-breaking-action@v1
with:
- against: "https://github.com/onsonr/sonr.git#branch=master"
- - name: Set output
- run: echo "has_breaking_changes=${{ steps.check_breaking.outcome == 'failure' }}" >> $GITHUB_OUTPUT
+ fetch-depth: 0
+ - name: Check for changes in proto directory
+ id: check_proto
+ run: |
+ git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q '^proto/' && \
+ echo "proto_changed=true" >> $GITHUB_OUTPUT || \
+ echo "proto_changed=false" >> $GITHUB_OUTPUT
bump-version:
- needs: [run-tests, check-protos]
+ needs: [run-tests, check-proto-changes]
runs-on: ubuntu-latest
name: "Bump Version"
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
@@ -52,4 +52,4 @@ jobs:
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- increment: ${{ needs.check-protos.outputs.has_breaking_changes == 'true' && 'MINOR' || 'PATCH' }}
+ increment: ${{ needs.check-proto-changes.outputs.proto_changed == 'true' && 'MINOR' || 'PATCH' }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0acfa6cfa..e69343267 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,39 +1,3 @@
-## v0.4.1 (2024-10-01)
-
-### Feat
-
-- allow manual release triggers
-- add Input and RegistrationForm models
-- add new utility classes
-- add login and registration pages
-- add tailwindcss utilities
-- add support for ARM64 architecture
-- add DWN resolver field
-- add stats section to homepage
-- implement hero section using Pkl
-- add PKL schema for message formats
-- add Homebrew tap for sonr
-- update release workflow to use latest tag
-
-### Fix
-
-- update release workflow to use latest tag
-- **versioning**: revert version to 0.9.0
-- **cta**: Fix typo in CTA title
-- change bento section title to reflect security focus
-- adjust hero image dimensions
-- **Input**: Change type from to
-- update hero image height in config.pkl
-
-### Refactor
-
-- move home page sections to home package
-- rename motrd to motr
-- update hero image dimensions
-- move nebula configuration to static file
-- rename buf-publish.yml to publish-assets.yml
-- remove unused field from
-
## v0.4.0 (2024-09-30)
### Feat
diff --git a/pkg/nebula/components/home/hero.templ b/pkg/nebula/components/home/hero.templ
index 9dbe298ce..742fba8de 100644
--- a/pkg/nebula/components/home/hero.templ
+++ b/pkg/nebula/components/home/hero.templ
@@ -25,7 +25,7 @@ templ SectionHero(hero *models.Hero) {
{ hero.SecondaryButton.Text }
diff --git a/pkl/orm.pkl b/pkl/orm.pkl
index a7718c8bb..993f71a11 100644
--- a/pkl/orm.pkl
+++ b/pkl/orm.pkl
@@ -270,6 +270,26 @@ class Profile {
updatedAt: String?
}
+class Session {
+ @PrimaryKey
+ id: String
+
+ @JsonField
+ subject: String
+
+ @JsonField
+ controller: Bech32
+
+ @JsonField
+ origin: String
+
+ @JsonField
+ createdAt: String?
+
+ @JsonField
+ updatedAt: String?
+}
+
db_name: String = "vault"
db_version: Int = 1