From 776dc51bb0bdd00faed57b2a0e5fe783c253785f Mon Sep 17 00:00:00 2001 From: Patrick <4031292+patmood@users.noreply.github.com> Date: Wed, 27 Nov 2024 20:44:39 +1100 Subject: [PATCH] version bump --- README.md | 13 +++++++------ dist/index.js | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d8d984f..eb001bb 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,10 @@ This will produce types for all your PocketBase collections to use in your front ## Version Support | PocketBase | pocketbase-typegen | npx command | -|------------|--------------------| ------------------------------------------------------------------------------ | -| v0.23.x | v1.2.x | npx pocketbase-typegen --db ./pb_data/data.db --out pocketbase-types.ts | -| v0.8.x | v1.1.x | npx pocketbase-typegen@1.2.1 --db ./pb_data/data.db --out pocketbase-types.ts | +| ---------- | ------------------ | ------------------------------------------------------------------------------ | +| v0.23.x | v1.3.x | npx pocketbase-typegen --db ./pb_data/data.db --out pocketbase-types.ts | +| v0.18.x | v1.2.x | npx pocketbase-typegen@1.2.1 --db ./pb_data/data.db --out pocketbase-types.ts | +| v0.8.x | v1.1.x | npx pocketbase-typegen@1.1.1 --db ./pb_data/data.db --out pocketbase-types.ts | | v0.7.x | v1.0.x | npx pocketbase-typegen@1.0.13 --db ./pb_data/data.db --out pocketbase-types.ts | ## Usage @@ -83,10 +84,10 @@ Using PocketBase SDK v0.18.3+, collections can be [automatically typed](https:// ```typescript import { TypedPocketBase } from "./pocketbase-types" -const pb = new PocketBase('http://127.0.0.1:8090') as TypedPocketBase +const pb = new PocketBase("http://127.0.0.1:8090") as TypedPocketBase -await pb.collection('tasks').getOne("RECORD_ID") // -> results in TaskResponse -await pb.collection('posts').getOne("RECORD_ID") // -> results in PostResponse +await pb.collection("tasks").getOne("RECORD_ID") // -> results in TaskResponse +await pb.collection("posts").getOne("RECORD_ID") // -> results in PostResponse ``` Alternatively, you can use generic types for each request, eg: diff --git a/dist/index.js b/dist/index.js index 2c7e70d..d593635 100755 --- a/dist/index.js +++ b/dist/index.js @@ -326,7 +326,7 @@ async function main(options2) { import { program } from "commander"; // package.json -var version = "1.2.1"; +var version = "1.3.0"; // src/index.ts program.name("Pocketbase Typegen").version(version).description( diff --git a/package.json b/package.json index 79d3098..11585c4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pocketbase-typegen", - "version": "1.2.1", + "version": "1.3.0", "description": "Generate pocketbase record types from your database", "main": "dist/index.js", "bin": {