@freehour/supabase-core 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,21 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
This package provides lightweight services to supabase to make it easier to work with databases, tables and storage buckets.
|
|
4
4
|
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- **Database Service**: Easy access to database tables and views.
|
|
8
|
+
- **Data Service**: Perform CRUD operations, fuzzy search, pagination, filtering and more on a specific table or view.
|
|
9
|
+
- **Storage Service**: Access to storage buckets and files, with support for file uploads, downloads, deletions, and more.
|
|
10
|
+
|
|
5
11
|
### Installation
|
|
6
12
|
|
|
7
|
-
Install the package, e.g. using
|
|
13
|
+
Install the package, e.g. using bun:
|
|
8
14
|
|
|
9
15
|
```bash
|
|
10
|
-
|
|
16
|
+
bun install @freehour/supabase-core
|
|
11
17
|
```
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
### Migrations and Schemas
|
|
20
|
+
|
|
21
|
+
The package includes SQL files for setting up the necessary database schemas and extensions.
|
|
22
|
+
These files are copied post-installation to the `supabase/` directory of your project.
|
|
23
|
+
If you get a warning that the post-install script is blocked, you need to run the follwing command to trust the dependency:
|
|
14
24
|
|
|
15
25
|
```bash
|
|
16
|
-
bun
|
|
26
|
+
bun pm trust @freehour/supabase-core
|
|
17
27
|
```
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
### Configuration
|
|
30
|
+
|
|
31
|
+
If you generate migrations from schemas, make sure to include the `supabase_core` schema in your `schema_paths` in `supabase/config.toml`.
|
|
20
32
|
|
|
21
33
|
```toml
|
|
22
34
|
schema_paths = ["./schemas/supabase-core/*.sql", /* your app schema paths */]
|
|
@@ -24,12 +36,26 @@ schema_paths = ["./schemas/supabase-core/*.sql", /* your app schema paths */]
|
|
|
24
36
|
|
|
25
37
|
### Building
|
|
26
38
|
|
|
27
|
-
|
|
39
|
+
Make sure the migrations are up to date:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
rm -rf supabase/migrations/.*sql
|
|
43
|
+
bunx supabase db diff -f 0000_supabase_core
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then build the package:
|
|
28
47
|
|
|
29
48
|
```bash
|
|
30
49
|
bun run build
|
|
31
50
|
```
|
|
32
51
|
|
|
52
|
+
### Publishing
|
|
53
|
+
|
|
54
|
+
To publish a new version of the package, update the version in `package.json` and run:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
bun publish --access public
|
|
58
|
+
```
|
|
33
59
|
|
|
34
60
|
|
|
35
61
|
|