Skip to content

Release 0.2.0-next.6: entities data layer + auth fail-safe - #4

Merged
max-bader merged 8 commits into
mainfrom
claude/entities-next-6-release-c08c97
Jul 16, 2026
Merged

max-bader merged 8 commits into
mainfrom
claude/entities-next-6-release-c08c97

Conversation

@max-bader

Copy link
Copy Markdown
Contributor

Combines the two canary lineages that diverged when the .5 auth fix shipped before the entities work reached next:

  • Entities data layer (next.0–next.4, from entities-layer): bool.entities.<table> Base44-parity data API.
  • Auth fail-safe (next.5): onAuthStateChange fires SIGNED_OUT instead of hanging when the initial session check rejects.

.6 therefore contains both. Merged cleanly in src/client.ts (changes were in different regions); only package.json and CHANGELOG.md needed manual resolution.

Version bumped to 0.2.0-next.6, which the publish workflow routes to the next dist-tag — canary apps get entities + the auth fix, latest untouched.

  • npm run build clean
  • 52/52 tests pass

Once merged, tag v0.2.0-next.6 + GitHub release triggers the npm publish.

🤖 Generated with Claude Code

HomemadeToast57 and others added 8 commits July 15, 2026 12:55
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
@max-bader
max-bader merged commit f82df8f into main Jul 16, 2026
3 checks passed
@max-bader
max-bader deleted the claude/entities-next-6-release-c08c97 branch July 16, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants