bones_api 1.14.0
bones_api: ^1.14.0 copied to clipboard
Bones_API - A powerful API backend framework for Dart. It comes with a built-in HTTP Server, route handler, entity handler, SQL translator, and DB adapters.
1.14.0 #
-
New
DBSQLiteAdapter: an embedded SQLite DB adapter, backed by thesqlite3package.import 'package:bones_api/bones_api_db_sqlite.dart'; var adapter = DBSQLiteAdapter('/var/lib/myapp/db.sqlite', generateTables: true); // Or an in-memory database: var memoryAdapter = DBSQLiteAdapter(':memory:', generateTables: true);-
Registered as
sqlite,sqlite3,sql.sqliteandsql.sqlite3, so a config blockdb: { sqlite: {...} }resolves it. -
fromConfigacceptspath/file/database/dbfor the database file, andmemory: true(or the path:memory:) for an in-memory database, plus the usualgenerateTables/checkTables/populate/log.sqlkeys. Irrelevant keys (host,port,username,password) are accepted and ignored, so a config can be pointed at SQLite without being rewritten. -
No server and no native library to install: the
sqlite3package bundles SQLite (3.53.4) through Dart's build hooks. -
Runs the same entity test-suite as the PostgreSQL and MySQL adapters, and needs no
Dockercontainer to do it. NewAPITestConfigSQLite, exported bypackage:bones_api/bones_api_test_sqlite.dart. -
Notes on the SQLite dialect:
- An auto-assigning ID is declared
INTEGER PRIMARY KEY AUTOINCREMENT: SQLite has noSERIAL/AUTO_INCREMENT, only a column declared exactlyINTEGER PRIMARY KEYaliases therowid, and withoutAUTOINCREMENTSQLite reuses the ID of a deleted row. ENUMis emulated with aVARCHAR CHECK (col IN (...))constraint.- Since
sqlite3is a synchronous driver, and SQLite allows a single writer, the adapter uses one native handle shared by every pooled connection: a second handle blocking on a lock would stall the isolate holding it, and offers nothing to gain when there is no I/O to overlap. Nested transactions useSAVEPOINT.
- An auto-assigning ID is declared
-
-
New
SQLDialect.returningAcceptsTableWildcard(defaulttrue, so the PostgreSQL/MySQL/memory dialects are unchanged). SQLite rejects the table-qualified wildcard thatDELETE ... RETURNINGemits ("RETURNING may not use TABLE.* wildcards") and needs a bareRETURNING *. -
Fixed
DBObjectDirectoryAdapterlosing objects written just before a read:_saveObjectwasasyncand itsFuturewas dropped bydoInsert/doUpdate, while every reader in the adapter inspects the filesystem synchronously. Astorecould therefore return before its object was on disk, andselectAllwould silently omit it (a not-yet-written file reads back asnulland was discarded). The write is now synchronous. -
Breaking: the minimum Dart SDK is now 3.10.0 (was 3.7.0), required by
sqlite3and its build hooks. -
Dependencies:
- Added
sqlite3: ^3.5.1
- Added
1.13.0 #
-
New
EntityPagination.onEvent: an optional hook notified of what is being fetched, for progress reporting and logging.var p = userRepository.paginateByQuery(' state == ? ', parameters: ['NY'], limit: 20, onEvent: (event) { switch (event) { case EntityPaginationPageLoading(:var page): print('fetching page $page...'); case EntityPaginationPageLoaded(:var page, :var entriesLength): print('page $page: $entriesLength entries'); case EntityPaginationPageError(:var page, :var error): print('page $page failed: $error'); case EntityPaginationPageSkipped(:var page, :var reason): print('page $page not fetched: ${reason.name}'); case EntityPaginationEnd(:var totalLength): print('done: $totalLength entries'); case EntityPaginationReset(:var discardedPages): print('discarded ${discardedPages.length} pages'); } });- Delivered synchronously, at the point where it happens and in order, so
it is also correct for a synchronous
EntityPageLoader(aStreamwould only deliver in a later microtask, after a sync read already finished). To consume it as a stream, forward it:onEvent: myEventStream.add. onEventis notfinal, so it can also be attached to an already builtEntityPagination. Only events emitted afterwards are seen.- An exception thrown by the listener is reported to the current
Zoneand does not break the fetch. - Nothing is allocated (not even the fetch timer) while
onEventisnull.
- Delivered synchronously, at the point where it happens and in order, so
it is also correct for a synchronous
-
New
EntityPaginationEvent<O>, asealedhierarchy so aswitchover it is exhaustive, withEntityPaginationListener<O>as the callback type:EntityPaginationPageLoading: a fetch is about to start. Emitted once per actual fetch.EntityPaginationPageLoaded: a fetch finished, with theentries, theentriesLength, theelapsedTimeof thepageLoaderandisFinalPage.EntityPaginationPageError: a fetch failed, with theerror, thestackTraceand theelapsedTime. The error is rethrown to the caller right after the event.EntityPaginationPageSkipped: a page was served without a fetch, with anEntityPaginationSkipReason:alreadyLoaded,inFlight(a concurrent request shares the fetch) orknownEmpty(past the resolved end). Not an error — it is what makes a repeated, concurrent or past-the-end read free.EntityPaginationEnd: the end was resolved, with thefinalPageand thetotalLength. Emitted once, immediately after theEntityPaginationPageLoadedthat resolved it — which is not necessarily the final page itself, since an empty page can pin the end at its predecessor.EntityPaginationReset:reset()orrefresh()discarded the loaded pages, with thediscardedPages, thediscardedEntitiesLengthandisRefresh—truewhile it is the reset of arefresh(), which re-fetches those pages right after, so a consumer can tell an in-progress refresh from a pagination that was simply emptied. Emitted after the state is cleared, so the pagination already reads as empty and the discarded state is on the event.
Every event but
EntityPaginationResetis about a page, and is anEntityPaginationPageEvent(alsosealed) carrying thepage.Note that concurrent page loads interleave:
getRangeandrefreshstart every page at once, so all the fetches are announced before any completes. -
paginateByQuery,paginateandpaginateAllgained the optionalonEventparameter, onEntitySource,EntityRepositoryandAPIRepository, so the hook is reachable without building anEntityPaginationby hand. -
Tests: 15 new cases in
bones_api_entity_pagination_test.dart(the event sequence of a full read, of an exact multiple of the page size, of an empty result and of a failure; the 3 skip reasons; the synchronous delivery; a listener attached after construction; a throwing listener; and thereset/refreshevents).
1.12.0 #
-
New
EntityPagination<O>: a lazily loaded, paginated view over a select, for reading a result page by page without knowing its total length upfront.var p = userRepository.paginateByQuery(' state == ? ', parameters: ['NY'], limit: 20); await p.loadNextPage(); // page 1 p[0]; // sync, already loaded await p.getAt(45); // loads page 3 on demand, leaving page 2 a gap await p.loadAll(); // fills the gaps and resolves the total- Pages are 1-based (matching the
pageparameter of theselect*methods); entry indexes are 0-based (matching a DartList). SeeindexOfPage/pageOfIndex. - Pages can be loaded out of order, leaving gaps:
getAt(45)with alimitof 20 loads only page 3. - Synchronous access (
operator [],loadedEntities) never fetches; only theFutureOrmethods (getAt,getPage,getRange,loadNextPage,loadPage,loadAll,stream) do.operator []returnsnullfor a gap, an unloaded page or an out-of-range index alike; useisPageLoaded/isIndexKnownOutOfRangeto tell them apart. - It is deliberately not a
Listor anIterable: both require alength, which is exactly what a paginated select can't answer until it reaches the end. UseloadAllwhen a complete list is really needed.
What it knows:
loadedPages,loadedPagesLength,loadedEntities,loadedEntitiesLength,maxLoadedPage,maxLoadedIndex,maxKnownPage,isFinalPageResolved,finalPage,totalLength,isKnownEmpty, andinformation().Since every page except the last holds exactly
limitentries, identifying the final page yields the total even with gaps:totalLength == (finalPage - 1) * limit + entries(finalPage). The end resolves when a page comes back short, when an empty page has a loaded and full predecessor, or when page 1 comes back empty. An empty page without a loaded predecessor does not resolve it — jumping to page 50 of a 3-page result only proves the end is somewhere before page 50 — but it is still recorded, to avoid re-fetching that page or any page after it.Concurrent requests for the same page share a single fetch, and a failed load is evicted so a retry actually retries.
- Pages are 1-based (matching the
-
New
paginateByQuery,paginateandpaginateAllonEntitySource,EntityRepository(withresolutionRules) andAPIRepository. They return immediately without loading anything.orderByIDdefaults totruethere, rather than following theoffset != nullrule of theselect*methods: a paginated read is only meaningful over a stable order. -
Note: each page is an independent select, without a shared
Transaction. Entries inserted or deleted between two page loads shift the offsets, so a page loaded later can repeat or skip entries. This is inherent to offset-based pagination; ordering by ID makes it as stable as it can be.
1.11.0 #
-
selectByQueryand its siblings gained 4 optional parameters, for pagination and ordering:offset: the return offset.page: the 1-based page to return, an ergonomic alternative tooffsetthat computes it from the page size:(page - 1) * limit.orderByID: orders the result by the table's ID column, resolved automatically from the existing scheme machinery (TableScheme.idFieldName→EncodingContext.tableFieldID, orEntityHandler.idFieldName).orderDirection: the newOrderDirectionenum,ascending(default) ordescending.
Semantics:
- The effective ordering is
orderByID ?? (offset != null): a non-nulloffsetturns the ordering on by default, since an offset-based pagination needs a stable order to be correct. PassorderByID: falseto opt out and get a bareOFFSET. orderDirectionis ignored while the ordering is not active.pageis a public convenience resolved to anoffsetat the repository layer (seeresolveSelectOffset); the adapter contract keeps taking onlyoffset. It throws anArgumentErrorwhen combined with anoffset(two spellings of one thing), when there is no positivelimitto use as the page size, or when it is< 1.page: 1resolves tooffset: 0, which still activates the ordering, so even the first page is stable.- All 4 are optional and default to the previous behavior: with them unset the generated SQL is character-identical to 1.10.0.
Added to
EntitySource/EntityRepository(selectByQuery,selectFirstByQuery,select,selectIDsByQuery,selectIDsBy,selectAll),APIRepository,IterableEntityRepository(matches/allincluded),DBEntityRepository,DBRelationalAdapter/DBRelationalRepositoryAdapter/DBRelationalEntityRepository,DBAdapter.doSelectAll/doSelectByIDs,DBSQLAdapter.doSelect/doSelectIDsBy/generateSelectSQL/generateSelectIDsSQLandDBSQLRepositoryAdapter.generateSelectSQL. -
New
OrderDirectionenum (bones_api_types.dart), withsqlKeyword,parseand the resolversresolveandresolveOrderByIDthat state the semantics above exactly once. -
New
compareEntityIDsandapplySelectOrderAndPagination(bones_api_entity.dart): the shared Dart-side "order by ID → skip → take" used by every adapter that can't delegate the ordering to a DB engine. -
New
resolveSelectOffset(bones_api_entity.dart): resolvespageto anoffset, and states thepage/offset/limitvalidation rules once. -
SQLDialect:- New
orderBySQLandlimitOffsetSQLclause builders, so all the dialect-specificSELECTtail syntax lives in one place. - New
offsetRequiresLimitandoffsetMaxLimitValuecapabilities. MySQL setsoffsetRequiresLimit: truesince it can't parse anOFFSETthat is not preceded by aLIMIT; an offset-only select there emitsLIMIT 18446744073709551615 OFFSET n. PostgreSQL and thegeneric(in-memory) dialect emit a bareOFFSET n.
- New
-
SQL: newoffset,orderByIDandorderDirectionfields (carried bycopy()), read byDBSQLMemoryAdapterto apply the same semantics in Dart. -
APIDBModule.select(/db/select/<table>): newLIMIT=<n>,OFFSET=<n>,PAGE=<n>andORDER=asc|descquery directives (seeAPIDBModule.selectQueryDirectives), parsed from the queryStringalongside the pre-existingEAGER=trueand stripped before the remainder is parsed as the entity condition query. The endpoint no longer selects the whole table and sorts it in Dart — the ordering is now resolved by the DB. Its output order is unchanged. An invalidPAGEbecomes an error response rather than an uncaughtArgumentError. -
Behavior change:
limitis now honored on the paths that previously accepted and silently ignored it —DBEntityRepository.select'sConditionID/ConditionIdIN/ConditionANY/KeyConditionEQfast paths,DBAdapter.doSelectAll/doSelectByIDs, and theDBObjectMemoryAdapter,DBObjectDirectoryAdapterandDBObjectGCSAdapteradapters. For example,selectAll(limit: 2)on an object adapter returned every row before this release; it now returns 2. -
Source-breaking for external subclasses: new named parameters were added to abstract members (
EntitySource.select/selectIDsBy/selectAll,DBAdapter.doSelectAll/doSelectByIDs,DBRelationalAdapter.doSelect/doSelectIDsBy). Dart requires an override to accept every named parameter of the supertype, so third-partyEntityRepository/DBAdapterimplementations must widen their overrides. -
Known limitation: a query over a to-many relationship generates a
JOINwithout aDISTINCT, so it can return the same entity more than once (pre-existing). Paginating such a query is therefore best-effort. -
Tests:
- New
bones_api_entity_select_order_test.dart(OrderDirection,compareEntityIDs,applySelectOrderAndPagination,SQLDialectclause builders),bones_api_entity_db_sql_select_test.dart(exact generated SQL per case + end-to-end paging over the in-memory SQL adapter) andbones_api_db_module_test.dart(first coverage ofAPIDBModule). bones_api_entity_db_tests_base.dart: 3 new tests in the shared adapter template, so the generated SQL and real page-by-page reads are asserted for the in-memory, PostgreSQL, MySQL, object-memory and object-directory adapters. Verified against real PostgreSQL and MySQL containers.
- New
1.10.0 #
-
docker_commander:^2.1.8→^3.0.0.- Removes
wasm_runandflutter_rust_bridge1.x from the dependency graph (they came in viadocker_commander→apollovm, and were only ever needed to execute Wasm — which nothing here does). - Those packages pinned
shelf_web_socket ^1.0.2andweb_socket_channel ^2.2.0, so everybones_apiapplication was locked out of a modern shelf/WebSocket stack. That constraint is now gone. docker_commander's own API is unchanged, so this is a minor release: theDockerHosttypes exposed by the test utils keep the same shape.
- Removes
-
petitparser:^6.1.0→^7.0.2(required byapollovm2.0.0).JsonGrammarLexer.token:flatten()takes its message as a named parameter in petitparser 7. Same behaviour, new call shape.
1.9.32 #
- Tests:
- Expanded coverage of
bones_api_utils_collections:isEqualsDeep/isEqualsListDeep/isEqualsIterableDeep/isEqualsSetDeep/isEqualsMapDeep(including nested structures,null/identity edge cases and customvalueEquality).intersectsIterableDeep.deepCopy/deepCopyList/deepCopySet/deepCopyMap(typed fast paths,Uint8List/Int8List, and copy independence).MapAsCacheExtension(getCached,getCachedNullable,getCachedAsync,getCachedAsyncNullable,getIfCached,checkCacheLimit).MapOfCachesExtension(getMultiCached*,isEquivalentContextwildcard semantics,equivalentCaches).RecordExtension.positionalParametersLength.
- Expanded coverage of
Arguments: case-sensitive keys, trailing single-dash flags, the trailing double-dash error path,keysAbbreviationsandtoArgumentsList.
- Expanded coverage of
1.9.31 #
-
Bug fixes:
ConditionSQLEncoder.valueToParameterValue: fixed encoding of aListof values containingConditionParameters; each element is now resolved individually instead of passing the whole list to every element.ConditionEncoder.resolveValueToType: fixed resolution of a single-elementIterableto a primitive type (was a no-op comparison instead of an assignment, leaving the value as aList).MapGetterExtension.matchKeyIgnoreCase: fixed case-insensitive key matching that always returnednull(empty loop body); now returns the matching key. Also fixessetMultiValue(..., ignoreCase: true).Time:millisecond/microsecondrange validation now correctly rejects1000(valid range is0..999).Time._bytesInStringFormat: fixed the second-byte digit check that was effectively disabled (length < 2instead oflength >= 2).APISession.isExpired: now honors the providednowargument instead of always usingDateTime.now().APIServerResponseCachecached entry:replaceFileStatno longer compares a variable to itself (identical(myFileStat, myFileStat)), so the file stat is correctly replaced.WeakList.set: now increments the internal modification counter, consistent with the other mutating methods.
-
Tests:
- Added tests covering the bug fixes above (
Timerange/string parsing,matchKeyIgnoreCase/getIgnoreCase/setMultiValue,APISession.isExpired, andConditionSQLEncoder/ConditionEncodervalue resolution).
- Added tests covering the bug fixes above (
1.9.30 #
-
APIRootStarter:start:- Added logging of severe errors when
apiRoot.ensureInitialized()returns a failure with an error.
- Added logging of severe errors when
-
Project template:
update_project_template.sh:- Updated
project_template preparecommand to exclude IDE module files matching^\w+\.iml$from the template archive.
- Updated
-
Dependencies:
- Updated
build_runnerto ^2.15.0. - Updated
testto ^1.31.1. - Updated
vm_serviceto ^15.2.0.
- Updated
1.9.29 #
-
ConditionID:- Added method
resolveIDValueto resolve the ID value from parameters orConditionParameter.
- Added method
-
DBEntityRepository:- Updated
selectIDsByand_selectByIDto useConditionID.resolveIDValuefor ID resolution. select:- Added optimization for
KeyConditionEQmatcher with a single key matching the entity ID field. - When matched, uses
_selectByIDto fetch the entity by ID and returns a single-element list or empty list accordingly.
- Added optimization for
- Updated
-
DBObjectDirectoryAdapter:- Updated
_doCountImpland_doDeleteImplto useConditionID.resolveIDValuefor ID resolution. - Updated public methods to pass combined parameters (
parameters ?? namedParameters) to internal implementations.
- Updated
-
DBObjectGCSAdapter:- Updated
_doCountImpland_doDeleteImplto useConditionID.resolveIDValuefor ID resolution. - Updated public methods to pass combined parameters (
parameters ?? namedParameters) to internal implementations.
- Updated
-
DBObjectMemoryAdapter:- Updated
_doCountImpland_doDeleteImplto useConditionID.resolveIDValuefor ID resolution. - Updated public methods to pass combined parameters (
parameters ?? namedParameters) to internal implementations.
- Updated
-
Dependency updates:
vm_service: ^15.0.2 → ^15.1.0
1.9.28 #
-
SQLGenerator:- Fixed
referenceTableandreferenceColumnassignment in unique constraint SQL entries to allow nullable references. - Updated unique and enum constraint names in
generateAddUniqueConstraintAlterTableSQLandgenerateAddEnumConstraintAlterTableSQLto use normalized column names with double underscores for consistency.
- Fixed
-
Dependency updates:
async_extension: ^1.2.22reflection_factory: ^2.7.5swiss_knife: ^3.3.14meta: ^1.18.2hotreloader: ^4.4.0googleapis_auth: ^2.3.0build_runner: ^2.13.1test: ^1.31.0
1.9.27 #
-
Added
bones_api_utils_fast_checksum.dart:- Provides functions
getAdler32Uint8List,getAdler32Hex,getCrc32Uint8List, andgetCrc32Hexfor Adler-32 and CRC-32 checksums as byte arrays and hex strings. - Implements internal helpers for big-endian byte conversion and hex encoding.
- Exports
getAdler32andgetCrc32fromarchivepackage for checksum calculation.
- Provides functions
-
WeakEtagclass (bones_api_base.dart):- Updated
WeakEtag.adler32andWeakEtag.crc32factories to usegetAdler32HexandgetCrc32Hexfrombones_api_utils_fast_checksum.dartinstead of deprecatedAdler32andCrc32classes.
- Updated
-
bones_api.dart:- Exported new
bones_api_utils_fast_checksum.dartutility.
- Exported new
-
Dependencies:
- Updated
async_extensionfrom ^1.2.20 to ^1.2.21. - Updated
swiss_knifefrom ^3.3.3 to ^3.3.5. - Updated
archivefrom ^4.0.7 to ^4.0.9. - Updated
build_runnerfrom ^2.10.5 to ^2.11.1. - docker_commander: ^2.1.8
- Updated
1.9.26 #
Initializablemixin:ensureInitialized: addedonErrorhandler tothencall to route errors to_onInitializationError.executeInitializedCallback:- Added
onErrorhandler tothencall on async initialization result to throwInitializationErrorwith stack trace.
- Added
_FutureExtension:toCompleter: addedonErrorhandler tothento complete completer with error and stack trace if not completed.
1.9.25 #
-
TableFieldReference:- Added nullable field
indexNameto represent the name of the index if one exists.
- Added nullable field
-
Added new class
TableRelationshipReferenceEntityTypedextendingTableRelationshipReference:- Adds
sourceFieldEntityTypeandtargetFieldEntityTypefields of typeTypeInfo. - Provides
copyWithEntityTypesmethod to create typed copies.
- Adds
-
TableRelationshipReference:- Added nullable fields
sourceRelationshipFieldIndexandtargetRelationshipFieldIndex. - Added
copyWithEntityTypesmethod returningTableRelationshipReferenceEntityTyped.
- Added nullable fields
-
EntityHandler:- Added
getFieldsListEntityTypesmethod to return a map of fields that are list entities or references with theirTypeInfo.
- Added
-
SQLDialect:- Added
foreignKeyCreatesImplicitIndexboolean flag with defaulttrue. - Added field
createIndexIfNotExiststo indicate support forIF NOT EXISTSinCREATE INDEX(defaulttrue).
- Added
-
CreateIndexSQL:- Updated
buildSQLmethod to conditionally includeIF NOT EXISTSonly if dialect supports it.
- Updated
-
DBPostgreSQLAdapter:- Added
foreignKeyCreatesImplicitIndexflag to PostgreSQL dialect set tofalse. - Updated
_findAllTableFieldsReferencesquery to include foreign key index name (fk_index_name) by joining withpg_indexandpg_class. - Populated
indexNameinTableFieldReferenceinstances from query result. - Updated relationship references to include
sourceRelationshipFieldIndexandtargetRelationshipFieldIndexfromindexName.
- Added
-
DBMySQLAdapter:- Set
createIndexIfNotExiststofalsein MySQL dialect capabilities.
- Set
-
DBSQLAdapter:parseConfigDBGenerateTablesAndCheckTables: changed return type fromList<bool>to a record with named fields(generateTables, checkTables).extractTableSQLs: updated regex to also matchCREATE INDEXstatements in addition toCREATEandALTER TABLE._populateTablesFromSQLsImpl: fixed error handling forCREATE INDEXstatements when the SQL dialect does not supportIF NOT EXISTS.- Now logs a warning and ignores the error instead of throwing.
- Added detection of missing foreign key indexes when dialect does not create implicit indexes.
- Added detection of missing relationship reference indexes for collection reference fields.
- Updated error reporting and logging to include missing reference indexes and relationship reference indexes.
- Updated
_checkDBTableSchemeReferenceFieldto returnTableRelationshipReferenceEntityTypedwith entity types. - Added generation of missing reference indexes and missing relationship reference indexes SQL statements.
- Updated
_DBTableCheckclass:- Added fields
missingReferenceIndexesandmissingRelationshipReferenceIndexes. - Added methods to generate missing reference indexes and relationship reference indexes SQL.
- Added fields
- Added
_DBRelationshipTableColumnsubclass of_DBTableColumnto represent relationship table columns with relationship table name. - Updated SQL generation to create indexes for foreign keys if dialect does not create implicit indexes:
- Added index creation after foreign key constraints in
generateAddColumnAlterTableSQL. - Added index creation for relationship table foreign keys in relationship table creation SQL.
- Added index creation after foreign key constraints in
-
Dependency updates:
async_extension: ^1.2.19 → ^1.2.20meta: ^1.18.0 → ^1.18.1
1.9.24 #
-
GZipSink:- Added override for
addSliceto handle partial chunk addition and update_inputLengthaccordingly. - Optimized
addSliceto call_gzipSink.close()whenisLastis true and full chunk is added.
- Added override for
-
BytesSink:- Updated
addSliceto use newaddPartmethod for partial chunk addition.
- Updated
-
BytesBuffer:- Added
addPartmethod to add a slice of bytes from a given offset and length, resizing buffer if needed. - Refactored
addmethod to delegate toaddPart. - Improved buffer range setting to support offset and length parameters in
addPart.
- Added
-
async_extension: ^1.2.18 -> ^1.2.19
1.9.23 #
DBPostgreSQLAdapter:mapDataTypeToDartType: added support for PostgreSQL typessmallintandsmallserialmapping toint.
1.9.22 #
-
Initializablemixin:- Added calls to
_forceLogFlushMessages()before throwingInitializationErrorin:_checkDependency_setInitializedDependenciesCompleters_onInitializationError_checkAllDependenciesOk_finalizeInitializationcheckInitializedexecuteInitialized
- Added calls to
-
Logging:
- Added
_forceLogFlushMessages()function to calllogging.Logger.root.forceFlushMessages(). Loggerextension:- Added
forceFlushMessages()method to invokeLoggerHandler.forceFlushMessages().
- Added
LoggerHandlerabstract class:- Added
forceFlushMessages()method.
- Added
LoggerHandlerGenericimplementation:- Implemented
forceFlushMessages()returningfalse.
- Implemented
LoggerHandlerIOimplementation:- Implemented
forceFlushMessages()to flush the print message queue immediately if not empty.
- Implemented
- Added
1.9.21 #
-
EntityHandler:- Updated all
Map.unmodifiableusages to explicitly specify type arguments, e.g.Map<String, TypeInfo>.unmodifiable. - Updated methods including
fieldsWithEntityReference,fieldsWithEntityReferenceList,fieldsEntityAnnotations,fieldsWithType,getFieldsTypes,getFieldsEnumTypes,getFieldsEntityTypes, andconstructorsto use typed unmodifiable maps. - Improved type safety in map constructions by adding explicit generic parameters.
- Updated all
-
Dependency updates:
meta: ^1.18.0
1.9.20 #
-
ConditionSQLEncoder:keyToSQL: added check to throwConditionEncodingErrorifkeysis empty.- Refactored
keyFieldReferenceToSQLto recursively resolve multi-level key references by walking keys and resolving intermediate tables and relationships. - Added helper methods
_resolveReferenceFieldand_resolveFinalFieldto modularize reference resolution logic.
-
DBSQLAdapter:- Introduced
_JoinEntrytypedef to represent SQL JOIN fragments with explicit alias dependencies (defsandrefs). - Added local extension methods on
List<_JoinEntry>to perform dependency-aware sorting of JOINs ensuring referenced aliases are resolved before use. - Refactored JOIN construction logic in SQL query building to:
- Collect JOINs as
_JoinEntrywith defined and referenced aliases. - Sort JOINs by alias dependencies before concatenation.
- Log a warning if not all JOIN references could be resolved.
- Collect JOINs as
- This improves correctness and ordering of JOIN clauses in generated SQL.
- Introduced
-
Dependencies:
- Updated
async_extensionfrom ^1.2.17 to ^1.2.18. - Updated
build_runnerfrom ^2.10.4 to ^2.10.5.
- Updated
1.9.19 #
- Dependency updates:
- Updated
reflection_factorydependency from^2.7.2to^2.7.3.
- Updated
1.9.18 #
-
DBAdapter:- Improved error messages in instantiation methods to include a list of instantiator function keys.
-
Dependencies:
- Updated
async_extensionfrom ^1.2.15 to ^1.2.17. - Updated
testfrom ^1.28.0 to ^1.29.0.
- Updated
1.9.17 #
-
APIServer:_resolvePayloadFromString: Improved JSON payload parsing:- Trim input before decoding.
- Return
nullfor empty bodies. - Catch decode errors and log them without throwing.
-
statistics: ^1.2.1
1.9.16 #
-
New
FileLimited: exposeFililimit handling. -
FileLimitExtension: useFileLimited.global. -
APIServerResponseCache:- Use a local
_fileLimitedfor file operations. - Optimize
Fileoperations to prioritize async and limited operations.
- Use a local
-
shelf_letsencrypt: ^2.0.3
-
build_runner: ^2.10.4
-
test: ^1.28.0
1.9.15 #
-
FileLimitExtension:- Added
statLimited,deleteLimited.
- Added
-
DBObjectGCSAdapter:- Replaced direct file operations with the new limited I/O methods:
deleteLimited()instead ofdelete()statLimited()instead ofstat()
- Improves concurrency control and prevents
Too many open fileserrors during cache cleanup and maintenance...
- Replaced direct file operations with the new limited I/O methods:
1.9.14 #
-
FileLimitExtension:- Added
readAsBytesLimited()andwriteAsBytesLimited()methods to safely limit concurrent file I/O operations and preventToo many open fileserrors.
- Added
-
DBObjectGCSAdapter:- Replaced direct file reads with the new
FileLimitExtension.readAsBytesLimited()to control concurrent I/O and preventToo many open fileserrors during cache access.
- Replaced direct file reads with the new
-
async_locks: ^4.0.2
-
build_runner: ^2.10.2
-
test: ^1.27.0
1.9.13 #
DBObjectGCSAdapter:_checkCacheDirectoryLimit:- Improve logging.
- Fix calculation of needed deleting and extra 20%.
1.9.12 #
-
DBObjectGCSAdapter:- Added properties:
cacheDevelopment,cacheFilesLimit,cacheCheckMaxSkipsandcacheCheckTimeout. - Auto-created
cacheDirectoryoncacheDevelopment. _checkCacheDirectoryLimit:- Optimize and also use
cacheFilesLimit. - Log check time.
- Optimize and also use
- Added properties:
-
DBObjectDirectoryAdapter:- Added property
development. - Auto-created
directoryondevelopment.
- Added property
-
reflection_factory: ^2.7.2
-
postgres: ^3.5.9
-
crypto: ^3.0.7
-
http: ^1.6.0
-
_discoveryapis_commons: ^1.0.7
-
build_runner: ^2.10.1
1.9.11 #
-
EntityHandler:resolveFieldsValues: when resolving anEntityReferenceand the value can't be resolved, pass the ID to the EntityReference.resolveValueByType: optimize for nullvalue.
-
LoggerHandler:_buildMsg: handle long debugName starting withtest_suite:.
-
ClassProxyListener:onCall: On response error, throw an exception usingresponse.stackTracewhen available.
1.9.10 #
-
DBEntityRepository:- Optimize
resolveEntities.
- Optimize
-
build_runner: ^2.7.1
1.9.9 #
-
APISecurity:- Added
notifyAPITokenInfoChange,disposeAuthenticationPermission,disposeAuthenticationDataAndPermission.
- Added
-
APITokenStore:- Added
removeTokenPermissions,removeTokenDataAndPermissions.
- Added
-
APIRequest:- Add
APIRequestandgetPayloadParameterIgnoreCase.
- Add
1.9.8 #
-
sdk: '>=3.7.0 <4.0.0'
-
reflection_factory: ^2.6.0
-
collection: ^1.19.1
-
mime: ^2.0.0
-
http: ^1.5.0
-
build_runner: ^2.7.0
-
Comment:
dependency_validator: ^4.1.3.
1.9.7 #
-
EntityAccessRules: addedtotalRules. -
APIModule:- Added
addRouteHandler.
- Added
-
APIRouteBuilder:- Added
addRouteHandler. apiMethod: optimize the builtrouteHandler.
- Added
-
Now
APIRouteHandleris abstract:- Removed field
function. - Public implementation
APIRouteHandlerFunction.
- Removed field
-
MethodReflectionExtension:returnsAPIResponse: do not acceptdynamic.
-
APIServer:- Improve error logging when start fails.
-
reflection_factory: ^2.5.3
1.9.6 #
APIServer:_defineGZipEncodedHeaders:- Fix
serverTimingEntryNamedefault value fromobj->json->gziptoobj-json-gzip.
- Fix
1.9.5 #
-
APIServer:_resolveBodyImpl:- Log errors while encoding payload to JSON.
- Catch
OutOfMemoryErrorand log. - Return
apiResponse.asErroron errors.
_jsonEncodePayload:- Now uses
AutoGZipSinkandJson.encodeToSinkto stream JSON encoding with automatic GZip compression based on output size.
- Now uses
-
Added
AutoGZipSink,GZipSinkandBytesSinkandBytesBuffer. -
Json:- Added
encodeToSink.
- Added
-
reflection_factory: ^2.5.2
-
swiss_knife: ^3.3.3
-
test: ^1.26.3
1.9.4 #
-
Main updates (see
v1.9.4-beta.*for more):-
APIServerConfig:defaultStaticFilesCacheControl: removedmust-revalidate(conflicts withstale-while-revalidate).- Added
longLivedStaticFilesCacheControlandlongLivedStaticFilesCached- Default values are for PWA bootstrap files:
/,/index.html,styles.css,/pwa_sw.js
- Default values are for PWA bootstrap files:
- Constructor:
- Improved parameters that can be passed through
apiConfig:
- Improved parameters that can be passed through
-
CacheControl:- Removed
mustRevalidatefrom the defaultdirectives(conflicts withstaleWhileRevalidate).
- Removed
-
-
coverage: ^1.15.0
1.9.4-beta.3 #
APIServerConfig:- Fix
normalizeHeaderValueresolution when usingapiConfig.
- Fix
1.9.4-beta.2 #
APIServerConfig:defaultLongLivedStaticFilesCacheControl: changedmax-agefrom 86400 (1 day) to 3600 (1 hour).- Constructor:
- Improved parameters that can be passed through
apiConfig:cookieless,useSessionID.maxPayloadLength,decompressPayload.apiCacheControl,staticFilesCacheControl.longLivedStaticFilesCacheControl,longLivedStaticFilesCached.
- Improved parameters that can be passed through
1.9.4-beta.1 #
-
CacheControl:- Removed
mustRevalidatefrom the defaultdirectives(conflicts withstaleWhileRevalidate).
- Removed
-
APIServerConfig:defaultStaticFilesCacheControl: removedmust-revalidate(conflicts withstale-while-revalidate).- Added
longLivedStaticFilesCacheControlandlongLivedStaticFilesCached- Default values are for PWA bootstrap files:
/,/index.html,styles.css,/pwa_sw.js
- Default values are for PWA bootstrap files:
-
APIServerResponseCache:- Improve headers of cached responses:
- Added
Cache-ControlandServer. - Added
Last-Modifiedon 304 responses.
- Added
- Improve headers of cached responses:
1.9.3 #
-
DBPostgreSQLAdapter:- Upgrade to
postgresAPI v3. - Allow SSL connections.
- Upgrade to
-
DBEntityRepositoryProvider: check for duplicated repositories. -
APIServerConfig,APIServerWorker,APIServer:- Add
maxPayloadLengthanddecompressPayloadoptions for request handling.
- Add
-
APIServer:_loadPayloadBytes:- Added support for compressed payload in gzip and deflate.
- Added
_decodePayloadGzipto handled GZip decompression and check the decompressed size in header before decompression.
-
Time.parse: accept formatTime(hh:mm:ss.sss) -
Fix SQL column generation type if min/max is defined for the field.
-
postgres: ^3.5.6
1.9.3-beta.11 #
-
DBEntityRepositoryProvider:- Added
_checkDuplicatedRepositories: check for duplicated repositores, byTypeandname.
- Added
-
Initializable:_doInitializationImpl: add extra timeout when new parents are added.
1.9.3-beta.10 #
DBMySQLAdapter,DBPostgreSQLAdapter:typeToSQLType: fix forint/BigIntID (isID: true).
1.9.3-beta.9 #
-
DBMySQLAdapter:typeToSQLType:- Fix for
int: useentityFieldAnnotationsmin/max to define SQL type (TINYINT,SMALLINT,MEDIUMINT,INT,BIGINT). - Fix for
BigIntandDynamicInt:DECIMAL(65, 0)
- Fix for
-
DBPostgreSQLAdapter:typeToSQLType:- Fix
int: useentityFieldAnnotationsmin/max to define SQL type (SMALLINT,INT,BIGINT). - Fix for
BigIntandDynamicInt:NUMERIC
- Fix
1.9.3-beta.8 #
-
APIServerConfig,APIServerWorker,APIServer:- Add
maxPayloadLengthanddecompressPayloadoptions for request handling.
- Add
-
APIServer:_loadPayloadBytes:- Added support for compressed payload in gzip and deflate.
- Added
_decodePayloadGzipto handled GZip decompression and check the decompressed size in header before decompression.
1.9.3-beta.7 #
-
GenericEntityHandler,ClassReflectionEntityHandler:getFieldType: if the field doesn't have a setter do not use cached fields types.
-
meta: ^1.17.0
-
gcloud: ^0.8.19
-
http: ^1.4.0
-
googleapis_auth: ^2.0.0
-
test: ^1.26.2
-
coverage: ^1.14.1
-
vm_service: ^15.0.2
1.9.3-beta.6 #
-
TypeInfoEntityExtension,TypeReflectionEntityExtension:entityType: also handleList<E>, returning theListgeneric type (E).
-
TypeInfoEntityExtension:- Added
toCastedList.
- Added
-
DBSQLAdapter:_checkDBTableScheme:- Separate references and collection references in
referenceFieldsandcollectionReferenceFields.
- Separate references and collection references in
_DBTableCheck: added fieldmissingCollectionReferenceColumns.
-
EntityHandler:resolveFieldsValues: ensure thatList<E>fields are casted to the list, usingentityType.toCastedList(val).
-
New
InitializationError. -
Initializable: better handling of errors of dependencies while initializing. -
async_extension: ^1.2.15
-
args: ^2.7.0
-
postgres: ^3.5.6
-
archive: ^4.0.7
-
coverage: ^1.12.0
1.9.3-beta.5 #
-
DBPostgreSQLAdapter: -
PostgreSQLConnectionWrapper:- Remove field
_endpoint. - Added fields
username,host,port,database,secure. connectionURL: appended query string withsslmode.
- Remove field
1.9.3-beta.4 #
DBPostgreSQLAdapter:_connectSSLImpl,_connectNoSSLImpl: simplify error handling.
1.9.3-beta.3 #
-
New
DBAdapterConnectivity. -
DBAdapter:- Added field
connectivity.
- Added field
-
DBPostgreSQLAdapter:- Remove filed
onlySecureConnections. - Added support to
connectivityfield.
- Remove filed
1.9.3-beta.2 #
-
New
DBAdapterCapabilityConnectivity. -
DBAdapterCapability:- Added field
connectivity.
- Added field
-
DBPostgreSQLAdapter:- Added field
onlySecureConnections.
- Added field
-
dependency_validator: ^4.1.3
1.9.3-beta.1 #
-
DBPostgreSQLAdapter:- Upgrade to
postgresAPI v3. - Allow SSL connections.
- Upgrade to
-
Time.parse: accept formatTime(hh:mm:ss.sss) -
postgres: ^3.5.4
-
project_template: ^1.1.1
-
archive: ^4.0.4
1.9.2 #
-
FieldsFromMap:resolveFiledName: improve field matching.
-
EntityHandlergetFieldType: added parameterresolveFiledName: false.- Optimize field and types resolution.
-
GenericEntityHandler,ClassReflectionEntityHandler:- Optimize field and types resolution.
1.9.1 #
- async_events: ^1.3.0
- reflection_factory: ^2.5.1
- web: ^1.1.1
1.9.0 #
-
APIPlatformBrowser:- Change use of
dart:html(deprecated) to packageweb.
- Change use of
-
Json:defaultFieldValueResolver: optimize primitives parsing (String, bool, int, double, num) .- Added
dumpRuntimeTypes.
-
sdk: '>=3.6.0 <4.0.0'
-
reflection_factory: ^2.5.0
-
statistics: ^1.2.0
-
swiss_knife: ^3.3.0
-
yaml_writer: ^2.1.0
-
mercury_client: ^2.3.0
-
resource_portable: ^3.1.2
-
collection: ^1.19.0
-
web: ^1.1.0
1.8.7 #
-
reflection_factory: ^2.4.10
-
petitparser: ^6.1.0
-
hotreloader: ^4.3.0
-
stream_channel: ^2.1.4
-
http: ^1.3.0
-
lints: ^5.1.1
-
build_runner: ^2.4.15
-
test: ^1.25.15
1.8.6 #
- ✨♻️ Improve cast method in APIResponse
- Add error parameter to cast method for more flexibility
- Include additional requires authentication in the copied APIResponse object.
1.8.5 #
-
refactor(api):
- 🔨 improve payload handling in resolveBody and resolveBodySync
- 🔨
UNAUTHORIZED,BAD_REQUEST: Allowerroraspayloadin response generation.
-
swiss_knife: ^3.2.3
-
yaml: ^3.1.3
-
stream_channel: ^2.1.3
1.8.4 #
APIRoot:_callZoned: allow anAPIResponseto be thrown as response.
1.8.3 #
-
ZoneField:createContextZone: added parameterzoneValues.createSafeContextZone:- Added named parameters
zoneSpecificationandzoneValues - Changed
handleUncaughtErrorto named parameter.
- Added named parameters
-
APIRoot:_callZoned:- Fix closure memory leak.
- Optimize and avoid a new closure on parameter
handleUncaughtErrorfor everyZonecreated throughcurrentAPIRequest.createSafeContextZone. Now using a singleZoneSpecificationinstance. - Ensure that
currentAPIRequest.disposeContextZone(callZone)is always called.
- Optimize and avoid a new closure on parameter
- Fix closure memory leak.
-
async_extension: ^1.2.14
-
test: ^1.25.14
1.8.2 #
✨♻️ Add Time operators for addition + and subtraction -.
-
New
DurationToTimeExtension:Duration.toTime() -
async_extension: ^1.2.13
-
reflection_factory: ^2.4.8
-
build_runner: ^2.4.14
-
test: ^1.25.13
1.8.1 #
- map_history: ^1.0.6
- shelf_letsencrypt: ^2.0.1
1.8.0 #
-
ZoneField:_zones: optimize usingQueue.- Added
createSafeContextZone(handles Uncaught Errors).
-
APIRoot_callZoned: usecurrentAPIRequest.createSafeContextZoneand avoid Uncaught Errors that can quit a server.
-
APIServerWorker:_startLetsEncrypt: allow multiple domains.letsEncrypt.startServer:- Pass
checkCertificate: letsEncryptProduction,
- Pass
-
sdk: '>=3.5.0 <4.0.0'
-
shelf_letsencrypt: ^2.0.0
-
map_history: ^1.0.4
-
gcloud: ^0.8.18
-
lints: ^4.0.0
-
dependency_validator: ^4.1.2
-
test: ^1.25.12
-
coverage: ^1.11.1
-
build_runner: ^2.4.13
1.7.32 #
- reflection_factory: ^2.4.7
1.7.31 #
-
HTMLInput._resolveInput: ensure thatDataTimevalues are UTC. -
APIDBModule:- Added
_addScriptFixDateTimeand_fixParametersDateTime(used byinsert). _writeInputTable: id with link to theselectroute.select:- Show entry index.
- JSON url with query parameters.
- Added
1.7.30 #
-
APITestConfigDockerDB:- Added field
cleanContainer.
- Added field
-
APITestConfigDockerPostgreSQL:- Added fields
postgresPort,maxConnectionsandlogStatement. - constructor:
super.cleanContainer.
- Added fields
-
APITestConfigDockerMySQL:- constructor:
super.cleanContainer.
- constructor:
-
docker_commander: ^2.1.7
1.7.29 #
- reflection_factory: ^2.4.6
1.7.28 #
EntityAccessRules._simplified:- Fix: Added parameter
masker.
- Fix: Added parameter
1.7.27 #
-
EntityAccessRuleType:- Added
mask.
- Added
-
EntityAccessRules:- Added field
masker. - Added getter
cached. - Added
hasRuleType.
- Added field
-
gcloud: ^0.8.17
-
coverage: ^1.11.0
1.7.26 #
- reflection_factory: ^2.4.5
- gcloud: ^0.8.16
1.7.25 #
-
APISecurity:onNewAPIToken: added parameterrequest.
-
yaml_writer: ^2.0.1
-
args: ^2.6.0
-
logging: ^1.3.0
-
crypto: ^3.0.6
-
path: ^1.9.1
-
coverage: ^1.10.0
1.7.24 #
-
APISecurity:refreshAPIToken: afterrefreshTokenand create a new token, populate permissions callinggetCredentialPermissions.
-
gcloud: ^0.8.15
1.7.23 #
-
SQL:- Added
copy,isSharedDummy, andensureNotSharedDummy. - Fix
generateInsertRelationshipSQLs: useensureNotSharedDummy.
- Added
-
meta: ^1.16.0
1.7.22 #
-
APIModuleProxyHttpCaller:- Optimize
parseResponse. doRequest:- Added parameter
returnType.
- Added parameter
- Only use
responseType = 'arraybuffer'if thereturnTypeisUint8List; otherwise, useresponseType = 'text'.
- Optimize
-
HTMLInput:- Added empty option for enums.
-
statistics: ^1.1.3
-
swiss_knife: ^3.2.2
-
mercury_client: ^2.2.4
-
shelf_static: ^1.1.3
-
gcloud: ^0.8.13
1.7.21 #
Time.fromBytes:- Handle 7 bytes encoding from PostgreSQL.
1.7.20 #
Pool:removeFromPool: callclosePoolElement.
1.7.19 #
Pool:_catchFromPopulatedPool: calldisposePoolElementon invalid elements.
1.7.18 #
-
EntityReferenceBase:- Added
disposeInternalHandlersandresolve.
- Added
-
coverage: ^1.9.1
1.7.17 #
EntityReference:- Fix
setfornullvalue.
- Fix
1.7.16 #
-
EntityReferenceBase:- Optimize
_resolveEntityHandler: avoid multiplenullresolutions. - Optimize
_resolveEntity: avoid uncessary call toentityProviderwhenentityandidarenull. - Added
resolveTypeName: avoidtype.toString(). - Optimize
_isInvalidEntityType: avoid multiple==calls.
- Optimize
-
data_serializer: ^1.2.1
-
crypto: ^3.0.5
1.7.15 #
-
ConditionSQLEncoder:encodeConditionValuesWithOperator: Fix encoding fornullvalues to useIS NULLandIS NOT NULL.
-
statistics: ^1.1.2
1.7.14 #
-
APIModuleProxyHttpCaller:isJsonResponse: Improve logic for determining JSON response types.isByteArrayResponse: Improve logic for determining raw bytes response types.
-
swiss_knife: ^3.2.1
1.7.13 #
-
EntityHandler:- Added
fieldsEntityAnnotations. - Added
fieldsWithTypeAndAnnotations. fieldsWithEntityReference,fieldsWithEntityReferenceList: ensure unmodifiable.fieldsWithTypeListEntityOrReference: do not return hidden fields (@EntityField.hidden()).
- Added
-
sdk: '>=3.4.0 <4.0.0'
-
data_serializer: ^1.2.0
-
reflection_factory: ^2.4.4
-
statistics: ^1.1.1
-
collection: ^1.19.0
-
shelf: ^1.4.2
-
http: ^1.2.2
-
test: ^1.25.8
-
coverage: ^1.9.0
1.7.12 #
APISecurity:resolveRequestCredentials: callvalidateUnknownTokento allow external tokens.
1.7.11 #
LoggerHandler: optimizelogBuffered.
1.7.10 #
-
APIToken,APICredential: added fieldrefreshToken. -
APISecurity:- Added
onNewAPIToken,validateUnknownToken,validateRefreshToken.
- Added
-
shared_map: ^1.1.9
-
reflection_factory: ^2.4.3
1.7.9 #
-
EntityHandlerProvider:- Optimize
_getEntityHandlerImpl.
- Optimize
-
ClassReflectionEntityHandler:- Optimize
copy.
- Optimize
-
DBEntityRepository:- Optimize
hasReferencedEntities.
- Optimize
-
EntityResolutionRules:- Added:
isAnyEagerEntityType,isAnyEagerEntityTypeInfo,isAnyLazyEntityType,isAnyLazyEntityTypeInfo.
- Added:
-
EntityReference- Added
fromEntityInstantiatorandhasEntity.
- Added
-
New
EntityInstantiatorandEntityInstantiatorHandler. -
EntityHandler:- Added
getIDFromMapandtoEntitiesMapByIdMap.
- Added
-
EntityRepository: addedgetEntityMapID. -
Time: set all fieldsfinal. -
APIResponse: added metricAPI-response-json. -
reflection_factory: ^2.4.2
1.7.8 #
DBSQLMemoryAdapter:_selectEntries: add support forlimit.
1.7.7 #
EntityHandler:_resolveValueAsUInt8List: handlehex:andbase64:prefixed data.
1.7.6 #
-
EntityHandler:- Added
getIDs.
- Added
-
EntitySource,EntityRepository:- Added
existIDs,selectIDsByandselectIDsByQuery.
- Added
-
DBRelationalAdapter:- Added
parseIDs.
- Added
1.7.5 #
-
New
IterableEntityReferenceExtensionandIterableEntityReferenceListExtension. -
EntityReference: addedidAsIntandidNotNullAsInt. -
EntityReferenceList: addedidsAsIntandidsNotNullAsInt.
1.7.4 #
TimedMap:- Added keyTimeoutChecker
1.7.3 #
MapAsCacheExtension:- Added
getIfCached. - Exposed
checkCachedEntry.
- Added
1.7.2 #
-
New
MapOfCachesExtensionandRecordExtension. -
reflection_factory: ^2.4.0
-
docker_commander: ^2.1.6
-
meta: ^1.15.0
-
archive: ^3.5.1
-
build_runner: ^2.4.10
-
test: ^1.25.5
-
coverage: ^1.8.0
1.7.1 #
DBPostgreSQLAdapter:- Fix
_parseConstraintfor enums with single values.
- Fix
1.7.0 #
-
ConditionParameter:- Added
contextKeyPositionwith the parameters position of the key. getValue: improve key and index resolution.- 💥 Breaking Change:
contextPosition: the index is now resolved using all parameters, not only the positional ones.- Now
bazwill resolvecontextPositionas2and not1:foo == ? || bar == ?:x || baz == ?
- Now
- Added
-
args: ^2.5.0
-
meta: ^1.14.0
-
googleapis_auth: ^1.6.0
-
test: ^1.25.3
1.6.15 #
-
APIModuleProxyTargetResolver: added parametererrorHandler. -
APIModuleProxyCaller.resolveTarget: added parametererrorHandler. -
APIModuleProxyDirectCallerandAPIModuleProxyHttpCaller:- Added field
errorHandler. - Added static field
defaultErrorHandler.
- Added field
-
APIModuleProxyCallerListener- Added static field
defaultErrorHandler.
- Added static field
-
APIModuleProxyCallerResponseError:- Added fields:
request,responseStatus,module,methodNameandparameters.
- Added fields:
-
Removed deprecated
APIModuleHttpProxy(useAPIModuleProxyHttpCaller).
1.6.14 #
APIToken: fix the constructor initialization of fieldduration.
1.6.13 #
-
Condition: addedisIDCondition -
DBSQLMemoryAdapter: optimize_selectEntriesforConditions that only depends on IDs.
1.6.12 #
LoggerHandler:- Added
isLoggingAllandisLoggingDB. - Optimize
parent,rootLoggerandroot.
- Added
1.6.11 #
-
TableScheme: optimizegetFieldReferencedTable. -
DBSQLMemoryAdapter:- optimize
_resolveEntityMapand_resolveEntityFieldRelationshipTable.
- optimize
-
APIServerConfig: addedlogQueue. -
EntityRepository:_storeAllFromJsonImpl: optimize loading of entities from JSON (split in blocks of 100 entries per store).
1.6.10 #
- reflection_factory: ^2.3.4
1.6.9 #
-
ClassReflectionEntityHandler:getFields: callreflection.getJsonFieldsVisibleValues(avoid issues withJsonHidden.fields).
-
reflection_factory: ^2.3.3
1.6.8 #
-
LoggerHandler:- Added
useLogQueue,disableLogQueueandenableLogQueue.
- Added
-
New
APIModuleProxyCallerError:- Implemented by
APIModuleProxyCallerResponseError.
- Implemented by
-
APIModuleProxyDirectCaller:- Throw
APIModuleProxyCallerResponseErrorforAPIResponses withERRORstatus.
- Throw
-
APIModuleProxyHttpCaller:- Throw
APIModuleProxyCallerResponseErrorfor errorHttpResponses.
- Throw
-
Optimize
DBAdapterandDBEntityRepository. -
async_extension: ^1.2.12
-
mercury_client: ^2.2.2
-
async_extension: ^1.2.9
-
googleapis_auth: ^1.5.1
-
build_runner: ^2.4.9
1.6.7 #
-
EntityHandler: addednormalizeIDandnormalizeIDs. -
EntityReference.fromID: use_normalizeID. -
EntityReferenceList.fromIDs: use_normalizeIDs.
1.6.6 #
-
APIServerConfig:- Added field
developmentandserverResponseDelay. - Added option
server-response-delay.
- Added field
-
APISecurity:- Fixed
disposeAuthenticationData. - Added
disposeAuthenticationToken.
- Fixed
-
APITokenStore:- Added
removeTokenData.
- Added
1.6.5 #
-
EntityAccessRules:- Fix
toJsonEncodableto allow rules to be applied to sub-entities.
- Fix
-
APIResponseextension onFutureandFutureOr:- Added
payloadAsyncOr.
- Added
-
LoggerHandler:flushMessages: added parameterdelay.
-
async_extension: ^1.2.7
-
reflection_factory: ^2.3.1
-
postgres: ^2.6.4
-
googleapis_auth: ^1.5.0
1.6.4 #
-
EntityReference:- Added
idNotNull,idAsandidNotNullAs
- Added
-
EntityReferenceList:- Added
idsAsandidsNotNullAs.
- Added
-
LoggerHandler:- Added
flushMessages.
- Added
-
APIServerandAPIServerWorker:_startImpl: callflushMessagesbefore return.
1.6.3 #
APIServer: allow return ofList<int>as JSON.
1.6.2 #
-
DBEntityRepository:- Optimize
_resolveRelationshipFields.
- Optimize
-
LoggerHandlerIO:printMessage: add a message queue for printing log messages asynchronously.
-
http: ^1.2.1
1.6.1 #
-
statistics: ^1.1.0
-
swiss_knife: ^3.2.0
-
shared_map: ^1.1.8
-
mercury_client: ^2.2.1
-
meta: ^1.12.0
-
logging: ^1.2.0
-
mime: ^1.0.5
-
gcloud: ^0.8.12
-
path: ^1.9.0
-
archive: ^3.4.10
-
http: ^1.2.0
-
build_runner: ^2.4.8
-
test: ^1.25.2
1.6.0 #
Dart 3.3.0 compatibility.
-
sdk: '>=3.3.0 <4.0.0'
-
data_serializer: ^1.1.0
-
yaml_writer: ^2.0.0
-
project_template: ^1.1.0
-
hotreloader: ^4.2.0
1.5.28 #
-
ClassReflectionEntityHandler.getFields: optimize usingreflection.getFieldsValues. -
async_events: ^1.1.0
-
reflection_factory: ^2.3.0
1.5.27 #
SQLGenerator:- Added
generateAddUniqueConstraintAlterTableSQL.
- Added
DBSQLAdapter:_checkDBTablesImpl: Added check formissingReferenceConstraintsSQLs,missingUniqueConstraintsSQLsandmissingEnumConstraintsSQLs.
- New
TableUniqueConstraint. EntityHandler:- Added
getFieldsEnumTypes,getFieldsEntityTypesandgetAllFieldsWithEntityAnnotation.
- Added
- New
DBExceptionandTransactionErrorResolver. DBAdapterException:- Added field
previousError.
- Added field
DBPostgreSQLAdapter:resolveError: passpreviousError.
- New
RecursiveToString. - Add
RecursiveToStringinterface toEntityFieldInvalidandTransactionOperation.
1.5.26 #
DBSQLMemoryAdapter:- Added index for relationship tables.
InitializationStatus:- Added fields
_initializingTimeand_initializedTime. - Logging initialization time.
- Added fields
1.5.25 #
- Fix
DBPostgreSQLAdapter._parseConstraint.
1.5.24 #
APIModuleProxyCallerListener: fixresolveResponsefornullresponse.
1.5.23 #
-
EntityAccessRules:- Added
toJsonEncodable(moved fromAPIServer).
- Added
-
New
APIModuleProxyCallerListenerbase class. -
APIModuleProxyDirectCaller:- Added
responsesAsJson. - Now capable to simulate a JSON serialization/deserialization for unit tests.
- Added
-
reflection_factory: ^2.2.8
1.5.22 #
DBAdapterCapability:- Added
constraintSupport.
- Added
TableScheme:- Added
constraints.
- Added
- New
TableConstraint,TablePrimaryKeyConstraintandTableEnumConstraint. SQLGenerator:- Added
generateAddEnumConstraintAlterTableSQL.
- Added
MapAsCacheExtension:- Added internal
_checkCachedEntryto handleTimedMap.checkEntry.
- Added internal
1.5.21 #
APIRouteBuilder:_resolveRequestParameterValueAsBytes: allowhex:...format.
1.5.20 #
- Better error message for null
getRepositoryAdapterByTableNameandgetEntityRepositoryByType.
1.5.19 #
-
New
DateTimeToTimeExtension:- New
toTime.
- New
-
reflection_factory: ^2.2.7
-
coverage: ^1.7.2
1.5.18 #
- shelf_gzip: ^4.1.0
1.5.17 #
APIServerWorker:- Improve error 500 logging.
1.5.16 #
APIServer:- added
resolveBodySync-APIRequest,APIResponseandTransaction. - Added
disposeAsync.
- added
APIServerWorker:_processAPIResponse: optimizeResponseresolution.- Call
APIResponse.disposeAsyncinstead of.dispose.
1.5.15 #
-APIRequest, APIResponse and Transaction.
- Added
dispose. APIServerWorker._processAPIResponse: callAPIResponse.dispose.
1.5.14 #
DBMySQLAdapterandDBPostgreSQLAdapter:- Add finalizer to ensure that the DB connection is closed when the wrapper is collected.
- Fix ˜KeyConditionNotIN`.
1.5.13 #
LoggerHandlerIO:- Added
APIPlatformproperties:bones_api.log.max_file_length,bones_api.log.max_rotation_files.
- Added
LogFileRotate:- Optimize
needRotation.
- Optimize
APIPlatform:- Added
getPropertyAs,propertiesKeys,setPropertyandapplyProperties.
- Added
DBAdapter:isConnectionValid: added parametercheckUsage.
1.5.12 #
APIServerConfig:- Added properties:
cacheStaticFilesResponses,staticFilesCacheMaxMemorySizeandstaticFilesCacheMaxContentLength.
- Added properties:
APIConfig:getAsandgetPath: also tries to parse the value to the returned type.
1.5.11 #
- New
APIServerResponseCache.
1.5.10 #
-
printZoneError: reduce print calls. -
shared_map: ^1.1.7
-
petitparser: ^6.0.2
1.5.9 #
- reflection_factory: ^2.2.5
- shared_map: ^1.1.6
1.5.8 #
EntityHandler:- Added
_resolveTransaction: improve currentTransactionresolution.
- Added
DBSQLMemoryAdapter:- Using
catchFromPool/releaseIntoPoolto simulate connection/context usage and indicate heavy use of connections in tests.
- Using
1.5.7 #
SQLGenerator:generateCreateTableSQL: fixCONSTRAINTof fields withEntityReference.
1.5.6 #
APIRepository:- Expose
countByQuery.
- Expose
1.5.5 #
- lints: ^3.0.0
- Apply new lints fixes.
- shared_map: ^1.1.5
1.5.4 #
-
APISecurity:- Ensure that
_sessionSet(APISessionSet) is using_sharedStoreField.
- Ensure that
-
APITokenStore:- Also call
_resolveSharedTokensByUsernamefrom constructor, to fully pre-initialize it.
- Also call
-
shared_map: ^1.1.4
1.5.3 #
- shared_map: ^1.1.1
1.5.2 #
APIServerConfig:- Fix
nameandversionresolution
- Fix
1.5.1 #
-
new
APIServerConfig:- Holds the configuration need for
APIServerandAPIServerWorker. - Can be created from command-line arguments or a JSON object.
- Holds the configuration need for
-
Created an abstract base class
_APIServerBaseforAPIServerandAPIServerWorker.startandstopmethods, delegating tostartImplandstopImpl.- Add a new boolean property
isStartingto determine if the server is in the process of starting.
-
APIServer- Support for spawning auxiliary workers in separate isolates when needed.
- Starting and stopping of auxiliary
APIServerWorkerinstances using isolates. Main worker starts normally.
-
New
APIServerWorkerto handle multi-workerAPIServer.- Add
_processWhileInitializingto handle API requests while the server is still initializing, including a timeout for initialization.
- Add
-
APIRequest:- Can also handle metrics.
- Added
transactionsfield, automatically populated with all theTransactionsof the request.
-
APIRequestandAPIResponse:- Improved metrics: added
descriptionparameter. - Added
Transactions duration toServer-Timing.
- Improved metrics: added
-
APIRoot:- Added
isIsolateCopy.
- Added
-
DBAdapterCapability:- Added
multiIsolateSupport;
- Added
-
DBAdapter- Added
auxiliaryModeandenableAuxiliaryMode. DBSQLMemoryAdapterandDBObjectMemoryAdapterdon't supportauxiliaryMode, since they don't supportmultiIsolateSupport.
- Added
-
SQLGenerator.generateCreateTableSQL: skip annotated hidden fields. -
APISessionSet: usingSharedStoreFieldandSharedMapFieldto store the the sessions. -
New
APITokenStore:- Shared tokens among
Isolates.
- Shared tokens among
-
shared_map: ^1.0.10
-
args_simple: ^1.1.0
-
coverage: ^1.7.1
-
vm_service: ^13.0.0
1.5.0 #
-
sdk: '>=3.2.0 <4.0.0'
- Simple workaround for Kernel/Fasta issue https://github.com/dart-lang/sdk/issues/54062
-
reflection_factory: ^2.2.4
1.4.37 #
DBObjectGCSAdapter:- Fix cached file parent directory creation.
1.4.36 #
-
APIConfig: fix resolution of variables keys. -
DBAdapter:- Added parameter
populateSourceVariables: allow variables in populate source.
- Added parameter
-
Improved related tests.
-
data_serializer: ^1.0.12
-
hotreloader: ^4.1.0
1.4.35 #
DBSQLMemoryAdapter._findFieldsReferencedTables: Fix referenced field name.
1.4.34 #
APIConfig: added fieldtest.DBSQLMemoryAdapter:- Fix
_findFieldsReferencedTables:- Normalize entity field to table column name.
- Fix
DBSQLAdapter:- Fix
_checkDBTableScheme:- Normalize entity field to table column name.
- Fix
checkDBTableField:- Allow
EntityReferenceListfields.
- Allow
- Fix
1.4.33 #
EntityReferenceBase: addedisNotNull.- New
NullEntityReferenceBaseExtensionandNullEntityReferenceExtension. - meta: ^1.11.0
- hotreloader: ^4.0.0
- archive: ^3.4.6
1.4.32 #
APIModuleProxy: addedignoreMethods.- reflection_factory: ^2.2.3
1.4.31 #
-
Added
EntityHandler.constructors. -
EntityHandler._createFromMapDefaultImpl: improveUnsupportedErrormessage. -
statistics: ^1.0.26
-
data_serializer: ^1.0.11
-
docker_commander: ^2.1.5
-
postgres: ^2.6.3
-
archive: ^3.4.5
-
collection: ^1.18.0
-
dependency_validator: ^3.2.3
-
coverage: ^1.6.4
-
test: ^1.24.7
1.4.30 #
-
EntityResolutionRules:- New factory constructor
fetchTypes.
- New factory constructor
-
docker_commander: ^2.1.2
1.4.29 #
-
New abstract class
DBConnectionWrapper:- Implementations
DBMySqlConnectionWrapperandPostgreSQLConnectionWrapper.
- Implementations
-
Pool- Added
createPoolElementForced(non-nullable). _catchFromPopulatedPool: now can return null.
- Added
-
DBAdapter:- New
connectionInactivityLimit. isConnectionValid:MySQLandPostgreSQL: checkingconnection.isInactive.
- New
-
Using
Graphto resolve the correct order ofCreateTableSQLand to populate samples. -
Checking
SQLBuilderorder and warning invalid orders. -
EntityReferenceList.fromJson:- Fix issue with some entities null in the JSON.
-
APIRouteBuilder._apiMethodInvocation:- Check if returned value is a
FutureOr<APIResponse>or return anAPIResponse.error.
- Check if returned value is a
-
graph_explorer: ^1.0.2
-
ascii_art_tree: ^1.0.6
-
docker_commander: ^2.1.1
-
petitparser: ^6.0.1
-
archive: ^3.3.9
1.4.28 #
-
getTableScheme,getTableSchemeImplandgetTableSchemeForEntityRepository:- Added optional
contextIDparameter to allow multiple calls with the samecontextIDto share internal caches.
- Added optional
-
DBMySQLAdapterandDBPostgreSQLAdapter:- Optimize
getTableSchemeandgetRepositoriesSchemeswith use ofcontextIDand internal shared caches.
- Optimize
-
async_extension: ^1.2.5
1.4.27 #
DBSQLAdapter:_checkDBTableScheme: ignore fields annotated withEntityField.hidden.
- reflection_factory: ^2.2.1
- mercury_client: ^2.2.0
- archive: ^3.3.8
1.4.26 #
APIServer:- Integrate
LetsEncryptlogger withAPIServerlogger.
- Integrate
- shelf_letsencrypt: ^1.2.2
- dart_spawner: ^1.1.0
- vm_service: ^11.10.0
1.4.25 #
SQLBuilderListExtension:bestOrder: fix dependencies order of table relationships.
EntityRepositoryProviderExtension:storeAllFromJson: store byallRepositoriesorders.
1.4.24 #
- async_extension: ^1.2.3
- docker_commander: ^2.1.0
1.4.23 #
-
New
FutureOrAPIResponseExtensionandFutureAPIResponseExtension. -
async_extension: ^1.2.2
-
reflection_factory: ^2.2.0
1.4.22 #
-
APIServer:_resolvePayload:- Better resolution of
MimeTypewhencontent-typeheader is not provided. - String
MimeTypes: usecharsetEncodingto decode theString. - Optimize load of payload bytes as
Uint8List.
- Better resolution of
-
async_extension: ^1.2.0
-
data_serializer: ^1.0.10
-
gcloud: ^0.8.11
-
test: ^1.24.6
-
vm_service: ^11.9.0
1.4.21 #
-
ConditionSQLEncoder:resolveValueToCompatibleType: forceDateTime.toUtc()to avoid DB adapter issues.
-
Transaction- Added
waitOperation.- Added
timeoutparameter.
- Added
- Added
-
EntityRepository:ensureStoredimplementations (DBRelationalEntityRepository,DBEntityRepository,IterableEntityRepository):- Avoid multiple
storeof the same entity in the same [Transaction].- Fix issue with unique fields.
- Throws
RecursiveRelationshipLoopErrorif a loop is detected.
- Avoid multiple
-
EntityFieldInvalid:- Added field
operation.
- Added field
-
Added missing
APIRequestMethod.HEAD. -
EntityHandler:- Avoid recursive loop call to
_validateFieldValueImpl.
- Avoid recursive loop call to
-
APIDBModule:- select: sort entities by id.
- update: fix enum selected option (
HTMLInput).
-
LogFileRotate:- Fix
needRotationfor a log file not created yet.
- Fix
-
async_events: ^1.0.12
-
stream_channel: ^2.1.2
-
gcloud: ^0.8.10
-
postgres: ^2.6.2
-
petitparser: ^5.4.0
1.4.20 #
-
ConditionElement:- Added field
parent. - Added
isInner.
- Added field
-
EncodingContext:resolveEntityAlias:- Better alias naming for
_refand_reltables. - Better naming for long names.
- Better alias naming for
-
DBRelationalEntityRepository._getCachedEntitiesRelationships:- Fix issue with
EntityReferenceListandEntityReferencevalues.
- Fix issue with
-
New
LogFileRotate(used by default when logging to files). -
APIServer: logResponse.internalServerError(error 500 responses) as severe. -
shelf_letsencrypt: ^1.2.1
-
http: ^1.1.0
1.4.19 #
- Update
bones_api_template.tar.gz.
1.4.18 #
ConditionEncoder:encodeEncodingValueList: fix SQL encoding of empty list as( null )and not( ).
1.4.17 #
logErrorMessageandlogDBMessage: fix resolution ofMessageLogger.
1.4.16 #
- API Config:
- Allow
log.all,log.errorandlog.dbto files.
- Allow
DBAdapter:- Better
boothierarchy. registerAsDbLoggerloggers of implementations ofDBAdapter.
- Better
LoggerHandler:- Added
resolveLogDestinyandlogBuffered.
- Added
DBAdapterException:- Added field
operation.
- Added field
1.4.15 #
SQLBuilderListExtension:- Optimize
bestOrder:- Use internal Quick Sort algorithm for better pivot selection (producing a better order of elements).
- Optimize
1.4.14 #
-
APIRouteBuilder.apiMethod:- Ignores framework methods from
APIModulethat could be interpreted as routes.
- Ignores framework methods from
-
SQLBuilder:- Added
mainTablegetter.- Used for better sorting using table name (
sorteByName).
- Used for better sorting using table name (
- Added
-
resource_portable: ^3.1.0
-
collection: ^1.17.2
-
test: ^1.24.4
-
vm_service: ^11.8.0
1.4.13 #
Initializable._finalizeInitializationWithDeps:- When finalizing root
Initializable: wait for still initializing dependencies.
- When finalizing root
- Fix
InitializationChain._completeCircularDependency:- Check if
Completeris already completed before callcomplete.
- Check if
- build_runner: ^2.4.6
1.4.12 #
- Fix
GroupConditionOR.cast. ConditionSQLEncoder.keyFieldReferenceToSQL: throw exception when a field can't by found in table.
1.4.11 #
- Added
APIModuleProxyCallerandAPIModuleProxyDirectCaller. - Rename
APIModuleHttpProxytoAPIModuleProxyHttpCaller. - reflection_factory: ^2.1.6
1.4.10 #
-
Added
StringUtils.toLowerCaseSimpleCached. -
Optimize
Json.defaultFieldNameResolver. -
Optimize
FieldsFromMap.getFieldsValuesFromMap. -
async_extension: ^1.1.1
-
reflection_factory: ^2.1.4
1.4.9 #
-
New
WeakList. -
Added
DBAdapter.instances. -
Transaction:_onErrorZoneUncaughtError: get theerror'sTransactionand pass it toprintZoneErroras message.- Added
Transaction.openInstances. - Added
canPropagateto indicated that aTransactioncan have multiple operations. - Added
initTime,endTimeanddurationgetters. - Log slow and long transactions.
_onExecutionError: only logs and rethrows the error in the 1st error notification._abortImpl:- call
_transactionCompleter.completeinstead ofcompleteErrorto avoid issues with hidden errorZone.
- call
-
TransactionOperation:- Added
initTime,endTimeanddurationgetters.
- Added
-
TransactionAbortedError:- Renamed
abortErrortoerror. - Renamed
abortStackTracetoerrorStackTrace.
- Renamed
-
Added
APIRouteConfig. -
APIRouteHandler.call: log response time. -
DBMySQLAdapterandDBPostgreSQLAdapter.- Allow
minConnectionsandmaxConnectionsfrom config. getTableSchemeImplandgetTableFieldsTypesImpl: fixreleaseIntoPoolanddisposePoolElementbehavior.
- Allow
-
DBEntityRepository: optimize_getRelationshipFields. -
DBAdapter:- added
isTransactionWithSingleOperation. - Fix
executeTransactionOperation: identify single operation transactions. - Fix
createPoolElement: respectmaxConnectionswith correctpoolAliveElementsSizecalculation. - Added
cancelTransactionResultWithError,throwTransactionResultWithErrorandresolveTransactionResult`.- Used by
openTransactionresult resolution.
- Used by
- added
-
Pool:- Fix
poolDisposedElementsCountto also count_invalidatedElementsCount. - Fix
_catchFromEmptyPool:- allow
createPoolElement(force: true)if reached the limit and can't catch a reused element.
- allow
- Fix
-
InitializationStatus:- New
finalizingstatus.
- New
-
InitializationChain:- Fix
_isParent- Avoid analyzing dependencies of
initializableif it exists in the parent's tree.
- Avoid analyzing dependencies of
- Fix
-
Initializable_doInitializationImpl: allow circular initialization with timeout.
-
lints: ^2.1.1
-
build_runner: ^2.4.5
1.4.8 #
-
DBEntityRepository_resolveEntitiesSubEntities: fix passing of parameterresolutionRuleson special case.
-
args: ^2.4.2
1.4.7 #
APIServer:_redirectToHttpsMiddleware: do not redirect/.well-known/acme-challenge/paths.
- sdk: '>=3.0.0 <4.0.0'
- collection: ^1.17.1
- googleapis_auth: ^1.4.1
- shelf_letsencrypt: ^1.2.0
- lints: ^2.1.0
1.4.6 #
ConditionEncoder:- Fix
_resolveValueToTypeImpl:- Convert
Enumvalues toStringcallingEnum.name. - Convert
Enumvalues toint|num|BigIntcallingEnum.index.
- Convert
- Fix
- reflection_factory: ^2.1.3
1.4.5 #
DBSQLAdapter:- Now checks for missing reference columns.
- Suggest
ALTER TABLEwith CONSTRAINTs.
SQLGenerator:generateAddColumnAlterTableSQL:- Handle enums and references.
- Generate CONSTRAINTs for
FOREIGN KEYandUNIQUE.
1.4.4 #
AlterTableSQL:- Added
indexes. buildSQL: implementifNotExistsforADD COLUMN.
- Added
SQLGenerator:- Added
generateAddColumnAlterTableSQL.
- Added
DBSQLAdapter:checkDBTables:- Now prints in the log a suggestion of
ALTER TABLESQLs to fix missing table columns.
- Now prints in the log a suggestion of
- args: ^2.4.1
- crypto: ^3.0.3
- gcloud: ^0.8.8
- http: ^0.13.6
- shelf: ^1.4.1
- shelf_static: ^1.1.2
- yaml: ^3.1.2
1.4.3 #
DBAdapter:- Added
checkDB: checks DB tables and fields.- Moved call to
generateTablestocheckDB.
- Moved call to
createPoolElement: optimize calls tocreateConnectionwhen creating multiple connections simultaneously.
- Added
FieldsFromMap:- Added
getFieldsKeysInMap.
- Added
TableScheme:- Added
relationshipTables.
- Added
EntityHandler:- Fix
valueToDynamicNumberforDateTimetypes.
- Fix
- Added
APIEntityTypeNullableExtensionto avoid resolution toAPIEntityObjectExtensiononType?variables. SQLBuilder: added logger and messages.DBMySQLAdapter:- Decode
TIMESQL type asTimeclass.
- Decode
- sdk: '>=2.18.0 <4.0.0'
1.4.2 #
Json:- Fix
_jsonEncodableProvider: do not useEntityHandlerif there's a registeredClassReflection.
- Fix
APIServer:- Fix
_toJsonEncodableAccessRuleswhen there's anEntityAccessRulesfor an entity but there's no encodable function.
- Fix
1.4.1 #
APIModuleHttpProxy:- Force
POSTrequest if any parameter is aListorMap.
- Force
APIRouteBuilder.resolveValueByType:- Renamed:
_resolveValueTypetoresolveValueByType - Exposed and static.
- Fix parsing of typed
List,SetandMapparameters. - Improved tests.
- Renamed:
- reflection_factory: ^2.1.2
1.4.0 #
- reflection_factory: ^2.1.0
1.3.69 #
APIAuthentication:- Added
_credentialfield to allow return (byget credential) of theAPICredentialinstance used in the authentication process.
- Added
1.3.68 #
APISecurity:- Added
authenticateMultiplefor when the request has anAPICredentialand also a payload with credential.
- Added
APICredential:- Added
originalCredentialfield. - Added
APICredential.fromMapandcheckCredential.
- Added
APIDBModule: Addedcredentialsupport.- async_events: ^1.0.11
- test: ^1.24.1
1.3.67 #
Time.toString:- Fix
withSecondsparameter.
- Fix
- Added
Time.copyWith.
1.3.66 #
- reflection_factory: ^2.0.7
- hotreloader: ^3.0.6
- statistics: ^1.0.25
- petitparser: ^5.3.0
- meta: ^1.9.1
1.3.65 #
decodeQueryStringParameters:- Added parameter
charset.
- Added parameter
- swiss_knife: ^3.1.5
- resource_portable: ^3.0.2
- archive: ^3.3.7
1.3.64 #
APIRoot:- Added
loadDependencies.
- Added
1.3.63 #
- New
HTMLDocument. APIDBModule:- Added insert & update support.
- Added delete operation.
- Added UI (HTML).
EntityHandler:- Added
resolveIDs. - Improve
resolveValueByType.
- Added
- reflection_factory: ^2.0.6
1.3.62 #
EntityReferenceList:- Fix
add.
- Fix
1.3.61 #
- Added
CreateIndexSQL. EntityField:- Added
_indexedandisIndexed. - Added constructor
EntityField.indexed().
- Added
DBSQLAdapter:- Added getter
entityRepositoriesBuildOrder.
- Added getter
DBAdapter:allRepositories:- Use
entityRepositoriesBuildOrderto return the repositores in the build order.
- Use
APIDBModule:tables: list repositories ordered by name.dump: list repositories in build order to allow use of the dump to populate a DB.
1.3.60 #
ConditionEncoder:- Fix queries using values of type
DecimalorDynamicInt.
- Fix queries using values of type
ConditionSQLEncoder:- Handle
Decimalasdouble. - Handle
DynamicIntasBigInt.
- Handle
1.3.59 #
DBObjectGCSAdapter:- Fix call to
bucket.info: replace with_getObjectInfo& try/catch.
- Fix call to
1.3.58 #
- New
DBObjectGCSAdapter. - New library:
bones_api_db_gcp.dart. DBObjectDirectoryAdapter: clean code.DBEntityRepositoryProvider:- Added
requiredAdaptersandrequiredEntityRepositoryProviders:- Used by
initializeDependencies.
- Used by
- Added
- reflection_factory: ^2.0.5
- http: ^0.13.5
- googleapis_auth: ^1.4.0
- crclib: ^3.0.0
1.3.57 #
- New
DBObjectAdapter:- Base class for
DBObjectMemoryAdapterandDBObjectDirectoryAdapter.
- Base class for
- New
DBAdapterRegister:- handles
DBAdapterregistration, avoiding repetitive static code inDBSQLAdapter,DBObjectAdapterandDBRelationalAdapter.
- handles
EntityHandler- Added
equalsValuesEntityMap. - Added
getEntityIDFrom. equalsValuesEntitynow also usingequalsValuesEntityMap.- This fixes an issue for
DBSQLMemoryAdapter.
- This fixes an issue for
- Added
1.3.56 #
EntityReference:disposeEntities: force_resolveIDbefore dispose.
EntityReferenceList:disposeEntities: force_resolveIDsbefore dispose.
APIRouteBuilder:_resolveValueType: resulveList,Set,Mapgeneric types.
1.3.55 #
APIResponseStatus- Added
REDIRECT: to perform URL/Location redirects.
- Added
1.3.54 #
DBObjectDirectoryAdapter:_normalizeID: ensure safe ID forFilepath.
EntityReferenceBase:- Improve
_getEntityID: allow use ofdynamic.idif there's notEntityHandler.
- Improve
1.3.53 #
- petitparser: ^5.2.0
- postgres: ^2.6.1
1.3.52 #
- Renamed
DBMemorySQLAdaptertoDBSQLMemoryAdapter.- Renamed
DBMemorySQLAdapterExceptiontoDBSQLMemoryAdapterException.
- Renamed
DBSQLMemoryAdapter:namechanged to "sql.memory".DBObjectMemoryAdapter:namechanged to "object.memory".DBMySQLAdapter: added alias "sql.mysql".DBPostgreSQLAdapter: added alias "sql.postgresql".- New
DBObjectDirectoryAdapter. EntityHandler:- Fix
_resolveValueByEntityHandlerfor whenentityRepositoryProviderisnull.
- Fix
DBAdapter:- Added
onClose.
- Added
1.3.51 #
- Renamed
DBMemoryObjectAdaptertoDBObjectMemoryAdapter.- Renamed
DBMemoryObjectAdapterExceptiontoDBObjectMemoryAdapterException.
- Renamed
1.3.50 #
APIServer:- Added
allowRequestLetsEncryptCertificate.
- Added
- shelf_letsencrypt: ^1.1.1
1.3.49 #
EntityHandler:- Optimize
isValidEntityType.
- Optimize
APIToken:- Optimize
generateToken.
- Optimize
IterableEntityRepositoryProviderExtension:getEntityRepository: added parameterremoveClosedProviders.
- reflection_factory: ^2.0.4
1.3.48 #
APIConfig:- Added
getAsMap,getAsList,getAs.
- Added
- Added
WithRuntimeTypeNameSafe. - Added
ExtensionRuntimeTypeNameUnsafe:runtimeTypeNameUnsafe
- Added linter rules:
avoid_dynamic_calls.avoid_type_to_string.no_runtimeType_toString.discarded_futures.no_adjacent_strings_in_list.
1.3.47 #
- Improve internal use of
EntityCache. EntityReferenceBase:- Added
_entityCache.
- Added
- Optimize
_InitializationChain._isParent. APIModuleHttpProxy:onCall: usingJson.decoderwithEntityHandlerProvider.globalProvider.
Json:- Added
decoder.
- Added
- reflection_factory: ^2.0.3
1.3.46 #
Json.defaultFieldValueResolver:- Improve resolution of
EntityReferenceand ``.
- Improve resolution of
- reflection_factory: ^2.0.1
1.3.45 #
KeyCondition: added support to>,>=,<and<=operators.KeyConditionGreaterThan,KeyConditionGreaterThanOrEqual.KeyConditionLessThan,KeyConditionLessThanOrEqual.
EntityHandler.createFromMap: added parameterjsonDecoder.
1.3.44 #
APIRouteRule:- Adde properties
globalRulesandnoGlobalRules.
- Adde properties
- archive: ^3.3.6
- args: ^2.4.0
1.3.43 #
- Added
APIEntityRules.
1.3.42 #
- New
APIEntityAccessRules,EntityAccessRules,EntityAccessRulesCachedandEntityAccessRulesContext: - Renamed
MergeEntityResolutionRulesErrortoMergeEntityRulesError. - Renamed
ValidateEntityResolutionRulesErrortoValidateEntityRulesError. EntityAccessRulesandEntityResolutionRulesnow extendsEntityRules.APIRouteHandler:- Added
entityAccessRules. - Optimize
entityResolutionRules.
- Added
APIResponse:- Added field
apiRequest.
- Added field
EntityReferenceBase:toJson: added parameterjsonEncoder.- Fixes some to JSON issues, preserving the parent
jsonEncoder.
- Fixes some to JSON issues, preserving the parent
Json:toJson: expose parametertoEncodableProvider.
APIServer:resolveBody:- When converting to JSON respect the
EntityAccessRulesof the context.
- When converting to JSON respect the
- test: ^1.23.1
1.3.41 #
EntityResolutionRules:- Added
mergeTolerant. copyWith: addedconflictingEntityTypes.merge: allowing conflicting merge whenmergeTolerantis present.
- Added
1.3.40 #
EntityResolutionRules:- Added
innocuousconst instance. - Added:
isInnocuous,isValid,validate. - Added:
copyWithandmerge. - Added
ValidateEntityResolutionRulesErrorandMergeEntityResolutionRulesError.
- Added
- Added
EntityRulesResolver.resolveEntityResolutionRules: returns aEntityResolutionRulesResolved.- Added
registerContextProvider(EntityRulesContextProvider).
APIRoot:- Initialization register:
EntityRulesResolver.registerContextProvider.
- Initialization register:
- Added
APIEntityResolutionRules. APIRouteHandler: addedentityResolutionRules.APIRequest: addedrouteHandler.- Moved entity rules classes to
bones_api_entity_rules.dart.
1.3.39 #
APIRoot._callZoned:- Better handling of errors: throwing with
StackTrace.
- Better handling of errors: throwing with
EntityResolutionRules:- Added
isEagerEntityTypeInfoandisLazyEntityTypeInfo.
- Added
DBEntityRepository:- Optimize:
resolveEntitiesand_resolveEntitiesSubEntities.
- Optimize:
APIServer:_sendAPIResponse: better handling of error response.
Time.parse:- Fix issue parsing input
Stringas bytes.
- Fix issue parsing input
- coverage: ^1.6.3
1.3.38 #
SQLGenerator:- Remove unecessary
UPDATE CASCADEforid(auto increment) references.
- Remove unecessary
- reflection_factory: ^2.0.0
- async_events: ^1.0.9
1.3.37 #
TransactionEntityProvider:- Fix
getEntityByIDimplementation: wasn't passing parameterresolutionRulesto sub-calls.
- Fix
- reflection_factory: ^1.2.25
1.3.36 #
DBRelationalEntityRepository:_ensureRelationshipsStored: avoid store of relationship fields if not inchangedFields.
DBMemorySQLAdapterandDBMemoryObjectAdapter:- Construct
TableSchemewithout relationship fields duplicated in the main fields.
- Construct
- args: ^2.3.2
- reflection_factory: ^1.2.22
1.3.35 #
- New
testAPIServertool. - Updated
bones_api_template.tar.gz. - shelf_gzip: ^4.0.1
- mime: ^1.0.4
- stream_channel: ^2.1.1
- test: ^1.22.2
- coverage: ^1.6.2
1.3.34 #
- reflection_factory: ^1.2.21
1.3.33 #
- reflection_factory: ^1.2.19
1.3.32 #
APIServer:defaultApiCacheControlanddefaultStaticFilesCacheControl:- Added
no-transformdirective.
- Added
- reflection_factory: ^1.2.18
1.3.31 #
APIServer:- Optimize headers.
- Added fields:
apiCacheControlandstaticFilesCacheControl. - Better
cache-controldefault values.
1.3.30 #
- statistics: ^1.0.24
- resource_portable: ^3.0.1
- swiss_knife: ^3.1.3
- archive: ^3.3.5
- mercury_client: ^2.1.8
1.3.29 #
DBAdapterandDBRepositoryAdapter:- Added
doSelectAll
- Added
DBMemoryObjectAdapter:- Added support for
doSelectAll.
- Added support for
APIDBModule:- Added
dumproute. - JSON output compact: compatible with DB populate source samples.
- Added
- mime: ^1.0.3
- path: ^1.8.3
- yaml_writer: ^1.0.3
- build_runner: ^2.3.3
- build_verify: ^3.1.0
- test: ^1.22.1
1.3.28 #
APIRoot._callZoned: fix error handling.
1.3.27 #
APIDBModule:- Added constructor parameter
nameandonlyOnDevelopment.
- Added constructor parameter
APISecurity:- Allow call to
authenticatewithrequestparameter from anAPIModule.
- Allow call to
1.3.26 #
APIModule:- Allow method routes with parameter
APIAuthentication.
- Allow method routes with parameter
APIRoot._callZoned: ensure that is catchingFutureerrors.- Added
APIConfig.developmentto inform development environment. - Added
APIDBModule: a development module only to show DB entities.
1.3.25 #
APISecurity:- Added
disposeAuthenticationData.
- Added
- swiss_knife: ^3.1.2
- pubspec: ^2.3.0
- coverage: ^1.6.1
1.3.24 #
APIResponse:- Fix constructor parameter
headersto ensure that it's always modifiable.
- Fix constructor parameter
APIServer:- Static files:
- Added
gzipencoding. - Added
cache-controlresponse header.
- Added
- Static files:
- logging: ^1.1.0
- collection: ^1.17.0
- mercury_client: ^2.1.7
- async_events: ^1.0.8
- archive: ^3.3.4
- lints: ^2.0.1
- build_runner: ^2.3.2
- test: ^1.22.0
1.3.23 #
APISecurity:- Added
logoutandinvalidateToken.
- Added
- Fixed
OPTIONSmethod forauthenticationRoute(/authenticate). - sdk: '>=2.18.0 <3.0.0'
- petitparser: ^5.1.0
1.3.22 #
- reflection_factory: ^1.2.17
- async_events: ^1.0.7
1.3.21 #
APIServer:- Added
useSessionIDto enable/disable theSESSIONIDcookie. - Added option
cookielessfor a server that blocks all cookies. - Added support for
Keep-Alive.
- Added
APIRequest:- Added
protocolandkeepAlive.
- Added
APIResponse:- Added
keepAliveTimeoutandkeepAliveMaxRequests.
- Added
1.3.20 #
- reflection_factory: ^1.2.16
1.3.19 #
ClassReflectionExtension:- Added:
toEntityReference,toEntityReferenceListandtoList.
- Added:
TypeInfoEntityExtension:- Added
isValidEntityReferenceTypeandisValidEntityReferenceListType.
- Added
JsonDecoder.registerTypeDecoderforEntityReferenceandEntityReferenceList:- Allow decoding of
nullvalues asEntityReference.asNullandEntityReferenceList.asNull.
- Allow decoding of
- reflection_factory: ^1.2.15
- shelf: ^1.4.0
- postgres: ^2.5.2
- build_runner: ^2.2.1
- test: ^1.21.6
1.3.18 #
APIRoot.resolveModule: defaults to path part#0.APIModule.resolveRoute: defaults to path part#1 ?? #0.- Ensure that any route resolution passes through
resolveRoutemethod (allowing personalization).
- Ensure that any route resolution passes through
APIRouteBuilder: allow path parts as parameter value byparameterIndex.- reflection_factory: ^1.2.14
1.3.17 #
- Added
Etag:WeakEtagandStrongEtag. - Added
CacheControlDirectiveandCacheControl. APIResponse:- Added
payloadETagandcacheControl. - Added
APIResponse.notModified.
- Added
- archive: ^3.3.1
1.3.16 #
APISecurity:- Adjust
_storeTokeInfo.
- Adjust
- async_events: ^1.0.6
1.3.15 #
DBSQLAdapter.generateCreateTableSQLs:- Fix CREATE TABLE SQLs order when a field is referencing to another DB.
1.3.14 #
APISecurity:getCredentialPermissions: Added parameterpreviousPermissions.getAuthenticationData: Added parameterpreviousData.
- async_events: ^1.0.5
1.3.13 #
- Ensure that parameter
EntityResolutionRules? resolutionRulesis fully propagated while fetching and resolving entities. - Added
TransactionEntityProviderto correctly resolve entities while callingentityHandler.createFromMapinside aTransaction. EntityReferenceBase:- Added
typeNamefor correct generation of JSON. - Added parameter
withEntitytocopy.
- Added
- Export
MimeTypeandDataURLBase64from packageswiss_knife. - reflection_factory: ^1.2.13
1.3.12 #
- Add
EntityHandler.typeNameto avoid minification issues withTypes name. - async_events: ^1.0.4
- reflection_factory: ^1.2.12
1.3.11 #
DBAdapter:- Fix resolution of
EntityReferenceBasefield table.
- Fix resolution of
DBMemorySQLAdapter:- Fix resolution of relationship tables with multiple candidates.
1.3.10 #
EntityReference.fromID: accepts null ID (works likeasNull).Initializable:InitializationChain._isParent: improve speed of search in the parent tree.
- Fix update of
Uint8Listfields.
1.3.9 #
- Improved
enumFromName. - Added
IterableEnumExtension. - Added
Type.tryParse. EntityReferenceandEntityReferenceList:- improve
fromJson.
- improve
- Fix
EntityRepository.selectFirstByQuery:resolutionRuleswasn't being passed to sub calls.
1.3.8 #
- Added
APIRequest.id. - Added
APIRoot.currentAPIRequest.- Logging messages now show the current
APIRequest.id.
- Logging messages now show the current
/API-INFO:- Now accepts a selected module. Example:
/API-INFO/user
- Now accepts a selected module. Example:
- Added
APIRequest.parsingDuration. - Added
APIRepository.count. - Added
DBEntityRepositoryProvider.extraDependencies. - Added
Transaction.parentTransaction:cacheEntitynow also propagates cache toparentTransaction.
EntityHandler:Uint8Listresolution: now acceptsbase64,HEXandData URL.
- Added
EntityReferenceList: a version ofEntityReferencefor entities lists. - Fix
EntityRepository._entitiesTracker: now tracked fields values are isolated from tracked entity. - Fix
APISecurity._resolveAuthentication: avoid multiple parallel calls for user resolution. - Added tests for
DBMemoryObjectAdapter. - reflection_factory: ^1.2.10
1.3.7 #
- Added
EntityReference: An entity field wrapper that allows lazy load of sub-entities. - Added
EntityResolutionRulesto allow lazy or eager selects. EntityProvider:getEntityByID: Added parametersync.
- reflection_factory: ^1.2.9
1.3.6 #
- Added integration with
AsyncEvent. - reflection_factory: ^1.2.6
- async_events: ^1.0.3
- statistics: ^1.0.23
- postgres: ^2.4.6
- shelf: ^1.3.2
- yaml_writer: ^1.0.2
1.3.5 #
SQL:- Added
isFullyDummy.
- Added
DBSQLAdapter:- Improve
fieldValueToSQLwhen the entity is from another adapter. updateSQLanddoUpdateSQL: return the ID even when theSQL.isDummy.
- Improve
1.3.4 #
APIRouteBuilder: Accepts Data URL forUint8Listparameters.APIModuleHttpProxy.doRequest: convertsUint8Listto Data URL (throughJson.toJson).
1.3.3 #
- Added
EntityResolutionRules. populateFromSource:- Allow source samples with
url(path/to/file.txt), that will be read from a local file.
- Allow source samples with
1.3.2 #
- Clean code.
1.3.1 #
DBMemorySQLAdapter,DBMemoryObjectAdapter,DBPostgreSQLAdapterDBMySQLAdapter:- Improve
toString: showinstanceID.
- Improve
SQLGenerator:- Fix CONSTRAINT to an entity type from another DBAdapter.
1.3.0 #
- Clean code:
- Renamed
MemorySQLAdaptertoDBMemorySQLAdapter. - Renamed
MemoryObjectAdaptertoDBMemoryObjectAdapter. - Renamed
SQLAdaptertoDBSQLAdapter.- Renamed
SQLEntityRepositorytoDBSQLEntityRepository. - Renamed
SQLEntityRepositoryProvidertoDBSQLEntityRepositoryProvider.
- Renamed
- Renamed
MySQLAdaptertoDBMySQLAdapter. - Renamed
PostgreSQLAdaptertoDBPostgreSQLAdapter. - Renamed
bones_api_adapter_mysql.darttobones_api_db_mysql.dart. - Renamed
bones_api_adapter_postgre.darttobones_api_db_postgre.dart. - Renamed some
lib/src/*.dartfiles.
- Renamed
1.2.26 #
- Fix resolution of
EntityRepositorywhen the same instance is returned by multiple providers. - Fix
selectByIDwith null parameters and null ID. - Fix resolution of route parameters with a type of
Listof entities. - sdk: '>=2.17.0 <3.0.0'
- reflection_factory: ^1.2.5
1.2.25 #
- Added
ZoneField:- A field value based on the current
Zone. - Used to correctly resolve
Transaction.executingTransactionand allow multiple simultaneousTransactions.
- A field value based on the current
APIRouteBuilder:- Improve resolution of request parameters (entities,
Decimaland bytes). - Allow resolution of entities and parameters using the request's payload.
- Improve resolution of request parameters (entities,
- New
MemoryObjectAdapter: allow storage of objects without relationships. - Added
DBRelationalAdapter:- Refactor
DBAdapterandSQLAdapterto have an intermediateDBRelationalAdapter.
- Refactor
Transaction:- Fix finalization when some complex asynchronous errors happens in the
Transaction. - Added
TransactionOperationSubTransaction, to wrap sub transactions as an operation of the parent transaction (used when multipleDBAdapters are used in aTransaction).
- Fix finalization when some complex asynchronous errors happens in the
- data_serializer: ^1.0.7
- map_history: ^1.0.3
- async_extension: ^1.0.11
- reflection_factory: ^1.2.4
1.2.24 #
bin/bones_api.dart:- Fix parameter
--libwhen respawning for Hot Reload.
- Fix parameter
- Added
SQLDialectfor better handling of syntax variations. SQLAdapter:- Moved to
SQLDialect:sqlElementQuote,sqlAcceptsOutputSyntax,sqlAcceptsReturningSyntax,sqlAcceptsTemporaryTableForReturning,sqlAcceptsInsertDefaultValues,sqlAcceptsInsertIgnore,sqlAcceptsInsertOnConflict.
- Moved to
SQLGenerator: allowVARCHAR PRIMARY KEY.EntityHandler:- Fix
EntityCacheinteraction issues:- Some instance were not being cached depending on the instantiation type.
- Internal call to
Json.fromJsonwere wrongly clearing theEntityCache.
- Respecting new parameter
EntityCache.allowEntityFetch.
- Fix
APIPayload(APIRequest,APIResponse):- Changed
payloadMimeTypefromStringtoMimeType.
- Changed
- async_extension: ^1.0.10
- reflection_factory: ^1.2.3
- statistics: ^1.0.22
1.2.23 #
APIConfig:- Added
sourceParentPath.
- Added
EntityRepositoryProvider:populateFromSource: added parameterworkingPath.
DBAdapterandSQLAdapter:- added parameter
workingPath.
- added parameter
APIPlatform:resolveFilePath: added parameterparentPath.
bin/bones_api.dart:- Added command
inspect.
- Added command
- Updated
lib/src/template/bones_api_template.tar.gz. - reflection_factory: ^1.2.2
1.2.22 #
SQLAdapterCapability:- Fix declaration for
PostgreSQLAdapterandMySQLAdapter.
- Fix declaration for
1.2.21 #
APIRepository:- Add missing
transactionparameters.
- Add missing
Transaction:- Added
executeOrError.
- Added
APIResponse:- added field
stackTrace.
- added field
APIRouteHandler:- Added logging of route call.
- Added
MapAsCacheExtension.
1.2.20 #
SQLAdapter:- generateTables: fix, to avoid generation if
capability.tableSQLisfalse.
- generateTables: fix, to avoid generation if
- reflection_factory: ^1.2.1
1.2.19 #
TableScheme:getTableRelationshipReference: better resolution when an entity has multipleListfields referencing the same entity/table.
1.2.18 #
Transaction:- Fix synchronization of final return for long transactions.
- Added
SQLAdapterExceptionandDBAdapterExceptionfor better exception/error handling:MemorySQLAdapterException.PostgreSQLAdapterException.MySQLAdapterException.
- Added
FieldNameMapper.
1.2.17 #
- Fix resolution of table columns to entity fields when resolving sub-entities.
1.2.16 #
MemorySQLAdapter:- Fix delete constraint for tables without referenced fields.
APIRoot:- Added
getByType. - Added
close(removes from availableAPIRootinstances). stopnow also closes theAPIRoot.
- Added
APIServer:stopnow also closes theAPIRoot.
EntityRepositoryProvider:- Optimize
getEntityRepository - Added
getEntityRepositoryByType.
- Optimize
EntityHandler:- Added
getEntityHandlerByTypeandgetEntityRepositoryByType.
- Added
EntityHandlerProvider:- Added
getEntityHandlerByTypeandgetEntityRepositoryByType.
- Added
clearPool:clearPoolnow also closes/disposes all elements in the pool.
1.2.15 #
ConditionSQLEncoder:keyFieldToSQL: fix resolution of class field to table column name.- Added
resolveFieldName.
EntityStorage:- Added
tryDeleteEntityandtryDeleteByID.
- Added
MemorySQLAdapternow check references constraint before delete.PostgreSQLAdapter: improved connection retry.- Added
tryCallMappedandtryCallutils.
1.2.14 #
SQLAdapter:- Added option
generateTables: will automatically generate the tables when initialized.
- Added option
PostgreSQLAdapter:- When update auto inserts (new entity with pre-defined ID), a fix of the primary key sequence is performed.
1.2.13 #
SQLGenerator:- Added
normalizeColumnName: now generates column names using underscore (from camel-case fields).
- Added
StringUtils:- Added
toLowerCaseSimpleandtoLowerCaseUnderscore.
- Added
1.2.12 #
MemorySQLAdapter: check for unique fields.PostgreSQLAdapterandMySQLAdapter: handles unique field errors asEntityFieldInvalid.EntityFieldInvalid: improved error information (addedtableNameandparentError).
1.2.11 #
EntityHandler: FixvalidateFieldValuefor sub-entities.
1.2.10 #
- Generate
CREATE TABLESQL with unique constraint (fromEntityField).
1.2.9 #
- Generate
CREATE TABLESQL usingEntityFieldinformation.
1.2.8 #
- Add
EntityField: annotation to inform if a field ishidden,uniqueand its limits (minimum,maximum). EntityStorage: now checks entity fields validity (EntityField).
1.2.7 #
- Split
bones_api_entity_adapter.dartintobones_api_entity_adapter_sql.dart. PostgreSQLAdapter:- dialect: "PostgreSQL"
MySQLAdapter:- dialect: "MySQL"
SQLGenerator:generateCreateTableSQL:- Added parameters
ifNotExistsandsortColumns. - fix column generation for enum fields.
- Added parameters
generateFullCreateTableSQLs: added parameterswithDate,ifNotExistsandsortColumns.
SQLAdaptertests:- Now is creating tables using
generateFullCreateTableSQLs(MySQLandPostgreSQL).
- Now is creating tables using
1.2.6 #
- Added
SQLBuilderthat is used to generate the entitiesCREATE TABLESQLs. - Added
SQLGeneratorthat is capable to generate entities tables and relationships SQLs. - Split
SQLAdapterandSQLAdapterCapabilityintoDBAdapterCapabilityandDBAdapter. SQLAdapter:- Added
generateCreateTableSQLs,generateFullCreateTableSQLs,generateEntityRepositoresCreateTableSQLs.
- Added
- Added
DBEntityRepositoryProviderandSQLEntityRepositoryProvider. - statistics: ^1.0.21
- test: ^1.21.4
- dependency_validator: ^3.2.2
1.2.5 #
- sdk: '>=2.15.0 <3.0.0'
- petitparser: ^5.0.0
- hotreloader: ^3.0.5
1.2.4 #
SQLAdapter:- Fix
extractSQLs.
- Fix
APITestConfigDBMemory:- Now starts creating a
MemorySQLAdapter.
- Now starts creating a
APITestConfigDockerPostgreSQL:- Fix
listTablesimplementation.
- Fix
APITestConfigDockerMySQL:- Fix
listTablesimplementation.
- Fix
1.2.3 #
APIRootStarter:- Added
isStopped. - Improved documentation.
- Improved tests.
- Added
APIRouteBuilder:apiInfonow also returnsAPIRouteInfofor method specific routes.
APITestConfig:- Added
resolveSupported,isSupported,isUnsupportedandunsupportedReason. - New
APITestConfigDockerDBSQL: adding SQL methods for DB containers with SQL support.
- Added
- Better hierarchy of
APITestConfigimplementations. LoggerHandler:- Exposed global function
logToConsole. - Added
cancelLogToConsole.
- Exposed global function
- Added library
bones_api_test_vm.dart.- Exposes
resolveFreePort(now uses a random approach to avoid collision between parallel tests).
- Exposes
- docker_commander: ^2.0.15
1.2.2 #
- Fix library names:
bones_api_testbones_api_test.mysql.bones_api_test.postgres.
1.2.1 #
EntityAccessor: addednameSimplified.LoggerHandler:logToConsole: avoid multiple listeners to the root logger.
APITestConfigDocker: remove unnecessary call tologToConsole().- Fix imports at
bones_api_root_starter.dart.
1.2.0 #
- Added
APIRootStarterhelper. - Added
APITestConfig: anAPIRoottest helper. - Added
APITestConfigDocker, a base class forDockerdatabase containers:APITestConfigDockerMySQL(MySQL container)APITestConfigDockerPostgreSQL(PostgreSQL container)
APIConfig: now supports variables (%VAR_NAME%).SQLAdapterCapability: added capabilitytableSQL.SQLAdapter:- Added parameters
populateTablesandpopulateSource(previously present only forMemorySQLAdapter). - Added
populateTablesandexecuteTableSQLmethods. generateInsertSQL: fix issue when all values are null.
- Added parameters
MySQLAdapterandPostgreSQLAdapter:- Improved automatic resolution of relationship tables.
MemorySQLAdapter:populateFromSourcemoved toEntityRepositoryProviderextension.
APIPlatform:getProperty: read a property from an "environment variable" (VM) orwindow.location.href(Browser).
APISessionandAPISessionSet: moved tobones_api_session.dart.- Change named parameter
caseInsensitivetocaseSensitiveto followRegExpparameters naming style. - Split
bones_api_utils.dartin multiple utils files:bones_api_utils_collections.dartbones_api_utils_httpclient.dartbones_api_utils_json.dartbones_api_utils_timedmap.dart
- docker_commander: ^2.0.14
1.1.34 #
MemorySQLAdapter:- Consolidating tables after a transaction is finished, removing unnecessary history data.
- map_history: ^1.0.2
1.1.33 #
- mysql1: ^0.20.0
- postgres: ^2.4.5
- lints: ^2.0.0
- coverage: ^1.3.2
1.1.32 #
MemorySQLAdapter:- Using
MapHistoryfor internal representation, to allow rollback of transactions. SQLAdapterCapability:transactionAbort:true(rollback support).
- Using
- Tests for
SQLAdapter:- Improve detection of
Dockerdaemon and skipping of tests group whenDockeris not running.
- Improve detection of
- map_history: ^1.0.1
1.1.31 #
EntityHandler:castListNullableandcastIterableNullable.castList: better exception message when an element is null.
Condition: Better resolution and matching of JSON collections and entities.KeyCondition:- Fix
_resolveValueEntityHandlerforListentities types.
- Fix
MemorySQLAdapter:- Fix
_normalizeEntityJSON.
- Fix
1.1.30 #
MemorySQLAdapter:- Ensure that the stored data has only valid JSON values for the whole entity tree.
EntityRepository:- Added
isOfEntityType.
- Added
1.1.29 #
EntityRepository:- Added
deleteEntity,deleteByIDanddeleteEntityCascade.
- Added
EntityHandler:- Renamed
isValidTypetoisValidEntityType.
- Renamed
- shelf: ^1.3.1
- shelf_static: ^1.1.1
- reflection_factory: ^1.2.0
- postgres: ^2.4.4
1.1.28 #
EntitySource:- Added
selectFirstByQuery.
- Added
- Clean code.
1.1.27 #
Initializable:Initializable.initialize: Now returns aInitializationResult, allow improved results and dependencies in the result.- Improve automatic detection of circular dependencies and avoid deadlocks.
- Refactor of dependency chain analysis code.
1.1.26 #
Initializable:- Moved code to
bones_api_initializable.dart. - Initialization of circular dependencies:
- Automatically identify initialization of circular dependencies.
- "Fix" the asynchronous deadlock caused by wait of circular dependencies.
- Moved code to
1.1.25 #
EntityRepositoryProvider:storeAllFromJson: ensure that operations are executed sequentially.
1.1.24 #
- Improve populate of entities using ID as reference to sub entities fields.
EntitySource:- Added
existsID.
- Added
SQLAdapter:- Fixed storage (and update fallback) of entities with pre-defined IDs.
MemorySQLAdapter:- Fixed
countwith a condition.s
- Fixed
- petitparser: ^4.4.0
1.1.23 #
- Small path for the last version.
1.1.22 #
MemorySQLAdapter:- Fixed when comparing entities and IDs.
1.1.21 #
Initializable:- Now allows async initializations.
MethodReflectionExtension:isAPIMethodnow acceptsFutureOr<APIResponse>.
EntityRepository:- Added
selectAll.
- Added
- reflection_factory: ^1.1.2
- crypto: ^3.0.2
- shelf: ^1.3.0
- hotreloader: ^3.0.4
- args: ^2.3.1
- yaml: ^3.1.1
1.1.20 #
APIServer:- Improve resolution of
APICredentialusername.
- Improve resolution of
- mercury_client: ^2.1.6
1.1.19 #
APIServer:- Improved resolution of request payload.
- Added
decodeQueryStringParameters, for full decoding of query string with single and multiple parameters.
1.1.18 #
APIRoot:- Added
callAuthenticate.
- Added
APIRequest:- Added
credentialto constructors.
- Added
1.1.17 #
APIModuleProxy:- ignoreParametersTypes: added type
APICredential(should exist only in the implementation).
- ignoreParametersTypes: added type
- reflection_factory: ^1.1.0
1.1.16 #
- reflection_factory: ^1.0.29
1.1.15 #
- Improved GitHub CI.
- Added browser tests.
- mercury_client: ^2.1.5
- swiss_knife: ^3.1.0
- data_serializer: ^1.0.7
1.1.14 #
MemorySQLAdapter: fixnextIDwhen entities are stored with pre-defined IDs.EntityHandler: RenameidFieldsNametoidFieldName.
1.1.13 #
ClassReflectionEntityHandler:- Improve
createFromMap. - Compatibility with
JsonFieldAlias.
- Improve
- reflection_factory: ^1.0.28
1.1.12 #
SQLAdapter(PostgreSQL,MySQLand in-memory):- Allow auto insert of new entities with explicit IDs. It was trying to update an entity that is not stored.
MemorySQLAdapter:- Fixed support for relationship tables.
- Fixed isolation of internal data (memory) that was leaking through queries results.
- Improved tests: now running same tests of
PostgreSQLandMySQL.
- Better resolution of
EntityRepositorywhen multiple candidates are present. - Added helpers:
deepCopy,deepCopyList,deepCopySetanddeepCopyMap.
1.1.11 #
Transaction:- Queries now reuse already instantiated entities in the same transaction.
- Added
EntityCachefor entity instantiation fromMapor JSON. EntityRepository:- Added
storeAllFromJsonandstoreFromJson.
- Added
MemorySQLAdapter:- Fixed relationships of
TableSchemeloaded by the memory SQLAdapter.
- Fixed relationships of
- Fix update of sub-entities, that was being ignored.
- Improve error logging.
- reflection_factory: ^1.0.27
1.1.10 #
- Optimize relationship requests to resolve entities.
MemorySQLAdapter: support of returned columns with alias name.
1.1.9 #
- Fix update SQL when a set value is null.
1.1.8 #
APIServerandAPIModule: improved error logging.- statistics: ^1.0.20
1.1.7 #
APIModuleProxy: ignoringAPIRequestparameters.- reflection_factory: ^1.0.25
1.1.6 #
APIServer:- Improved CORES response (
OPTIONSrequest).
- Improved CORES response (
APISecurity:- Improved resolution of credential token and related username.
- Improved tests.
1.1.5 #
- SQL:
- Added:
numerictype mapped toDecimal.
- Added:
- Fix JSON parsing of
Decimaltypes.
1.1.4 #
- Integrate
Decimalto entities, repositories, JSON and SQL. - Improve
APIPlatform. - statistics: ^1.0.19
1.1.3 #
EntityHandler.resolveValueByType:- Avoid
dev_compilerbug https://github.com/dart-lang/sdk/issues/48631 when generating JS code.
- Avoid
1.1.2 #
- Added
ConditionIdIN: to allow optimized selection of multiple IDs with one query. - Added
EntityProviderto all entity field resolution related operations, likecreateFromMapandJson.decode. - Improve
APIModuleHttpProxyresponse body decoding. - reflection_factory: ^1.0.24
- mercury_client: ^2.1.4
1.1.1 #
- Fix
MethodReflectionExtension.returnsAPIResponse.
1.1.0 #
- Added
APIModuleProxyandAPIModuleHttpProxy. - reflection_factory: ^1.0.23
- meta: ^1.7.0
1.0.39 #
- Added support to Let's Encrypt HTTPS certificates.
bones_api.dartCLI:- Allow domain static files.
APIRoot:APILogger: to allow logging ofAPIRootevents.APIRequestHandler: for personalized request handlers.- New fields
preApiRequestHandlersandposApiRequestHandlers.
- Fix
SQLAdapter.generateInsertRelationshipSQLs. - Added test tag:
slow - shelf_static: ^1.1.0
- shelf_letsencrypt: ^1.0.0
- dart_spawner: ^1.0.6
- data_serializer: ^1.0.6
- mercury_client: ^2.1.3
- build_verify: ^3.0.0
- path: ^1.8.1
- sdk: '>=2.14.0 <3.0.0'
1.0.38 #
- Fix references and naming:
postgretopostgres. APIServer: added support forGzipencoding, through packageshelf_gzip.- shelf_gzip: ^4.0.0
- reflection_factory: ^1.0.21
- data_serializer: ^1.0.3
1.0.37 #
- Added support to
Conditionoperator=~(IN). - Added support to SQL operator
IN. - postgres: ^2.4.3
- test: ^1.19.5
- dependency_validator: ^3.1.2
1.0.36 #
TypeParserandTypeInfomoved to packagereflection_factory.- reflection_factory: ^1.0.20
1.0.35 #
- Fix
TypeInfo:- Now
TypeInfohandlesTypecomparison in a special way (to keep consistence between VM and JS/Web).
- Now
1.0.34 #
- Improved
EntityHandlerresolution of fields while creating instances fromMap. - reflection_factory: ^1.0.19
1.0.33 #
Entity&EntityHandler:- Added support for enums.
- Added
enumToNameandenumFromName - reflection_factory: ^1.0.18
1.0.32 #
Json:- Integrated with
reflection_factoryJsonCodec.
- Integrated with
FieldsFromMap.getFieldsValuesFromMap: added parameterincludeAbsentFields.isAPIMethod: now ignores methods declared byAPIModule, sincereflection_factorynow supports supper classes.- reflection_factory: ^1.0.17
- postgres: ^2.4.2
- build_runner: ^2.1.5
- test: ^1.19.3
1.0.31 #
- Added
APIServer.apiInfoURL. - Updated
bones_api_template.tar.gz. - CLI
serve: fix an issue when mixing parameters-band-r.
1.0.30 #
Json.toJson:- Added parameters:
removeNullFieldsandentityHandlerProvider. - Fixed application of
removeFieldandmaskFieldover an entity.
- Added parameters:
1.0.29 #
- Improved
Json.toJson. - Added field
APIAuthentication.data. APISecurity: addedgetAuthenticationData.
1.0.28 #
- Added
API-INFOpath: describes the API routes.
1.0.27 #
- Improved resolution of
ClassReflectionEntityHandler. - Extension:
ReflectionFactory.createFromMap.ClassReflection.createFromMap.
- async_extension: ^1.0.9
- reflection_factory: ^1.0.16
1.0.26 #
- Added
APICredential,APIPasswordandAPISecurity. - Routes now can have
APIRouteRuleannotations. EntityHandler: now using also using sibling reflections to resolve.DataTime:toJsonnow converts to aUTCstring.- Added
MapMultiValueExtension. - Updated
bones_api_template.tar.gz. - reflection_factory: ^1.0.14
- crypto: ^3.0.1
1.0.25 #
- Update template:
lib/src/template/bones_api_template.tar.gz
1.0.24 #
TableFieldReferenceandTableFieldReferencenow also have the fields type.SchemeProvidernow can resolve an entity ID.- Fix
Conditionvalue when an entity is passed or referenced.
1.0.23 #
Transaction:- Added
abortto cancel the current executing transaction. - Better error handling.
- Added
- Error Zone:
runErrorZonetransformed intocreateErrorZoneand an extension withrunGuardedAsyncandasyncTry.
executeWithPool: addedvalidatorparameter.- async_extension: ^1.0.8
1.0.22 #
Condition:- Improved subfield match.
SQL:- Allow
Conditionwith fields that are a relationship table.
- Allow
MySQLAdapter:- Using
sqlElementQuote"`" to avoid issues with reserved words.
- Using
1.0.21 #
- Better handling of route parameters with
nulland empty values. - Improve example and
README.md. - mercury_client: ^2.1.1
1.0.20 #
APIRouteBuilder:- Better conversion of parameters types.
- Payload only for parameter of type
Uint8List.
APIServer:- Better handling of errors of async payloads (
Futureresolution).
- Better handling of errors of async payloads (
1.0.19 #
- Improved
SQLEntityRepositorytests. - Fixed
MemorySQLAdapter:- Ensure that relationships entries are unique.
- Update previous entity fields.
- Improved tests tags:
version,dockerandbuild.
1.0.18 #
APIResponseStatus:- Added
BAD_REQUEST.
- Added
- Added
InstanceTrackerto track entities fields changes. EntityRepository:- tracking entity fields changes.
- SQL:
- Fix update syntax.
- Improved
UPDATEto set only modified fields.
1.0.17 #
- Optimize imports.
- Fix wrong import, that was preventing to use in JS/Browser platforms.
1.0.16 #
- Better handling of
APIServererrors and logging. - Added
runErrorZonehelper. - Added logging for entity operations errors.
- reflection_factory: ^1.0.13
1.0.15 #
EntityHandler:resolveValueByTypenow can select an entity by its ID when necessary.
ClassReflectionEntityHandler:- Fixed
fieldsTypesandfindIdFieldName, to ignore fields that are final or doesn't have a setter. - Fixed use of
reflectionto ensure that current object is used.
- Fixed
- Improved tests to run
Entitytests repositories with reflection and without reflection. - reflection_factory: ^1.0.12
1.0.14 #
- Added
SQLAdapterforMySQL. - SQL:
- Improve generated SQL, to adapt to different dialects.
- Allow generation of SQL with only positional parameters (needed for MySQL).
- Improve return of DELETE, to circumvent SQL dialects without
RETURNNGandOUTPUT. - Improved supported types.
- mysql1: ^0.19.2
- docker_commander: ^2.0.13
1.0.13 #
- Added
TypeInfoto represent better types with generics. - Added
TableRelationshipReferencefor use inTableScheme. - Added
TimedMapto help with timed caches. - Added
KeyConditionINandKeyConditionNotIN. - Entities:
- Added support to relationship fields.
- Added support for List fields pointing to another entity.
SQLEntityRepository:- Added support to UPDATE.
- Added support to relationship tables.
1.0.12 #
- CLI:
- Added option
--buildto automatically build reflection files when detected by inspector. - Added commands:
create: creates abones_apibackend project tree.info: show information about thebones_apibackend project template.
- Added option
- reflection_factory: ^1.0.10
- project_template: ^1.0.2
- resource_portable: ^3.0.0
1.0.11 #
APIRequest:- Added
scheme,requesterSourceand_requesterAddress.
- Added
APIResponse:- Added metrics support (used to generate
Server-Timingheaders). - Added
setCORS.
- Added metrics support (used to generate
- Added
TypeParser, for lenient parsing of basic Dart types. - Entities:
- Better automatic conversion of types when setting entities fields.
- Added support for transactions.
- Repositories:
- Added
limitsupport for queries. - Better resolution of correct
EntityRepositoryandEntityHandlerfor a type while loading it. - Better resolution of sub-entities in fields.
- Added
- Improved tests:
- Using Docker container to test PostgreSQL adapter.
- async_extension: ^1.0.7
- reflection_factory: ^1.0.8
- docker_commander: ^2.0.12
1.0.10 #
TableScheme:- Added
getFieldsValuesandgetFieldValue.
- Added
EntityHandler: optimized fiel resolution onsetFieldsFromMap.- Improved dartdoc references.
- Improved tests.
1.0.9 #
apiMethodnow can receive anAPIRequestparameter while receiving other normal parameters.PostgreSQLAdapter: correctly resolvingidFieldNameby primary key column.- Added test to ensure that
APIRoot.VERSIONis compatible withpubspec.yaml. - Added test that uses reflection.
- Added
build_verifytest. - reflection_factory: ^1.0.7
1.0.8 #
- Added
APIConfig:- CLI now accepts a
--configoption.
- CLI now accepts a
- Rename
Dataclasses toEntity. - Added
MemorySQLAdapter. - Added
TableSchemeto helpConditionEncoder:- SQL now can perform inner join:
- Example Condition:
address.state = "NY"
- Example Condition:
- SQL now can perform inner join:
- Improved
ConditionIDencoding:- ID field name (primary key) can be resolved for each table.
#IDcan be used to point to the primary key field/column.
APIRepository&EntityRepository:- Added delete operation.
EntityHandlernow handles better fields that points to other entities.- Improved tests.
- async_extension: ^1.0.5
- reflection_factory: ^1.0.6
- yaml: ^3.1.0
- yaml_writer: ^1.0.1
- mercury_client: ^2.1.0
1.0.7 #
- Added
APIPayload.payloadFileExtension. - Added
ConditionEncoder,ConditionSQLEncoder. - Improved Data & Entity framework:
- Added
SQLDatabaseAdapterandPostgreAdapter. - Added
DataRepositorySQL.
- Added
- Added DB Adapter for PostgreSQL.
- APIServer:
- Better auto MIME Type resolution.
- Now API methods can return
FutureOr<APIResponse>. - mime: ^1.0.0
1.0.6 #
- CLI Hot Reload fixed:
- Avoid reload of main Isolate (bones_api CLI), since API is spawned in its own Isolate.
DataEntity:- Added
fieldsNames.
- Added
DataHandlerProvider:- Fixed
getDataHandler.
- Fixed
- Added
EntityDataHandlerandDataRepositoryProvider.
1.0.5 #
- Added integration with
ReflectionFactory.- Routes can be configured using a
reflectionobject.
- Routes can be configured using a
APIServer:- Added support to Dart VM Hot Reload.
- CLI
bones_api:- Added flag
--hotreloadto serve the API with Hot Reload enabled.
- Added flag
- Added
DataEntityandDataHandlerframework - Added
Condition:- Allow queries using a syntax similar to Dart.
- New
APIRepository, to allow database agnostic integration. - dart_spawner: ^1.0.5
- reflection_factory: ^1.0.4
- args: ^2.2.0
- petitparser: ^4.2.0
- hotreloader: ^3.0.1
- logging: ^1.0.1
- collection: ^1.15.0
- lints: ^1.0.1
1.0.4 #
- CLI
bones_api:- Added command
console. - Command
serve: added headerContent-Type.
- Added command
- Added
Argumentstool. - Added
APIRequest.fromArgsandAPIRequest.fromArgsLine. - Added
APIRequest/APIResponsepayloadMimeType.
1.0.3 #
APIServer:- Added
createandrunhelpers.
- Added
1.0.2 #
APIServer:- Add
isStoppedandwaitStopped(). - Removed
isClosed.
- Add
- Fix
PATCHmethod. - CLI:
- Improved serve console logging.
- Using
dart_spawnerto spawn/run anAPI. - dart_spawner: ^1.0.2
- Removed
yaml: ^3.1.0
1.0.1 #
- Improve documentation.
- Fix typo.
1.0.0 #
- CLI:
bones_apiwithservecommand. - Initial version.