Release 0.2.0-next.6: entities data layer + auth fail-safe - #4
Merged
Merged
Conversation
A Base44-style CRUD API over the gateway client so generated apps read/write
data without touching Supabase, SQL, or credentials:
bool.entities.<table>.{list,filter,get,create,update,delete,subscribe}
- Dynamic Proxy keyed by table name; returns rows directly, throws on error.
- filter() maps scalar/null/array/operator queries to PostgREST; sort is a
'-col' string; list/filter paginate via limit+offset.
- Additive and backward-compatible: bool.db / supabase / auth unchanged.
- Tests assert the real supabase-js -> PostgREST translation through the
gateway (URL + query params), not a mocked builder.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rs, CSV import); v0.2.0-next.1 Brings bool.entities to one-to-one with Base44's entity surface so apps never need a raw-SQL escape hatch: - Methods: + bulkCreate, bulkUpdate (upsert), updateMany, deleteMany, importEntities (client-side CSV parse -> bulkCreate), + fields selection on list/filter. Base44-shaped return types (DeleteResult/UpdateManyResult/...). - Filter DSL switched to Base44's MongoDB-style $-operators: $eq $ne $gt $gte $lt $lte $in $nin $exists $regex $all $not + root $and/$or/$nor. - updateMany $set = one atomic PATCH; $inc/$mul/$push/$pull = read-modify-write (documented non-atomic; RPC follow-up). $size omitted (not expressible over PostgREST). importEntities parses CSV client-side — no gateway endpoint needed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…lback to RMW); v0.2.0-next.2 $inc/$mul now select target ids then call the per-schema bool_apply_numeric function so the arithmetic is atomic in SQL. Falls back to read-modify-write on PGRST202 (function not provisioned), so it's safe on any schema. $set/$unset stay a single atomic PATCH; $push/$pull remain read-modify-write (documented). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…verage; v0.2.0-next.3 $nor was producing garbage (or=not.(...).undefined). Reimplemented via De Morgan — NOR = AND of negated conditions — which is valid PostgREST. Caught by adding a test that asserts the actual query string. Test coverage expanded to 51 tests: $not, $nor, $and, $size-ignored, +sort, limit cap, $mul RPC, $unset PATCH, mixed $set+$inc, $push/$pull read-modify-write, plus the existing read/write/bulk/filter/import paths. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tities) Change the EntitiesModule map from a `type` alias to an `interface` with a string index signature, so a generated app can augment it per-entity via `declare module "bool-sdk"` and get typed bool.entities.<name> (field names, enum unions, value types) — caught at the app's `tsc -b` build. The index signature keeps un-declared tables usable as EntityHandler<any>, so the un-augmented SDK is unchanged. Runtime untouched. v0.2.0-next.4 (canary). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md # package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Combines the two canary lineages that diverged when the
.5auth fix shipped before the entities work reachednext:entities-layer):bool.entities.<table>Base44-parity data API.onAuthStateChangefiresSIGNED_OUTinstead of hanging when the initial session check rejects..6therefore contains both. Merged cleanly insrc/client.ts(changes were in different regions); onlypackage.jsonandCHANGELOG.mdneeded manual resolution.Version bumped to
0.2.0-next.6, which the publish workflow routes to thenextdist-tag — canary apps get entities + the auth fix,latestuntouched.npm run buildcleanOnce merged, tag
v0.2.0-next.6+ GitHub release triggers the npm publish.🤖 Generated with Claude Code