Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

# Setup Node
- name: 📦 Setup Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

# Setup Node
- name: 📦 Setup Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc

Expand Down Expand Up @@ -80,9 +80,10 @@ jobs:
if: github.repository == 'pawcoding/astro-loader-pocketbase'
id: release
uses: cycjimmy/semantic-release-action@v5
with:
semantic_version: 25
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# Update project on website
- name: 🖥️ Update website
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: 🧪 Test code
# Run this on every push except master and next

on:
# Run this on every push except master and next
push:
branches:
- "**"
- "!master"
- "!next"
# Run this every week to make sure the latest PocketBase version still works
schedule:
- cron: "0 4 * * 6"

env:
HUSKY: 0
Expand All @@ -28,7 +32,7 @@ jobs:

# Setup Node
- name: 📦 Setup Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger-pawcode-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
echo "release_url=${{ github.event.release.html_url }}" >> $GITHUB_OUTPUT

- name: 🚀 Trigger pawcode-astro update
uses: peter-evans/repository-dispatch@v3
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.PAWCODE_ASTRO_TOKEN }}
repository: pawcoding/pawcode-astro
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22
24
6 changes: 5 additions & 1 deletion .oxlintrc.json → .oxlintrc.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"eslint/no-empty-function": "warn",
"eslint/no-eq-null": "error",
"eslint/no-iterator": "error",
"eslint/no-param-reassign": "warn",
"eslint/no-proto": "error",
"eslint/no-unused-expressions": "warn",
"eslint/no-var": "error",
"import/no-commonjs": "error",
"import/no-cycle": "error",
Expand Down Expand Up @@ -117,6 +117,7 @@
"eslint/no-throw-literal": "error",
"eslint/require-await": "warn",
"eslint/symbol-description": "error",
"typescript/ban-ts-comment": "warn",
"typescript/no-unsafe-argument": "error",
"typescript/no-unsafe-assignment": "error",
"typescript/no-unsafe-call": "error",
Expand All @@ -131,6 +132,7 @@
"unicorn/consistent-empty-array-spread": "warn",
"unicorn/explicit-length-check": "warn",
"unicorn/new-for-builtins": "warn",
"unicorn/no-array-callback-reference": "error",
"unicorn/no-instanceof-array": "error",
"unicorn/no-negation-in-equality-check": "warn",
"unicorn/no-static-only-class": "error",
Expand All @@ -141,12 +143,14 @@
"unicorn/no-useless-switch-case": "warn",
"unicorn/prefer-array-flat": "error",
"unicorn/prefer-array-some": "warn",
"unicorn/prefer-at": "warn",
"unicorn/prefer-date-now": "warn",
"unicorn/prefer-math-min-max": "warn",
"unicorn/prefer-math-trunc": "error",
"unicorn/prefer-string-replace-all": "warn",
"unicorn/prefer-string-slice": "warn",
"unicorn/prefer-type-error": "warn",
"unicorn/require-module-specifiers": "error",
// Style
"eslint/arrow-body-style": "warn",
"eslint/curly": "error",
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ const blog = defineCollection({
});
```

_It's recommended to use an [impersonate token (API token)](https://pocketbase.io/docs/authentication/#api-keys) instead of the email and password, as this is more secure and can be easily revoked._
> [!TIP]
> It's recommended to use an [impersonate token (API token)](https://pocketbase.io/docs/authentication/#api-keys) instead of the email and password, as this is more secure and can be easily revoked.
> This also prevents the loader from hitting some rate limits with PocketBase, since the default is 2 authentication requests per 3 second interval.

Under the hood, the loader will use the [PocketBase API](https://pocketbase.io/docs/api-collections/#view-collection) to fetch the schema of your collection and generate types with Zod based on that schema.

Expand Down
Loading