Compare commits
26 Commits
cojson@0.1
...
cojson@0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11dcfd703d | ||
|
|
879b726537 | ||
|
|
66bbd03262 | ||
|
|
c09b63698f | ||
|
|
700a4f1ba1 | ||
|
|
844cdc907f | ||
|
|
9e32d4cb92 | ||
|
|
40e1ca7cb1 | ||
|
|
80cf21e453 | ||
|
|
48c8a3d219 | ||
|
|
31bb1201fc | ||
|
|
08d1b05607 | ||
|
|
d64a14210d | ||
|
|
7e53d33e9b | ||
|
|
ea2b39cc30 | ||
|
|
6b835f95cf | ||
|
|
a229ae5f70 | ||
|
|
84fdc1d8fd | ||
|
|
14a8b32522 | ||
|
|
ddc09a0d6b | ||
|
|
3b45a3f2fd | ||
|
|
9034a45da0 | ||
|
|
a5ceaffb0c | ||
|
|
dcee2f9b4e | ||
|
|
83fdc504ff | ||
|
|
5a8a62b4a3 |
35
.github/pull_request_template.md
vendored
35
.github/pull_request_template.md
vendored
@@ -1,24 +1,23 @@
|
||||
### What this Does
|
||||
Brief summary of the change, ideally framed in user or product terms.
|
||||
# Description
|
||||
<!-- Please include a summary of the change and which issue is fixed -->
|
||||
<!-- Please also include relevant motivation and context -->
|
||||
<!-- Include any links to documentation like RFC’s if necessary -->
|
||||
<!-- Add a link to to relevant preview environments or anything that would simplify visual review process -->
|
||||
<!-- Supplemental screenshots and video are encouraged, but the primary description should be in text -->
|
||||
|
||||
### Why Are We Doing This?
|
||||
Link to the shaped pitch or explain what problem it solves.
|
||||
## Manual testing instructions
|
||||
|
||||
### Scope / Boundaries
|
||||
Includes:
|
||||
- [x] Core feature functionality
|
||||
- [x] Tests or validation steps
|
||||
<!-- Add any actions required to manually test the changes -->
|
||||
|
||||
Do NOT include:
|
||||
- [ ] Related stretch features or follow-ups
|
||||
## Tests
|
||||
|
||||
### Testing Instructions
|
||||
How a reviewer or QA can verify behavior, offer step-by-step instructions if possible. Screenshots or recordings are welcome.
|
||||
- [ ] Tests have been added and/or updated
|
||||
- [ ] Tests have not been updated, because: <!-- Insert reason for not updating tests here -->
|
||||
- [ ] I need help with writing tests
|
||||
|
||||
### Known Issues / Open Questions (if any)
|
||||
- [ ] Note anything you’d like review on or decided async
|
||||
|
||||
### Related Links
|
||||
- GitHub issue
|
||||
- Linear pitch
|
||||
- Design links or references
|
||||
## Checklist
|
||||
|
||||
- [ ] I've updated the part of the docs that are affected the PR changes
|
||||
- [ ] I've generated a changeset, if a version bump is required
|
||||
- [ ] I've updated the jsDoc comments to the public APIs I've modified, or added them when missing
|
||||
6
.github/workflows/code-quality.yml
vendored
6
.github/workflows/code-quality.yml
vendored
@@ -1,5 +1,11 @@
|
||||
name: Code quality
|
||||
|
||||
concurrency:
|
||||
# For pushes, this lets concurrent runs happen, so each push gets a result.
|
||||
# But for other events (e.g. PRs), we can cancel the previous runs.
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
|
||||
6
.github/workflows/e2e-rn-test.yml
vendored
6
.github/workflows/e2e-rn-test.yml
vendored
@@ -1,5 +1,11 @@
|
||||
name: End-to-End Tests for React Native
|
||||
|
||||
concurrency:
|
||||
# For pushes, this lets concurrent runs happen, so each push gets a result.
|
||||
# But for other events (e.g. PRs), we can cancel the previous runs.
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
6
.github/workflows/jazz-run.yml
vendored
6
.github/workflows/jazz-run.yml
vendored
@@ -1,5 +1,11 @@
|
||||
name: Jazz Run Tests
|
||||
|
||||
concurrency:
|
||||
# For pushes, this lets concurrent runs happen, so each push gets a result.
|
||||
# But for other events (e.g. PRs), we can cancel the previous runs.
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
46
.github/workflows/playwright-homepage.yml
vendored
46
.github/workflows/playwright-homepage.yml
vendored
@@ -1,46 +0,0 @@
|
||||
name: Playwright Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
timeout-minutes: 60
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Setup Source Code
|
||||
uses: ./.github/actions/source-code/
|
||||
|
||||
- name: Install root dependencies
|
||||
run: pnpm install && pnpm exec turbo build --filter="./packages/*"
|
||||
|
||||
- name: Install project dependencies
|
||||
run: pnpm install
|
||||
working-directory: ./homepage/homepage
|
||||
|
||||
- name: Pnpm Build
|
||||
run: pnpm exec turbo build
|
||||
working-directory: ./homepage/homepage
|
||||
|
||||
- name: Install Playwright Browsers
|
||||
run: pnpm exec playwright install
|
||||
working-directory: ./homepage/homepage
|
||||
|
||||
- name: Run Playwright tests
|
||||
run: pnpm exec playwright test
|
||||
working-directory: ./homepage/homepage
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: homepage-playwright-report
|
||||
path: ./homepage/homepage/playwright-report/
|
||||
retention-days: 30
|
||||
164
.github/workflows/playwright.yml
vendored
164
.github/workflows/playwright.yml
vendored
@@ -1,5 +1,11 @@
|
||||
name: Playwright Tests
|
||||
|
||||
concurrency:
|
||||
# For pushes, this lets concurrent runs happen, so each push gets a result.
|
||||
# But for other events (e.g. PRs), we can cancel the previous runs.
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
@@ -13,21 +19,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
project: [
|
||||
"tests/e2e",
|
||||
"examples/chat",
|
||||
"examples/chat-svelte",
|
||||
"examples/clerk",
|
||||
"examples/betterauth",
|
||||
"examples/file-share-svelte",
|
||||
"examples/form",
|
||||
"examples/inspector",
|
||||
"examples/music-player",
|
||||
"examples/organization",
|
||||
"starters/react-passkey-auth",
|
||||
"starters/svelte-passkey-auth",
|
||||
"tests/jazz-svelte"
|
||||
]
|
||||
shard: ["1/2", "2/2"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -37,25 +29,129 @@ jobs:
|
||||
- name: Setup Source Code
|
||||
uses: ./.github/actions/source-code/
|
||||
|
||||
- name: Pnpm Build
|
||||
run: |
|
||||
if [ -f .env.test ]; then
|
||||
cp .env.test .env
|
||||
fi
|
||||
pnpm turbo build
|
||||
working-directory: ./${{ matrix.project }}
|
||||
|
||||
- name: Install Playwright Browsers
|
||||
run: pnpm exec playwright install
|
||||
working-directory: ./${{ matrix.project }}
|
||||
|
||||
- name: Run Playwright tests
|
||||
run: pnpm exec playwright test
|
||||
working-directory: ./${{ matrix.project }}
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ hashFiles(format('{0}/package.json', matrix.project)) }}-playwright-report
|
||||
path: ./${{ matrix.project }}/playwright-report/
|
||||
retention-days: 30
|
||||
- name: Run Playwright tests for shard ${{ matrix.shard }}
|
||||
run: |
|
||||
# Parse shard information (e.g., "1/2" -> shard_num=1, total_shards=2)
|
||||
IFS='/' read -r shard_num total_shards <<< "${{ matrix.shard }}"
|
||||
shard_index=$((shard_num - 1)) # Convert to 0-based index
|
||||
|
||||
# Debug: Print parsed values
|
||||
echo "Parsed shard_num: $shard_num"
|
||||
echo "Parsed total_shards: $total_shards"
|
||||
echo "Calculated shard_index: $shard_index"
|
||||
|
||||
# Define all projects to test
|
||||
all_projects=(
|
||||
"tests/e2e"
|
||||
"examples/chat"
|
||||
"examples/chat-svelte"
|
||||
"examples/clerk"
|
||||
"examples/betterauth"
|
||||
"examples/file-share-svelte"
|
||||
"examples/form"
|
||||
"examples/inspector"
|
||||
"examples/music-player"
|
||||
"examples/organization"
|
||||
"starters/react-passkey-auth"
|
||||
"starters/svelte-passkey-auth"
|
||||
"tests/jazz-svelte"
|
||||
)
|
||||
|
||||
# Calculate which projects this shard should run
|
||||
shard_projects=()
|
||||
for i in "${!all_projects[@]}"; do
|
||||
if [ $((i % total_shards)) -eq $shard_index ]; then
|
||||
shard_projects+=("${all_projects[i]}")
|
||||
fi
|
||||
done
|
||||
|
||||
# Track project results
|
||||
overall_exit_code=0
|
||||
failed_projects=()
|
||||
passed_projects=()
|
||||
|
||||
echo "=== Running tests for shard ${{ matrix.shard }} ==="
|
||||
echo "Projects in this shard:"
|
||||
printf '%s\n' "${shard_projects[@]}"
|
||||
echo
|
||||
|
||||
# Run tests for each project
|
||||
for project in "${shard_projects[@]}"; do
|
||||
echo "=== Testing project: $project ==="
|
||||
|
||||
# Check if project directory exists
|
||||
if [ ! -d "$project" ]; then
|
||||
echo "❌ FAILED: Project directory $project does not exist"
|
||||
failed_projects+=("$project (directory not found)")
|
||||
overall_exit_code=1
|
||||
continue
|
||||
fi
|
||||
|
||||
# Check if project has package.json
|
||||
if [ ! -f "$project/package.json" ]; then
|
||||
echo "❌ FAILED: No package.json found in $project"
|
||||
failed_projects+=("$project (no package.json)")
|
||||
overall_exit_code=1
|
||||
continue
|
||||
fi
|
||||
|
||||
# Build the project
|
||||
echo "🔨 Building $project..."
|
||||
cd "$project"
|
||||
|
||||
if [ -f .env.test ]; then
|
||||
cp .env.test .env
|
||||
fi
|
||||
|
||||
if ! pnpm turbo build; then
|
||||
echo "❌ BUILD FAILED: $project"
|
||||
failed_projects+=("$project (build failed)")
|
||||
overall_exit_code=1
|
||||
cd - > /dev/null
|
||||
continue
|
||||
fi
|
||||
|
||||
# Run Playwright tests
|
||||
echo "🧪 Running Playwright tests for $project..."
|
||||
if ! pnpm exec playwright test; then
|
||||
echo "❌ TESTS FAILED: $project"
|
||||
failed_projects+=("$project (tests failed)")
|
||||
overall_exit_code=1
|
||||
else
|
||||
echo "✅ TESTS PASSED: $project"
|
||||
passed_projects+=("$project")
|
||||
fi
|
||||
|
||||
cd - > /dev/null
|
||||
echo "=== Finished testing $project ==="
|
||||
echo
|
||||
done
|
||||
|
||||
# Print summary report
|
||||
echo "=========================================="
|
||||
echo "📊 TEST SUMMARY FOR SHARD ${{ matrix.shard }}"
|
||||
echo "=========================================="
|
||||
|
||||
if [ ${#passed_projects[@]} -gt 0 ]; then
|
||||
echo "✅ PASSED (${#passed_projects[@]}):"
|
||||
printf ' - %s\n' "${passed_projects[@]}"
|
||||
echo
|
||||
fi
|
||||
|
||||
if [ ${#failed_projects[@]} -gt 0 ]; then
|
||||
echo "❌ FAILED (${#failed_projects[@]}):"
|
||||
printf ' - %s\n' "${failed_projects[@]}"
|
||||
echo
|
||||
fi
|
||||
|
||||
|
||||
echo "Total projects in shard: ${#shard_projects[@]}"
|
||||
echo "Passed: ${#passed_projects[@]}"
|
||||
echo "Failed: ${#failed_projects[@]}"
|
||||
echo "=========================================="
|
||||
|
||||
# Exit with overall status
|
||||
exit $overall_exit_code
|
||||
|
||||
7
.github/workflows/pre-release.yml
vendored
7
.github/workflows/pre-release.yml
vendored
@@ -1,4 +1,11 @@
|
||||
name: Pre-Publish tagged Pull Requests
|
||||
|
||||
concurrency:
|
||||
# For pushes, this lets concurrent runs happen, so each push gets a result.
|
||||
# But for other events (e.g. PRs), we can cancel the previous runs.
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
|
||||
6
.github/workflows/unit-test.yml
vendored
6
.github/workflows/unit-test.yml
vendored
@@ -1,5 +1,11 @@
|
||||
name: Unit Tests
|
||||
|
||||
concurrency:
|
||||
# For pushes, this lets concurrent runs happen, so each push gets a result.
|
||||
# But for other events (e.g. PRs), we can cancel the previous runs.
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# passkey-svelte
|
||||
|
||||
## 0.0.96
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c09b636]
|
||||
- jazz-tools@0.15.7
|
||||
|
||||
## 0.0.95
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a5ceaff]
|
||||
- jazz-tools@0.15.6
|
||||
|
||||
## 0.0.94
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-svelte",
|
||||
"version": "0.0.94",
|
||||
"version": "0.0.96",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -17,6 +17,7 @@ import React from "react";
|
||||
import { TodoAccount, TodoProject } from "./1_schema.ts";
|
||||
import { NewProjectForm } from "./3_NewProjectForm.tsx";
|
||||
import { ProjectTodoTable } from "./4_ProjectTodoTable.tsx";
|
||||
import { apiKey } from "./apiKey.ts";
|
||||
import {
|
||||
Button,
|
||||
ThemeProvider,
|
||||
@@ -41,7 +42,7 @@ function JazzAndAuth({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<JazzReactProvider
|
||||
sync={{
|
||||
peer: `ws://localhost:4200`,
|
||||
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
|
||||
}}
|
||||
AccountSchema={TodoAccount}
|
||||
>
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# cojson-storage-indexeddb
|
||||
|
||||
## 0.15.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- cojson@0.15.7
|
||||
- cojson-storage@0.15.7
|
||||
|
||||
## 0.15.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- cojson@0.15.6
|
||||
- cojson-storage@0.15.6
|
||||
|
||||
## 0.15.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cojson-storage-indexeddb",
|
||||
"version": "0.15.5",
|
||||
"version": "0.15.7",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# cojson-storage-sqlite
|
||||
|
||||
## 0.15.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- cojson@0.15.7
|
||||
- cojson-storage@0.15.7
|
||||
|
||||
## 0.15.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- cojson@0.15.6
|
||||
- cojson-storage@0.15.6
|
||||
|
||||
## 0.15.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "cojson-storage-sqlite",
|
||||
"type": "module",
|
||||
"version": "0.15.5",
|
||||
"version": "0.15.7",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"better-sqlite3": "^11.7.0",
|
||||
"cojson": "workspace:0.15.5",
|
||||
"cojson": "workspace:0.15.7",
|
||||
"cojson-storage": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# cojson-storage
|
||||
|
||||
## 0.15.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- cojson@0.15.7
|
||||
|
||||
## 0.15.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- cojson@0.15.6
|
||||
|
||||
## 0.15.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cojson-storage",
|
||||
"version": "0.15.5",
|
||||
"version": "0.15.7",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# cojson-transport-nodejs-ws
|
||||
|
||||
## 0.15.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- cojson@0.15.7
|
||||
|
||||
## 0.15.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- cojson@0.15.6
|
||||
|
||||
## 0.15.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "cojson-transport-ws",
|
||||
"type": "module",
|
||||
"version": "0.15.5",
|
||||
"version": "0.15.7",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# cojson
|
||||
|
||||
## 0.15.7
|
||||
|
||||
## 0.15.6
|
||||
|
||||
## 0.15.5
|
||||
|
||||
## 0.15.4
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"version": "0.15.5",
|
||||
"version": "0.15.7",
|
||||
"devDependencies": {
|
||||
"@opentelemetry/sdk-metrics": "^2.0.0",
|
||||
"typescript": "catalog:"
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# jazz-auth-betterauth
|
||||
|
||||
## 0.15.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c09b636]
|
||||
- jazz-tools@0.15.7
|
||||
- jazz-betterauth-client-plugin@0.15.7
|
||||
- cojson@0.15.7
|
||||
|
||||
## 0.15.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a5ceaff]
|
||||
- jazz-tools@0.15.6
|
||||
- jazz-betterauth-client-plugin@0.15.6
|
||||
- cojson@0.15.6
|
||||
|
||||
## 0.15.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-auth-betterauth",
|
||||
"version": "0.15.5",
|
||||
"version": "0.15.7",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# jazz-betterauth-client-plugin
|
||||
|
||||
## 0.15.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-betterauth-server-plugin@0.15.7
|
||||
|
||||
## 0.15.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-betterauth-server-plugin@0.15.6
|
||||
|
||||
## 0.15.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-betterauth-client-plugin",
|
||||
"version": "0.15.5",
|
||||
"version": "0.15.7",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# jazz-betterauth-server-plugin
|
||||
|
||||
## 0.15.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c09b636]
|
||||
- jazz-tools@0.15.7
|
||||
- cojson@0.15.7
|
||||
|
||||
## 0.15.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a5ceaff]
|
||||
- jazz-tools@0.15.6
|
||||
- cojson@0.15.6
|
||||
|
||||
## 0.15.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-betterauth-server-plugin",
|
||||
"version": "0.15.5",
|
||||
"version": "0.15.7",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# jazz-react-auth-betterauth
|
||||
|
||||
## 0.15.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c09b636]
|
||||
- jazz-tools@0.15.7
|
||||
- jazz-auth-betterauth@0.15.7
|
||||
- jazz-betterauth-client-plugin@0.15.7
|
||||
- cojson@0.15.7
|
||||
|
||||
## 0.15.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a5ceaff]
|
||||
- jazz-tools@0.15.6
|
||||
- jazz-auth-betterauth@0.15.6
|
||||
- jazz-betterauth-client-plugin@0.15.6
|
||||
- cojson@0.15.6
|
||||
|
||||
## 0.15.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-react-auth-betterauth",
|
||||
"version": "0.15.5",
|
||||
"version": "0.15.7",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"types": "src/index.tsx",
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# jazz-run
|
||||
|
||||
## 0.15.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c09b636]
|
||||
- jazz-tools@0.15.7
|
||||
- cojson@0.15.7
|
||||
- cojson-storage-sqlite@0.15.7
|
||||
- cojson-transport-ws@0.15.7
|
||||
|
||||
## 0.15.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a5ceaff]
|
||||
- jazz-tools@0.15.6
|
||||
- cojson@0.15.6
|
||||
- cojson-storage-sqlite@0.15.6
|
||||
- cojson-transport-ws@0.15.6
|
||||
|
||||
## 0.15.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"bin": "./dist/index.js",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"version": "0.15.5",
|
||||
"version": "0.15.7",
|
||||
"exports": {
|
||||
"./startSyncServer": {
|
||||
"import": "./dist/startSyncServer.js",
|
||||
@@ -28,11 +28,11 @@
|
||||
"@effect/printer-ansi": "^0.34.5",
|
||||
"@effect/schema": "^0.71.1",
|
||||
"@effect/typeclass": "^0.25.5",
|
||||
"cojson": "workspace:0.15.5",
|
||||
"cojson-storage-sqlite": "workspace:0.15.5",
|
||||
"cojson-transport-ws": "workspace:0.15.5",
|
||||
"cojson": "workspace:0.15.7",
|
||||
"cojson-storage-sqlite": "workspace:0.15.7",
|
||||
"cojson-transport-ws": "workspace:0.15.7",
|
||||
"effect": "^3.6.5",
|
||||
"jazz-tools": "workspace:0.15.5",
|
||||
"jazz-tools": "workspace:0.15.7",
|
||||
"ws": "^8.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# jazz-tools
|
||||
|
||||
## 0.15.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- c09b636: Fix react bundling in jazz-tools/inspector/register-custom-element
|
||||
- cojson@0.15.7
|
||||
- cojson-storage@0.15.7
|
||||
- cojson-storage-indexeddb@0.15.7
|
||||
- cojson-transport-ws@0.15.7
|
||||
|
||||
## 0.15.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- a5ceaff: add Group.getDirectMembers to get only direct members of a group
|
||||
- cojson@0.15.6
|
||||
- cojson-storage@0.15.6
|
||||
- cojson-storage-indexeddb@0.15.6
|
||||
- cojson-transport-ws@0.15.6
|
||||
|
||||
## 0.15.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"version": "0.15.5",
|
||||
"version": "0.15.7",
|
||||
"dependencies": {
|
||||
"@manuscripts/prosemirror-recreate-steps": "^0.1.4",
|
||||
"@scure/base": "1.2.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Account } from "jazz-tools";
|
||||
import { JazzInspectorInternal } from "jazz-tools/inspector";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { JazzInspectorInternal } from "./index.js";
|
||||
|
||||
export class JazzInspectorElement extends HTMLElement {
|
||||
private root: ReturnType<typeof createRoot> | null = null;
|
||||
|
||||
@@ -182,7 +182,9 @@ export class Group extends CoValueBase implements CoValue {
|
||||
}
|
||||
}
|
||||
|
||||
get members(): Array<{
|
||||
private getMembersFromKeys(
|
||||
accountIDs: Iterable<RawAccountID | AgentID>,
|
||||
): Array<{
|
||||
id: string;
|
||||
role: AccountRole;
|
||||
ref: Ref<Account>;
|
||||
@@ -195,7 +197,7 @@ export class Group extends CoValueBase implements CoValue {
|
||||
optional: false,
|
||||
} satisfies RefEncoded<Account>;
|
||||
|
||||
for (const accountID of this._raw.getAllMemberKeysSet()) {
|
||||
for (const accountID of accountIDs) {
|
||||
if (!isAccountID(accountID)) continue;
|
||||
|
||||
const role = this._raw.roleOf(accountID);
|
||||
@@ -230,6 +232,30 @@ export class Group extends CoValueBase implements CoValue {
|
||||
return members;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all members of the group, including inherited members from parent
|
||||
* groups.
|
||||
*
|
||||
* If you need only the direct members of the group, use
|
||||
* {@link getDirectMembers} instead.
|
||||
*
|
||||
* @returns The members of the group.
|
||||
*/
|
||||
get members() {
|
||||
return this.getMembersFromKeys(this._raw.getAllMemberKeysSet());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the direct members of the group.
|
||||
*
|
||||
* If you need all members of the group, including inherited members from
|
||||
* parent groups, use {@link Group.members|members} instead.
|
||||
* @returns The direct members of the group.
|
||||
*/
|
||||
getDirectMembers() {
|
||||
return this.getMembersFromKeys(this._raw.getMemberKeys());
|
||||
}
|
||||
|
||||
getRoleOf(member: Everyone | ID<Account> | "me") {
|
||||
if (member === "me") {
|
||||
return this._raw.roleOf(
|
||||
|
||||
@@ -650,3 +650,65 @@ describe("Group.members", () => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Group.getDirectMembers", () => {
|
||||
test("should return only the direct members of the group", async () => {
|
||||
const parentGroup = Group.create();
|
||||
const childGroup = Group.create();
|
||||
|
||||
const bob = await createJazzTestAccount({});
|
||||
await bob.waitForAllCoValuesSync();
|
||||
|
||||
// Add bob to parent group
|
||||
parentGroup.addMember(bob, "reader");
|
||||
|
||||
// Add parent group to child group
|
||||
childGroup.addMember(parentGroup);
|
||||
|
||||
// Child group should inherit bob through parent, but bob is not a direct member
|
||||
expect(childGroup.members).toEqual([
|
||||
expect.objectContaining({
|
||||
account: expect.objectContaining({
|
||||
id: co.account().getMe().id,
|
||||
}),
|
||||
}),
|
||||
expect.objectContaining({
|
||||
account: expect.objectContaining({
|
||||
id: bob.id,
|
||||
}),
|
||||
}),
|
||||
]);
|
||||
|
||||
// directMembers should only show the admin, not the inherited bob
|
||||
expect(childGroup.getDirectMembers()).toEqual([
|
||||
expect.objectContaining({
|
||||
account: expect.objectContaining({
|
||||
id: co.account().getMe().id,
|
||||
}),
|
||||
}),
|
||||
]);
|
||||
|
||||
// Explicitly verify bob is not in directMembers
|
||||
expect(childGroup.getDirectMembers()).not.toContainEqual(
|
||||
expect.objectContaining({
|
||||
account: expect.objectContaining({
|
||||
id: bob.id,
|
||||
}),
|
||||
}),
|
||||
);
|
||||
|
||||
// Parent group's direct members should include both admin and bob
|
||||
expect(parentGroup.getDirectMembers()).toEqual([
|
||||
expect.objectContaining({
|
||||
account: expect.objectContaining({
|
||||
id: co.account().getMe().id,
|
||||
}),
|
||||
}),
|
||||
expect.objectContaining({
|
||||
account: expect.objectContaining({
|
||||
id: bob.id,
|
||||
}),
|
||||
}),
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -60,7 +60,7 @@ export default defineConfig([
|
||||
"register-custom-element": "src/inspector/register-custom-element.ts",
|
||||
},
|
||||
// This is a custom element meant to be used on non-react apps
|
||||
noExternal: ["react", "react-dom"],
|
||||
noExternal: ["react", "react-dom", "react-dom/client", "react/jsx-runtime"],
|
||||
outDir: "dist/inspector",
|
||||
},
|
||||
{
|
||||
|
||||
178
pnpm-lock.yaml
generated
178
pnpm-lock.yaml
generated
@@ -1620,7 +1620,7 @@ importers:
|
||||
specifier: ^11.7.0
|
||||
version: 11.10.0
|
||||
cojson:
|
||||
specifier: workspace:0.15.5
|
||||
specifier: workspace:0.15.7
|
||||
version: link:../cojson
|
||||
cojson-storage:
|
||||
specifier: workspace:*
|
||||
@@ -1797,19 +1797,19 @@ importers:
|
||||
specifier: ^0.25.5
|
||||
version: 0.25.8(effect@3.11.9)
|
||||
cojson:
|
||||
specifier: workspace:0.15.5
|
||||
specifier: workspace:0.15.7
|
||||
version: link:../cojson
|
||||
cojson-storage-sqlite:
|
||||
specifier: workspace:0.15.5
|
||||
specifier: workspace:0.15.7
|
||||
version: link:../cojson-storage-sqlite
|
||||
cojson-transport-ws:
|
||||
specifier: workspace:0.15.5
|
||||
specifier: workspace:0.15.7
|
||||
version: link:../cojson-transport-ws
|
||||
effect:
|
||||
specifier: ^3.6.5
|
||||
version: 3.11.9
|
||||
jazz-tools:
|
||||
specifier: workspace:0.15.5
|
||||
specifier: workspace:0.15.7
|
||||
version: link:../jazz-tools
|
||||
ws:
|
||||
specifier: ^8.14.2
|
||||
@@ -2034,6 +2034,9 @@ importers:
|
||||
'@sveltejs/vite-plugin-svelte':
|
||||
specifier: ^5.1.0
|
||||
version: 5.1.0(svelte@5.34.1)(vite@6.3.5(@types/node@22.15.18)(jiti@2.4.2)(lightningcss@1.30.1)(terser@5.37.0)(tsx@4.19.3)(yaml@2.6.1))
|
||||
'@tailwindcss/postcss':
|
||||
specifier: ^4.1.11
|
||||
version: 4.1.11
|
||||
'@types/eslint':
|
||||
specifier: ^9.6.0
|
||||
version: 9.6.1
|
||||
@@ -5681,60 +5684,117 @@ packages:
|
||||
'@tailwindcss/node@4.1.10':
|
||||
resolution: {integrity: sha512-2ACf1znY5fpRBwRhMgj9ZXvb2XZW8qs+oTfotJ2C5xR0/WNL7UHZ7zXl6s+rUqedL1mNi+0O+WQr5awGowS3PQ==}
|
||||
|
||||
'@tailwindcss/node@4.1.11':
|
||||
resolution: {integrity: sha512-yzhzuGRmv5QyU9qLNg4GTlYI6STedBWRE7NjxP45CsFYYq9taI0zJXZBMqIC/c8fViNLhmrbpSFS57EoxUmD6Q==}
|
||||
|
||||
'@tailwindcss/oxide-android-arm64@4.1.10':
|
||||
resolution: {integrity: sha512-VGLazCoRQ7rtsCzThaI1UyDu/XRYVyH4/EWiaSX6tFglE+xZB5cvtC5Omt0OQ+FfiIVP98su16jDVHDEIuH4iQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@tailwindcss/oxide-android-arm64@4.1.11':
|
||||
resolution: {integrity: sha512-3IfFuATVRUMZZprEIx9OGDjG3Ou3jG4xQzNTvjDoKmU9JdmoCohQJ83MYd0GPnQIu89YoJqvMM0G3uqLRFtetg==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@tailwindcss/oxide-darwin-arm64@4.1.10':
|
||||
resolution: {integrity: sha512-ZIFqvR1irX2yNjWJzKCqTCcHZbgkSkSkZKbRM3BPzhDL/18idA8uWCoopYA2CSDdSGFlDAxYdU2yBHwAwx8euQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@tailwindcss/oxide-darwin-arm64@4.1.11':
|
||||
resolution: {integrity: sha512-ESgStEOEsyg8J5YcMb1xl8WFOXfeBmrhAwGsFxxB2CxY9evy63+AtpbDLAyRkJnxLy2WsD1qF13E97uQyP1lfQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@tailwindcss/oxide-darwin-x64@4.1.10':
|
||||
resolution: {integrity: sha512-eCA4zbIhWUFDXoamNztmS0MjXHSEJYlvATzWnRiTqJkcUteSjO94PoRHJy1Xbwp9bptjeIxxBHh+zBWFhttbrQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@tailwindcss/oxide-darwin-x64@4.1.11':
|
||||
resolution: {integrity: sha512-EgnK8kRchgmgzG6jE10UQNaH9Mwi2n+yw1jWmof9Vyg2lpKNX2ioe7CJdf9M5f8V9uaQxInenZkOxnTVL3fhAw==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@tailwindcss/oxide-freebsd-x64@4.1.10':
|
||||
resolution: {integrity: sha512-8/392Xu12R0cc93DpiJvNpJ4wYVSiciUlkiOHOSOQNH3adq9Gi/dtySK7dVQjXIOzlpSHjeCL89RUUI8/GTI6g==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@tailwindcss/oxide-freebsd-x64@4.1.11':
|
||||
resolution: {integrity: sha512-xdqKtbpHs7pQhIKmqVpxStnY1skuNh4CtbcyOHeX1YBE0hArj2romsFGb6yUmzkq/6M24nkxDqU8GYrKrz+UcA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@tailwindcss/oxide-linux-arm-gnueabihf@4.1.10':
|
||||
resolution: {integrity: sha512-t9rhmLT6EqeuPT+MXhWhlRYIMSfh5LZ6kBrC4FS6/+M1yXwfCtp24UumgCWOAJVyjQwG+lYva6wWZxrfvB+NhQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@tailwindcss/oxide-linux-arm-gnueabihf@4.1.11':
|
||||
resolution: {integrity: sha512-ryHQK2eyDYYMwB5wZL46uoxz2zzDZsFBwfjssgB7pzytAeCCa6glsiJGjhTEddq/4OsIjsLNMAiMlHNYnkEEeg==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@tailwindcss/oxide-linux-arm64-gnu@4.1.10':
|
||||
resolution: {integrity: sha512-3oWrlNlxLRxXejQ8zImzrVLuZ/9Z2SeKoLhtCu0hpo38hTO2iL86eFOu4sVR8cZc6n3z7eRXXqtHJECa6mFOvA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@tailwindcss/oxide-linux-arm64-gnu@4.1.11':
|
||||
resolution: {integrity: sha512-mYwqheq4BXF83j/w75ewkPJmPZIqqP1nhoghS9D57CLjsh3Nfq0m4ftTotRYtGnZd3eCztgbSPJ9QhfC91gDZQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@tailwindcss/oxide-linux-arm64-musl@4.1.10':
|
||||
resolution: {integrity: sha512-saScU0cmWvg/Ez4gUmQWr9pvY9Kssxt+Xenfx1LG7LmqjcrvBnw4r9VjkFcqmbBb7GCBwYNcZi9X3/oMda9sqQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@tailwindcss/oxide-linux-arm64-musl@4.1.11':
|
||||
resolution: {integrity: sha512-m/NVRFNGlEHJrNVk3O6I9ggVuNjXHIPoD6bqay/pubtYC9QIdAMpS+cswZQPBLvVvEF6GtSNONbDkZrjWZXYNQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@tailwindcss/oxide-linux-x64-gnu@4.1.10':
|
||||
resolution: {integrity: sha512-/G3ao/ybV9YEEgAXeEg28dyH6gs1QG8tvdN9c2MNZdUXYBaIY/Gx0N6RlJzfLy/7Nkdok4kaxKPHKJUlAaoTdA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@tailwindcss/oxide-linux-x64-gnu@4.1.11':
|
||||
resolution: {integrity: sha512-YW6sblI7xukSD2TdbbaeQVDysIm/UPJtObHJHKxDEcW2exAtY47j52f8jZXkqE1krdnkhCMGqP3dbniu1Te2Fg==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@tailwindcss/oxide-linux-x64-musl@4.1.10':
|
||||
resolution: {integrity: sha512-LNr7X8fTiKGRtQGOerSayc2pWJp/9ptRYAa4G+U+cjw9kJZvkopav1AQc5HHD+U364f71tZv6XamaHKgrIoVzA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@tailwindcss/oxide-linux-x64-musl@4.1.11':
|
||||
resolution: {integrity: sha512-e3C/RRhGunWYNC3aSF7exsQkdXzQ/M+aYuZHKnw4U7KQwTJotnWsGOIVih0s2qQzmEzOFIJ3+xt7iq67K/p56Q==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@tailwindcss/oxide-wasm32-wasi@4.1.10':
|
||||
resolution: {integrity: sha512-d6ekQpopFQJAcIK2i7ZzWOYGZ+A6NzzvQ3ozBvWFdeyqfOZdYHU66g5yr+/HC4ipP1ZgWsqa80+ISNILk+ae/Q==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
@@ -5747,25 +5807,56 @@ packages:
|
||||
- '@emnapi/wasi-threads'
|
||||
- tslib
|
||||
|
||||
'@tailwindcss/oxide-wasm32-wasi@4.1.11':
|
||||
resolution: {integrity: sha512-Xo1+/GU0JEN/C/dvcammKHzeM6NqKovG+6921MR6oadee5XPBaKOumrJCXvopJ/Qb5TH7LX/UAywbqrP4lax0g==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [wasm32]
|
||||
bundledDependencies:
|
||||
- '@napi-rs/wasm-runtime'
|
||||
- '@emnapi/core'
|
||||
- '@emnapi/runtime'
|
||||
- '@tybys/wasm-util'
|
||||
- '@emnapi/wasi-threads'
|
||||
- tslib
|
||||
|
||||
'@tailwindcss/oxide-win32-arm64-msvc@4.1.10':
|
||||
resolution: {integrity: sha512-i1Iwg9gRbwNVOCYmnigWCCgow8nDWSFmeTUU5nbNx3rqbe4p0kRbEqLwLJbYZKmSSp23g4N6rCDmm7OuPBXhDA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@tailwindcss/oxide-win32-arm64-msvc@4.1.11':
|
||||
resolution: {integrity: sha512-UgKYx5PwEKrac3GPNPf6HVMNhUIGuUh4wlDFR2jYYdkX6pL/rn73zTq/4pzUm8fOjAn5L8zDeHp9iXmUGOXZ+w==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@tailwindcss/oxide-win32-x64-msvc@4.1.10':
|
||||
resolution: {integrity: sha512-sGiJTjcBSfGq2DVRtaSljq5ZgZS2SDHSIfhOylkBvHVjwOsodBhnb3HdmiKkVuUGKD0I7G63abMOVaskj1KpOA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@tailwindcss/oxide-win32-x64-msvc@4.1.11':
|
||||
resolution: {integrity: sha512-YfHoggn1j0LK7wR82TOucWc5LDCguHnoS879idHekmmiR7g9HUtMw9MI0NHatS28u/Xlkfi9w5RJWgz2Dl+5Qg==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@tailwindcss/oxide@4.1.10':
|
||||
resolution: {integrity: sha512-v0C43s7Pjw+B9w21htrQwuFObSkio2aV/qPx/mhrRldbqxbWJK6KizM+q7BF1/1CmuLqZqX3CeYF7s7P9fbA8Q==}
|
||||
engines: {node: '>= 10'}
|
||||
|
||||
'@tailwindcss/oxide@4.1.11':
|
||||
resolution: {integrity: sha512-Q69XzrtAhuyfHo+5/HMgr1lAiPP/G40OMFAnws7xcFEYqcypZmdW8eGXaOUIeOl1dzPJBPENXgbjsOyhg2nkrg==}
|
||||
engines: {node: '>= 10'}
|
||||
|
||||
'@tailwindcss/postcss@4.1.10':
|
||||
resolution: {integrity: sha512-B+7r7ABZbkXJwpvt2VMnS6ujcDoR2OOcFaqrLIo1xbcdxje4Vf+VgJdBzNNbrAjBj/rLZ66/tlQ1knIGNLKOBQ==}
|
||||
|
||||
'@tailwindcss/postcss@4.1.11':
|
||||
resolution: {integrity: sha512-q/EAIIpF6WpLhKEuQSEVMZNMIY8KhWoAemZ9eylNAih9jxMGAYPPWBn3I9QL/2jZ+e7OEz/tZkX5HwbBR4HohA==}
|
||||
|
||||
'@tailwindcss/typography@0.5.15':
|
||||
resolution: {integrity: sha512-AqhlCXl+8grUz8uqExv5OTtgpjuVIwFTSXTrh8y9/pw6q2ek7fJ+Y8ZEVw7EB2DCcuCOtEjf9w3+J3rzts01uA==}
|
||||
peerDependencies:
|
||||
@@ -12085,6 +12176,9 @@ packages:
|
||||
tailwindcss@4.1.10:
|
||||
resolution: {integrity: sha512-P3nr6WkvKV/ONsTzj6Gb57sWPMX29EPNPopo7+FcpkQaNsrNpZ1pv8QmrYI2RqEKD7mlGqLnGovlcYnBK0IqUA==}
|
||||
|
||||
tailwindcss@4.1.11:
|
||||
resolution: {integrity: sha512-2E9TBm6MDD/xKYe+dvJZAmg3yxIEDNRc0jwlNyDg/4Fil2QcSLjFKGVff0lAf1jjeaArlG/M75Ey/EYr/OJtBA==}
|
||||
|
||||
tapable@2.2.1:
|
||||
resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -17742,42 +17836,88 @@ snapshots:
|
||||
source-map-js: 1.2.1
|
||||
tailwindcss: 4.1.10
|
||||
|
||||
'@tailwindcss/node@4.1.11':
|
||||
dependencies:
|
||||
'@ampproject/remapping': 2.3.0
|
||||
enhanced-resolve: 5.18.1
|
||||
jiti: 2.4.2
|
||||
lightningcss: 1.30.1
|
||||
magic-string: 0.30.17
|
||||
source-map-js: 1.2.1
|
||||
tailwindcss: 4.1.11
|
||||
|
||||
'@tailwindcss/oxide-android-arm64@4.1.10':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-android-arm64@4.1.11':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-darwin-arm64@4.1.10':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-darwin-arm64@4.1.11':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-darwin-x64@4.1.10':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-darwin-x64@4.1.11':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-freebsd-x64@4.1.10':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-freebsd-x64@4.1.11':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-arm-gnueabihf@4.1.10':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-arm-gnueabihf@4.1.11':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-arm64-gnu@4.1.10':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-arm64-gnu@4.1.11':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-arm64-musl@4.1.10':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-arm64-musl@4.1.11':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-x64-gnu@4.1.10':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-x64-gnu@4.1.11':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-x64-musl@4.1.10':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-linux-x64-musl@4.1.11':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-wasm32-wasi@4.1.10':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-wasm32-wasi@4.1.11':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-win32-arm64-msvc@4.1.10':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-win32-arm64-msvc@4.1.11':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-win32-x64-msvc@4.1.10':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide-win32-x64-msvc@4.1.11':
|
||||
optional: true
|
||||
|
||||
'@tailwindcss/oxide@4.1.10':
|
||||
dependencies:
|
||||
detect-libc: 2.0.4
|
||||
@@ -17796,6 +17936,24 @@ snapshots:
|
||||
'@tailwindcss/oxide-win32-arm64-msvc': 4.1.10
|
||||
'@tailwindcss/oxide-win32-x64-msvc': 4.1.10
|
||||
|
||||
'@tailwindcss/oxide@4.1.11':
|
||||
dependencies:
|
||||
detect-libc: 2.0.4
|
||||
tar: 7.4.3
|
||||
optionalDependencies:
|
||||
'@tailwindcss/oxide-android-arm64': 4.1.11
|
||||
'@tailwindcss/oxide-darwin-arm64': 4.1.11
|
||||
'@tailwindcss/oxide-darwin-x64': 4.1.11
|
||||
'@tailwindcss/oxide-freebsd-x64': 4.1.11
|
||||
'@tailwindcss/oxide-linux-arm-gnueabihf': 4.1.11
|
||||
'@tailwindcss/oxide-linux-arm64-gnu': 4.1.11
|
||||
'@tailwindcss/oxide-linux-arm64-musl': 4.1.11
|
||||
'@tailwindcss/oxide-linux-x64-gnu': 4.1.11
|
||||
'@tailwindcss/oxide-linux-x64-musl': 4.1.11
|
||||
'@tailwindcss/oxide-wasm32-wasi': 4.1.11
|
||||
'@tailwindcss/oxide-win32-arm64-msvc': 4.1.11
|
||||
'@tailwindcss/oxide-win32-x64-msvc': 4.1.11
|
||||
|
||||
'@tailwindcss/postcss@4.1.10':
|
||||
dependencies:
|
||||
'@alloc/quick-lru': 5.2.0
|
||||
@@ -17804,6 +17962,14 @@ snapshots:
|
||||
postcss: 8.5.4
|
||||
tailwindcss: 4.1.10
|
||||
|
||||
'@tailwindcss/postcss@4.1.11':
|
||||
dependencies:
|
||||
'@alloc/quick-lru': 5.2.0
|
||||
'@tailwindcss/node': 4.1.11
|
||||
'@tailwindcss/oxide': 4.1.11
|
||||
postcss: 8.5.4
|
||||
tailwindcss: 4.1.11
|
||||
|
||||
'@tailwindcss/typography@0.5.15(tailwindcss@4.1.10)':
|
||||
dependencies:
|
||||
lodash.castarray: 4.4.0
|
||||
@@ -25444,6 +25610,8 @@ snapshots:
|
||||
|
||||
tailwindcss@4.1.10: {}
|
||||
|
||||
tailwindcss@4.1.11: {}
|
||||
|
||||
tapable@2.2.1: {}
|
||||
|
||||
tar-fs@2.1.1:
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# jazz-react-tailwind-starter
|
||||
|
||||
## 0.0.127
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c09b636]
|
||||
- jazz-tools@0.15.7
|
||||
|
||||
## 0.0.126
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a5ceaff]
|
||||
- jazz-tools@0.15.6
|
||||
|
||||
## 0.0.125
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-react-passkey-auth-starter",
|
||||
"private": true,
|
||||
"version": "0.0.125",
|
||||
"version": "0.0.127",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# svelte-passkey-auth
|
||||
|
||||
## 0.0.101
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c09b636]
|
||||
- jazz-tools@0.15.7
|
||||
|
||||
## 0.0.100
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a5ceaff]
|
||||
- jazz-tools@0.15.6
|
||||
|
||||
## 0.0.99
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "svelte-passkey-auth",
|
||||
"version": "0.0.99",
|
||||
"version": "0.0.101",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@@ -33,6 +33,7 @@
|
||||
"svelte": "^5.33.19",
|
||||
"svelte-check": "^4.0.0",
|
||||
"tailwindcss": "^4.1.10",
|
||||
"@tailwindcss/postcss": "^4.1.11",
|
||||
"typescript": "5.6.2",
|
||||
"typescript-eslint": "^8.0.0",
|
||||
"vite": "^6.3.5"
|
||||
|
||||
@@ -25,7 +25,22 @@ export const AccountRoot = co.map({
|
||||
|
||||
export function getUserAge(root: co.loaded<typeof AccountRoot> | undefined) {
|
||||
if (!root) return null;
|
||||
return new Date().getFullYear() - root.dateOfBirth.getFullYear();
|
||||
|
||||
const today = new Date();
|
||||
const birthDate = root.dateOfBirth;
|
||||
|
||||
let age = today.getFullYear() - birthDate.getFullYear();
|
||||
|
||||
// Check if the birthday hasn't occurred yet this year
|
||||
const hasBirthdayPassed =
|
||||
today.getMonth() > birthDate.getMonth() ||
|
||||
(today.getMonth() === birthDate.getMonth() && today.getDate() > birthDate.getDate());
|
||||
|
||||
if (!hasBirthdayPassed) {
|
||||
age--;
|
||||
}
|
||||
|
||||
return age;
|
||||
}
|
||||
|
||||
export const JazzAccount = co
|
||||
|
||||
Reference in New Issue
Block a user