suparepo 1.25.0
suparepo: ^1.25.0 copied to clipboard
Generate repository/data access layer code from Supabase database schema. Automatically creates CRUD operations, queries, and type-safe API clients.
Changelog #
1.25.0 - 2026-06-28 #
Changed #
result_modelsnow augments introspected columns instead of replacing them. A column named in the override adopts itstype/nullable; introspected columns the override does not mention are kept (previously they were silently dropped). This matches the documented intent — the override exists mainly to declare nullability, whichpg_proccannot express. If you relied onresult_modelsto prune introspected columns, list the exact columns you want or userpc.exclude. When introspection yields no columns, the override is still used as the full definition. (Implemented viaSchemaFetcher.applyResultModels.)
Fixed #
float8/double precision/numericcolumns no longer crashfromRow. They are cast throughnum((row['x'] as num).toDouble()) instead ofas double; whole-number JSON values decode toint, which the old direct cast rejected at runtime.- Picks up
supabase_schema_core1.10.0, which fixes the OpenAPI 400 abort andexecute_sqldouble-wrap that previously prevented RPC result models from regenerating.
Requires #
supabase_schema_core: ^1.10.0.
1.24.0 - 2026-06-26 #
Added #
- Nullable columns in
result_models. YAMLresult_modelscolumn definitions now accept anullable: trueflag ({ type: text, nullable: true }). Nullable scalar columns are generated as optionalType?constructor parameters (declared after therequiredones) and theirfromRowcasts become null-safe —row['x'] as Type?for scalars androw['x'] != null ? DateTime.parse(row['x'] as String) : nullfortimestamptz. The shorthand (name: text) and{ type: text }continue to defaultnullable: false. Error, nested-json, and json/dynamiccolumns are unaffected. This letsRETURNS TABLEfunctions — whose column nullability PostgreSQL cannot infer frompg_proc— declare an accurate null contract and avoid runtime cast crashes.
Changed #
- Requires
supabase_schema_core^1.9.0 (addsRpcTableColumn.nullable).
1.23.2 - 2026-06-17 #
Fixed #
- Response DTO inference now types comparison/logical/
!expressions asboolean. AjsonResponsefield whose value is (or whoseconstis bound to) a comparison (===,!==,==,!=,<,<=,>,>=), a logical&&/||, or a prefix!previously fell back todynamic— so when unioned across returns with a literaltrue/false, the field degraded todynamicinstead ofbool(e.g.get_access_status.allowed). Such expressions now resolve tobool: comparisons and!are always boolean, and&&/||is boolean when both operands resolve to boolean (recursively, via a boolean literal, or aboolean-typed symbol). Ternaries, arithmetic, and other unresolvable expressions still fall back todynamic.Promise<T>unwrap, sync helpers,.select()inference, request inference, and error generation are unchanged.
1.23.1 - 2026-06-17 #
Fixed #
- Cross-file return-type resolution now unwraps
Promise<T>from awaited async helpers. The 1.23.0 cross-file resolution read an imported helper's declared return type, but anasynchelper's type isPromise<T>— which fell through todynamicinstead ofT. Now a resolvedPromise<T>is unwrapped toT(e.g.await isEntitledUser(): Promise<boolean>→bool,Promise<string>→String,Promise<Foo>→ theFooDTO; arrays/nested types reuse the existing mapping). This also resolves a field whose value is written asawait helper(...)directly. Sync helpers (: boolean), union inference,.select()inference, request inference, and error generation are unchanged; unresolvable cases still fall back todynamic.
1.23.0 - 2026-06-17 #
Added #
- Response DTO inference now unions all success returns. Handlers that return multiple success
jsonResponse({...})calls (e.g. an early{ already: true }plus a main{ completed: true, allDone }) previously only had their first return analyzed, dropping keys that appeared only in later returns. The inference now scans every success return and takes the union of their property sets — a key present in only some returns becomes optional (nullable). Same-typed occurrences keep their type (nested objects merge recursively); conflicting types fall back todynamic. Single-return and.select()-based functions are unchanged. - Imported helper return types are resolved across relative imports. A
jsonResponseproperty bound to a localconst x = helper(...)now resolves tohelper's declared return type even whenhelperis imported from a relative module (e.g.computeAllDone(): booleanfrom../_shared/daily_todos.ts), so such fields are typed (bool) instead ofdynamic. The handler's one-level relative imports are read for function/arrow return types only.
1.22.3 - 2026-06-17 #
Fixed #
- Select-projection inference now handles no-argument
.select()(e.g..insert({...}).select().single()). PostgREST treats.select()with no arguments as "all columns", butinfer_response_from_selectonly recognized.select("cols")with an explicit column string, so ajsonResponse({ wish: data })backed by.select()fell back todynamic— forcing callers back toresponse.toJson()['wish']map access. A no-arg.select()is now treated as*, so the property becomes a typed nested DTO (e.g.response.wish.body) typed from the table schema.
1.22.2 - 2026-06-17 #
Fixed #
- Generated Edge Function response DTOs now self-ignore
invalid_annotation_target. The DTOs put@JsonKeyon@freezedfactory parameters, which raises theinvalid_annotation_targetwarning (not a lint, so it wasn't covered by the existing// ignore_for_file: type=lint). The per-file ignore header now lists it explicitly — matching supafreeze's generated models — so consuming packages no longer need a package-wide analyzer override.
1.22.1 - 2026-06-17 #
Fixed #
flatten_request_paramsno longer drops the body for functions with no recovered request model. Whenflatten_request_params: trueand a function had no YAMLmodels.<fn>.requestand no usage-inferred request (but still routed to a typed method because a response shape was recovered), the generated client method had no body parameter at all — onlyheaders— so callers couldn't send a request body and body-reading handlers broke. The typed method now keeps a rawMap<String, dynamic>? bodyfallback (forwarded tofunctions.invoke(..., body: body)) whenever the request couldn't be expanded into named parameters. Functions with a recovered request are unchanged. Also emits a warning when a handler clearly reads a request body (req.json()etc.) but no request model was recovered, suggesting amodelsentry.
1.22.0 - 2026-06-17 #
Added #
-
Edge Function response inference from
.select()projections (edge_functions.infer_response_from_select: true, defaultfalse). Extends the success-response DTO generation: when ajsonResponse({...})property spreads a.from("table").select("cols")result ({ ...data, extra: ... }) or is a bare select variable, the projected columns are typed from the introspected table schema — only the selected columns, with their nullability, plus any extra literal properties (typed by the existing name/value heuristic)..maybeSingle()/.single()yields a single nested object; otherwiseList<...>. Column aliases (alias:col) andselect("*")are supported.This turns the dominant "
.select()+ spread" handler pattern into typed nested DTOs without hand-writing anexport interface. Heuristic by design, so it's opt-in and degrades safely: reshaped (.map(...)), relation-embedded (bond:bonds(*)), or otherwise unresolvable projections fall back todynamic. Strategy 1 (export interface <Name>Response) still takes precedence, and with the flag off the output is identical to 1.21.0. Requires a Supabase connection to introspect the schema.New config key:
edge_functions.infer_response_from_select.
1.21.0 - 2026-06-17 #
Added #
-
Edge Function success-response DTOs. Generate Freezed response models for Edge Functions from the handler's TypeScript types, so callers no longer hand-parse response JSON. Two strategies, in priority order:
- An exported
export interface <PascalName>Response { ... }is parsed directly. - Otherwise the success
jsonResponse({ ... })call is parsed, and each property's type is recovered from referenced functions/variables whose return/declared type points at an interface (e.g.viewSavedCards(...): SavedDailyCardView[]→List<...>), falling back to a name/value heuristic.
Nested objects become nested Freezed classes,
T | nullbecomes nullable,string[]becomesList<String>, and snake_case keys map via@JsonKey. Files are written toedge_functions.response_models_output(default: next to the client file), and the typed client method returns the generated<Name>Response(decoded viafromJson). Because the recovered shape mirrors the actual response (partial projections + computed fields),fromJsonparses real responses without throwing. Functions without a recoverable response shape are skipped (backward compatible).New config:
edge_functions.response_models_output. - An exported
1.20.1 - 2026-06-10 #
Fixed #
- YAML
models:now merge with auto-detection instead of replacing it. Previously, defining amodels:entry for an Edge Function suppressed auto-detection for that function entirely — so overriding onlyrequestwould drop its auto-detected error/response classes. Now YAML wins per field group (request/response/errors) and auto-detection fills in any group the YAML omits. This lets you override just the request types (e.g. to fix numeric/boolean fields the usage-based inference can't recover) while keeping the auto-generatedXErrorsealed classes.
1.20.0 - 2026-06-10 #
Added #
- Usage-based Edge Function request inference (
edge_functions.infer_request_from_usage: true) — recovers request models for handlers that don't declare an explicitbody as { ... }type. Opt-in (defaultfalse) because inference is heuristic. When enabled, request fields are inferred from:req.json() as { ... }cast annotationsbody.<field>access patterns, with types fromtypeof body.<field> === "string" | "number" | "boolean"guards (andbody.<field> === true | falsefor booleans)- optionality from ternary/nullish defaults (
typeof body.x === "string" ? ... : null,body.x ?? ...),if (body.x !== undefined)guards, and boolean flag comparisons - This makes auto-detection (and
flatten_request_params) work for Deno Edge Functions that destructure the body field-by-field. Numeric fields without atypeof === "number"guard fall back totext— definemodels:to override these. YAMLmodels:always take precedence over inference.
1.19.0 - 2026-06-10 #
Added #
- Flattened Edge Function request parameters (
edge_functions.flatten_request_params: true) — typed Edge Function methods can now expand request-model fields into named method parameters instead of taking a singlerequest:wrapper object. The JSON body is built inside the generated method, so callers never hardcode JSON string keys:- Before:
client.sendEmail(request: SendEmailRequest(to: 'a@x.com', subject: 'Hi')) - After:
client.sendEmail(to: 'a@x.com', subject: 'Hi') - Required fields are emitted before optional ones to satisfy Dart's parameter ordering
- The
XRequestmodel class is still generated for backward compatibility - Opt-in (default
false); requires a request model (auto-detected from TypeScript or defined via YAMLmodels)
- Before:
1.18.1 - 2026-05-20 #
Fixed #
- Edge Function client generator no longer emits an unused
import 'dart:convert';when all functions have request-only models (no typed response). The import is now only added when at least one function declares a typed response, sincejsonDecode/utf8.decodeare only used inside the response-decoding path. This eliminatesunused_importwarnings in downstream projects that rundart analyze --fatal-infos.
1.18.0 - 2026-05-20 #
Added #
- In-memory fake repository generation (
generate_fakes: true) — emits{table}_repository.fake.dartalongside each real repository. The generatedFake{Table}Repositoryclassimplementsthe real repository so it can be substituted via Riverpod overrides in tests:- CRUD methods (
getAll/getById/create/update/delete/count/paginate) operate on an in-memoryMap<dynamic, Model>keyed by primary key seed(records)helper to populate the store- Relation methods (
getAllWith*) fall back togetAll()since relations can't be auto-embedded in memory - Custom methods from
.custom.dartare stubbed withUnimplementedErrorso callers can override them in a subclass for test-specific behavior
- CRUD methods (
1.17.0 - 2026-05-19 #
Added #
- SQL migrations fallback for RPC return-type introspection — When
execute_sqlis not installed or PostgREST's OpenAPI omits response schemas, suparepo now parses local*.sqlmigration files to recover return types. This makes the RPC client generation work out of the box for projects that don't (or can't) install theexecute_sqlhelper RPC.- New config option
rpc.migrations_pathfor explicit paths - Auto-detects common locations (
../supabase/migrations,../../supabase/migrations,./supabase/migrations) when the option is unset - Composite types (
CREATE TYPE foo AS (...)) referenced byRETURNS SETOF fooare fully resolved to typed column lists - Resolution count is reported in the CLI output:
📄 SQL migrations fallback: resolved N/M missing return type(s)
- New config option
Changed #
- Bump
supabase_schema_coredependency to^1.8.0
1.16.1 - 2026-05-19 #
Fixed #
- Surface diagnostic warnings when
execute_sqlRPC introspection fails so that users no longer get an entirerpc_client.dartofFuture<void>methods with no indication why. The CLI now prints actionable guidance (installexecute_sqlor userpc.return_typesinsuparepo.yaml) when a high ratio of RPC functions cannot be resolved (fixes #2) - OpenAPI parsing now resolves
$refresponse schemas and supports OpenAPI 3.0responses.200.content.<mediaType>.schema, recovering return types in more PostgREST output shapes
Changed #
- Bump
supabase_schema_coredependency to^1.7.3
1.16.0 - 2026-04-15 #
Added #
@SupaQueryannotation support — Annotate method stubs in.custom.dartextension files with@SupaQuery(...)and suparepo auto-generates PostgREST query implementations. Supports:- Filter operators:
eq,neq,lt,lte,gt,gte,like,ilike,is_,in_,contains,overlaps Param.nowfor runtimeDateTime.now()injectionParam('name')for method parameter injectionOrderBy/OrderBy.descwithnullsFirstoptionlimit,returnMode(list/single/maybeSingle), customselect,resultModel
- Filter operators:
- New dependency:
supa_query_annotation ^0.1.0
Changed #
- Translate all code comments, doc strings, test descriptions, and CHANGELOG entries to English (OSS)
1.15.2 - 2026-04-08 #
Fixed #
- Fix
coalescetype inference failing when subqueries contain::type casts (e.g.coalesce((select true from t where (x)::date = y::date), false)) — the::check was evaluated beforecoalesce, causing::dateinside the subquery to be mistakenly used as the return type - Harden
_tokenizeBuildObjectArgsto correctly handle SQL string literals (e.g.'Asia/Tokyo') nested inside subqueries withinjson_build_objectarguments
1.15.1 - 2026-04-08 #
Fixed #
- Fix
json_build_objecttype inference for complex expressions —coalesce(..., false)now infersbool,coalesce(..., 0)infersint4,NOT exprandEXISTS(...)inferbool, instead of falling back toString
1.15.0 - 2026-04-08 #
Added #
- Auto-generate nested Freezed models for json columns in
RETURNS TABLE— When aRETURNS TABLEfunction hasjson/jsonbcolumns, suparepo parsesjson_agg(json_build_object(...))patterns in the function body to detect the inner structure and generates typed nested models (e.g.List<CalendarItem>instead ofdynamic). - Nested models are generated in the same result file with
fromRow()factory - Supports multiple json columns per function, each with independent nested structure detection
- Column alias matching:
json_agg(...) as v_calendarmaps tocalendarcolumn inRETURNS TABLE
1.14.0 - 2026-04-08 #
Added #
- Auto-generate error code sealed classes from PL/pgSQL — For
RETURNS TABLE(success bool, error text)functions, suparepo parses the function body to detect error code string literals (e.g.'daily_limit_exceeded') and generates a Freezed sealed class withfromErrorCode()factory. - Result model
errorfield is automatically typed with the generated error class instead ofString. - Supported PL/pgSQL patterns:
return query select false, 'error_code'::text;error := 'error_code';
1.13.2 - 2026-04-08 #
Fixed #
- Revert global
json/jsonb→dynamicmapping; restoreMap<String, dynamic>in TypeMapper for general use (repositories, etc.) - Scope
dynamicmapping to RPC result models only —json/jsonbcolumns inRETURNS TABLEaredynamicin generated Freezed models (safe for bothjson_aggarrays andjson_build_objectobjects), while repositories keepMap<String, dynamic>
1.13.1 - 2026-04-08 #
Fixed #
- Fix
RETURNS TABLEsingle-row RPC causingtype '_Map<String, dynamic>' is not a subtype of type 'List<dynamic>'error — PostgREST may return a single object instead of an array; generated code now normalizes the response withrawResponse is List ? rawResponse : [rawResponse] - Fix
json/jsonbcolumn type mapping in RPC result models todynamic—json_agg()returns a JSON array (List<dynamic>), not a Map - Fix
fromRow()generation fordynamicfields — no longer emits redundantas dynamiccast
1.13.0 - 2026-04-08 #
Added #
- Auto-detect JSON column schemas — For
RETURNS json/jsonbRPC functions, suparepo now automatically parsesjson_build_object()/jsonb_build_object()calls in the function body to detect field names and types, then generates Freezed result models without any YAML configuration.- Types are inferred from PL/pgSQL variable declarations (
DECLARE v_rank text;) - Type cast expressions (
expr::int4) are also recognized RETURNS TABLEauto-detection takes precedence; JSON auto-detection only applies to functions without existingtableColumns- Requires
execute_sqlRPC function forpg_proc.prosrcaccess
- Types are inferred from PL/pgSQL variable declarations (
1.12.0 - 2026-04-08 #
Added #
- YAML-defined result models for
RETURNS json/jsonbRPC functions — You can now define column schemas insuparepo.yamlviaresult_modelsto generate Freezed result model classes for functions that returnjsonorjsonb, without changing the SQL toRETURNS TABLE(...). - Single-object return support: functions with
result_modelsandreturnsSetOf: falsegenerateFuture<Model>instead ofFuture<List<Model>>. - Shorthand syntax support in
result_models(e.g.rank: textinstead ofrank: { type: text }).
Example #
rpc:
enabled: true
generate_result_models: true
result_models:
get_membership_rank_info:
rank: { type: text }
upload_days: { type: int4 }
is_active: { type: bool }
Generates GetMembershipRankInfoResult Freezed class and the RPC client returns Future<GetMembershipRankInfoResult> instead of Future<Map<String, dynamic>>.
1.11.5 - 2026-04-03 #
Fixed #
- Remove unnecessary null-aware operator (
?.) on non-null DateTime params that causedinvalid_null_aware_operatorwarning withdart analyze --fatal-infos
1.11.4 - 2026-04-03 #
Fixed #
- Fix
DateTimeparameters in RPC functions failing withjsonEncodeerror ("Converting object to an encodable object failed: Instance of 'DateTime'")dateparams are now serialized asYYYY-MM-DDvia.toIso8601String().split('T').firsttimestamp/timestamptzparams are serialized as full ISO8601 via.toIso8601String()
1.11.3 - 2026-03-11 #
Fixed #
- Fix
_isImportReferencedincorrectly matching.supafreeze.dartclass names as substrings of identifiers withRepository/Customsuffixes- e.g.
TentameProjectsfalsely matchedTentameProjectsRepository, preventing removal of unused imports
- e.g.
1.11.2 - 2026-03-11 #
Fixed #
- Add automatic cleanup of unused imports (supabase, supafreeze) in
.custom.dartfiles - Improve
generateExtensionFile()to only import types actually referenced by methods
1.11.1 - 2026-03-11 #
Fixed #
- Fix
.supafreeze.dartimports not being excluded when embedding from.custom.dart - Fix duplicate custom imports in generated repository files
1.11.0 - 2026-03-11 #
Changed #
- Embed custom methods from
.custom.dartas instance methods in generated repository classes- Resolves issue where extension methods could not be overridden from subclasses in tests due to Dart's static dispatch
.custom.dartfiles remain in extension format for IDE support and editing- suparepo reads
.custom.dartat generation time and embeds directly into the generated class - No longer need to import
.custom.dartfrom use_case layer - Custom methods can now be properly overridden in fake repositories for testing
1.10.1 - 2026-03-11 #
Fixed #
- Fix custom methods not being migrated when preceded by multi-line field declarations (
static const _x =\n '...';) - Auto-migrate private static fields referenced by custom methods into the extension
1.10.0 - 2026-03-11 #
Added #
- Automatic custom method migration
- Detect custom methods in existing repository files during regeneration
- Auto-migrate to
*_repository.custom.dartas extensions - Auto-replace
_clientreferences withclient - Merge with existing
.custom.dartfiles (skip duplicates) - Auto-migrate custom imports
--no-migrateflag to skip migration
1.9.0 - 2026-03-11 #
Added #
- Add
clientgetter to repository classes (enables adding custom methods via extensions)- Resolves issue of custom code being lost during regeneration
- Custom methods are written as extensions in
*_repository.custom.dart
Fixed #
- Fix TS type extractor failing to detect error codes from
statusMap: Record<string, number>patterns- Support error codes via variable references like
error: data.error+ statusMap lookup - Merge with existing literal
error: "..."patterns and deduplicate
- Support error codes via variable references like
1.8.3 - 2026-03-05 #
Fixed #
- Fix Edge Function error class
fromFunctionExceptioncrashing withas Stringcast whene.detailsisMap<String, dynamic>- Handle cases where Supabase SDK auto-decodes JSON responses to
Map<String, dynamic> - Use switch expression on actual type of
e.detailsto support bothString(raw) andMap<String, dynamic>(decoded)
- Handle cases where Supabase SDK auto-decodes JSON responses to
1.8.2 - 2026-03-04 #
Fixed #
- Fix Edge Function client
response.datatype cast error- Supabase SDK auto-decodes
Content-Type: application/jsonresponses toMap<String, dynamic>, causingas List<int>cast to fail at runtime - Dynamically check actual type of
response.datato support bothList<int>(raw bytes) andMap<String, dynamic>(decoded)
- Supabase SDK auto-decodes
1.8.1 - 2026-03-03 #
Fixed #
- Fix
fromRow()DateTime field crashing withas DateTimecast at runtime- Supabase RPC JSON responses return timestamps as strings, changed to
DateTime.parse(row['col'] as String)
- Supabase RPC JSON responses return timestamps as strings, changed to
1.8.0 - 2026-03-03 #
Added #
- Freezed result model generation for RETURNS TABLE functions (
generate_result_models)- Automatically generates
@freezedresult model classes withfromRow()factory for RPC functions usingRETURNS TABLE(col1 type1, ...) - Column names and types are fetched from
pg_proccatalog (proargmodes,proargnames,proallargtypes) - RPC client methods return typed
List<GetMyInviteCodeResult>instead ofList<Map<String, dynamic>> - Model file per function: e.g.
get_my_invite_code_result.dart - Configurable output directory via
result_models_output - Requires
execute_sqlRPC function andbuild_runnerfor Freezed code generation
- Automatically generates
Changed #
- Bumped
supabase_schema_coredependency to^1.3.0 RpcGenerator.generateRpcClient()acceptsgenerateResultModelsandresultModelsImportPrefixparameters
1.7.2 - 2026-03-03 #
Fixed #
- RPC functions using
RETURNS TABLE(...)are now correctly generated asFuture<List<Map<String, dynamic>>>instead ofFuture<void>- PostgreSQL internally represents
RETURNS TABLEasrecord+proretset = true, which was previously treated as void
- PostgreSQL internally represents
Changed #
- Bumped
supabase_schema_coredependency to^1.2.2
1.7.1 - 2026-02-23 #
Fixed #
- Fix error type generation code examples in README to use generic examples
1.7.0 - 2026-02-23 #
Added #
- Edge Function error type generation (Freezed sealed class)
- Automatically detects error responses (status 4xx/5xx) from TypeScript source
- Extracts
snake_caseerror codes fromJSON.stringify({ error: "..." })patterns - Generates Freezed sealed class per Edge Function with named constructors for each error code
- Includes
unknownvariant for unrecognized error codes - Includes
fromFunctionExceptionfactory for easyFunctionExceptionparsing - Error class files are output alongside the Edge Function client (e.g.,
submit_campaign_receipt_error.dart)
1.6.2 - 2026-02-23 #
Changed #
- RPC client now uses typed generics on
rpc<T>()calls instead ofrpc<dynamic>()with manual casts- Scalar:
return await _client.rpc<bool>(...)(was_client.rpc<dynamic>(...)+response as bool) - setof:
_client.rpc<List<dynamic>>(...)+response.cast<T>() - void: unchanged (
_client.rpc<void>(...))
- Scalar:
1.6.1 - 2026-02-23 #
Fixed #
execute_sqlviapg_procnow returns all function rows (was only returning the first row due toEXECUTE ... INTOlimitation; fixed by wrapping query withjson_agg)execute_sqlis now automatically excluded from generated RPC client (internal infrastructure, not a user-facing function)
Changed #
- Bumped
supabase_schema_coredependency to^1.2.1
1.6.0 - 2026-02-23 #
Added #
- YAML
return_typesfor manual RPC return type overrides- Specify PostgreSQL type names per function (e.g.
text,bool,setof jsonb) - Takes highest priority over
pg_procauto-correction and OpenAPI spec - No
execute_sqlfunction needed — ideal for projects without it
- Specify PostgreSQL type names per function (e.g.
- Comprehensive README documentation for return type correction
execute_sqlsetup guide with SQL snippet and security notes- Type mapping reference table
- Priority order explanation
1.5.0 - 2026-02-23 #
Added #
- Accurate RPC return type resolution via
pg_proccatalog- Fixes boolean and other scalar functions being generated as
Future<void>instead ofFuture<bool>,Future<int>, etc. - Requires
execute_sqlRPC function; gracefully falls back to OpenAPI spec when unavailable
- Fixes boolean and other scalar functions being generated as
Changed #
- Bumped
supabase_schema_coredependency to^1.2.0
1.4.6 - 2026-02-23 #
Fixed #
- Fixed
argument_type_not_assignableerror in generated Edge Function clientresponse.dataisdynamic, added explicitas List<int>cast forutf8.decode()
1.4.5 - 2026-02-23 #
Fixed #
- Restored RPC/EdgeFunction provider generation in
supabase_client_provider.dart(unified mode)- 1.4.3 accidentally removed RPC/Edge providers from the unified file
- Now: without
client_providers_output, providers are embedded insupabase_client_provider.dart(default) - With
client_providers_output, providers go to a separate file
1.4.4 - 2026-02-23 #
Fixed #
- Added
ignore_for_filedirectives toedge_function_client.dartgenerated code- Suppresses
public_member_api_docs,sort_constructors_first,lines_longer_than_80_charslint warnings
- Suppresses
1.4.3 - 2026-02-23 #
Changed #
- Split RPC/EdgeFunction providers into separate
client_providers.dartfilesupabase_client_provider.dartnow contains onlysupabaseClientprovider- New
client_providers_outputsetting generatesclient_providers.dartwithsupabaseRpcClientandsupabaseEdgeFunctionClientproviders - Fixes
InvalidTypeExceptionwhen gateway package does not depend on data package
1.4.2 - 2026-02-22 #
Changed #
- Moved RPC and Edge Function client providers to unified
client_provider_outputfilesupabase_client_provider.dartnow containssupabaseClient,supabaseRpcClient, andsupabaseEdgeFunctionClientproviders- Removed inline provider generation from
rpc_client.dartandedge_function_client.dart
1.4.0 - 2026-02-22 #
Added #
- Automatic TypeScript type inference for Edge Functions
- Extracts request types from
body as { ... }patterns - Extracts response types from
JSON.stringify({ ... })in success responses - Detects required/optional fields from validation if-statements (
!field,typeofchecks) - Supports
handler.tsdelegation pattern - Type mapping:
string→String,number→int,boolean→bool - Enabled by default (
auto_detect_types: true), YAML model definitions take precedence
- Extracts request types from
- Riverpod provider generation for Edge Function client
- Generates
@Riverpod(keepAlive: true)provider forSupabaseEdgeFunctionClient - Consistent with existing RPC client provider pattern
- Generates
1.3.3 - 2026-02-18 #
Added #
client_provider_output— generatesupabase_client_provider.dartat a custom output pathclient_provider_import— customize the provider import path in generated code
1.3.2 - 2026-02-18 #
Fixed #
- RPC client: remove unused
responsevariable for void return type functions - RPC client: add explicit type arguments to
rpc()to resolveinference_failure_on_function_invocation
1.3.1 - 2026-02-18 #
Fixed #
- Tightened
supabase_schema_corelower bound to^1.1.0(fixes downgrade analysis) - Added example file for pub.dev scoring
- Updated README with
generate_providersandmodel_import_prefixdocumentation
1.3.0 - 2026-02-18 #
Added #
- Riverpod provider generation (
generate_providers)- Optionally generates
@Riverpod(keepAlive: true)providers for each repository and RPC client - Generates
supabase_client_provider.dartfor SupabaseClient DI - Controlled by
generate_providers: trueinsuparepo.yaml
- Optionally generates
- Individual model import prefix (
model_import_prefix)- Import each model file individually instead of a barrel file
- e.g.
model_import_prefix: package:data/importspackage:data/categories.supafreeze.dart
Fixed #
- Fixed
count()method to use correct Supabase SDK API (.select().count(CountOption.exact)) - Added
ignore_for_filedirectives to suppress lint warnings in generated code - Fixed required parameters ordering in RPC client methods
1.2.0 - 2026-02-12 #
Added #
- Configurable Supabase import (
supabase_import)- Allows switching between
package:supabase_flutter/supabase_flutter.dart(default) andpackage:supabase/supabase.dartfor pure Dart packages - Applied to all generators: repository, RPC client, and Edge Function client
- Allows switching between
1.1.0 - 2026-02-11 #
Added #
- RPC client generation (
RpcGenerator)- Detects RPC functions from OpenAPI spec and generates type-safe Dart methods
- Automatic snake_case to camelCase conversion with reserved word escaping
- Edge Function client generation
EdgeFunctionDetector— scans localsupabase/functions/directoryEdgeFunctionGenerator— generates clients with or without typed models- YAML-based request/response model definitions
- Configuration extensions (
RpcConfig,EdgeFunctionConfig)- RPC: enabled, output, include/exclude filters
- Edge Functions: enabled, output, functions_path, include/exclude, model definitions
- CLI (
bin/suparepo.dart)dart run suparepo— generate all enabled outputs--repo/--rpc/--edge— generate specific targets--force— force regenerate all
Changed #
- Added
rpcandedgeFunctionsfields toSuparepoConfig