Compare commits
1 Commits
jazz-react
...
crazy-auth
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fd1d5a3a4 |
@@ -11,16 +11,13 @@
|
|||||||
"cojson-storage-sqlite",
|
"cojson-storage-sqlite",
|
||||||
"cojson-transport-ws",
|
"cojson-transport-ws",
|
||||||
"jazz-browser",
|
"jazz-browser",
|
||||||
"jazz-auth-clerk",
|
"jazz-browser-auth-clerk",
|
||||||
"jazz-browser-media-images",
|
"jazz-browser-media-images",
|
||||||
"jazz-expo",
|
|
||||||
"jazz-inspector",
|
|
||||||
"jazz-nodejs",
|
"jazz-nodejs",
|
||||||
"jazz-react",
|
"jazz-react",
|
||||||
"jazz-react-core",
|
|
||||||
"jazz-react-auth-clerk",
|
"jazz-react-auth-clerk",
|
||||||
"jazz-react-native-core",
|
|
||||||
"jazz-react-native",
|
"jazz-react-native",
|
||||||
|
"jazz-react-native-auth-clerk",
|
||||||
"jazz-react-native-media-images",
|
"jazz-react-native-media-images",
|
||||||
"jazz-run",
|
"jazz-run",
|
||||||
"jazz-svelte",
|
"jazz-svelte",
|
||||||
|
|||||||
39
.github/actions/android-emulator/action.yml
vendored
@@ -1,39 +0,0 @@
|
|||||||
name: Setup Android Emulator
|
|
||||||
|
|
||||||
inputs:
|
|
||||||
api-level:
|
|
||||||
description: 'API level to use for the emulator'
|
|
||||||
required: true
|
|
||||||
default: '29'
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Enable KVM
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
|
||||||
sudo udevadm control --reload-rules
|
|
||||||
sudo udevadm trigger --name-match=kvm
|
|
||||||
|
|
||||||
- name: Gradle cache
|
|
||||||
uses: gradle/actions/setup-gradle@v4
|
|
||||||
|
|
||||||
- name: AVD cache
|
|
||||||
uses: useblacksmith/cache@v5
|
|
||||||
id: avd-cache
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.android/avd/*
|
|
||||||
~/.android/adb*
|
|
||||||
key: avd-${{ inputs.api-level }}
|
|
||||||
|
|
||||||
- name: Create AVD and Generate Snapshot for Caching
|
|
||||||
if: steps.avd-cache.outputs.cache-hit != 'true'
|
|
||||||
uses: reactivecircus/android-emulator-runner@v2
|
|
||||||
with:
|
|
||||||
api-level: ${{ inputs.api-level }}
|
|
||||||
force-avd-creation: false
|
|
||||||
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-metrics
|
|
||||||
disable-animations: false
|
|
||||||
script: echo "Generated AVD snapshot for caching."
|
|
||||||
36
.github/actions/source-code/action.yml
vendored
@@ -1,36 +0,0 @@
|
|||||||
name: Get and Build Source Code
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Enable latestcorepack
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
|
|
||||||
npm install -g corepack@latest
|
|
||||||
echo "After : corepack version => $(corepack --version)"
|
|
||||||
corepack enable
|
|
||||||
pnpm --version
|
|
||||||
|
|
||||||
- name: Install Node.js
|
|
||||||
uses: useblacksmith/setup-node@v5
|
|
||||||
with:
|
|
||||||
node-version-file: '.node-version'
|
|
||||||
cache: 'pnpm'
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- uses: useblacksmith/cache@v5
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ env.STORE_PATH }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
shell: bash
|
|
||||||
run: pnpm install --frozen-lockfile
|
|
||||||
34
.github/workflows/build-examples.yaml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-examples:
|
build-examples:
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
example: [
|
example: [
|
||||||
@@ -19,16 +19,40 @@ jobs:
|
|||||||
"pets",
|
"pets",
|
||||||
"reactions",
|
"reactions",
|
||||||
"todo",
|
"todo",
|
||||||
|
"onboarding",
|
||||||
]
|
]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@v3
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Setup Source Code
|
- name: Enable corepack
|
||||||
uses: ./.github/actions/source-code/
|
run: corepack enable
|
||||||
|
|
||||||
|
- name: Install Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: '.node-version'
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Setup pnpm cache
|
||||||
|
with:
|
||||||
|
path: ${{ env.STORE_PATH }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
|
||||||
- name: Pnpm Build
|
- name: Pnpm Build
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
52
.github/workflows/build-starters.yaml
vendored
@@ -2,25 +2,51 @@ name: Build Starters
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["main"]
|
branches: [ "main" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-starters:
|
build-starters:
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
starter: ["react-passkey-auth"]
|
starter: [
|
||||||
|
"react-demo-auth-tailwind",
|
||||||
|
]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Setup Source Code
|
- name: Enable corepack
|
||||||
uses: ./.github/actions/source-code/
|
run: corepack enable
|
||||||
|
|
||||||
- name: Pnpm Build
|
- name: Install Node.js
|
||||||
run: |
|
uses: actions/setup-node@v3
|
||||||
pnpm install
|
with:
|
||||||
pnpm turbo build;
|
node-version-file: '.node-version'
|
||||||
working-directory: ./starters/${{ matrix.starter }}
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Setup pnpm cache
|
||||||
|
with:
|
||||||
|
path: ${{ env.STORE_PATH }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
|
||||||
|
- name: Pnpm Build
|
||||||
|
run: |
|
||||||
|
pnpm install
|
||||||
|
pnpm turbo build;
|
||||||
|
working-directory: ./starters/${{ matrix.starter }}
|
||||||
|
|||||||
7
.github/workflows/code-quality.yml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
quality:
|
quality:
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -15,7 +15,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
- name: Run Biome
|
- name: Run Biome
|
||||||
run: biome ci .
|
run: biome ci .
|
||||||
|
|
||||||
- name: Check Catalog Dependencies
|
|
||||||
run: node scripts/check-catalog-deps.js
|
|
||||||
84
.github/workflows/e2e-rn-test.yml
vendored
@@ -1,84 +0,0 @@
|
|||||||
name: End-to-End Tests for React Native
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
paths:
|
|
||||||
- ".github/actions/android-emulator/**"
|
|
||||||
- ".github/actions/source-code/**"
|
|
||||||
- ".github/workflows/e2e-rn-test.yml"
|
|
||||||
- "examples/chat-rn-expo/**"
|
|
||||||
- "packages/**"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
e2e-tests:
|
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Source Code
|
|
||||||
uses: ./.github/actions/source-code/
|
|
||||||
|
|
||||||
- name: Create Output Directory
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/output
|
|
||||||
|
|
||||||
- name: Setup JDK
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: corretto
|
|
||||||
java-version: 22
|
|
||||||
cache: gradle
|
|
||||||
|
|
||||||
- name: Pnpm Build
|
|
||||||
run: pnpm turbo build --filter="./packages/*"
|
|
||||||
|
|
||||||
- name: chat-rn-expo App Pre Build
|
|
||||||
working-directory: ./examples/chat-rn-expo
|
|
||||||
run: |
|
|
||||||
pnpm build
|
|
||||||
pnpm expo prebuild --clean
|
|
||||||
|
|
||||||
- name: Install Maestro
|
|
||||||
run: |
|
|
||||||
curl -fsSL "https://get.maestro.mobile.dev" | bash
|
|
||||||
|
|
||||||
- name: Setup Android Emulator
|
|
||||||
id: android-emulator
|
|
||||||
uses: ./.github/actions/android-emulator/
|
|
||||||
with:
|
|
||||||
api-level: 29
|
|
||||||
|
|
||||||
- name: Test App
|
|
||||||
uses: reactivecircus/android-emulator-runner@v2
|
|
||||||
id: e2e_test
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
api-level: 29
|
|
||||||
force-avd-creation: false
|
|
||||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-metrics
|
|
||||||
disable-animations: true
|
|
||||||
working-directory: ./examples/chat-rn-expo/
|
|
||||||
script: ./test/e2e/run.sh
|
|
||||||
|
|
||||||
- name: Copy Maestro Output
|
|
||||||
if: steps.e2e_test.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
cp -r ~/.maestro/tests/* ~/output
|
|
||||||
|
|
||||||
- name: Upload Output Files
|
|
||||||
if: steps.e2e_test.outcome != 'success'
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: e2e-test-output
|
|
||||||
path: ~/output/*
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
- name: Exit with Test Result
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
if [ "${{ steps.e2e_test.outcome }}" != "success" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
31
.github/workflows/jazz-run.yml
vendored
@@ -8,16 +8,38 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Setup Source Code
|
- name: Enable corepack
|
||||||
uses: ./.github/actions/source-code/
|
run: corepack enable
|
||||||
|
|
||||||
|
- name: Install Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: '.node-version'
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Setup pnpm cache
|
||||||
|
with:
|
||||||
|
path: ${{ env.STORE_PATH }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build jazz-run
|
- name: Build jazz-run
|
||||||
run: pnpm exec turbo build && chmod +x dist/index.js;
|
run: pnpm exec turbo build && chmod +x dist/index.js;
|
||||||
@@ -26,3 +48,4 @@ jobs:
|
|||||||
- name: Run create account
|
- name: Run create account
|
||||||
run: ./dist/index.js account create --name "Jazz Run CI test"
|
run: ./dist/index.js account create --name "Jazz Run CI test"
|
||||||
working-directory: ./packages/jazz-run
|
working-directory: ./packages/jazz-run
|
||||||
|
|
||||||
32
.github/workflows/playwright.yml
vendored
@@ -9,19 +9,41 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
project: ["tests/e2e", "examples/chat", "examples/clerk", "examples/file-share-svelte", "examples/form", "examples/music-player", "examples/pets", "starters/react-passkey-auth"]
|
project: ["tests/e2e", "examples/chat", "examples/file-share-svelte", "examples/form", "examples/music-player", "examples/pets", "examples/onboarding", "starters/react-demo-auth-tailwind"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Setup Source Code
|
- name: Enable corepack
|
||||||
uses: ./.github/actions/source-code/
|
run: corepack enable
|
||||||
|
|
||||||
|
- name: Install Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: '.node-version'
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Setup pnpm cache
|
||||||
|
with:
|
||||||
|
path: ${{ env.STORE_PATH }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Pnpm Build
|
- name: Pnpm Build
|
||||||
run: pnpm turbo build
|
run: pnpm turbo build
|
||||||
|
|||||||
102
.github/workflows/pre-release.yml
vendored
@@ -1,102 +0,0 @@
|
|||||||
name: Pre-Publish tagged Pull Requests
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened, labeled]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pre-release:
|
|
||||||
if: contains(github.event.pull_request.labels.*.name, 'pre-release')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Source Code
|
|
||||||
uses: ./.github/actions/source-code/
|
|
||||||
|
|
||||||
- name: Pnpm Build
|
|
||||||
run: pnpm turbo build --filter="./packages/*"
|
|
||||||
|
|
||||||
- name: Pre publish
|
|
||||||
run: pnpm exec pkg-pr-new publish --json output.json --comment=off "./packages/*"
|
|
||||||
|
|
||||||
- name: Post or update comment
|
|
||||||
uses: actions/github-script@v6
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const output = JSON.parse(fs.readFileSync('output.json', 'utf8'));
|
|
||||||
|
|
||||||
const packages = output.packages
|
|
||||||
.map((p) => `- ${p.name}: ${p.url}`)
|
|
||||||
.join('\n');
|
|
||||||
|
|
||||||
const sha =
|
|
||||||
context.event_name === 'pull_request'
|
|
||||||
? context.payload.pull_request.head.sha
|
|
||||||
: context.payload.after;
|
|
||||||
|
|
||||||
const resolutions = Object.fromEntries(
|
|
||||||
output.packages.map((p) => [p.name, p.url])
|
|
||||||
);
|
|
||||||
|
|
||||||
const commitUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${sha}`;
|
|
||||||
|
|
||||||
const body = `## Jazz pre-release
|
|
||||||
|
|
||||||
### Packages:
|
|
||||||
|
|
||||||
\`\`\`json
|
|
||||||
${JSON.stringify(resolutions, null, 4)}
|
|
||||||
\`\`\`
|
|
||||||
|
|
||||||
[View Commit](${commitUrl})`;
|
|
||||||
|
|
||||||
async function logPublishInfo() {
|
|
||||||
console.log('\n' + '='.repeat(50));
|
|
||||||
console.log('Publish Information');
|
|
||||||
console.log('='.repeat(50));
|
|
||||||
console.log('\nPublished Packages:');
|
|
||||||
console.log(output.packages);
|
|
||||||
console.log('\nTemplates:');
|
|
||||||
console.log(templates);
|
|
||||||
console.log(`\nCommit URL: ${commitUrl}`);
|
|
||||||
console.log('\n' + '='.repeat(50));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (context.eventName === 'pull_request') {
|
|
||||||
if (context.issue.number) {
|
|
||||||
await github.rest.issues.createComment({
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
body: body,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (context.eventName === 'push') {
|
|
||||||
const pullRequests = await github.rest.pulls.list({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
state: 'open',
|
|
||||||
head: `${context.repo.owner}:${context.ref.replace(
|
|
||||||
'refs/heads/',
|
|
||||||
''
|
|
||||||
)}`,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (pullRequests.data.length > 0) {
|
|
||||||
await github.rest.issues.createComment({
|
|
||||||
issue_number: pullRequests.data[0].number,
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
body: body,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.log(
|
|
||||||
'No open pull request found for this push. Logging publish information to console:'
|
|
||||||
);
|
|
||||||
await logPublishInfo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
31
.github/workflows/release.yml
vendored
@@ -17,16 +17,35 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Source Code
|
- name: Enable corepack
|
||||||
uses: ./.github/actions/source-code/
|
run: corepack enable
|
||||||
|
|
||||||
- name: Build packages
|
- name: Install Node.js
|
||||||
run: pnpm exec turbo run build --filter='./packages/*'
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: '.node-version'
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Setup pnpm cache
|
||||||
|
with:
|
||||||
|
path: ${{ env.STORE_PATH }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Create Release Pull Request or Publish to npm
|
- name: Create Release Pull Request or Publish to npm
|
||||||
id: changesets
|
id: changesets
|
||||||
|
|||||||
31
.github/workflows/unit-test.yml
vendored
@@ -9,20 +9,39 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
unit-tests:
|
unit-tests:
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Source Code
|
- name: Enable corepack
|
||||||
uses: ./.github/actions/source-code/
|
run: corepack enable
|
||||||
|
|
||||||
|
- name: Install Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.node-version'
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: actions/cache@v4
|
||||||
|
name: Setup pnpm cache
|
||||||
|
with:
|
||||||
|
path: ${{ env.STORE_PATH }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Pnpm Build
|
- name: Pnpm Build
|
||||||
run: pnpm turbo build --filter="./packages/*"
|
run: pnpm turbo build --filter="./packages/*"
|
||||||
|
|
||||||
- name: Install Playwright Browsers
|
|
||||||
run: pnpm exec playwright install
|
|
||||||
|
|
||||||
- name: Unit Tests
|
- name: Unit Tests
|
||||||
run: pnpm test:ci
|
run: pnpm test:ci
|
||||||
|
|||||||
12
.gitignore
vendored
@@ -7,25 +7,15 @@ docsTmp
|
|||||||
coverage
|
coverage
|
||||||
.direnv
|
.direnv
|
||||||
|
|
||||||
# Typescript
|
|
||||||
**/*.tsbuildinfo
|
|
||||||
|
|
||||||
# Next.js
|
# Next.js
|
||||||
**/.next
|
**/.next
|
||||||
|
|
||||||
# Vite output
|
# Vite output
|
||||||
**/dist
|
**/dist
|
||||||
__screenshots__
|
|
||||||
|
|
||||||
# Playwright
|
# Playwright
|
||||||
test-results
|
test-results
|
||||||
|
|
||||||
.husky
|
.husky
|
||||||
|
|
||||||
.vscode/*
|
.vscode/settings.json
|
||||||
.idea/*
|
|
||||||
|
|
||||||
.svelte-kit
|
|
||||||
|
|
||||||
.cursorrules
|
|
||||||
.windsurfrules
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ We welcome all ideas! If you have suggestions, feel free to open an issue marked
|
|||||||
|
|
||||||
### 5. Local Setup
|
### 5. Local Setup
|
||||||
|
|
||||||
You'll need Node.js 22.x installed (we're working on support for 23.x), and pnpm 9.x installed. If you're using nix, run `nix develop` to get a shell with the correct versions of everything installed.
|
You'll need Node.js 20.x or 22.x installed (we're working on support for 23.x), and pnpm 9.x installed. If you're using nix, run `nix develop` to get a shell with the correct versions of everything installed.
|
||||||
|
|
||||||
1. **Clone the repository**:
|
1. **Clone the repository**:
|
||||||
```bash
|
```bash
|
||||||
@@ -48,25 +48,7 @@ You'll need Node.js 22.x installed (we're working on support for 23.x), and pnpm
|
|||||||
pnpm install
|
pnpm install
|
||||||
```
|
```
|
||||||
|
|
||||||
3. **Install homepage dependencies**:
|
3. **Run tests** to verify everything is working:
|
||||||
|
|
||||||
```bash
|
|
||||||
cd homepage && pnpm install
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Go back to the project root**:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd ..
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Build the packages**:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pnpm build
|
|
||||||
```
|
|
||||||
|
|
||||||
5. **Run tests** to verify everything is working:
|
|
||||||
```bash
|
```bash
|
||||||
pnpm test
|
pnpm test
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright 2025, Garden Computing, Inc.
|
Copyright 2024, Garden Computing, Inc.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
@@ -17,4 +17,4 @@ For community and support, please join our [Discord](https://discord.gg/utDMjHYg
|
|||||||
- Community & support: [Discord](https://discord.gg/utDMjHYg42)
|
- Community & support: [Discord](https://discord.gg/utDMjHYg42)
|
||||||
- Updates: [X](https://x.com/jazz_tools) & [Email](https://garden.co/news)
|
- Updates: [X](https://x.com/jazz_tools) & [Email](https://garden.co/news)
|
||||||
|
|
||||||
Copyright 2025 — Garden Computing, Inc.
|
Copyright 2024 — Garden Computing, Inc.
|
||||||
|
|||||||
30
biome.json
@@ -12,10 +12,7 @@
|
|||||||
"**/ios/**",
|
"**/ios/**",
|
||||||
"**/android/**",
|
"**/android/**",
|
||||||
"packages/jazz-svelte/**",
|
"packages/jazz-svelte/**",
|
||||||
"examples/*svelte*/**",
|
"examples/*svelte*/**"
|
||||||
"examples/jazz-paper-scissors/src/routeTree.gen.ts",
|
|
||||||
"homepage/homepage/**",
|
|
||||||
"**/package.json"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"formatter": {
|
"formatter": {
|
||||||
@@ -55,24 +52,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"include": ["packages/cojson-storage*/**", "cojson-transport-ws/**"],
|
"include": ["packages/**/src/tests/**", "packages/**/src/test/**"],
|
||||||
"linter": {
|
|
||||||
"enabled": true,
|
|
||||||
"rules": {
|
|
||||||
"recommended": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"include": ["packages/**/src/tests/**"],
|
|
||||||
"linter": {
|
"linter": {
|
||||||
"rules": {
|
"rules": {
|
||||||
"correctness": {
|
"correctness": {
|
||||||
"useImportExtensions": "off"
|
"useImportExtensions": "off"
|
||||||
},
|
}
|
||||||
"style": {
|
}
|
||||||
"noNonNullAssertion": "off"
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"include": ["packages/cojson-storage-indexeddb/**"],
|
||||||
|
"linter": {
|
||||||
|
"enabled": true,
|
||||||
|
"rules": {
|
||||||
|
"recommended": true,
|
||||||
"suspicious": {
|
"suspicious": {
|
||||||
"noExplicitAny": "info"
|
"noExplicitAny": "info"
|
||||||
}
|
}
|
||||||
|
|||||||
470
examples/chat-rn-clerk/CHANGELOG.md
Normal file
@@ -0,0 +1,470 @@
|
|||||||
|
# chat-rn-clerk
|
||||||
|
|
||||||
|
## 1.0.51
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- f76274c: Fix image handling in react-native
|
||||||
|
- Updated dependencies [f76274c]
|
||||||
|
- Updated dependencies [5e83864]
|
||||||
|
- jazz-react-native@0.9.10
|
||||||
|
- jazz-tools@0.9.10
|
||||||
|
- jazz-react-native-auth-clerk@0.9.10
|
||||||
|
- jazz-react-native-media-images@0.9.10
|
||||||
|
|
||||||
|
## 1.0.50
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [8eb9247]
|
||||||
|
- jazz-tools@0.9.9
|
||||||
|
- jazz-react-native@0.9.9
|
||||||
|
- jazz-react-native-auth-clerk@0.9.9
|
||||||
|
- jazz-react-native-media-images@0.9.9
|
||||||
|
|
||||||
|
## 1.0.49
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [d1d773b]
|
||||||
|
- jazz-tools@0.9.8
|
||||||
|
- jazz-react-native@0.9.8
|
||||||
|
- jazz-react-native-auth-clerk@0.9.8
|
||||||
|
- jazz-react-native-media-images@0.9.8
|
||||||
|
|
||||||
|
## 1.0.48
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [8a390d2]
|
||||||
|
- jazz-react-native@0.9.6
|
||||||
|
- jazz-react-native-auth-clerk@0.9.6
|
||||||
|
|
||||||
|
## 1.0.47
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [c871912]
|
||||||
|
- jazz-react-native@0.9.5
|
||||||
|
- jazz-react-native-auth-clerk@0.9.5
|
||||||
|
|
||||||
|
## 1.0.46
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.9.4
|
||||||
|
- jazz-react-native-auth-clerk@0.9.4
|
||||||
|
|
||||||
|
## 1.0.45
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [7cd691f]
|
||||||
|
- jazz-react-native@0.9.3
|
||||||
|
- jazz-react-native-auth-clerk@0.9.3
|
||||||
|
|
||||||
|
## 1.0.44
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [80fd3e9]
|
||||||
|
- jazz-react-native@0.9.2
|
||||||
|
- jazz-react-native-auth-clerk@0.9.2
|
||||||
|
|
||||||
|
## 1.0.43
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [1b71969]
|
||||||
|
- jazz-tools@0.9.1
|
||||||
|
- jazz-react-native@0.9.1
|
||||||
|
- jazz-react-native-auth-clerk@0.9.1
|
||||||
|
- jazz-react-native-media-images@0.9.1
|
||||||
|
|
||||||
|
## 1.0.42
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [1da4d55]
|
||||||
|
- Updated dependencies [8eda792]
|
||||||
|
- Updated dependencies [1e5e3a1]
|
||||||
|
- jazz-react-native@0.9.0
|
||||||
|
- jazz-tools@0.9.0
|
||||||
|
- jazz-react-native-auth-clerk@0.9.0
|
||||||
|
- jazz-react-native-media-images@0.9.0
|
||||||
|
|
||||||
|
## 1.0.41
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [dc62b95]
|
||||||
|
- Updated dependencies [1de26f8]
|
||||||
|
- jazz-tools@0.8.51
|
||||||
|
- jazz-react-native@0.8.51
|
||||||
|
- jazz-react-native-auth-clerk@0.8.51
|
||||||
|
- jazz-react-native-media-images@0.8.51
|
||||||
|
|
||||||
|
## 1.0.40
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.50
|
||||||
|
- jazz-react-native-auth-clerk@0.8.50
|
||||||
|
- jazz-tools@0.8.50
|
||||||
|
- jazz-react-native-media-images@0.8.50
|
||||||
|
|
||||||
|
## 1.0.39
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.49
|
||||||
|
- jazz-react-native-auth-clerk@0.8.49
|
||||||
|
- jazz-tools@0.8.49
|
||||||
|
- jazz-react-native-media-images@0.8.49
|
||||||
|
|
||||||
|
## 1.0.38
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [635e824]
|
||||||
|
- Updated dependencies [0a85982]
|
||||||
|
- jazz-tools@0.8.48
|
||||||
|
- jazz-react-native@0.8.48
|
||||||
|
- jazz-react-native-auth-clerk@0.8.48
|
||||||
|
- jazz-react-native-media-images@0.8.48
|
||||||
|
|
||||||
|
## 1.0.37
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [33ef9c4]
|
||||||
|
- jazz-react-native@0.8.47
|
||||||
|
- jazz-react-native-auth-clerk@0.8.47
|
||||||
|
|
||||||
|
## 1.0.36
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [ab4ffbd]
|
||||||
|
- jazz-react-native@0.8.46
|
||||||
|
- jazz-react-native-auth-clerk@0.8.46
|
||||||
|
|
||||||
|
## 1.0.35
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [7701307]
|
||||||
|
- Updated dependencies [fa41f8e]
|
||||||
|
- Updated dependencies [88d7d9a]
|
||||||
|
- Updated dependencies [60e35ea]
|
||||||
|
- jazz-react-native@0.8.45
|
||||||
|
- jazz-tools@0.8.45
|
||||||
|
- jazz-react-native-auth-clerk@0.8.45
|
||||||
|
- jazz-react-native-media-images@0.8.45
|
||||||
|
|
||||||
|
## 1.0.34
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.44
|
||||||
|
- jazz-react-native-auth-clerk@0.8.44
|
||||||
|
- jazz-tools@0.8.44
|
||||||
|
- jazz-react-native-media-images@0.8.44
|
||||||
|
|
||||||
|
## 1.0.33
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- cdc7f9f: Fixing react-native examples
|
||||||
|
- Updated dependencies [cdc7f9f]
|
||||||
|
- jazz-react-native-auth-clerk@0.8.43
|
||||||
|
|
||||||
|
## 1.0.32
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.41
|
||||||
|
- jazz-react-native-auth-clerk@0.8.41
|
||||||
|
- jazz-tools@0.8.41
|
||||||
|
- jazz-react-native-media-images@0.8.41
|
||||||
|
|
||||||
|
## 1.0.31
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0c6b0f3]
|
||||||
|
- Updated dependencies [249eecb]
|
||||||
|
- jazz-react-native@0.8.39
|
||||||
|
- jazz-tools@0.8.39
|
||||||
|
- jazz-react-native-auth-clerk@0.8.39
|
||||||
|
- jazz-react-native-media-images@0.8.39
|
||||||
|
|
||||||
|
## 1.0.30
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.38
|
||||||
|
- jazz-react-native-auth-clerk@0.8.38
|
||||||
|
- jazz-tools@0.8.38
|
||||||
|
- jazz-react-native-media-images@0.8.38
|
||||||
|
|
||||||
|
## 1.0.29
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.37
|
||||||
|
- jazz-react-native-auth-clerk@0.8.37
|
||||||
|
- jazz-tools@0.8.37
|
||||||
|
- jazz-react-native-media-images@0.8.28
|
||||||
|
|
||||||
|
## 1.0.28
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- c84764a: feat: added jazz-react-native-auth-clerk package
|
||||||
|
- Updated dependencies [c84764a]
|
||||||
|
- Updated dependencies [441fe27]
|
||||||
|
- jazz-react-native-auth-clerk@0.8.36
|
||||||
|
- jazz-react-native@0.8.36
|
||||||
|
- jazz-tools@0.8.36
|
||||||
|
- jazz-react-native-media-images@0.8.27
|
||||||
|
|
||||||
|
## 1.0.27
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [8b87117]
|
||||||
|
- jazz-tools@0.8.35
|
||||||
|
- jazz-react-auth-clerk@0.8.35
|
||||||
|
- jazz-react-native@0.8.35
|
||||||
|
- jazz-react-native-media-images@0.8.26
|
||||||
|
|
||||||
|
## 1.0.26
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [9ca25d1]
|
||||||
|
- jazz-react-auth-clerk@0.8.34
|
||||||
|
- jazz-react-native@0.8.34
|
||||||
|
- jazz-tools@0.8.34
|
||||||
|
- jazz-react-native-media-images@0.8.25
|
||||||
|
|
||||||
|
## 1.0.25
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.33
|
||||||
|
|
||||||
|
## 1.0.24
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [1a4bda0]
|
||||||
|
- Updated dependencies [df42b2b]
|
||||||
|
- jazz-react-auth-clerk@0.8.32
|
||||||
|
- jazz-tools@0.8.32
|
||||||
|
- jazz-react-native@0.8.32
|
||||||
|
- jazz-react-native-media-images@0.8.24
|
||||||
|
|
||||||
|
## 1.0.23
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.31
|
||||||
|
- jazz-react-native@0.8.31
|
||||||
|
- jazz-tools@0.8.31
|
||||||
|
- jazz-react-native-media-images@0.8.23
|
||||||
|
|
||||||
|
## 1.0.22
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.30
|
||||||
|
- jazz-react-native@0.8.30
|
||||||
|
- jazz-tools@0.8.30
|
||||||
|
- jazz-react-native-media-images@0.8.22
|
||||||
|
|
||||||
|
## 1.0.21
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.29
|
||||||
|
- jazz-react-auth-clerk@0.8.29
|
||||||
|
- jazz-tools@0.8.29
|
||||||
|
- jazz-react-native-media-images@0.8.21
|
||||||
|
|
||||||
|
## 1.0.20
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.28
|
||||||
|
- jazz-react-native@0.8.28
|
||||||
|
- jazz-tools@0.8.28
|
||||||
|
- jazz-react-native-media-images@0.8.20
|
||||||
|
|
||||||
|
## 1.0.19
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.27
|
||||||
|
- jazz-react-native@0.8.27
|
||||||
|
- jazz-tools@0.8.27
|
||||||
|
- jazz-react-native-media-images@0.8.19
|
||||||
|
|
||||||
|
## 1.0.18
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.26
|
||||||
|
|
||||||
|
## 1.0.17
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.24
|
||||||
|
|
||||||
|
## 1.0.16
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [d348c2d]
|
||||||
|
- Updated dependencies [6902b5b]
|
||||||
|
- Updated dependencies [1a0cd3d]
|
||||||
|
- jazz-tools@0.8.23
|
||||||
|
- jazz-react-auth-clerk@0.8.23
|
||||||
|
- jazz-react-native@0.8.23
|
||||||
|
- jazz-react-native-media-images@0.8.18
|
||||||
|
|
||||||
|
## 1.0.15
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.22
|
||||||
|
|
||||||
|
## 1.0.14
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [149ca97]
|
||||||
|
- jazz-tools@0.8.21
|
||||||
|
- jazz-react-auth-clerk@0.8.21
|
||||||
|
- jazz-react-native@0.8.21
|
||||||
|
- jazz-react-native-media-images@0.8.17
|
||||||
|
|
||||||
|
## 1.0.13
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [3ef3ff3]
|
||||||
|
- jazz-react-native-media-images@0.8.16
|
||||||
|
- jazz-react-native@0.8.20
|
||||||
|
- jazz-react-auth-clerk@0.8.20
|
||||||
|
|
||||||
|
## 1.0.12
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.19
|
||||||
|
- jazz-react-native@0.8.19
|
||||||
|
- jazz-tools@0.8.19
|
||||||
|
- jazz-react-native-media-images@0.8.15
|
||||||
|
|
||||||
|
## 1.0.11
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.18
|
||||||
|
- jazz-react-native@0.8.18
|
||||||
|
- jazz-tools@0.8.18
|
||||||
|
- jazz-react-native-media-images@0.8.14
|
||||||
|
|
||||||
|
## 1.0.10
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.17
|
||||||
|
- jazz-react-native@0.8.17
|
||||||
|
- jazz-tools@0.8.17
|
||||||
|
- jazz-react-native-media-images@0.8.13
|
||||||
|
|
||||||
|
## 1.0.9
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.16
|
||||||
|
- jazz-react-native@0.8.16
|
||||||
|
- jazz-tools@0.8.16
|
||||||
|
- jazz-react-native-media-images@0.8.12
|
||||||
|
|
||||||
|
## 1.0.8
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [cce679b]
|
||||||
|
- Updated dependencies [221c58f]
|
||||||
|
- jazz-tools@0.8.15
|
||||||
|
- jazz-react-auth-clerk@0.8.15
|
||||||
|
- jazz-react-native@0.8.15
|
||||||
|
- jazz-react-native-media-images@0.8.11
|
||||||
|
|
||||||
|
## 1.0.7
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [36273b3]
|
||||||
|
- jazz-tools@0.8.14
|
||||||
|
- jazz-react-auth-clerk@0.8.14
|
||||||
|
- jazz-react-native@0.8.14
|
||||||
|
- jazz-react-native-media-images@0.8.10
|
||||||
|
|
||||||
|
## 1.0.6
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [fd011d7]
|
||||||
|
- jazz-tools@0.8.13
|
||||||
|
- jazz-react-auth-clerk@0.8.13
|
||||||
|
- jazz-react-native@0.8.13
|
||||||
|
- jazz-react-native-media-images@0.8.9
|
||||||
|
|
||||||
|
## 1.0.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.12
|
||||||
|
- jazz-react-native@0.8.12
|
||||||
|
- jazz-tools@0.8.12
|
||||||
|
- jazz-react-native-media-images@0.8.8
|
||||||
|
|
||||||
|
## 1.0.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-auth-clerk@0.8.11
|
||||||
|
- jazz-react-native@0.8.11
|
||||||
|
- jazz-tools@0.8.11
|
||||||
|
- jazz-react-native-media-images@0.8.7
|
||||||
|
|
||||||
|
## 1.0.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- b7639cf: feat(react-native): replaced react-native-mmkv with expo-secure-store and initialize it by default as kvStore in createJazzRNApp() (BREAKING)
|
||||||
|
- Updated dependencies [b7639cf]
|
||||||
|
- jazz-react-native@0.8.8
|
||||||
|
|
||||||
|
## 1.0.2
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [32b05b6]
|
||||||
|
- jazz-react-native-media-images@0.8.6
|
||||||
|
- jazz-react-native@0.8.7
|
||||||
|
- jazz-react-auth-clerk@0.8.7
|
||||||
|
|
||||||
|
## 1.0.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.6
|
||||||
|
- jazz-react-auth-clerk@0.8.6
|
||||||
@@ -11,13 +11,13 @@ pnpm i
|
|||||||
pnpm run build
|
pnpm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Inside the `examples/chat-rn-expo-clerk` Directory
|
### 2. Inside the `examples/chat-rn-clerk` Directory
|
||||||
|
|
||||||
Next, navigate to the specific example project and run the following commands:
|
Next, navigate to the specific example project and run the following commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm expo prebuild
|
pnpm expo prebuild
|
||||||
pnpx pod-install
|
npx pod-install
|
||||||
pnpm expo run:ios
|
pnpm expo run:ios
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"expo": {
|
"expo": {
|
||||||
"name": "jazz-chat-rn-expo-clerk",
|
"name": "jazz-chat-rn-clerk",
|
||||||
"scheme": "jazz-chat-rn-expo-clerk",
|
"scheme": "jazz-chat-rn-clerk",
|
||||||
"slug": "jazz-chat-rn-expo-clerk",
|
"slug": "jazz-chat-rn-clerk",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"orientation": "portrait",
|
"orientation": "portrait",
|
||||||
"icon": "./assets/images/icon.png",
|
"icon": "./assets/images/icon.png",
|
||||||
@@ -23,12 +23,21 @@
|
|||||||
},
|
},
|
||||||
"package": "com.jazz.chatrnclerk"
|
"package": "com.jazz.chatrnclerk"
|
||||||
},
|
},
|
||||||
"newArchEnabled": true,
|
|
||||||
"plugins": [
|
"plugins": [
|
||||||
|
[
|
||||||
|
"expo-build-properties",
|
||||||
|
{
|
||||||
|
"ios": {
|
||||||
|
"newArchEnabled": true
|
||||||
|
},
|
||||||
|
"android": {
|
||||||
|
"newArchEnabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"expo-secure-store",
|
"expo-secure-store",
|
||||||
"expo-font",
|
"expo-font",
|
||||||
"expo-router",
|
"expo-router",
|
||||||
"expo-sqlite",
|
|
||||||
[
|
[
|
||||||
"expo-image-picker",
|
"expo-image-picker",
|
||||||
{
|
{
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
import { Redirect, Stack } from "expo-router";
|
import { Redirect, Stack } from "expo-router";
|
||||||
import { useIsAuthenticated } from "jazz-expo";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { useAuth } from "../../src/auth-context";
|
||||||
|
|
||||||
export default function HomeLayout() {
|
export default function HomeLayout() {
|
||||||
const isAuthenticated = useIsAuthenticated();
|
const { isAuthenticated } = useAuth();
|
||||||
|
|
||||||
if (isAuthenticated) {
|
if (isAuthenticated) {
|
||||||
return <Redirect href={"/chat"} />;
|
return <Redirect href={"/chat"} />;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Redirect, Stack } from "expo-router";
|
import { Redirect, Stack } from "expo-router";
|
||||||
import { useIsAuthenticated } from "jazz-expo";
|
import { useAuth } from "../../src/auth-context";
|
||||||
|
|
||||||
export default function UnAuthenticatedLayout() {
|
export default function UnAuthenticatedLayout() {
|
||||||
const isAuthenticated = useIsAuthenticated();
|
const { isAuthenticated } = useAuth();
|
||||||
|
|
||||||
if (isAuthenticated) {
|
if (isAuthenticated) {
|
||||||
return <Redirect href={"/chat"} />;
|
return <Redirect href={"/chat"} />;
|
||||||
@@ -28,7 +28,7 @@ const SignInWithOAuth = () => {
|
|||||||
const { createdSessionId, signIn, signUp, setActive } =
|
const { createdSessionId, signIn, signUp, setActive } =
|
||||||
await startOAuthFlow({
|
await startOAuthFlow({
|
||||||
redirectUrl: Linking.createURL("/", {
|
redirectUrl: Linking.createURL("/", {
|
||||||
scheme: "jazz-chat-rn-expo-clerk",
|
scheme: "jazz-chat-rn-clerk",
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
44
examples/chat-rn-clerk/app/_layout.tsx
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import "../global.css";
|
||||||
|
import { ClerkLoaded, ClerkProvider } from "@clerk/clerk-expo";
|
||||||
|
import { useFonts } from "expo-font";
|
||||||
|
import { Slot } from "expo-router";
|
||||||
|
import * as SplashScreen from "expo-splash-screen";
|
||||||
|
import React, { useEffect } from "react";
|
||||||
|
import { tokenCache } from "../cache";
|
||||||
|
import { JazzAndAuth } from "../src/auth-context";
|
||||||
|
|
||||||
|
SplashScreen.preventAutoHideAsync();
|
||||||
|
|
||||||
|
export default function RootLayout() {
|
||||||
|
const [loaded] = useFonts({
|
||||||
|
SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
|
||||||
|
});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (loaded) {
|
||||||
|
SplashScreen.hideAsync();
|
||||||
|
}
|
||||||
|
}, [loaded]);
|
||||||
|
|
||||||
|
if (!loaded) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const publishableKey = process.env.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY;
|
||||||
|
|
||||||
|
if (!publishableKey) {
|
||||||
|
throw new Error(
|
||||||
|
"Missing Publishable Key. Please set EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY in your .env",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ClerkProvider tokenCache={tokenCache} publishableKey={publishableKey}>
|
||||||
|
<ClerkLoaded>
|
||||||
|
<JazzAndAuth>
|
||||||
|
<Slot />
|
||||||
|
</JazzAndAuth>
|
||||||
|
</ClerkLoaded>
|
||||||
|
</ClerkProvider>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -4,8 +4,8 @@ import clsx from "clsx";
|
|||||||
import * as Clipboard from "expo-clipboard";
|
import * as Clipboard from "expo-clipboard";
|
||||||
import * as ImagePicker from "expo-image-picker";
|
import * as ImagePicker from "expo-image-picker";
|
||||||
import { useLocalSearchParams } from "expo-router";
|
import { useLocalSearchParams } from "expo-router";
|
||||||
import { useAccount, useCoState } from "jazz-expo";
|
import { useAccount, useCoState } from "jazz-react-native";
|
||||||
import { ProgressiveImg } from "jazz-expo";
|
import { ProgressiveImg } from "jazz-react-native";
|
||||||
import { createImage } from "jazz-react-native-media-images";
|
import { createImage } from "jazz-react-native-media-images";
|
||||||
import { Group, ID } from "jazz-tools";
|
import { Group, ID } from "jazz-tools";
|
||||||
import { useEffect, useLayoutEffect, useState } from "react";
|
import { useEffect, useLayoutEffect, useState } from "react";
|
||||||
@@ -28,7 +28,7 @@ export default function Conversation() {
|
|||||||
const { me } = useAccount();
|
const { me } = useAccount();
|
||||||
const [chat, setChat] = useState<Chat>();
|
const [chat, setChat] = useState<Chat>();
|
||||||
const [message, setMessage] = useState("");
|
const [message, setMessage] = useState("");
|
||||||
const loadedChat = useCoState(Chat, chat?.id, { resolve: { $each: true } });
|
const loadedChat = useCoState(Chat, chat?.id, [{}]);
|
||||||
const navigation = useNavigation();
|
const navigation = useNavigation();
|
||||||
const [isUploading, setIsUploading] = useState(false);
|
const [isUploading, setIsUploading] = useState(false);
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ export default function Conversation() {
|
|||||||
|
|
||||||
const loadChat = async (chatId: ID<Chat>) => {
|
const loadChat = async (chatId: ID<Chat>) => {
|
||||||
try {
|
try {
|
||||||
const chat = await Chat.load(chatId, me);
|
const chat = await Chat.load(chatId, me, []);
|
||||||
setChat(chat);
|
setChat(chat);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Error loading chat", error);
|
console.log("Error loading chat", error);
|
||||||
@@ -165,8 +165,8 @@ export default function Conversation() {
|
|||||||
!isMe ? "mt-2 text-gray-500" : "mt-1 text-gray-200",
|
!isMe ? "mt-2 text-gray-500" : "mt-1 text-gray-200",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{item._edits.text.madeAt?.getHours().toString().padStart(2, "0")}:
|
{item._edits.text.madeAt.getHours()}:
|
||||||
{item._edits.text.madeAt?.getMinutes().toString().padStart(2, "0")}
|
{item._edits.text.madeAt.getMinutes()}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -11,7 +11,7 @@ import React, {
|
|||||||
} from "react-native";
|
} from "react-native";
|
||||||
|
|
||||||
import { useUser } from "@clerk/clerk-expo";
|
import { useUser } from "@clerk/clerk-expo";
|
||||||
import { useAccount } from "jazz-expo";
|
import { useAccount } from "jazz-react-native";
|
||||||
import { Chat } from "../../src/schema";
|
import { Chat } from "../../src/schema";
|
||||||
|
|
||||||
export default function ChatScreen() {
|
export default function ChatScreen() {
|
||||||
@@ -20,15 +20,10 @@ export default function ChatScreen() {
|
|||||||
const navigation = useNavigation();
|
const navigation = useNavigation();
|
||||||
const { user } = useUser();
|
const { user } = useUser();
|
||||||
|
|
||||||
function handleLogOut() {
|
|
||||||
logOut();
|
|
||||||
router.navigate("/");
|
|
||||||
}
|
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
navigation.setOptions({
|
navigation.setOptions({
|
||||||
headerTitle: "Chat",
|
headerTitle: "Chat",
|
||||||
headerRight: () => <Button onPress={handleLogOut} title="Logout" />,
|
headerRight: () => <Button onPress={logOut} title="Logout" />,
|
||||||
});
|
});
|
||||||
}, [navigation]);
|
}, [navigation]);
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 313 KiB After Width: | Height: | Size: 313 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
@@ -19,6 +19,7 @@ config.resolver.nodeModulesPaths = [
|
|||||||
path.resolve(workspaceRoot, "node_modules"),
|
path.resolve(workspaceRoot, "node_modules"),
|
||||||
];
|
];
|
||||||
config.resolver.sourceExts = ["mjs", "js", "json", "ts", "tsx"];
|
config.resolver.sourceExts = ["mjs", "js", "json", "ts", "tsx"];
|
||||||
|
config.resolver.unstable_enablePackageExports = true;
|
||||||
config.resolver.requireCycleIgnorePatterns = [
|
config.resolver.requireCycleIgnorePatterns = [
|
||||||
/(^|\/|\\)node_modules($|\/|\\)/,
|
/(^|\/|\\)node_modules($|\/|\\)/,
|
||||||
/(^|\/|\\)packages($|\/|\\)/,
|
/(^|\/|\\)packages($|\/|\\)/,
|
||||||
79
examples/chat-rn-clerk/package.json
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"name": "chat-rn-clerk",
|
||||||
|
"main": "index.js",
|
||||||
|
"version": "1.0.51",
|
||||||
|
"scripts": {
|
||||||
|
"build": "expo export -p ios",
|
||||||
|
"start": "expo start",
|
||||||
|
"format-and-lint": "biome check .",
|
||||||
|
"format-and-lint:fix": "biome check . --write",
|
||||||
|
"android": "expo run:android",
|
||||||
|
"ios": "expo run:ios",
|
||||||
|
"web": "expo start --web",
|
||||||
|
"test": "jest --watchAll"
|
||||||
|
},
|
||||||
|
"jest": {
|
||||||
|
"preset": "jest-expo"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@azure/core-asynciterator-polyfill": "^1.0.2",
|
||||||
|
"@bam.tech/react-native-image-resizer": "^3.0.11",
|
||||||
|
"@clerk/clerk-expo": "^2.2.21",
|
||||||
|
"@expo/vector-icons": "^14.0.2",
|
||||||
|
"@op-engineering/op-sqlite": "^11.2.12",
|
||||||
|
"@react-native-community/netinfo": "^11.4.1",
|
||||||
|
"@react-navigation/native": "^7.0.13",
|
||||||
|
"@react-navigation/native-stack": "^7.1.14",
|
||||||
|
"base-64": "^1.0.0",
|
||||||
|
"buffer": "^6.0.3",
|
||||||
|
"clsx": "^2.0.0",
|
||||||
|
"expo": "^52.0.0",
|
||||||
|
"expo-build-properties": "~0.13.1",
|
||||||
|
"expo-clipboard": "~7.0.0",
|
||||||
|
"expo-constants": "~17.0.3",
|
||||||
|
"expo-crypto": "~14.0.1",
|
||||||
|
"expo-dev-client": "~5.0.5",
|
||||||
|
"expo-file-system": "^18.0.4",
|
||||||
|
"expo-font": "~13.0.1",
|
||||||
|
"expo-image-picker": "~16.0.4",
|
||||||
|
"expo-linking": "~7.0.3",
|
||||||
|
"expo-router": "~4.0.11",
|
||||||
|
"expo-secure-store": "~14.0.0",
|
||||||
|
"expo-splash-screen": "~0.29.16",
|
||||||
|
"expo-status-bar": "~2.0.0",
|
||||||
|
"expo-system-ui": "~4.0.5",
|
||||||
|
"expo-web-browser": "~14.0.1",
|
||||||
|
"jazz-react-native": "workspace:*",
|
||||||
|
"jazz-react-native-auth-clerk": "workspace:*",
|
||||||
|
"jazz-react-native-media-images": "workspace:*",
|
||||||
|
"jazz-tools": "workspace:*",
|
||||||
|
"nativewind": "^4.1.21",
|
||||||
|
"react": "^18.3.1",
|
||||||
|
"react-dom": "^18.3.1",
|
||||||
|
"react-native": "~0.76.3",
|
||||||
|
"react-native-fetch-api": "^3.0.0",
|
||||||
|
"react-native-gesture-handler": "~2.20.2",
|
||||||
|
"react-native-get-random-values": "^1.11.0",
|
||||||
|
"react-native-polyfill-globals": "^3.1.0",
|
||||||
|
"react-native-quick-base64": "^2.1.2",
|
||||||
|
"react-native-reanimated": "~3.16.3",
|
||||||
|
"react-native-safe-area-context": "4.12.0",
|
||||||
|
"react-native-screens": "4.1.0",
|
||||||
|
"react-native-url-polyfill": "^2.0.0",
|
||||||
|
"react-native-web": "~0.19.13",
|
||||||
|
"text-encoding": "^0.7.0",
|
||||||
|
"web-streams-polyfill": "^3.2.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.20.0",
|
||||||
|
"@types/jest": "^29.5.3",
|
||||||
|
"@types/react": "^18.3.12",
|
||||||
|
"@types/react-test-renderer": "^18.0.7",
|
||||||
|
"jest": "^29.2.1",
|
||||||
|
"jest-expo": "~52.0.2",
|
||||||
|
"react-test-renderer": "18.2.0",
|
||||||
|
"tailwindcss": "^3.4.15",
|
||||||
|
"typescript": "~5.6.2"
|
||||||
|
},
|
||||||
|
"private": true
|
||||||
|
}
|
||||||
8
examples/chat-rn-clerk/polyfills.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import "react-native-polyfill-globals/auto";
|
||||||
|
import "@azure/core-asynciterator-polyfill";
|
||||||
|
import { Buffer } from "buffer";
|
||||||
|
import { polyfillGlobal } from "react-native/Libraries/Utilities/PolyfillFunctions";
|
||||||
|
import { ReadableStream } from "web-streams-polyfill/ponyfill/es6";
|
||||||
|
|
||||||
|
polyfillGlobal("Buffer", () => Buffer);
|
||||||
|
polyfillGlobal("ReadableStream", () => ReadableStream);
|
||||||
63
examples/chat-rn-clerk/src/auth-context.tsx
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
import { useClerk, useUser } from "@clerk/clerk-expo";
|
||||||
|
import { JazzProvider, setupKvStore } from "jazz-react-native";
|
||||||
|
import { useJazzClerkAuth } from "jazz-react-native-auth-clerk";
|
||||||
|
import React, {
|
||||||
|
createContext,
|
||||||
|
PropsWithChildren,
|
||||||
|
useContext,
|
||||||
|
useEffect,
|
||||||
|
useState,
|
||||||
|
} from "react";
|
||||||
|
import { Text, View } from "react-native";
|
||||||
|
const AuthContext = createContext<{
|
||||||
|
isAuthenticated: boolean;
|
||||||
|
isLoading: boolean;
|
||||||
|
}>({
|
||||||
|
isAuthenticated: false,
|
||||||
|
isLoading: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
export function useAuth() {
|
||||||
|
return useContext(AuthContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
const kvStore = setupKvStore();
|
||||||
|
|
||||||
|
export function JazzAndAuth({ children }: PropsWithChildren) {
|
||||||
|
const { isSignedIn, isLoaded: isClerkLoaded } = useUser();
|
||||||
|
const clerk = useClerk();
|
||||||
|
const [auth, state] = useJazzClerkAuth(clerk, kvStore);
|
||||||
|
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (isSignedIn && isClerkLoaded && auth) {
|
||||||
|
setIsAuthenticated(true);
|
||||||
|
} else {
|
||||||
|
setIsAuthenticated(false);
|
||||||
|
}
|
||||||
|
}, [isSignedIn, isClerkLoaded, auth]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<AuthContext.Provider
|
||||||
|
value={{ isAuthenticated, isLoading: !isClerkLoaded || !auth }}
|
||||||
|
>
|
||||||
|
{state?.errors?.length > 0 &&
|
||||||
|
state.errors.map((error) => (
|
||||||
|
<View key={error}>
|
||||||
|
<Text style={{ color: "red" }}>{error}</Text>
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
{auth && clerk.user ? (
|
||||||
|
<JazzProvider
|
||||||
|
auth={auth}
|
||||||
|
storage="sqlite"
|
||||||
|
peer="wss://cloud.jazz.tools/?key=chat-rn-clerk-example-jazz@garden.co"
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</JazzProvider>
|
||||||
|
) : (
|
||||||
|
children
|
||||||
|
)}
|
||||||
|
</AuthContext.Provider>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,992 +0,0 @@
|
|||||||
# chat-rn-expo-clerk
|
|
||||||
|
|
||||||
## 1.0.106
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [bd94012]
|
|
||||||
- jazz-expo@0.13.14
|
|
||||||
- jazz-tools@0.13.14
|
|
||||||
- jazz-react-native-media-images@0.13.14
|
|
||||||
|
|
||||||
## 1.0.105
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-expo@0.13.13
|
|
||||||
- jazz-tools@0.13.13
|
|
||||||
- jazz-react-native-media-images@0.13.13
|
|
||||||
|
|
||||||
## 1.0.104
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [4547525]
|
|
||||||
- jazz-tools@0.13.12
|
|
||||||
- jazz-expo@0.13.12
|
|
||||||
- jazz-react-native-media-images@0.13.12
|
|
||||||
|
|
||||||
## 1.0.103
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [17273a6]
|
|
||||||
- jazz-tools@0.13.11
|
|
||||||
- jazz-expo@0.13.11
|
|
||||||
- jazz-react-native-media-images@0.13.11
|
|
||||||
|
|
||||||
## 1.0.102
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-expo@0.13.10
|
|
||||||
- jazz-tools@0.13.10
|
|
||||||
- jazz-react-native-media-images@0.13.10
|
|
||||||
|
|
||||||
## 1.0.101
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [a6cf01f]
|
|
||||||
- jazz-tools@0.13.9
|
|
||||||
- jazz-expo@0.13.9
|
|
||||||
- jazz-react-native-media-images@0.13.9
|
|
||||||
|
|
||||||
## 1.0.100
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-expo@0.13.8
|
|
||||||
|
|
||||||
## 1.0.99
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [bc3d7bb]
|
|
||||||
- jazz-tools@0.13.7
|
|
||||||
- jazz-expo@0.13.7
|
|
||||||
- jazz-react-native-media-images@0.13.7
|
|
||||||
|
|
||||||
## 1.0.98
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [fe6f561]
|
|
||||||
- jazz-tools@0.13.5
|
|
||||||
- jazz-expo@0.13.5
|
|
||||||
- jazz-react-native-media-images@0.13.5
|
|
||||||
|
|
||||||
## 1.0.97
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [3129982]
|
|
||||||
- Updated dependencies [3129982]
|
|
||||||
- jazz-expo@0.13.4
|
|
||||||
- jazz-tools@0.13.4
|
|
||||||
- jazz-react-native-media-images@0.13.4
|
|
||||||
|
|
||||||
## 1.0.96
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [12f8bfa]
|
|
||||||
- Updated dependencies [bd57177]
|
|
||||||
- jazz-tools@0.13.3
|
|
||||||
- jazz-expo@0.13.3
|
|
||||||
- jazz-react-native-media-images@0.13.3
|
|
||||||
|
|
||||||
## 1.0.95
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-expo@0.13.2
|
|
||||||
- jazz-tools@0.13.2
|
|
||||||
- jazz-react-native-media-images@0.13.2
|
|
||||||
|
|
||||||
## 1.0.94
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [63a7aa0]
|
|
||||||
- jazz-expo@0.13.1
|
|
||||||
|
|
||||||
## 1.0.93
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [bce3bcc]
|
|
||||||
- Updated dependencies [afd1374]
|
|
||||||
- jazz-expo@0.13.0
|
|
||||||
- jazz-tools@0.13.0
|
|
||||||
- jazz-react-native-media-images@0.13.0
|
|
||||||
|
|
||||||
## 1.0.92
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.12.2
|
|
||||||
- jazz-react-native-auth-clerk@0.12.2
|
|
||||||
- jazz-tools@0.12.2
|
|
||||||
- jazz-react-native-media-images@0.12.2
|
|
||||||
|
|
||||||
## 1.0.91
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.12.1
|
|
||||||
- jazz-react-native-auth-clerk@0.12.1
|
|
||||||
- jazz-tools@0.12.1
|
|
||||||
- jazz-react-native-media-images@0.12.1
|
|
||||||
|
|
||||||
## 1.0.90
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [01523dc]
|
|
||||||
- Updated dependencies [4ea87dc]
|
|
||||||
- Updated dependencies [1e6da19]
|
|
||||||
- Updated dependencies [b6c6a0a]
|
|
||||||
- jazz-tools@0.12.0
|
|
||||||
- jazz-react-native@0.12.0
|
|
||||||
- jazz-react-native-auth-clerk@0.12.0
|
|
||||||
- jazz-react-native-media-images@0.12.0
|
|
||||||
|
|
||||||
## 1.0.89
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.11.8
|
|
||||||
- jazz-react-native-auth-clerk@0.11.8
|
|
||||||
- jazz-tools@0.11.8
|
|
||||||
- jazz-react-native-media-images@0.11.8
|
|
||||||
|
|
||||||
## 1.0.88
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [a140f55]
|
|
||||||
- Updated dependencies [2b0d1b0]
|
|
||||||
- jazz-tools@0.11.7
|
|
||||||
- jazz-react-native@0.11.7
|
|
||||||
- jazz-react-native-auth-clerk@0.11.7
|
|
||||||
- jazz-react-native-media-images@0.11.7
|
|
||||||
|
|
||||||
## 1.0.87
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- 1bfa9bb: Removed when="singedUp" from examples apps' Jazz providers. This is a really niche use-case option and can lead to broken-feeling experiences when anonymous users try to load something.
|
|
||||||
- Updated dependencies [e7c85b7]
|
|
||||||
- jazz-react-native@0.11.6
|
|
||||||
- jazz-tools@0.11.6
|
|
||||||
- jazz-react-native-auth-clerk@0.11.6
|
|
||||||
- jazz-react-native-media-images@0.11.6
|
|
||||||
|
|
||||||
## 1.0.86
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.11.5
|
|
||||||
- jazz-react-native-auth-clerk@0.11.5
|
|
||||||
- jazz-tools@0.11.5
|
|
||||||
- jazz-react-native-media-images@0.11.5
|
|
||||||
|
|
||||||
## 1.0.85
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [57a3dbe]
|
|
||||||
- Updated dependencies [a717754]
|
|
||||||
- Updated dependencies [a91f343]
|
|
||||||
- jazz-tools@0.11.4
|
|
||||||
- jazz-react-native@0.11.4
|
|
||||||
- jazz-react-native-auth-clerk@0.11.4
|
|
||||||
- jazz-react-native-media-images@0.11.4
|
|
||||||
|
|
||||||
## 1.0.84
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.11.3
|
|
||||||
- jazz-react-native-auth-clerk@0.11.3
|
|
||||||
- jazz-tools@0.11.3
|
|
||||||
- jazz-react-native-media-images@0.11.3
|
|
||||||
|
|
||||||
## 1.0.83
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [6892dc6]
|
|
||||||
- jazz-tools@0.11.2
|
|
||||||
- jazz-react-native@0.11.2
|
|
||||||
- jazz-react-native-auth-clerk@0.11.2
|
|
||||||
- jazz-react-native-media-images@0.11.2
|
|
||||||
|
|
||||||
## 1.0.82
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.11.1
|
|
||||||
- jazz-react-native-auth-clerk@0.11.1
|
|
||||||
|
|
||||||
## 1.0.81
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [6a96d8b]
|
|
||||||
- Updated dependencies [a35249a]
|
|
||||||
- Updated dependencies [b9d194a]
|
|
||||||
- Updated dependencies [a4713df]
|
|
||||||
- Updated dependencies [34cbdc3]
|
|
||||||
- Updated dependencies [f039e8f]
|
|
||||||
- Updated dependencies [e22de9f]
|
|
||||||
- jazz-tools@0.11.0
|
|
||||||
- jazz-react-native-media-images@0.11.0
|
|
||||||
- jazz-react-native-auth-clerk@0.11.0
|
|
||||||
- jazz-react-native@0.11.0
|
|
||||||
|
|
||||||
## 1.0.80
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [2f99de0]
|
|
||||||
- jazz-tools@0.10.15
|
|
||||||
- jazz-react-native@0.10.15
|
|
||||||
- jazz-react-native-auth-clerk@0.10.15
|
|
||||||
- jazz-react-native-media-images@0.10.15
|
|
||||||
|
|
||||||
## 1.0.79
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [75211e3]
|
|
||||||
- jazz-tools@0.10.14
|
|
||||||
- jazz-react-native@0.10.14
|
|
||||||
- jazz-react-native-auth-clerk@0.10.14
|
|
||||||
- jazz-react-native-media-images@0.10.14
|
|
||||||
|
|
||||||
## 1.0.78
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [07feedd]
|
|
||||||
- jazz-tools@0.10.13
|
|
||||||
- jazz-react-native@0.10.13
|
|
||||||
- jazz-react-native-auth-clerk@0.10.13
|
|
||||||
- jazz-react-native-media-images@0.10.13
|
|
||||||
|
|
||||||
## 1.0.77
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [4612e05]
|
|
||||||
- jazz-tools@0.10.12
|
|
||||||
- jazz-react-native@0.10.12
|
|
||||||
- jazz-react-native-auth-clerk@0.10.12
|
|
||||||
- jazz-react-native-media-images@0.10.12
|
|
||||||
|
|
||||||
## 1.0.76
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [5a54e4a]
|
|
||||||
- jazz-react-native@0.10.11
|
|
||||||
- jazz-react-native-auth-clerk@0.10.11
|
|
||||||
|
|
||||||
## 1.0.75
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [3405d8f]
|
|
||||||
- jazz-react-native@0.10.10
|
|
||||||
- jazz-react-native-auth-clerk@0.10.10
|
|
||||||
|
|
||||||
## 1.0.74
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native-auth-clerk@0.10.9
|
|
||||||
|
|
||||||
## 1.0.73
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [2fb6428]
|
|
||||||
- jazz-tools@0.10.8
|
|
||||||
- jazz-react-native@0.10.8
|
|
||||||
- jazz-react-native-auth-clerk@0.10.8
|
|
||||||
- jazz-react-native-media-images@0.10.8
|
|
||||||
|
|
||||||
## 1.0.72
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [1136d9b]
|
|
||||||
- Updated dependencies [0eed228]
|
|
||||||
- jazz-react-native@0.10.7
|
|
||||||
- jazz-tools@0.10.7
|
|
||||||
- jazz-react-native-auth-clerk@0.10.7
|
|
||||||
- jazz-react-native-media-images@0.10.7
|
|
||||||
|
|
||||||
## 1.0.71
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [ada802b]
|
|
||||||
- jazz-tools@0.10.6
|
|
||||||
- jazz-react-native@0.10.6
|
|
||||||
- jazz-react-native-auth-clerk@0.10.6
|
|
||||||
- jazz-react-native-media-images@0.10.6
|
|
||||||
|
|
||||||
## 1.0.70
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [59ff77e]
|
|
||||||
- jazz-tools@0.10.5
|
|
||||||
- jazz-react-native@0.10.5
|
|
||||||
- jazz-react-native-auth-clerk@0.10.5
|
|
||||||
- jazz-react-native-media-images@0.10.5
|
|
||||||
|
|
||||||
## 1.0.69
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.10.4
|
|
||||||
- jazz-react-native-auth-clerk@0.10.4
|
|
||||||
- jazz-tools@0.10.4
|
|
||||||
- jazz-react-native-media-images@0.10.4
|
|
||||||
|
|
||||||
## 1.0.68
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [d8582fc]
|
|
||||||
- jazz-tools@0.10.3
|
|
||||||
- jazz-react-native@0.10.3
|
|
||||||
- jazz-react-native-auth-clerk@0.10.3
|
|
||||||
- jazz-react-native-media-images@0.10.3
|
|
||||||
|
|
||||||
## 1.0.67
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.10.2
|
|
||||||
- jazz-react-native-auth-clerk@0.10.2
|
|
||||||
- jazz-tools@0.10.2
|
|
||||||
- jazz-react-native-media-images@0.10.2
|
|
||||||
|
|
||||||
## 1.0.66
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [5a63cba]
|
|
||||||
- jazz-tools@0.10.1
|
|
||||||
- jazz-react-native@0.10.1
|
|
||||||
- jazz-react-native-auth-clerk@0.10.1
|
|
||||||
- jazz-react-native-media-images@0.10.1
|
|
||||||
|
|
||||||
## 1.0.65
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [498954f]
|
|
||||||
- Updated dependencies [d42c2aa]
|
|
||||||
- Updated dependencies [dd03464]
|
|
||||||
- Updated dependencies [b426342]
|
|
||||||
- jazz-react-native-auth-clerk@0.10.0
|
|
||||||
- jazz-react-native@0.10.0
|
|
||||||
- jazz-tools@0.10.0
|
|
||||||
- jazz-react-native-media-images@0.10.0
|
|
||||||
|
|
||||||
## 1.0.64
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.23
|
|
||||||
- jazz-react-native-auth-clerk@0.9.23
|
|
||||||
- jazz-tools@0.9.23
|
|
||||||
- jazz-react-native-media-images@0.9.23
|
|
||||||
|
|
||||||
## 1.0.63
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.22
|
|
||||||
- jazz-react-native-auth-clerk@0.9.22
|
|
||||||
|
|
||||||
## 1.0.62
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [1be017d]
|
|
||||||
- jazz-tools@0.9.21
|
|
||||||
- jazz-react-native@0.9.21
|
|
||||||
- jazz-react-native-auth-clerk@0.9.21
|
|
||||||
- jazz-react-native-media-images@0.9.21
|
|
||||||
|
|
||||||
## 1.0.61
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [b01cc1f]
|
|
||||||
- jazz-tools@0.9.20
|
|
||||||
- jazz-react-native@0.9.20
|
|
||||||
- jazz-react-native-auth-clerk@0.9.20
|
|
||||||
- jazz-react-native-media-images@0.9.20
|
|
||||||
|
|
||||||
## 1.0.60
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.19
|
|
||||||
- jazz-react-native-auth-clerk@0.9.19
|
|
||||||
- jazz-tools@0.9.19
|
|
||||||
- jazz-react-native-media-images@0.9.19
|
|
||||||
|
|
||||||
## 1.0.59
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.18
|
|
||||||
- jazz-react-native-auth-clerk@0.9.18
|
|
||||||
- jazz-tools@0.9.18
|
|
||||||
- jazz-react-native-media-images@0.9.18
|
|
||||||
|
|
||||||
## 1.0.58
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [c2ca1fe]
|
|
||||||
- Updated dependencies [1227047]
|
|
||||||
- jazz-tools@0.9.17
|
|
||||||
- jazz-react-native@0.9.17
|
|
||||||
- jazz-react-native-auth-clerk@0.9.17
|
|
||||||
- jazz-react-native-media-images@0.9.17
|
|
||||||
|
|
||||||
## 1.0.57
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [24b3b6a]
|
|
||||||
- jazz-react-native-auth-clerk@0.9.16
|
|
||||||
- jazz-tools@0.9.16
|
|
||||||
- jazz-react-native@0.9.16
|
|
||||||
- jazz-react-native-media-images@0.9.16
|
|
||||||
|
|
||||||
## 1.0.56
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [7491711]
|
|
||||||
- jazz-tools@0.9.15
|
|
||||||
- jazz-react-native@0.9.15
|
|
||||||
- jazz-react-native-auth-clerk@0.9.15
|
|
||||||
- jazz-react-native-media-images@0.9.15
|
|
||||||
|
|
||||||
## 1.0.55
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [3df93cc]
|
|
||||||
- jazz-tools@0.9.14
|
|
||||||
- jazz-react-native@0.9.14
|
|
||||||
- jazz-react-native-auth-clerk@0.9.14
|
|
||||||
- jazz-react-native-media-images@0.9.14
|
|
||||||
|
|
||||||
## 1.0.54
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.13
|
|
||||||
- jazz-react-native-auth-clerk@0.9.13
|
|
||||||
- jazz-tools@0.9.13
|
|
||||||
- jazz-react-native-media-images@0.9.13
|
|
||||||
|
|
||||||
## 1.0.53
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.12
|
|
||||||
- jazz-react-native-auth-clerk@0.9.12
|
|
||||||
- jazz-tools@0.9.12
|
|
||||||
- jazz-react-native-media-images@0.9.12
|
|
||||||
|
|
||||||
## 1.0.52
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.11
|
|
||||||
- jazz-react-native-auth-clerk@0.9.11
|
|
||||||
- jazz-tools@0.9.11
|
|
||||||
- jazz-react-native-media-images@0.9.11
|
|
||||||
|
|
||||||
## 1.0.51
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- f76274c: Fix image handling in react-native
|
|
||||||
- Updated dependencies [f76274c]
|
|
||||||
- Updated dependencies [5e83864]
|
|
||||||
- jazz-react-native@0.9.10
|
|
||||||
- jazz-tools@0.9.10
|
|
||||||
- jazz-react-native-auth-clerk@0.9.10
|
|
||||||
- jazz-react-native-media-images@0.9.10
|
|
||||||
|
|
||||||
## 1.0.50
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [8eb9247]
|
|
||||||
- jazz-tools@0.9.9
|
|
||||||
- jazz-react-native@0.9.9
|
|
||||||
- jazz-react-native-auth-clerk@0.9.9
|
|
||||||
- jazz-react-native-media-images@0.9.9
|
|
||||||
|
|
||||||
## 1.0.49
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [d1d773b]
|
|
||||||
- jazz-tools@0.9.8
|
|
||||||
- jazz-react-native@0.9.8
|
|
||||||
- jazz-react-native-auth-clerk@0.9.8
|
|
||||||
- jazz-react-native-media-images@0.9.8
|
|
||||||
|
|
||||||
## 1.0.48
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [8a390d2]
|
|
||||||
- jazz-react-native@0.9.6
|
|
||||||
- jazz-react-native-auth-clerk@0.9.6
|
|
||||||
|
|
||||||
## 1.0.47
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [c871912]
|
|
||||||
- jazz-react-native@0.9.5
|
|
||||||
- jazz-react-native-auth-clerk@0.9.5
|
|
||||||
|
|
||||||
## 1.0.46
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.4
|
|
||||||
- jazz-react-native-auth-clerk@0.9.4
|
|
||||||
|
|
||||||
## 1.0.45
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [7cd691f]
|
|
||||||
- jazz-react-native@0.9.3
|
|
||||||
- jazz-react-native-auth-clerk@0.9.3
|
|
||||||
|
|
||||||
## 1.0.44
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [80fd3e9]
|
|
||||||
- jazz-react-native@0.9.2
|
|
||||||
- jazz-react-native-auth-clerk@0.9.2
|
|
||||||
|
|
||||||
## 1.0.43
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [1b71969]
|
|
||||||
- jazz-tools@0.9.1
|
|
||||||
- jazz-react-native@0.9.1
|
|
||||||
- jazz-react-native-auth-clerk@0.9.1
|
|
||||||
- jazz-react-native-media-images@0.9.1
|
|
||||||
|
|
||||||
## 1.0.42
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [1da4d55]
|
|
||||||
- Updated dependencies [8eda792]
|
|
||||||
- Updated dependencies [1e5e3a1]
|
|
||||||
- jazz-react-native@0.9.0
|
|
||||||
- jazz-tools@0.9.0
|
|
||||||
- jazz-react-native-auth-clerk@0.9.0
|
|
||||||
- jazz-react-native-media-images@0.9.0
|
|
||||||
|
|
||||||
## 1.0.41
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [dc62b95]
|
|
||||||
- Updated dependencies [1de26f8]
|
|
||||||
- jazz-tools@0.8.51
|
|
||||||
- jazz-react-native@0.8.51
|
|
||||||
- jazz-react-native-auth-clerk@0.8.51
|
|
||||||
- jazz-react-native-media-images@0.8.51
|
|
||||||
|
|
||||||
## 1.0.40
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.50
|
|
||||||
- jazz-react-native-auth-clerk@0.8.50
|
|
||||||
- jazz-tools@0.8.50
|
|
||||||
- jazz-react-native-media-images@0.8.50
|
|
||||||
|
|
||||||
## 1.0.39
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.49
|
|
||||||
- jazz-react-native-auth-clerk@0.8.49
|
|
||||||
- jazz-tools@0.8.49
|
|
||||||
- jazz-react-native-media-images@0.8.49
|
|
||||||
|
|
||||||
## 1.0.38
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [635e824]
|
|
||||||
- Updated dependencies [0a85982]
|
|
||||||
- jazz-tools@0.8.48
|
|
||||||
- jazz-react-native@0.8.48
|
|
||||||
- jazz-react-native-auth-clerk@0.8.48
|
|
||||||
- jazz-react-native-media-images@0.8.48
|
|
||||||
|
|
||||||
## 1.0.37
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [33ef9c4]
|
|
||||||
- jazz-react-native@0.8.47
|
|
||||||
- jazz-react-native-auth-clerk@0.8.47
|
|
||||||
|
|
||||||
## 1.0.36
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [ab4ffbd]
|
|
||||||
- jazz-react-native@0.8.46
|
|
||||||
- jazz-react-native-auth-clerk@0.8.46
|
|
||||||
|
|
||||||
## 1.0.35
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [7701307]
|
|
||||||
- Updated dependencies [fa41f8e]
|
|
||||||
- Updated dependencies [88d7d9a]
|
|
||||||
- Updated dependencies [60e35ea]
|
|
||||||
- jazz-react-native@0.8.45
|
|
||||||
- jazz-tools@0.8.45
|
|
||||||
- jazz-react-native-auth-clerk@0.8.45
|
|
||||||
- jazz-react-native-media-images@0.8.45
|
|
||||||
|
|
||||||
## 1.0.34
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.44
|
|
||||||
- jazz-react-native-auth-clerk@0.8.44
|
|
||||||
- jazz-tools@0.8.44
|
|
||||||
- jazz-react-native-media-images@0.8.44
|
|
||||||
|
|
||||||
## 1.0.33
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- cdc7f9f: Fixing react-native examples
|
|
||||||
- Updated dependencies [cdc7f9f]
|
|
||||||
- jazz-react-native-auth-clerk@0.8.43
|
|
||||||
|
|
||||||
## 1.0.32
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.41
|
|
||||||
- jazz-react-native-auth-clerk@0.8.41
|
|
||||||
- jazz-tools@0.8.41
|
|
||||||
- jazz-react-native-media-images@0.8.41
|
|
||||||
|
|
||||||
## 1.0.31
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [0c6b0f3]
|
|
||||||
- Updated dependencies [249eecb]
|
|
||||||
- jazz-react-native@0.8.39
|
|
||||||
- jazz-tools@0.8.39
|
|
||||||
- jazz-react-native-auth-clerk@0.8.39
|
|
||||||
- jazz-react-native-media-images@0.8.39
|
|
||||||
|
|
||||||
## 1.0.30
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.38
|
|
||||||
- jazz-react-native-auth-clerk@0.8.38
|
|
||||||
- jazz-tools@0.8.38
|
|
||||||
- jazz-react-native-media-images@0.8.38
|
|
||||||
|
|
||||||
## 1.0.29
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.37
|
|
||||||
- jazz-react-native-auth-clerk@0.8.37
|
|
||||||
- jazz-tools@0.8.37
|
|
||||||
- jazz-react-native-media-images@0.8.28
|
|
||||||
|
|
||||||
## 1.0.28
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- c84764a: feat: added jazz-react-native-auth-clerk package
|
|
||||||
- Updated dependencies [c84764a]
|
|
||||||
- Updated dependencies [441fe27]
|
|
||||||
- jazz-react-native-auth-clerk@0.8.36
|
|
||||||
- jazz-react-native@0.8.36
|
|
||||||
- jazz-tools@0.8.36
|
|
||||||
- jazz-react-native-media-images@0.8.27
|
|
||||||
|
|
||||||
## 1.0.27
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [8b87117]
|
|
||||||
- jazz-tools@0.8.35
|
|
||||||
- jazz-react-auth-clerk@0.8.35
|
|
||||||
- jazz-react-native@0.8.35
|
|
||||||
- jazz-react-native-media-images@0.8.26
|
|
||||||
|
|
||||||
## 1.0.26
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [9ca25d1]
|
|
||||||
- jazz-react-auth-clerk@0.8.34
|
|
||||||
- jazz-react-native@0.8.34
|
|
||||||
- jazz-tools@0.8.34
|
|
||||||
- jazz-react-native-media-images@0.8.25
|
|
||||||
|
|
||||||
## 1.0.25
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.33
|
|
||||||
|
|
||||||
## 1.0.24
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [1a4bda0]
|
|
||||||
- Updated dependencies [df42b2b]
|
|
||||||
- jazz-react-auth-clerk@0.8.32
|
|
||||||
- jazz-tools@0.8.32
|
|
||||||
- jazz-react-native@0.8.32
|
|
||||||
- jazz-react-native-media-images@0.8.24
|
|
||||||
|
|
||||||
## 1.0.23
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.31
|
|
||||||
- jazz-react-native@0.8.31
|
|
||||||
- jazz-tools@0.8.31
|
|
||||||
- jazz-react-native-media-images@0.8.23
|
|
||||||
|
|
||||||
## 1.0.22
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.30
|
|
||||||
- jazz-react-native@0.8.30
|
|
||||||
- jazz-tools@0.8.30
|
|
||||||
- jazz-react-native-media-images@0.8.22
|
|
||||||
|
|
||||||
## 1.0.21
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.29
|
|
||||||
- jazz-react-auth-clerk@0.8.29
|
|
||||||
- jazz-tools@0.8.29
|
|
||||||
- jazz-react-native-media-images@0.8.21
|
|
||||||
|
|
||||||
## 1.0.20
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.28
|
|
||||||
- jazz-react-native@0.8.28
|
|
||||||
- jazz-tools@0.8.28
|
|
||||||
- jazz-react-native-media-images@0.8.20
|
|
||||||
|
|
||||||
## 1.0.19
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.27
|
|
||||||
- jazz-react-native@0.8.27
|
|
||||||
- jazz-tools@0.8.27
|
|
||||||
- jazz-react-native-media-images@0.8.19
|
|
||||||
|
|
||||||
## 1.0.18
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.26
|
|
||||||
|
|
||||||
## 1.0.17
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.24
|
|
||||||
|
|
||||||
## 1.0.16
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [d348c2d]
|
|
||||||
- Updated dependencies [6902b5b]
|
|
||||||
- Updated dependencies [1a0cd3d]
|
|
||||||
- jazz-tools@0.8.23
|
|
||||||
- jazz-react-auth-clerk@0.8.23
|
|
||||||
- jazz-react-native@0.8.23
|
|
||||||
- jazz-react-native-media-images@0.8.18
|
|
||||||
|
|
||||||
## 1.0.15
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.22
|
|
||||||
|
|
||||||
## 1.0.14
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [149ca97]
|
|
||||||
- jazz-tools@0.8.21
|
|
||||||
- jazz-react-auth-clerk@0.8.21
|
|
||||||
- jazz-react-native@0.8.21
|
|
||||||
- jazz-react-native-media-images@0.8.17
|
|
||||||
|
|
||||||
## 1.0.13
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [3ef3ff3]
|
|
||||||
- jazz-react-native-media-images@0.8.16
|
|
||||||
- jazz-react-native@0.8.20
|
|
||||||
- jazz-react-auth-clerk@0.8.20
|
|
||||||
|
|
||||||
## 1.0.12
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.19
|
|
||||||
- jazz-react-native@0.8.19
|
|
||||||
- jazz-tools@0.8.19
|
|
||||||
- jazz-react-native-media-images@0.8.15
|
|
||||||
|
|
||||||
## 1.0.11
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.18
|
|
||||||
- jazz-react-native@0.8.18
|
|
||||||
- jazz-tools@0.8.18
|
|
||||||
- jazz-react-native-media-images@0.8.14
|
|
||||||
|
|
||||||
## 1.0.10
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.17
|
|
||||||
- jazz-react-native@0.8.17
|
|
||||||
- jazz-tools@0.8.17
|
|
||||||
- jazz-react-native-media-images@0.8.13
|
|
||||||
|
|
||||||
## 1.0.9
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.16
|
|
||||||
- jazz-react-native@0.8.16
|
|
||||||
- jazz-tools@0.8.16
|
|
||||||
- jazz-react-native-media-images@0.8.12
|
|
||||||
|
|
||||||
## 1.0.8
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [cce679b]
|
|
||||||
- Updated dependencies [221c58f]
|
|
||||||
- jazz-tools@0.8.15
|
|
||||||
- jazz-react-auth-clerk@0.8.15
|
|
||||||
- jazz-react-native@0.8.15
|
|
||||||
- jazz-react-native-media-images@0.8.11
|
|
||||||
|
|
||||||
## 1.0.7
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [36273b3]
|
|
||||||
- jazz-tools@0.8.14
|
|
||||||
- jazz-react-auth-clerk@0.8.14
|
|
||||||
- jazz-react-native@0.8.14
|
|
||||||
- jazz-react-native-media-images@0.8.10
|
|
||||||
|
|
||||||
## 1.0.6
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [fd011d7]
|
|
||||||
- jazz-tools@0.8.13
|
|
||||||
- jazz-react-auth-clerk@0.8.13
|
|
||||||
- jazz-react-native@0.8.13
|
|
||||||
- jazz-react-native-media-images@0.8.9
|
|
||||||
|
|
||||||
## 1.0.5
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.12
|
|
||||||
- jazz-react-native@0.8.12
|
|
||||||
- jazz-tools@0.8.12
|
|
||||||
- jazz-react-native-media-images@0.8.8
|
|
||||||
|
|
||||||
## 1.0.4
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-auth-clerk@0.8.11
|
|
||||||
- jazz-react-native@0.8.11
|
|
||||||
- jazz-tools@0.8.11
|
|
||||||
- jazz-react-native-media-images@0.8.7
|
|
||||||
|
|
||||||
## 1.0.3
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- b7639cf: feat(react-native): replaced react-native-mmkv with expo-secure-store and initialize it by default as kvStore in createJazzRNApp() (BREAKING)
|
|
||||||
- Updated dependencies [b7639cf]
|
|
||||||
- jazz-react-native@0.8.8
|
|
||||||
|
|
||||||
## 1.0.2
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [32b05b6]
|
|
||||||
- jazz-react-native-media-images@0.8.6
|
|
||||||
- jazz-react-native@0.8.7
|
|
||||||
- jazz-react-auth-clerk@0.8.7
|
|
||||||
|
|
||||||
## 1.0.1
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.6
|
|
||||||
- jazz-react-auth-clerk@0.8.6
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
import "../global.css";
|
|
||||||
import { ClerkLoaded, ClerkProvider } from "@clerk/clerk-expo";
|
|
||||||
import { secureStore } from "@clerk/clerk-expo/secure-store";
|
|
||||||
import { useFonts } from "expo-font";
|
|
||||||
import { Slot, useRouter, useSegments } from "expo-router";
|
|
||||||
import * as SplashScreen from "expo-splash-screen";
|
|
||||||
import { useIsAuthenticated, useJazzContext } from "jazz-expo";
|
|
||||||
import React, { useEffect } from "react";
|
|
||||||
import { tokenCache } from "../cache";
|
|
||||||
import { JazzAndAuth } from "../src/auth-context";
|
|
||||||
|
|
||||||
SplashScreen.preventAutoHideAsync();
|
|
||||||
|
|
||||||
function InitialLayout() {
|
|
||||||
const isAuthenticated = useIsAuthenticated();
|
|
||||||
const segments = useSegments();
|
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const inAuthGroup = segments[0] === "(auth)";
|
|
||||||
|
|
||||||
if (isAuthenticated && inAuthGroup) {
|
|
||||||
router.replace("/chat");
|
|
||||||
} else if (!isAuthenticated && !inAuthGroup) {
|
|
||||||
router.replace("/");
|
|
||||||
}
|
|
||||||
|
|
||||||
SplashScreen.hideAsync();
|
|
||||||
}, [isAuthenticated, segments, router]);
|
|
||||||
|
|
||||||
return <Slot />;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function RootLayout() {
|
|
||||||
const [fontsLoaded] = useFonts({
|
|
||||||
SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
|
|
||||||
});
|
|
||||||
|
|
||||||
const publishableKey = process.env.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY;
|
|
||||||
|
|
||||||
if (!publishableKey) {
|
|
||||||
throw new Error(
|
|
||||||
"Missing Publishable Key. Please set EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY in your .env",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (fontsLoaded) {
|
|
||||||
} else {
|
|
||||||
SplashScreen.preventAutoHideAsync();
|
|
||||||
}
|
|
||||||
}, [fontsLoaded]);
|
|
||||||
|
|
||||||
if (!fontsLoaded) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ClerkProvider
|
|
||||||
tokenCache={tokenCache}
|
|
||||||
publishableKey={publishableKey}
|
|
||||||
__experimental_resourceCache={secureStore}
|
|
||||||
>
|
|
||||||
<ClerkLoaded>
|
|
||||||
<JazzAndAuth>
|
|
||||||
<InitialLayout />
|
|
||||||
</JazzAndAuth>
|
|
||||||
</ClerkLoaded>
|
|
||||||
</ClerkProvider>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "chat-rn-expo-clerk",
|
|
||||||
"main": "index.js",
|
|
||||||
"version": "1.0.106",
|
|
||||||
"scripts": {
|
|
||||||
"build": "expo export -p ios",
|
|
||||||
"start": "expo start",
|
|
||||||
"format-and-lint": "biome check .",
|
|
||||||
"format-and-lint:fix": "biome check . --write",
|
|
||||||
"android": "expo run:android",
|
|
||||||
"ios": "expo prebuild && pnpx pod-install && expo run:ios",
|
|
||||||
"web": "expo start --web",
|
|
||||||
"run:ios": "pnpm expo prebuild && npx pod-install && pnpm expo run:ios"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@azure/core-asynciterator-polyfill": "^1.0.2",
|
|
||||||
"@bacons/text-decoder": "0.0.0",
|
|
||||||
"@bam.tech/react-native-image-resizer": "^3.0.11",
|
|
||||||
"@clerk/clerk-expo": "^2.2.21",
|
|
||||||
"@craftzdog/react-native-buffer": "6.0.5",
|
|
||||||
"@expo/vector-icons": "^14.0.2",
|
|
||||||
"@react-native-community/netinfo": "11.4.1",
|
|
||||||
"@react-navigation/native": "7.0.19",
|
|
||||||
"@react-navigation/native-stack": "7.2.1",
|
|
||||||
"clsx": "^2.0.0",
|
|
||||||
"expo": "^52.0.42",
|
|
||||||
"expo-build-properties": "~0.13.1",
|
|
||||||
"expo-clipboard": "~7.0.0",
|
|
||||||
"expo-constants": "~17.0.8",
|
|
||||||
"expo-crypto": "~14.0.2",
|
|
||||||
"expo-dev-client": "~5.0.16",
|
|
||||||
"expo-file-system": "^18.0.4",
|
|
||||||
"expo-font": "~13.0.1",
|
|
||||||
"expo-image-picker": "~16.0.6",
|
|
||||||
"expo-linking": "~7.0.5",
|
|
||||||
"expo-router": "~4.0.19",
|
|
||||||
"expo-secure-store": "~14.0.0",
|
|
||||||
"expo-splash-screen": "~0.29.22",
|
|
||||||
"expo-sqlite": "15.1.3",
|
|
||||||
"expo-status-bar": "~2.0.1",
|
|
||||||
"expo-web-browser": "~14.0.1",
|
|
||||||
"jazz-expo": "workspace:*",
|
|
||||||
"jazz-react-native-media-images": "workspace:*",
|
|
||||||
"jazz-tools": "workspace:*",
|
|
||||||
"nativewind": "^4.1.21",
|
|
||||||
"react": "18.3.1",
|
|
||||||
"react-dom": "18.3.1",
|
|
||||||
"react-native": "0.76.7",
|
|
||||||
"react-native-gesture-handler": "~2.20.2",
|
|
||||||
"react-native-get-random-values": "^1.11.0",
|
|
||||||
"react-native-reanimated": "~3.16.3",
|
|
||||||
"react-native-safe-area-context": "4.12.0",
|
|
||||||
"react-native-screens": "4.4.0",
|
|
||||||
"react-native-url-polyfill": "^2.0.0",
|
|
||||||
"react-native-web": "~0.19.13",
|
|
||||||
"readable-stream": "4.7.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/core": "^7.25.2",
|
|
||||||
"@types/react": "~18.3.12",
|
|
||||||
"@types/react-test-renderer": "^19.0.0",
|
|
||||||
"react-test-renderer": "18.3.1",
|
|
||||||
"tailwindcss": "^3.4.17",
|
|
||||||
"typescript": "5.6.2"
|
|
||||||
},
|
|
||||||
"private": true
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
/* eslint-disable import/order */
|
|
||||||
|
|
||||||
// @ts-expect-error - @types/react-native doesn't cover this file
|
|
||||||
import { polyfillGlobal } from "react-native/Libraries/Utilities/PolyfillFunctions";
|
|
||||||
|
|
||||||
import { Buffer } from "@craftzdog/react-native-buffer";
|
|
||||||
polyfillGlobal("Buffer", () => Buffer);
|
|
||||||
|
|
||||||
// @ts-expect-error - @types/readable-stream doesn't have ReadableStream type
|
|
||||||
import { ReadableStream } from "readable-stream";
|
|
||||||
polyfillGlobal("ReadableStream", () => ReadableStream);
|
|
||||||
|
|
||||||
import "@azure/core-asynciterator-polyfill";
|
|
||||||
|
|
||||||
import "@bacons/text-decoder/install";
|
|
||||||
|
|
||||||
import "react-native-get-random-values";
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export const apiKey = "chat-rn-expo-clerk-example-jazz@garden.co";
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
import { useClerk } from "@clerk/clerk-expo";
|
|
||||||
import { JazzProviderWithClerk } from "jazz-expo/auth/clerk";
|
|
||||||
import React, { PropsWithChildren } from "react";
|
|
||||||
import { apiKey } from "./apiKey";
|
|
||||||
|
|
||||||
export function JazzAndAuth({ children }: PropsWithChildren) {
|
|
||||||
const clerk = useClerk();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<JazzProviderWithClerk
|
|
||||||
clerk={clerk}
|
|
||||||
sync={{
|
|
||||||
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</JazzProviderWithClerk>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,795 +0,0 @@
|
|||||||
# chat-rn-expo
|
|
||||||
|
|
||||||
## 1.0.93
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [bd94012]
|
|
||||||
- jazz-expo@0.13.14
|
|
||||||
- jazz-tools@0.13.14
|
|
||||||
|
|
||||||
## 1.0.92
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-expo@0.13.13
|
|
||||||
- jazz-tools@0.13.13
|
|
||||||
|
|
||||||
## 1.0.91
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [4547525]
|
|
||||||
- jazz-tools@0.13.12
|
|
||||||
- jazz-expo@0.13.12
|
|
||||||
|
|
||||||
## 1.0.90
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [17273a6]
|
|
||||||
- jazz-tools@0.13.11
|
|
||||||
- jazz-expo@0.13.11
|
|
||||||
|
|
||||||
## 1.0.89
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-expo@0.13.10
|
|
||||||
- jazz-tools@0.13.10
|
|
||||||
|
|
||||||
## 1.0.88
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [a6cf01f]
|
|
||||||
- jazz-tools@0.13.9
|
|
||||||
- jazz-expo@0.13.9
|
|
||||||
|
|
||||||
## 1.0.87
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-expo@0.13.8
|
|
||||||
|
|
||||||
## 1.0.86
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [bc3d7bb]
|
|
||||||
- jazz-tools@0.13.7
|
|
||||||
- jazz-expo@0.13.7
|
|
||||||
|
|
||||||
## 1.0.85
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [fe6f561]
|
|
||||||
- jazz-tools@0.13.5
|
|
||||||
- jazz-expo@0.13.5
|
|
||||||
|
|
||||||
## 1.0.84
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [3129982]
|
|
||||||
- Updated dependencies [3129982]
|
|
||||||
- jazz-expo@0.13.4
|
|
||||||
- jazz-tools@0.13.4
|
|
||||||
|
|
||||||
## 1.0.83
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [12f8bfa]
|
|
||||||
- Updated dependencies [bd57177]
|
|
||||||
- jazz-tools@0.13.3
|
|
||||||
- jazz-expo@0.13.3
|
|
||||||
|
|
||||||
## 1.0.82
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-expo@0.13.2
|
|
||||||
- jazz-tools@0.13.2
|
|
||||||
|
|
||||||
## 1.0.81
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [63a7aa0]
|
|
||||||
- jazz-expo@0.13.1
|
|
||||||
|
|
||||||
## 1.0.80
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [bce3bcc]
|
|
||||||
- Updated dependencies [afd1374]
|
|
||||||
- jazz-expo@0.13.0
|
|
||||||
- jazz-tools@0.13.0
|
|
||||||
|
|
||||||
## 1.0.88
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.12.2
|
|
||||||
- jazz-tools@0.12.2
|
|
||||||
|
|
||||||
## 1.0.87
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.12.1
|
|
||||||
- jazz-tools@0.12.1
|
|
||||||
|
|
||||||
## 1.0.86
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [01523dc]
|
|
||||||
- Updated dependencies [4ea87dc]
|
|
||||||
- Updated dependencies [1e6da19]
|
|
||||||
- Updated dependencies [b6c6a0a]
|
|
||||||
- jazz-tools@0.12.0
|
|
||||||
- jazz-react-native@0.12.0
|
|
||||||
|
|
||||||
## 1.0.85
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.11.8
|
|
||||||
- jazz-tools@0.11.8
|
|
||||||
|
|
||||||
## 1.0.84
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [a140f55]
|
|
||||||
- Updated dependencies [2b0d1b0]
|
|
||||||
- jazz-tools@0.11.7
|
|
||||||
- jazz-react-native@0.11.7
|
|
||||||
|
|
||||||
## 1.0.83
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [e7c85b7]
|
|
||||||
- jazz-react-native@0.11.6
|
|
||||||
- jazz-tools@0.11.6
|
|
||||||
|
|
||||||
## 1.0.82
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.11.5
|
|
||||||
- jazz-tools@0.11.5
|
|
||||||
|
|
||||||
## 1.0.81
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [57a3dbe]
|
|
||||||
- Updated dependencies [a717754]
|
|
||||||
- Updated dependencies [a91f343]
|
|
||||||
- jazz-tools@0.11.4
|
|
||||||
- jazz-react-native@0.11.4
|
|
||||||
|
|
||||||
## 1.0.80
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.11.3
|
|
||||||
- jazz-tools@0.11.3
|
|
||||||
|
|
||||||
## 1.0.79
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [6892dc6]
|
|
||||||
- jazz-tools@0.11.2
|
|
||||||
- jazz-react-native@0.11.2
|
|
||||||
|
|
||||||
## 1.0.78
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.11.1
|
|
||||||
|
|
||||||
## 1.0.77
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [6a96d8b]
|
|
||||||
- Updated dependencies [a35249a]
|
|
||||||
- Updated dependencies [b9d194a]
|
|
||||||
- Updated dependencies [a4713df]
|
|
||||||
- Updated dependencies [34cbdc3]
|
|
||||||
- Updated dependencies [f039e8f]
|
|
||||||
- Updated dependencies [e22de9f]
|
|
||||||
- jazz-tools@0.11.0
|
|
||||||
- jazz-react-native@0.11.0
|
|
||||||
|
|
||||||
## 1.0.76
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [2f99de0]
|
|
||||||
- jazz-tools@0.10.15
|
|
||||||
- jazz-react-native@0.10.15
|
|
||||||
|
|
||||||
## 1.0.75
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [75211e3]
|
|
||||||
- jazz-tools@0.10.14
|
|
||||||
- jazz-react-native@0.10.14
|
|
||||||
|
|
||||||
## 1.0.74
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [07feedd]
|
|
||||||
- jazz-tools@0.10.13
|
|
||||||
- jazz-react-native@0.10.13
|
|
||||||
|
|
||||||
## 1.0.73
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [4612e05]
|
|
||||||
- jazz-tools@0.10.12
|
|
||||||
- jazz-react-native@0.10.12
|
|
||||||
|
|
||||||
## 1.0.72
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [5a54e4a]
|
|
||||||
- jazz-react-native@0.10.11
|
|
||||||
|
|
||||||
## 1.0.71
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [3405d8f]
|
|
||||||
- jazz-react-native@0.10.10
|
|
||||||
|
|
||||||
## 1.0.70
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [2fb6428]
|
|
||||||
- jazz-tools@0.10.8
|
|
||||||
- jazz-react-native@0.10.8
|
|
||||||
|
|
||||||
## 1.0.69
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [1136d9b]
|
|
||||||
- Updated dependencies [0eed228]
|
|
||||||
- jazz-react-native@0.10.7
|
|
||||||
- jazz-tools@0.10.7
|
|
||||||
|
|
||||||
## 1.0.68
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [ada802b]
|
|
||||||
- jazz-tools@0.10.6
|
|
||||||
- jazz-react-native@0.10.6
|
|
||||||
|
|
||||||
## 1.0.67
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [59ff77e]
|
|
||||||
- jazz-tools@0.10.5
|
|
||||||
- jazz-react-native@0.10.5
|
|
||||||
|
|
||||||
## 1.0.66
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.10.4
|
|
||||||
- jazz-tools@0.10.4
|
|
||||||
|
|
||||||
## 1.0.65
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [d8582fc]
|
|
||||||
- jazz-tools@0.10.3
|
|
||||||
- jazz-react-native@0.10.3
|
|
||||||
|
|
||||||
## 1.0.64
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.10.2
|
|
||||||
- jazz-tools@0.10.2
|
|
||||||
|
|
||||||
## 1.0.63
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [5a63cba]
|
|
||||||
- jazz-tools@0.10.1
|
|
||||||
- jazz-react-native@0.10.1
|
|
||||||
|
|
||||||
## 1.0.62
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [498954f]
|
|
||||||
- Updated dependencies [d42c2aa]
|
|
||||||
- Updated dependencies [dd03464]
|
|
||||||
- Updated dependencies [b426342]
|
|
||||||
- jazz-react-native@0.10.0
|
|
||||||
- jazz-tools@0.10.0
|
|
||||||
|
|
||||||
## 1.0.61
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.23
|
|
||||||
- jazz-tools@0.9.23
|
|
||||||
|
|
||||||
## 1.0.60
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.22
|
|
||||||
|
|
||||||
## 1.0.59
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [1be017d]
|
|
||||||
- jazz-tools@0.9.21
|
|
||||||
- jazz-react-native@0.9.21
|
|
||||||
|
|
||||||
## 1.0.58
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [b01cc1f]
|
|
||||||
- jazz-tools@0.9.20
|
|
||||||
- jazz-react-native@0.9.20
|
|
||||||
|
|
||||||
## 1.0.57
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.19
|
|
||||||
- jazz-tools@0.9.19
|
|
||||||
|
|
||||||
## 1.0.56
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.18
|
|
||||||
- jazz-tools@0.9.18
|
|
||||||
|
|
||||||
## 1.0.55
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [c2ca1fe]
|
|
||||||
- Updated dependencies [1227047]
|
|
||||||
- jazz-tools@0.9.17
|
|
||||||
- jazz-react-native@0.9.17
|
|
||||||
|
|
||||||
## 1.0.54
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [24b3b6a]
|
|
||||||
- jazz-tools@0.9.16
|
|
||||||
- jazz-react-native@0.9.16
|
|
||||||
|
|
||||||
## 1.0.53
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [7491711]
|
|
||||||
- jazz-tools@0.9.15
|
|
||||||
- jazz-react-native@0.9.15
|
|
||||||
|
|
||||||
## 1.0.52
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [3df93cc]
|
|
||||||
- jazz-tools@0.9.14
|
|
||||||
- jazz-react-native@0.9.14
|
|
||||||
|
|
||||||
## 1.0.51
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.13
|
|
||||||
- jazz-tools@0.9.13
|
|
||||||
|
|
||||||
## 1.0.50
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.12
|
|
||||||
- jazz-tools@0.9.12
|
|
||||||
|
|
||||||
## 1.0.49
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.11
|
|
||||||
- jazz-tools@0.9.11
|
|
||||||
|
|
||||||
## 1.0.48
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [f76274c]
|
|
||||||
- Updated dependencies [5e83864]
|
|
||||||
- jazz-react-native@0.9.10
|
|
||||||
- jazz-tools@0.9.10
|
|
||||||
|
|
||||||
## 1.0.47
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [8eb9247]
|
|
||||||
- jazz-tools@0.9.9
|
|
||||||
- jazz-react-native@0.9.9
|
|
||||||
|
|
||||||
## 1.0.46
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [d1d773b]
|
|
||||||
- jazz-tools@0.9.8
|
|
||||||
- jazz-react-native@0.9.8
|
|
||||||
|
|
||||||
## 1.0.45
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [8a390d2]
|
|
||||||
- jazz-react-native@0.9.6
|
|
||||||
|
|
||||||
## 1.0.44
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [c871912]
|
|
||||||
- jazz-react-native@0.9.5
|
|
||||||
|
|
||||||
## 1.0.43
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.9.4
|
|
||||||
|
|
||||||
## 1.0.42
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [7cd691f]
|
|
||||||
- jazz-react-native@0.9.3
|
|
||||||
|
|
||||||
## 1.0.41
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [80fd3e9]
|
|
||||||
- jazz-react-native@0.9.2
|
|
||||||
|
|
||||||
## 1.0.40
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [1b71969]
|
|
||||||
- jazz-tools@0.9.1
|
|
||||||
- jazz-react-native@0.9.1
|
|
||||||
|
|
||||||
## 1.0.39
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [1da4d55]
|
|
||||||
- Updated dependencies [8eda792]
|
|
||||||
- Updated dependencies [1e5e3a1]
|
|
||||||
- jazz-react-native@0.9.0
|
|
||||||
- jazz-tools@0.9.0
|
|
||||||
|
|
||||||
## 1.0.38
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [dc62b95]
|
|
||||||
- Updated dependencies [1de26f8]
|
|
||||||
- jazz-tools@0.8.51
|
|
||||||
- jazz-react-native@0.8.51
|
|
||||||
|
|
||||||
## 1.0.37
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.50
|
|
||||||
- jazz-tools@0.8.50
|
|
||||||
|
|
||||||
## 1.0.36
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.49
|
|
||||||
- jazz-tools@0.8.49
|
|
||||||
|
|
||||||
## 1.0.35
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [635e824]
|
|
||||||
- Updated dependencies [0a85982]
|
|
||||||
- jazz-tools@0.8.48
|
|
||||||
- jazz-react-native@0.8.48
|
|
||||||
|
|
||||||
## 1.0.34
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [33ef9c4]
|
|
||||||
- jazz-react-native@0.8.47
|
|
||||||
|
|
||||||
## 1.0.33
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [ab4ffbd]
|
|
||||||
- jazz-react-native@0.8.46
|
|
||||||
|
|
||||||
## 1.0.32
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [7701307]
|
|
||||||
- Updated dependencies [fa41f8e]
|
|
||||||
- Updated dependencies [88d7d9a]
|
|
||||||
- Updated dependencies [60e35ea]
|
|
||||||
- jazz-react-native@0.8.45
|
|
||||||
- jazz-tools@0.8.45
|
|
||||||
|
|
||||||
## 1.0.31
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.44
|
|
||||||
- jazz-tools@0.8.44
|
|
||||||
|
|
||||||
## 1.0.30
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.41
|
|
||||||
- jazz-tools@0.8.41
|
|
||||||
|
|
||||||
## 1.0.29
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [0c6b0f3]
|
|
||||||
- Updated dependencies [249eecb]
|
|
||||||
- jazz-react-native@0.8.39
|
|
||||||
- jazz-tools@0.8.39
|
|
||||||
|
|
||||||
## 1.0.28
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.38
|
|
||||||
- jazz-tools@0.8.38
|
|
||||||
|
|
||||||
## 1.0.27
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.37
|
|
||||||
- jazz-tools@0.8.37
|
|
||||||
|
|
||||||
## 1.0.26
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [c84764a]
|
|
||||||
- Updated dependencies [441fe27]
|
|
||||||
- jazz-react-native@0.8.36
|
|
||||||
- jazz-tools@0.8.36
|
|
||||||
|
|
||||||
## 1.0.25
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [8b87117]
|
|
||||||
- jazz-tools@0.8.35
|
|
||||||
- jazz-react-native@0.8.35
|
|
||||||
|
|
||||||
## 1.0.24
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.34
|
|
||||||
- jazz-tools@0.8.34
|
|
||||||
|
|
||||||
## 1.0.23
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [df42b2b]
|
|
||||||
- jazz-tools@0.8.32
|
|
||||||
- jazz-react-native@0.8.32
|
|
||||||
|
|
||||||
## 1.0.22
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.31
|
|
||||||
- jazz-tools@0.8.31
|
|
||||||
|
|
||||||
## 1.0.21
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.30
|
|
||||||
- jazz-tools@0.8.30
|
|
||||||
|
|
||||||
## 1.0.20
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.29
|
|
||||||
- jazz-tools@0.8.29
|
|
||||||
|
|
||||||
## 1.0.19
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.28
|
|
||||||
- jazz-tools@0.8.28
|
|
||||||
|
|
||||||
## 1.0.18
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.27
|
|
||||||
- jazz-tools@0.8.27
|
|
||||||
|
|
||||||
## 1.0.17
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [d348c2d]
|
|
||||||
- Updated dependencies [6902b5b]
|
|
||||||
- Updated dependencies [1a0cd3d]
|
|
||||||
- jazz-tools@0.8.23
|
|
||||||
- jazz-react-native@0.8.23
|
|
||||||
|
|
||||||
## 1.0.16
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [149ca97]
|
|
||||||
- jazz-tools@0.8.21
|
|
||||||
- jazz-react-native@0.8.21
|
|
||||||
|
|
||||||
## 1.0.15
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [3ef3ff3]
|
|
||||||
- jazz-react-native@0.8.20
|
|
||||||
|
|
||||||
## 1.0.14
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.19
|
|
||||||
- jazz-tools@0.8.19
|
|
||||||
|
|
||||||
## 1.0.13
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.18
|
|
||||||
- jazz-tools@0.8.18
|
|
||||||
|
|
||||||
## 1.0.12
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.17
|
|
||||||
- jazz-tools@0.8.17
|
|
||||||
|
|
||||||
## 1.0.11
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.16
|
|
||||||
- jazz-tools@0.8.16
|
|
||||||
|
|
||||||
## 1.0.10
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [cce679b]
|
|
||||||
- jazz-tools@0.8.15
|
|
||||||
- jazz-react-native@0.8.15
|
|
||||||
|
|
||||||
## 1.0.9
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [36273b3]
|
|
||||||
- jazz-tools@0.8.14
|
|
||||||
- jazz-react-native@0.8.14
|
|
||||||
|
|
||||||
## 1.0.8
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [fd011d7]
|
|
||||||
- jazz-tools@0.8.13
|
|
||||||
- jazz-react-native@0.8.13
|
|
||||||
|
|
||||||
## 1.0.7
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.12
|
|
||||||
- jazz-tools@0.8.12
|
|
||||||
|
|
||||||
## 1.0.6
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.11
|
|
||||||
- jazz-tools@0.8.11
|
|
||||||
|
|
||||||
## 1.0.5
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- b7639cf: feat(react-native): replaced react-native-mmkv with expo-secure-store and initialize it by default as kvStore in createJazzRNApp() (BREAKING)
|
|
||||||
- Updated dependencies [b7639cf]
|
|
||||||
- jazz-react-native@0.8.8
|
|
||||||
|
|
||||||
## 1.0.4
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [32b05b6]
|
|
||||||
- jazz-react-native@0.8.7
|
|
||||||
|
|
||||||
## 1.0.3
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- jazz-react-native@0.8.6
|
|
||||||
|
|
||||||
## 1.0.2
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies [c3f4e6b]
|
|
||||||
- Updated dependencies [d9152ed]
|
|
||||||
- jazz-react-native@0.8.5
|
|
||||||
- jazz-tools@0.8.5
|
|
||||||
|
|
||||||
## 1.0.1
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- Updated dependencies
|
|
||||||
- jazz-react-native@0.8.3
|
|
||||||
- jazz-tools@0.8.3
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# 🎷 Jazz + Expo + `react-navigation` + Demo Auth
|
|
||||||
|
|
||||||
## 🚀 How to Run
|
|
||||||
|
|
||||||
### 1. Inside the Workspace Root
|
|
||||||
|
|
||||||
First, install dependencies and build the project:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pnpm i
|
|
||||||
pnpm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Inside the `examples/chat-rn-expo` Directory
|
|
||||||
|
|
||||||
Next, navigate to the specific example project and run the following commands:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pnpm expo prebuild
|
|
||||||
pnpx pod-install
|
|
||||||
pnpm expo run:ios
|
|
||||||
```
|
|
||||||
|
|
||||||
This will set up and launch the app on iOS. For Android, you can replace the last command with `pnpm expo run:android`.
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
{
|
|
||||||
"expo": {
|
|
||||||
"name": "jazz-chat-rn-expo",
|
|
||||||
"scheme": "jazz-chat-rn-expo",
|
|
||||||
"slug": "jazz-chat-rn-expo",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"orientation": "portrait",
|
|
||||||
"icon": "./assets/icon.png",
|
|
||||||
"userInterfaceStyle": "light",
|
|
||||||
"splash": {
|
|
||||||
"image": "./assets/splash.png",
|
|
||||||
"resizeMode": "contain",
|
|
||||||
"backgroundColor": "#ffffff"
|
|
||||||
},
|
|
||||||
"ios": {
|
|
||||||
"supportsTablet": true,
|
|
||||||
"bundleIdentifier": "com.jazz.chatrn"
|
|
||||||
},
|
|
||||||
"android": {
|
|
||||||
"adaptiveIcon": {
|
|
||||||
"foregroundImage": "./assets/adaptive-icon.png",
|
|
||||||
"backgroundColor": "#ffffff"
|
|
||||||
},
|
|
||||||
"package": "com.jazz.chatrn"
|
|
||||||
},
|
|
||||||
"plugins": ["expo-secure-store", "expo-sqlite", "expo-build-properties"],
|
|
||||||
"extra": {
|
|
||||||
"eas": {
|
|
||||||
"projectId": "e0e61872-1906-4c84-b9d8-9be77355cad0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"owner": "paxx"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
module.exports = function (api) {
|
|
||||||
api.cache(true);
|
|
||||||
return {
|
|
||||||
presets: [
|
|
||||||
["babel-preset-expo", { jsxImportSource: "nativewind" }],
|
|
||||||
"nativewind/babel",
|
|
||||||
],
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
// Learn more https://docs.expo.dev/guides/monorepos
|
|
||||||
const { getDefaultConfig } = require("expo/metro-config");
|
|
||||||
const { withNativeWind } = require("nativewind/metro");
|
|
||||||
const { FileStore } = require("metro-cache");
|
|
||||||
const path = require("path");
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
const projectRoot = __dirname;
|
|
||||||
const workspaceRoot = path.resolve(projectRoot, "../..");
|
|
||||||
|
|
||||||
const config = getDefaultConfig(projectRoot, { isCSSEnabled: true });
|
|
||||||
|
|
||||||
// Since we are using pnpm, we have to setup the monorepo manually for Metro
|
|
||||||
// #1 - Watch all files in the monorepo
|
|
||||||
config.watchFolders = [workspaceRoot];
|
|
||||||
// #2 - Try resolving with project modules first, then workspace modules
|
|
||||||
config.resolver.nodeModulesPaths = [
|
|
||||||
path.resolve(projectRoot, "node_modules"),
|
|
||||||
path.resolve(workspaceRoot, "node_modules"),
|
|
||||||
];
|
|
||||||
config.resolver.sourceExts = ["mjs", "js", "json", "ts", "tsx"];
|
|
||||||
config.resolver.requireCycleIgnorePatterns = [
|
|
||||||
/(^|\/|\\)node_modules($|\/|\\)/,
|
|
||||||
/(^|\/|\\)packages($|\/|\\)/,
|
|
||||||
];
|
|
||||||
|
|
||||||
// Use turborepo to restore the cache when possible
|
|
||||||
config.cacheStores = [
|
|
||||||
new FileStore({
|
|
||||||
root: path.join(projectRoot, "node_modules", ".cache", "metro"),
|
|
||||||
}),
|
|
||||||
];
|
|
||||||
|
|
||||||
// module.exports = config;
|
|
||||||
module.exports = withNativeWind(config, { input: "./global.css" });
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "chat-rn-expo",
|
|
||||||
"version": "1.0.93",
|
|
||||||
"main": "index.js",
|
|
||||||
"scripts": {
|
|
||||||
"build": "expo export -p ios",
|
|
||||||
"start": "expo start",
|
|
||||||
"format-and-lint": "biome check .",
|
|
||||||
"format-and-lint:fix": "biome check . --write",
|
|
||||||
"android": "expo run:android",
|
|
||||||
"ios": "expo prebuild && pnpx pod-install && expo run:ios",
|
|
||||||
"web": "expo start --web"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@azure/core-asynciterator-polyfill": "^1.0.2",
|
|
||||||
"@bacons/text-decoder": "0.0.0",
|
|
||||||
"@craftzdog/react-native-buffer": "6.0.5",
|
|
||||||
"@react-native-community/netinfo": "11.4.1",
|
|
||||||
"@react-navigation/native": "7.0.19",
|
|
||||||
"@react-navigation/native-stack": "7.2.1",
|
|
||||||
"clsx": "^2.0.0",
|
|
||||||
"expo": "52.0.42",
|
|
||||||
"expo-build-properties": "~0.13.1",
|
|
||||||
"expo-clipboard": "~7.0.0",
|
|
||||||
"expo-constants": "~17.0.8",
|
|
||||||
"expo-dev-client": "~5.0.16",
|
|
||||||
"expo-linking": "~7.0.5",
|
|
||||||
"expo-secure-store": "~14.0.0",
|
|
||||||
"expo-sqlite": "15.1.3",
|
|
||||||
"expo-status-bar": "~2.0.1",
|
|
||||||
"expo-web-browser": "~14.0.1",
|
|
||||||
"jazz-expo": "workspace:*",
|
|
||||||
"jazz-tools": "workspace:*",
|
|
||||||
"nativewind": "^4.1.21",
|
|
||||||
"react": "18.3.1",
|
|
||||||
"react-dom": "18.3.1",
|
|
||||||
"react-native": "0.76.7",
|
|
||||||
"react-native-get-random-values": "^1.11.0",
|
|
||||||
"react-native-safe-area-context": "4.12.0",
|
|
||||||
"react-native-screens": "4.4.0",
|
|
||||||
"react-native-url-polyfill": "^2.0.0",
|
|
||||||
"readable-stream": "4.7.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/core": "^7.25.2",
|
|
||||||
"@types/react": "~18.3.12",
|
|
||||||
"tailwindcss": "^3.4.17",
|
|
||||||
"typescript": "5.6.2"
|
|
||||||
},
|
|
||||||
"private": true
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
/* eslint-disable import/order */
|
|
||||||
|
|
||||||
// @ts-expect-error - @types/react-native doesn't cover this file
|
|
||||||
import { polyfillGlobal } from "react-native/Libraries/Utilities/PolyfillFunctions";
|
|
||||||
|
|
||||||
import { Buffer } from "@craftzdog/react-native-buffer";
|
|
||||||
polyfillGlobal("Buffer", () => Buffer);
|
|
||||||
|
|
||||||
// @ts-expect-error - @types/readable-stream doesn't have ReadableStream type
|
|
||||||
import { ReadableStream } from "readable-stream";
|
|
||||||
polyfillGlobal("ReadableStream", () => ReadableStream);
|
|
||||||
|
|
||||||
import "@azure/core-asynciterator-polyfill";
|
|
||||||
|
|
||||||
import "@bacons/text-decoder/install";
|
|
||||||
|
|
||||||
import "react-native-get-random-values";
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
import "../global.css";
|
|
||||||
|
|
||||||
import {
|
|
||||||
NavigationContainer,
|
|
||||||
useNavigationContainerRef,
|
|
||||||
} from "@react-navigation/native";
|
|
||||||
import { createNativeStackNavigator } from "@react-navigation/native-stack";
|
|
||||||
import * as Linking from "expo-linking";
|
|
||||||
import React, { StrictMode, useEffect, useState } from "react";
|
|
||||||
import HandleInviteScreen from "./invite";
|
|
||||||
|
|
||||||
import { JazzProvider } from "jazz-expo";
|
|
||||||
import { apiKey } from "./apiKey";
|
|
||||||
import ChatScreen from "./chat";
|
|
||||||
|
|
||||||
const Stack = createNativeStackNavigator();
|
|
||||||
|
|
||||||
const prefix = Linking.createURL("/");
|
|
||||||
|
|
||||||
const linking = {
|
|
||||||
prefixes: [prefix],
|
|
||||||
config: {
|
|
||||||
screens: {
|
|
||||||
HandleInviteScreen: {
|
|
||||||
path: "router/invite/:valueHint?/:valueID/:inviteSecret",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
function App() {
|
|
||||||
const [initialRoute, setInitialRoute] = useState<
|
|
||||||
"ChatScreen" | "HandleInviteScreen"
|
|
||||||
>("ChatScreen");
|
|
||||||
const navigationRef = useNavigationContainerRef();
|
|
||||||
useEffect(() => {
|
|
||||||
Linking.getInitialURL().then((url) => {
|
|
||||||
if (url) {
|
|
||||||
if (url && url.includes("invite")) {
|
|
||||||
setInitialRoute("HandleInviteScreen");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<StrictMode>
|
|
||||||
<JazzProvider
|
|
||||||
sync={{
|
|
||||||
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<NavigationContainer linking={linking} ref={navigationRef}>
|
|
||||||
<Stack.Navigator initialRouteName={initialRoute}>
|
|
||||||
<Stack.Screen
|
|
||||||
options={{ title: "Jazz Chat" }}
|
|
||||||
name="ChatScreen"
|
|
||||||
// @ts-ignore
|
|
||||||
component={ChatScreen}
|
|
||||||
/>
|
|
||||||
<Stack.Screen
|
|
||||||
name="HandleInviteScreen"
|
|
||||||
component={HandleInviteScreen}
|
|
||||||
/>
|
|
||||||
</Stack.Navigator>
|
|
||||||
</NavigationContainer>
|
|
||||||
</JazzProvider>
|
|
||||||
</StrictMode>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default App;
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export const apiKey = "chat-rn-expo-example-jazz@garden.co";
|
|
||||||
@@ -1,213 +0,0 @@
|
|||||||
import clsx from "clsx";
|
|
||||||
import * as Clipboard from "expo-clipboard";
|
|
||||||
import { Group, ID, Profile } from "jazz-tools";
|
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import React, {
|
|
||||||
Button,
|
|
||||||
FlatList,
|
|
||||||
KeyboardAvoidingView,
|
|
||||||
SafeAreaView,
|
|
||||||
Text,
|
|
||||||
TextInput,
|
|
||||||
TouchableOpacity,
|
|
||||||
View,
|
|
||||||
Alert,
|
|
||||||
} from "react-native";
|
|
||||||
|
|
||||||
import { useAccount, useCoState } from "jazz-expo";
|
|
||||||
import { Chat, Message } from "./schema";
|
|
||||||
|
|
||||||
export default function ChatScreen({ navigation }: { navigation: any }) {
|
|
||||||
const { me, logOut } = useAccount();
|
|
||||||
const [chatId, setChatId] = useState<ID<Chat>>();
|
|
||||||
const loadedChat = useCoState(Chat, chatId, { resolve: { $each: true } });
|
|
||||||
const [message, setMessage] = useState("");
|
|
||||||
const profile = useCoState(Profile, me._refs.profile?.id, {});
|
|
||||||
|
|
||||||
function handleLogOut() {
|
|
||||||
setChatId(undefined);
|
|
||||||
logOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
navigation.setOptions({
|
|
||||||
headerRight: () => <Button onPress={handleLogOut} title="Logout" />,
|
|
||||||
headerLeft: () =>
|
|
||||||
loadedChat ? (
|
|
||||||
<Button
|
|
||||||
onPress={() => {
|
|
||||||
if (loadedChat?.id) {
|
|
||||||
Clipboard.setStringAsync(
|
|
||||||
`https://chat.jazz.tools/#/chat/${loadedChat.id}`,
|
|
||||||
);
|
|
||||||
Alert.alert("Copied to clipboard", `Chat ID: ${loadedChat.id}`);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
title="Share"
|
|
||||||
/>
|
|
||||||
) : null,
|
|
||||||
});
|
|
||||||
}, [navigation, loadedChat]);
|
|
||||||
|
|
||||||
const createChat = () => {
|
|
||||||
const group = Group.create({ owner: me });
|
|
||||||
group.addMember("everyone", "writer");
|
|
||||||
const chat = Chat.create([], { owner: group });
|
|
||||||
setChatId(chat.id);
|
|
||||||
};
|
|
||||||
|
|
||||||
const joinChat = () => {
|
|
||||||
Alert.prompt(
|
|
||||||
"Join Chat",
|
|
||||||
"Enter the Chat ID (example: co_zBGEHYvRfGuT2YSBraY3njGjnde)",
|
|
||||||
[
|
|
||||||
{
|
|
||||||
text: "Cancel",
|
|
||||||
style: "cancel",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "Join",
|
|
||||||
onPress: (chatId) => {
|
|
||||||
if (chatId) {
|
|
||||||
setChatId(chatId as ID<Chat>);
|
|
||||||
} else {
|
|
||||||
Alert.alert("Error", "Chat ID cannot be empty.");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"plain-text",
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const sendMessage = () => {
|
|
||||||
if (!loadedChat) return;
|
|
||||||
if (message.trim()) {
|
|
||||||
loadedChat.push(
|
|
||||||
Message.create({ text: message }, { owner: loadedChat?._owner }),
|
|
||||||
);
|
|
||||||
setMessage("");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const renderMessageItem = ({ item }: { item: Message }) => {
|
|
||||||
const isMe = item._edits?.text?.by?.isMe;
|
|
||||||
return (
|
|
||||||
<View
|
|
||||||
className={clsx(
|
|
||||||
`rounded-lg p-1 px-1.5 max-w-[80%] `,
|
|
||||||
|
|
||||||
isMe ? `bg-gray-200 self-end text-right` : `bg-gray-300 self-start `,
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{!isMe ? (
|
|
||||||
<Text
|
|
||||||
className={clsx(
|
|
||||||
`text-xs text-gray-500`,
|
|
||||||
isMe ? "text-right" : "text-left",
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{item?._edits?.text?.by?.profile?.name}
|
|
||||||
</Text>
|
|
||||||
) : null}
|
|
||||||
<View
|
|
||||||
className={clsx(
|
|
||||||
"flex relative items-end justify-between",
|
|
||||||
isMe ? "flex-row" : "flex-row",
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<Text className={clsx(`text-black text-md max-w-[85%]`)}>
|
|
||||||
{item.text}
|
|
||||||
</Text>
|
|
||||||
<Text
|
|
||||||
className={clsx(
|
|
||||||
"text-[10px] text-gray-500 text-right ml-2",
|
|
||||||
!isMe ? "mt-2" : "mt-1",
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{item?._edits?.text?.madeAt?.getHours().toString().padStart(2, "0")}
|
|
||||||
:
|
|
||||||
{item?._edits?.text?.madeAt
|
|
||||||
?.getMinutes()
|
|
||||||
.toString()
|
|
||||||
.padStart(2, "0")}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<View className="flex flex-col h-full">
|
|
||||||
{!loadedChat ? (
|
|
||||||
<View className="flex flex-col h-full items-center justify-center">
|
|
||||||
<Text className="text-m font-bold mb-6">Username</Text>
|
|
||||||
<TextInput
|
|
||||||
className="rounded h-12 p-2 mb-12 w-40 border border-gray-200 block"
|
|
||||||
value={profile?.name ?? ""}
|
|
||||||
onChangeText={(value) => {
|
|
||||||
if (profile) {
|
|
||||||
profile.name = value;
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
textAlignVertical="center"
|
|
||||||
onSubmitEditing={sendMessage}
|
|
||||||
testID="username-input"
|
|
||||||
/>
|
|
||||||
<TouchableOpacity
|
|
||||||
onPress={createChat}
|
|
||||||
className="bg-blue-500 p-4 rounded-md"
|
|
||||||
>
|
|
||||||
<Text className="text-white font-semibold">Start new chat</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
<TouchableOpacity
|
|
||||||
onPress={joinChat}
|
|
||||||
className="bg-green-500 p-4 rounded-md mt-4"
|
|
||||||
>
|
|
||||||
<Text className="text-white font-semibold">Join chat</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
</View>
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
<FlatList
|
|
||||||
contentContainerStyle={{
|
|
||||||
flexGrow: 1,
|
|
||||||
flex: 1,
|
|
||||||
gap: 6,
|
|
||||||
padding: 8,
|
|
||||||
}}
|
|
||||||
className="flex"
|
|
||||||
data={loadedChat}
|
|
||||||
keyExtractor={(item) => item.id}
|
|
||||||
renderItem={renderMessageItem}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<KeyboardAvoidingView
|
|
||||||
keyboardVerticalOffset={110}
|
|
||||||
behavior="padding"
|
|
||||||
className="p-3 bg-white border-t border-gray-300"
|
|
||||||
>
|
|
||||||
<SafeAreaView className="flex flex-row items-center gap-2">
|
|
||||||
<TextInput
|
|
||||||
className="rounded-full h-8 py-0 px-2 border border-gray-200 block flex-1"
|
|
||||||
value={message}
|
|
||||||
onChangeText={setMessage}
|
|
||||||
placeholder="Type a message..."
|
|
||||||
textAlignVertical="center"
|
|
||||||
onSubmitEditing={sendMessage}
|
|
||||||
testID="message-input"
|
|
||||||
/>
|
|
||||||
<TouchableOpacity
|
|
||||||
onPress={sendMessage}
|
|
||||||
className="bg-gray-300 text-white rounded-full h-8 w-8 items-center justify-center"
|
|
||||||
testID="send-button"
|
|
||||||
>
|
|
||||||
<Text>↑</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
</SafeAreaView>
|
|
||||||
</KeyboardAvoidingView>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
import { useAcceptInvite } from "jazz-expo";
|
|
||||||
import React, { Text } from "react-native";
|
|
||||||
import { Chat } from "./schema";
|
|
||||||
|
|
||||||
export default function HandleInviteScreen({
|
|
||||||
navigation,
|
|
||||||
}: {
|
|
||||||
navigation: any;
|
|
||||||
}) {
|
|
||||||
useAcceptInvite({
|
|
||||||
invitedObjectSchema: Chat,
|
|
||||||
onAccept: async (chatId) => {
|
|
||||||
navigation.navigate("ChatScreen", { chatId });
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return <Text>Accepting invite...</Text>;
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import { CoList, CoMap, co } from "jazz-tools";
|
|
||||||
|
|
||||||
export class Message extends CoMap {
|
|
||||||
text = co.string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class Chat extends CoList.Of(co.ref(Message)) {}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# this sub-flow exists to work around an ios issue where the text field is not
|
|
||||||
# fully erased. The tap into the input field hits the middle, and clears all
|
|
||||||
# text to the left. If there's more to the right, it slides left, and thus we
|
|
||||||
# repeat this step. https://maestro.mobile.dev/api-reference/commands/erasetext
|
|
||||||
appId: com.jazz.chatrn
|
|
||||||
---
|
|
||||||
- copyTextFrom:
|
|
||||||
id: ${id}
|
|
||||||
- repeat:
|
|
||||||
times: 4
|
|
||||||
commands:
|
|
||||||
- tapOn:
|
|
||||||
id: ${id}
|
|
||||||
- eraseText
|
|
||||||
- copyTextFrom:
|
|
||||||
id: ${id}
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
appId: com.jazz.chatrn
|
|
||||||
---
|
|
||||||
- launchApp
|
|
||||||
|
|
||||||
# # handle Expo screens (for local dev)
|
|
||||||
# - assertVisible: "Continue"
|
|
||||||
# - tapOn: "Continue"
|
|
||||||
# - assertVisible: "Reload"
|
|
||||||
# - tapOn: "Reload"
|
|
||||||
|
|
||||||
# login
|
|
||||||
- assertVisible: "Anonymous user"
|
|
||||||
- runFlow:
|
|
||||||
label: "Erase existing username"
|
|
||||||
file: erase_text.yml
|
|
||||||
env:
|
|
||||||
id: "username-input"
|
|
||||||
- inputText: "boorad"
|
|
||||||
- assertVisible: "boorad"
|
|
||||||
|
|
||||||
# start new chat
|
|
||||||
- tapOn: "Start new chat"
|
|
||||||
- assertVisible: "Share"
|
|
||||||
- assertVisible: "Jazz Chat"
|
|
||||||
- assertVisible: "Logout"
|
|
||||||
|
|
||||||
# send a message
|
|
||||||
- tapOn:
|
|
||||||
id: "message-input"
|
|
||||||
- inputText: "bro, low key, it do be like that tho"
|
|
||||||
- tapOn:
|
|
||||||
id: "send-button"
|
|
||||||
- assertVisible: "bro, low key, it do be like that tho"
|
|
||||||
|
|
||||||
# get invite code
|
|
||||||
- tapOn: "Share"
|
|
||||||
- assertVisible: "Copied to clipboard"
|
|
||||||
- tapOn: "OK"
|
|
||||||
# this assert doesn't work. maestro.copiedText only populates from `copyTextFrom`
|
|
||||||
# - assertTrue: ${maestro.copiedText.startsWith("co_z")}
|
|
||||||
|
|
||||||
# logout
|
|
||||||
- tapOn: "Logout"
|
|
||||||
- assertVisible: "Anonymous user"
|
|
||||||
# This doesn't work on CI, maybe because Android has a different alert dialog
|
|
||||||
# - tapOn: "Join chat"
|
|
||||||
# - inputText: "co_zFs6KFyhxPw4xtw83tcEMzeHUNv" # Use a static id because maestro doesn't have access to the system clipboard
|
|
||||||
# - pressKey: "enter"
|
|
||||||
# - assertVisible: "boorad"
|
|
||||||
# - assertVisible: "bro, low key, it do be like that tho"
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# This script is necessary, because unlike ios, the android emulator action
|
|
||||||
# accepts a script, runs it as your tests, then terminates.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# build and install the app
|
|
||||||
echo "Building and installing Android app."
|
|
||||||
echo "If it fails, its output will be in artifact: android-install.log..."
|
|
||||||
cd ./android/
|
|
||||||
./gradlew installRelease >> ~/output/android-install.log 2>&1
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
# run the e2e tests
|
|
||||||
export PATH="$PATH":"$HOME/.maestro/bin"
|
|
||||||
export MAESTRO_DRIVER_STARTUP_TIMEOUT=300000 # setting to 5 mins 👀
|
|
||||||
export MAESTRO_CLI_NO_ANALYTICS=1
|
|
||||||
export MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED=true
|
|
||||||
maestro test test/e2e/flow.yml
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
BUNDLE_PATH: "vendor/bundle"
|
|
||||||
BUNDLE_FORCE_RUBY_PLATFORM: 1
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
extends: ["@react-native", "plugin:prettier/recommended"],
|
|
||||||
plugins: ["prettier"],
|
|
||||||
};
|
|
||||||
97
examples/chat-rn/.gitignore
vendored
@@ -1,75 +1,38 @@
|
|||||||
# OSX
|
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
|
||||||
#
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
# Xcode
|
# dependencies
|
||||||
#
|
|
||||||
build/
|
|
||||||
*.pbxuser
|
|
||||||
!default.pbxuser
|
|
||||||
*.mode1v3
|
|
||||||
!default.mode1v3
|
|
||||||
*.mode2v3
|
|
||||||
!default.mode2v3
|
|
||||||
*.perspectivev3
|
|
||||||
!default.perspectivev3
|
|
||||||
xcuserdata
|
|
||||||
*.xccheckout
|
|
||||||
*.moved-aside
|
|
||||||
DerivedData
|
|
||||||
*.hmap
|
|
||||||
*.ipa
|
|
||||||
*.xcuserstate
|
|
||||||
**/.xcode.env.local
|
|
||||||
|
|
||||||
# Android/IntelliJ
|
|
||||||
#
|
|
||||||
build/
|
|
||||||
.idea
|
|
||||||
.gradle
|
|
||||||
local.properties
|
|
||||||
*.iml
|
|
||||||
*.hprof
|
|
||||||
.cxx/
|
|
||||||
*.keystore
|
|
||||||
!debug.keystore
|
|
||||||
.kotlin/
|
|
||||||
|
|
||||||
# node.js
|
|
||||||
#
|
|
||||||
node_modules/
|
node_modules/
|
||||||
npm-debug.log
|
|
||||||
yarn-error.log
|
|
||||||
|
|
||||||
# fastlane
|
# Expo
|
||||||
#
|
.expo/
|
||||||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
dist/
|
||||||
# screenshots whenever they are needed.
|
web-build/
|
||||||
# For more information about the recommended setup visit:
|
|
||||||
# https://docs.fastlane.tools/best-practices/source-control/
|
|
||||||
|
|
||||||
**/fastlane/report.xml
|
# Native
|
||||||
**/fastlane/Preview.html
|
*.orig.*
|
||||||
**/fastlane/screenshots
|
*.jks
|
||||||
**/fastlane/test_output
|
*.p8
|
||||||
|
*.p12
|
||||||
|
*.key
|
||||||
|
*.mobileprovision
|
||||||
|
|
||||||
# Bundle artifact
|
# Metro
|
||||||
*.jsbundle
|
|
||||||
|
|
||||||
# Ruby / CocoaPods
|
|
||||||
**/Pods/
|
|
||||||
/vendor/bundle/
|
|
||||||
|
|
||||||
# Temporary files created by Metro to check the health of the file watcher
|
|
||||||
.metro-health-check*
|
.metro-health-check*
|
||||||
|
|
||||||
# testing
|
# debug
|
||||||
/coverage
|
npm-debug.*
|
||||||
|
yarn-debug.*
|
||||||
|
yarn-error.*
|
||||||
|
|
||||||
# Yarn
|
# macOS
|
||||||
.yarn/*
|
.DS_Store
|
||||||
!.yarn/patches
|
*.pem
|
||||||
!.yarn/plugins
|
|
||||||
!.yarn/releases
|
# local env files
|
||||||
!.yarn/sdks
|
.env*.local
|
||||||
!.yarn/versions
|
|
||||||
|
# typescript
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
ios
|
||||||
|
android
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
ios
|
|
||||||
android
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
arrowParens: "avoid",
|
|
||||||
bracketSameLine: true,
|
|
||||||
bracketSpacing: true,
|
|
||||||
singleQuote: false,
|
|
||||||
trailingComma: "all",
|
|
||||||
};
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1,137 +1,368 @@
|
|||||||
# chat-rn
|
# chat-rn
|
||||||
|
|
||||||
## 1.0.101
|
## 1.0.48
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [5c2c7d4]
|
- Updated dependencies [f76274c]
|
||||||
- cojson@0.13.14
|
- Updated dependencies [5e83864]
|
||||||
- cojson-transport-ws@0.13.14
|
- jazz-react-native@0.9.10
|
||||||
- jazz-react-native@0.13.14
|
- jazz-tools@0.9.10
|
||||||
- jazz-tools@0.13.14
|
|
||||||
|
|
||||||
## 1.0.100
|
## 1.0.47
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [ec9cb40]
|
- Updated dependencies [8eb9247]
|
||||||
- cojson@0.13.13
|
- jazz-tools@0.9.9
|
||||||
- cojson-transport-ws@0.13.13
|
- jazz-react-native@0.9.9
|
||||||
- jazz-react-native@0.13.13
|
|
||||||
- jazz-tools@0.13.13
|
|
||||||
|
|
||||||
## 1.0.99
|
## 1.0.46
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [4547525]
|
- Updated dependencies [d1d773b]
|
||||||
- Updated dependencies [65719f2]
|
- jazz-tools@0.9.8
|
||||||
- jazz-tools@0.13.12
|
- jazz-react-native@0.9.8
|
||||||
- cojson@0.13.12
|
|
||||||
- jazz-react-native@0.13.12
|
|
||||||
- cojson-transport-ws@0.13.12
|
|
||||||
|
|
||||||
## 1.0.98
|
## 1.0.45
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [17273a6]
|
- Updated dependencies [8a390d2]
|
||||||
- Updated dependencies [3396ed4]
|
- jazz-react-native@0.9.6
|
||||||
- Updated dependencies [17273a6]
|
|
||||||
- Updated dependencies [267ea4c]
|
|
||||||
- cojson@0.13.11
|
|
||||||
- jazz-tools@0.13.11
|
|
||||||
- cojson-transport-ws@0.13.11
|
|
||||||
- jazz-react-native@0.13.11
|
|
||||||
|
|
||||||
## 1.0.97
|
## 1.0.44
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [f837cfe]
|
- Updated dependencies [c871912]
|
||||||
- cojson@0.13.10
|
- jazz-react-native@0.9.5
|
||||||
- cojson-transport-ws@0.13.10
|
|
||||||
- jazz-react-native@0.13.10
|
|
||||||
- jazz-tools@0.13.10
|
|
||||||
|
|
||||||
## 1.0.96
|
## 1.0.43
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [a6cf01f]
|
- jazz-react-native@0.9.4
|
||||||
- jazz-tools@0.13.9
|
|
||||||
- jazz-react-native@0.13.9
|
|
||||||
|
|
||||||
## 1.0.95
|
## 1.0.42
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [bc3d7bb]
|
- Updated dependencies [7cd691f]
|
||||||
- Updated dependencies [4e9aae1]
|
- jazz-react-native@0.9.3
|
||||||
- Updated dependencies [21c935c]
|
|
||||||
- Updated dependencies [aa1c80e]
|
|
||||||
- Updated dependencies [13074be]
|
|
||||||
- jazz-tools@0.13.7
|
|
||||||
- cojson@0.13.7
|
|
||||||
- jazz-react-native@0.13.7
|
|
||||||
- cojson-transport-ws@0.13.7
|
|
||||||
|
|
||||||
## 1.0.94
|
## 1.0.41
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [e090b39]
|
- Updated dependencies [80fd3e9]
|
||||||
- Updated dependencies [fe6f561]
|
- jazz-react-native@0.9.2
|
||||||
- cojson@0.13.5
|
|
||||||
- jazz-tools@0.13.5
|
|
||||||
- cojson-transport-ws@0.13.5
|
|
||||||
- jazz-react-native@0.13.5
|
|
||||||
|
|
||||||
## 1.0.93
|
## 1.0.40
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [3129982]
|
- Updated dependencies [1b71969]
|
||||||
- jazz-tools@0.13.4
|
- jazz-tools@0.9.1
|
||||||
- jazz-react-native@0.13.4
|
- jazz-react-native@0.9.1
|
||||||
|
|
||||||
## 1.0.92
|
## 1.0.39
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [12f8bfa]
|
- Updated dependencies [1da4d55]
|
||||||
- Updated dependencies [b19cab7]
|
- Updated dependencies [8eda792]
|
||||||
- Updated dependencies [bd57177]
|
- Updated dependencies [1e5e3a1]
|
||||||
- jazz-tools@0.13.3
|
- jazz-react-native@0.9.0
|
||||||
- cojson-transport-ws@0.13.3
|
- jazz-tools@0.9.0
|
||||||
- jazz-react-native@0.13.3
|
|
||||||
|
|
||||||
## 1.0.91
|
## 1.0.38
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [c551839]
|
- Updated dependencies [dc62b95]
|
||||||
- cojson@0.13.2
|
- Updated dependencies [1de26f8]
|
||||||
- cojson-transport-ws@0.13.2
|
- jazz-tools@0.8.51
|
||||||
- jazz-react-native@0.13.2
|
- jazz-react-native@0.8.51
|
||||||
- jazz-tools@0.13.2
|
|
||||||
|
|
||||||
## 1.0.90
|
## 1.0.37
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [63a7aa0]
|
- jazz-react-native@0.8.50
|
||||||
- jazz-react-native@0.13.1
|
- jazz-tools@0.8.50
|
||||||
|
|
||||||
## 1.0.89
|
## 1.0.36
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies [a013538]
|
- jazz-react-native@0.8.49
|
||||||
- Updated dependencies [bce3bcc]
|
- jazz-tools@0.8.49
|
||||||
- Updated dependencies [afd1374]
|
|
||||||
- Updated dependencies [bce3bcc]
|
## 1.0.35
|
||||||
- cojson@0.13.0
|
|
||||||
- jazz-react-native@0.13.0
|
### Patch Changes
|
||||||
- jazz-tools@0.13.0
|
|
||||||
- cojson-transport-ws@0.13.0
|
- Updated dependencies [635e824]
|
||||||
|
- Updated dependencies [0a85982]
|
||||||
|
- jazz-tools@0.8.48
|
||||||
|
- jazz-react-native@0.8.48
|
||||||
|
|
||||||
|
## 1.0.34
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [33ef9c4]
|
||||||
|
- jazz-react-native@0.8.47
|
||||||
|
|
||||||
|
## 1.0.33
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [ab4ffbd]
|
||||||
|
- jazz-react-native@0.8.46
|
||||||
|
|
||||||
|
## 1.0.32
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [7701307]
|
||||||
|
- Updated dependencies [fa41f8e]
|
||||||
|
- Updated dependencies [88d7d9a]
|
||||||
|
- Updated dependencies [60e35ea]
|
||||||
|
- jazz-react-native@0.8.45
|
||||||
|
- jazz-tools@0.8.45
|
||||||
|
|
||||||
|
## 1.0.31
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.44
|
||||||
|
- jazz-tools@0.8.44
|
||||||
|
|
||||||
|
## 1.0.30
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.41
|
||||||
|
- jazz-tools@0.8.41
|
||||||
|
|
||||||
|
## 1.0.29
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0c6b0f3]
|
||||||
|
- Updated dependencies [249eecb]
|
||||||
|
- jazz-react-native@0.8.39
|
||||||
|
- jazz-tools@0.8.39
|
||||||
|
|
||||||
|
## 1.0.28
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.38
|
||||||
|
- jazz-tools@0.8.38
|
||||||
|
|
||||||
|
## 1.0.27
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.37
|
||||||
|
- jazz-tools@0.8.37
|
||||||
|
|
||||||
|
## 1.0.26
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [c84764a]
|
||||||
|
- Updated dependencies [441fe27]
|
||||||
|
- jazz-react-native@0.8.36
|
||||||
|
- jazz-tools@0.8.36
|
||||||
|
|
||||||
|
## 1.0.25
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [8b87117]
|
||||||
|
- jazz-tools@0.8.35
|
||||||
|
- jazz-react-native@0.8.35
|
||||||
|
|
||||||
|
## 1.0.24
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.34
|
||||||
|
- jazz-tools@0.8.34
|
||||||
|
|
||||||
|
## 1.0.23
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [df42b2b]
|
||||||
|
- jazz-tools@0.8.32
|
||||||
|
- jazz-react-native@0.8.32
|
||||||
|
|
||||||
|
## 1.0.22
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.31
|
||||||
|
- jazz-tools@0.8.31
|
||||||
|
|
||||||
|
## 1.0.21
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.30
|
||||||
|
- jazz-tools@0.8.30
|
||||||
|
|
||||||
|
## 1.0.20
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.29
|
||||||
|
- jazz-tools@0.8.29
|
||||||
|
|
||||||
|
## 1.0.19
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.28
|
||||||
|
- jazz-tools@0.8.28
|
||||||
|
|
||||||
|
## 1.0.18
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.27
|
||||||
|
- jazz-tools@0.8.27
|
||||||
|
|
||||||
|
## 1.0.17
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [d348c2d]
|
||||||
|
- Updated dependencies [6902b5b]
|
||||||
|
- Updated dependencies [1a0cd3d]
|
||||||
|
- jazz-tools@0.8.23
|
||||||
|
- jazz-react-native@0.8.23
|
||||||
|
|
||||||
|
## 1.0.16
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [149ca97]
|
||||||
|
- jazz-tools@0.8.21
|
||||||
|
- jazz-react-native@0.8.21
|
||||||
|
|
||||||
|
## 1.0.15
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [3ef3ff3]
|
||||||
|
- jazz-react-native@0.8.20
|
||||||
|
|
||||||
|
## 1.0.14
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.19
|
||||||
|
- jazz-tools@0.8.19
|
||||||
|
|
||||||
|
## 1.0.13
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.18
|
||||||
|
- jazz-tools@0.8.18
|
||||||
|
|
||||||
|
## 1.0.12
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.17
|
||||||
|
- jazz-tools@0.8.17
|
||||||
|
|
||||||
|
## 1.0.11
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.16
|
||||||
|
- jazz-tools@0.8.16
|
||||||
|
|
||||||
|
## 1.0.10
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [cce679b]
|
||||||
|
- jazz-tools@0.8.15
|
||||||
|
- jazz-react-native@0.8.15
|
||||||
|
|
||||||
|
## 1.0.9
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [36273b3]
|
||||||
|
- jazz-tools@0.8.14
|
||||||
|
- jazz-react-native@0.8.14
|
||||||
|
|
||||||
|
## 1.0.8
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [fd011d7]
|
||||||
|
- jazz-tools@0.8.13
|
||||||
|
- jazz-react-native@0.8.13
|
||||||
|
|
||||||
|
## 1.0.7
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.12
|
||||||
|
- jazz-tools@0.8.12
|
||||||
|
|
||||||
|
## 1.0.6
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.11
|
||||||
|
- jazz-tools@0.8.11
|
||||||
|
|
||||||
|
## 1.0.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- b7639cf: feat(react-native): replaced react-native-mmkv with expo-secure-store and initialize it by default as kvStore in createJazzRNApp() (BREAKING)
|
||||||
|
- Updated dependencies [b7639cf]
|
||||||
|
- jazz-react-native@0.8.8
|
||||||
|
|
||||||
|
## 1.0.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [32b05b6]
|
||||||
|
- jazz-react-native@0.8.7
|
||||||
|
|
||||||
|
## 1.0.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- jazz-react-native@0.8.6
|
||||||
|
|
||||||
|
## 1.0.2
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [c3f4e6b]
|
||||||
|
- Updated dependencies [d9152ed]
|
||||||
|
- jazz-react-native@0.8.5
|
||||||
|
- jazz-tools@0.8.5
|
||||||
|
|
||||||
|
## 1.0.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies
|
||||||
|
- jazz-react-native@0.8.3
|
||||||
|
- jazz-tools@0.8.3
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
source 'https://rubygems.org'
|
|
||||||
|
|
||||||
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
|
||||||
ruby ">= 2.6.10"
|
|
||||||
|
|
||||||
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
|
|
||||||
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
|
|
||||||
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
|
|
||||||
gem 'xcodeproj', '< 1.26.0'
|
|
||||||
gem 'concurrent-ruby', '< 1.3.4'
|
|
||||||
gem "bigdecimal", "~> 3.1"
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
GEM
|
|
||||||
remote: https://rubygems.org/
|
|
||||||
specs:
|
|
||||||
CFPropertyList (3.0.7)
|
|
||||||
base64
|
|
||||||
nkf
|
|
||||||
rexml
|
|
||||||
activesupport (6.1.7.10)
|
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
||||||
i18n (>= 1.6, < 2)
|
|
||||||
minitest (>= 5.1)
|
|
||||||
tzinfo (~> 2.0)
|
|
||||||
zeitwerk (~> 2.3)
|
|
||||||
addressable (2.8.7)
|
|
||||||
public_suffix (>= 2.0.2, < 7.0)
|
|
||||||
algoliasearch (1.27.5)
|
|
||||||
httpclient (~> 2.8, >= 2.8.3)
|
|
||||||
json (>= 1.5.1)
|
|
||||||
atomos (0.1.3)
|
|
||||||
base64 (0.2.0)
|
|
||||||
bigdecimal (3.1.9)
|
|
||||||
claide (1.1.0)
|
|
||||||
cocoapods (1.15.2)
|
|
||||||
addressable (~> 2.8)
|
|
||||||
claide (>= 1.0.2, < 2.0)
|
|
||||||
cocoapods-core (= 1.15.2)
|
|
||||||
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
|
||||||
cocoapods-downloader (>= 2.1, < 3.0)
|
|
||||||
cocoapods-plugins (>= 1.0.0, < 2.0)
|
|
||||||
cocoapods-search (>= 1.0.0, < 2.0)
|
|
||||||
cocoapods-trunk (>= 1.6.0, < 2.0)
|
|
||||||
cocoapods-try (>= 1.1.0, < 2.0)
|
|
||||||
colored2 (~> 3.1)
|
|
||||||
escape (~> 0.0.4)
|
|
||||||
fourflusher (>= 2.3.0, < 3.0)
|
|
||||||
gh_inspector (~> 1.0)
|
|
||||||
molinillo (~> 0.8.0)
|
|
||||||
nap (~> 1.0)
|
|
||||||
ruby-macho (>= 2.3.0, < 3.0)
|
|
||||||
xcodeproj (>= 1.23.0, < 2.0)
|
|
||||||
cocoapods-core (1.15.2)
|
|
||||||
activesupport (>= 5.0, < 8)
|
|
||||||
addressable (~> 2.8)
|
|
||||||
algoliasearch (~> 1.0)
|
|
||||||
concurrent-ruby (~> 1.1)
|
|
||||||
fuzzy_match (~> 2.0.4)
|
|
||||||
nap (~> 1.0)
|
|
||||||
netrc (~> 0.11)
|
|
||||||
public_suffix (~> 4.0)
|
|
||||||
typhoeus (~> 1.0)
|
|
||||||
cocoapods-deintegrate (1.0.5)
|
|
||||||
cocoapods-downloader (2.1)
|
|
||||||
cocoapods-plugins (1.0.0)
|
|
||||||
nap
|
|
||||||
cocoapods-search (1.0.1)
|
|
||||||
cocoapods-trunk (1.6.0)
|
|
||||||
nap (>= 0.8, < 2.0)
|
|
||||||
netrc (~> 0.11)
|
|
||||||
cocoapods-try (1.2.0)
|
|
||||||
colored2 (3.1.2)
|
|
||||||
concurrent-ruby (1.3.3)
|
|
||||||
escape (0.0.4)
|
|
||||||
ethon (0.16.0)
|
|
||||||
ffi (>= 1.15.0)
|
|
||||||
ffi (1.17.1)
|
|
||||||
fourflusher (2.3.1)
|
|
||||||
fuzzy_match (2.0.4)
|
|
||||||
gh_inspector (1.1.3)
|
|
||||||
httpclient (2.9.0)
|
|
||||||
mutex_m
|
|
||||||
i18n (1.14.7)
|
|
||||||
concurrent-ruby (~> 1.0)
|
|
||||||
json (2.7.6)
|
|
||||||
minitest (5.25.4)
|
|
||||||
molinillo (0.8.0)
|
|
||||||
mutex_m (0.3.0)
|
|
||||||
nanaimo (0.3.0)
|
|
||||||
nap (1.1.0)
|
|
||||||
netrc (0.11.0)
|
|
||||||
nkf (0.2.0)
|
|
||||||
public_suffix (4.0.7)
|
|
||||||
rexml (3.4.1)
|
|
||||||
ruby-macho (2.5.1)
|
|
||||||
typhoeus (1.4.1)
|
|
||||||
ethon (>= 0.9.0)
|
|
||||||
tzinfo (2.0.6)
|
|
||||||
concurrent-ruby (~> 1.0)
|
|
||||||
xcodeproj (1.25.1)
|
|
||||||
CFPropertyList (>= 2.3.3, < 4.0)
|
|
||||||
atomos (~> 0.1.3)
|
|
||||||
claide (>= 1.0.2, < 2.0)
|
|
||||||
colored2 (~> 3.1)
|
|
||||||
nanaimo (~> 0.3.0)
|
|
||||||
rexml (>= 3.3.6, < 4.0)
|
|
||||||
zeitwerk (2.6.18)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
activesupport (>= 6.1.7.5, != 7.1.0)
|
|
||||||
bigdecimal (~> 3.1)
|
|
||||||
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
|
|
||||||
concurrent-ruby (< 1.3.4)
|
|
||||||
xcodeproj (< 1.26.0)
|
|
||||||
|
|
||||||
RUBY VERSION
|
|
||||||
ruby 2.6.10p210
|
|
||||||
|
|
||||||
BUNDLED WITH
|
|
||||||
2.3.25
|
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
# 🎷 Jazz + React Native + Demo Auth
|
# 🎷 Jazz + Expo + `react-navigation` + Demo Auth
|
||||||
|
|
||||||
## 🚀 How to Run
|
## 🚀 How to Run
|
||||||
|
|
||||||
### 1. Inside the Workspace Root
|
### 1. Inside the Workspace Root
|
||||||
|
|
||||||
First, install dependencies for the project:
|
First, install dependencies and build the project:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm i
|
pnpm i
|
||||||
|
pnpm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Inside the `examples/chat-rn` Directory
|
### 2. Inside the `examples/chat-rn` Directory
|
||||||
@@ -15,18 +16,9 @@ pnpm i
|
|||||||
Next, navigate to the specific example project and run the following commands:
|
Next, navigate to the specific example project and run the following commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm pods
|
pnpm expo prebuild
|
||||||
pnpm ios
|
npx pod-install
|
||||||
|
pnpm expo run:ios
|
||||||
```
|
```
|
||||||
|
|
||||||
This will set up and launch the app on iOS. For Android, you can skip `pnpm pods` and replace the last command with `pnpm android`.
|
This will set up and launch the app on iOS. For Android, you can replace the last command with `pnpm expo run:android`.
|
||||||
|
|
||||||
## Creation
|
|
||||||
|
|
||||||
This was created using the following command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pnpx @react-native-community/cli init chat-rn --version 0.76.7 --install-pods true --skip-git-init true --package-name com.chatrn --directory chat-rn
|
|
||||||
```
|
|
||||||
|
|
||||||
Then change package name in `package.json`, and begin build instructions above.
|
|
||||||
|
|||||||
@@ -1,119 +0,0 @@
|
|||||||
apply plugin: "com.android.application"
|
|
||||||
apply plugin: "org.jetbrains.kotlin.android"
|
|
||||||
apply plugin: "com.facebook.react"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the configuration block to customize your React Native Android app.
|
|
||||||
* By default you don't need to apply any configuration, just uncomment the lines you need.
|
|
||||||
*/
|
|
||||||
react {
|
|
||||||
/* Folders */
|
|
||||||
// The root of your project, i.e. where "package.json" lives. Default is '../..'
|
|
||||||
// root = file("../../")
|
|
||||||
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
|
|
||||||
// reactNativeDir = file("../../node_modules/react-native")
|
|
||||||
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
|
|
||||||
// codegenDir = file("../../node_modules/@react-native/codegen")
|
|
||||||
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
|
|
||||||
// cliFile = file("../../node_modules/react-native/cli.js")
|
|
||||||
|
|
||||||
/* Variants */
|
|
||||||
// The list of variants to that are debuggable. For those we're going to
|
|
||||||
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
|
|
||||||
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
|
|
||||||
// debuggableVariants = ["liteDebug", "prodDebug"]
|
|
||||||
|
|
||||||
/* Bundling */
|
|
||||||
// A list containing the node command and its flags. Default is just 'node'.
|
|
||||||
// nodeExecutableAndArgs = ["node"]
|
|
||||||
//
|
|
||||||
// The command to run when bundling. By default is 'bundle'
|
|
||||||
// bundleCommand = "ram-bundle"
|
|
||||||
//
|
|
||||||
// The path to the CLI configuration file. Default is empty.
|
|
||||||
// bundleConfig = file(../rn-cli.config.js)
|
|
||||||
//
|
|
||||||
// The name of the generated asset file containing your JS bundle
|
|
||||||
// bundleAssetName = "MyApplication.android.bundle"
|
|
||||||
//
|
|
||||||
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
|
|
||||||
// entryFile = file("../js/MyApplication.android.js")
|
|
||||||
//
|
|
||||||
// A list of extra flags to pass to the 'bundle' commands.
|
|
||||||
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
|
||||||
// extraPackagerArgs = []
|
|
||||||
|
|
||||||
/* Hermes Commands */
|
|
||||||
// The hermes compiler command to run. By default it is 'hermesc'
|
|
||||||
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
|
|
||||||
//
|
|
||||||
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
|
||||||
// hermesFlags = ["-O", "-output-source-map"]
|
|
||||||
|
|
||||||
/* Autolinking */
|
|
||||||
autolinkLibrariesWithApp()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
|
||||||
*/
|
|
||||||
def enableProguardInReleaseBuilds = false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The preferred build flavor of JavaScriptCore (JSC)
|
|
||||||
*
|
|
||||||
* For example, to use the international variant, you can use:
|
|
||||||
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
|
||||||
*
|
|
||||||
* The international variant includes ICU i18n library and necessary data
|
|
||||||
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
|
||||||
* give correct results when using with locales other than en-US. Note that
|
|
||||||
* this variant is about 6MiB larger per architecture than default.
|
|
||||||
*/
|
|
||||||
def jscFlavor = 'org.webkit:android-jsc:+'
|
|
||||||
|
|
||||||
android {
|
|
||||||
ndkVersion rootProject.ext.ndkVersion
|
|
||||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
|
||||||
compileSdk rootProject.ext.compileSdkVersion
|
|
||||||
|
|
||||||
namespace "com.chatrn"
|
|
||||||
defaultConfig {
|
|
||||||
applicationId "com.chatrn"
|
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
||||||
versionCode 1
|
|
||||||
versionName "1.0"
|
|
||||||
}
|
|
||||||
signingConfigs {
|
|
||||||
debug {
|
|
||||||
storeFile file('debug.keystore')
|
|
||||||
storePassword 'android'
|
|
||||||
keyAlias 'androiddebugkey'
|
|
||||||
keyPassword 'android'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
buildTypes {
|
|
||||||
debug {
|
|
||||||
signingConfig signingConfigs.debug
|
|
||||||
}
|
|
||||||
release {
|
|
||||||
// Caution! In production, you need to generate your own keystore file.
|
|
||||||
// see https://reactnative.dev/docs/signed-apk-android.
|
|
||||||
signingConfig signingConfigs.debug
|
|
||||||
minifyEnabled enableProguardInReleaseBuilds
|
|
||||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
// The version of react-native is set by the React Native Gradle Plugin
|
|
||||||
implementation("com.facebook.react:react-android")
|
|
||||||
|
|
||||||
if (hermesEnabled.toBoolean()) {
|
|
||||||
implementation("com.facebook.react:hermes-android")
|
|
||||||
} else {
|
|
||||||
implementation jscFlavor
|
|
||||||
}
|
|
||||||
}
|
|
||||||
10
examples/chat-rn/android/app/proguard-rules.pro
vendored
@@ -1,10 +0,0 @@
|
|||||||
# Add project specific ProGuard rules here.
|
|
||||||
# By default, the flags in this file are appended to flags specified
|
|
||||||
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
|
|
||||||
# You can edit the include path and order by changing the proguardFiles
|
|
||||||
# directive in build.gradle.
|
|
||||||
#
|
|
||||||
# For more details, see
|
|
||||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
||||||
|
|
||||||
# Add any project specific keep options here:
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
|
|
||||||
<application
|
|
||||||
android:usesCleartextTraffic="true"
|
|
||||||
tools:targetApi="28"
|
|
||||||
tools:ignore="GoogleAppIndexingWarning"/>
|
|
||||||
</manifest>
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
|
|
||||||
<application
|
|
||||||
android:name=".MainApplication"
|
|
||||||
android:label="@string/app_name"
|
|
||||||
android:icon="@mipmap/ic_launcher"
|
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
|
||||||
android:allowBackup="false"
|
|
||||||
android:theme="@style/AppTheme"
|
|
||||||
android:supportsRtl="true">
|
|
||||||
<activity
|
|
||||||
android:name=".MainActivity"
|
|
||||||
android:label="@string/app_name"
|
|
||||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
|
|
||||||
android:launchMode="singleTask"
|
|
||||||
android:windowSoftInputMode="adjustResize"
|
|
||||||
android:exported="true">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
</application>
|
|
||||||
</manifest>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package com.chatrn
|
|
||||||
|
|
||||||
import com.facebook.react.ReactActivity
|
|
||||||
import com.facebook.react.ReactActivityDelegate
|
|
||||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
|
|
||||||
import com.facebook.react.defaults.DefaultReactActivityDelegate
|
|
||||||
|
|
||||||
class MainActivity : ReactActivity() {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
|
||||||
* rendering of the component.
|
|
||||||
*/
|
|
||||||
override fun getMainComponentName(): String = "ChatRN"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
|
|
||||||
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
|
|
||||||
*/
|
|
||||||
override fun createReactActivityDelegate(): ReactActivityDelegate =
|
|
||||||
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
package com.chatrn
|
|
||||||
|
|
||||||
import android.app.Application
|
|
||||||
import com.facebook.react.PackageList
|
|
||||||
import com.facebook.react.ReactApplication
|
|
||||||
import com.facebook.react.ReactHost
|
|
||||||
import com.facebook.react.ReactNativeHost
|
|
||||||
import com.facebook.react.ReactPackage
|
|
||||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
|
|
||||||
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
|
|
||||||
import com.facebook.react.defaults.DefaultReactNativeHost
|
|
||||||
import com.facebook.react.soloader.OpenSourceMergedSoMapping
|
|
||||||
import com.facebook.soloader.SoLoader
|
|
||||||
|
|
||||||
class MainApplication : Application(), ReactApplication {
|
|
||||||
|
|
||||||
override val reactNativeHost: ReactNativeHost =
|
|
||||||
object : DefaultReactNativeHost(this) {
|
|
||||||
override fun getPackages(): List<ReactPackage> =
|
|
||||||
PackageList(this).packages.apply {
|
|
||||||
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
||||||
// add(MyReactNativePackage())
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getJSMainModuleName(): String = "index"
|
|
||||||
|
|
||||||
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
|
|
||||||
|
|
||||||
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
|
|
||||||
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
|
|
||||||
}
|
|
||||||
|
|
||||||
override val reactHost: ReactHost
|
|
||||||
get() = getDefaultReactHost(applicationContext, reactNativeHost)
|
|
||||||
|
|
||||||
override fun onCreate() {
|
|
||||||
super.onCreate()
|
|
||||||
SoLoader.init(this, OpenSourceMergedSoMapping)
|
|
||||||
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
||||||
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
||||||
load()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2014 The Android Open Source Project
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
|
|
||||||
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
|
|
||||||
android:insetTop="@dimen/abc_edit_text_inset_top_material"
|
|
||||||
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
|
|
||||||
>
|
|
||||||
|
|
||||||
<selector>
|
|
||||||
<!--
|
|
||||||
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
|
|
||||||
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
|
|
||||||
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
|
|
||||||
|
|
||||||
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
||||||
|
|
||||||
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
|
|
||||||
-->
|
|
||||||
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
||||||
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
|
|
||||||
</selector>
|
|
||||||
|
|
||||||
</inset>
|
|
||||||
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |