conduit 4.1.3
conduit: ^4.1.3 copied to clipboard
A modern HTTP server application framework, ORM and OAuth2 provider with OpenAPI 3.0 integration. Foundation for REST, RPC or GraphQL services.
4.0.0 #
3.2.0 #
3.1.1 #
- REFACTOR: use melos for mono-repo management.
- REFACTOR: use melos for mono-repo management.
- CHORE: publish packages.
3.0.11 #
remove dcli dependency for conduit and dependencies
3.0.10 #
fix for non-path create cli
3.0.9 #
3.0.8 #
3.0.7 #
uptick version for multi release
3.0.5 #
Stable Release
2.0.0-b9 #
Fixed a bug with the conduit build command. We had left in dep overrides which should only be used for conduit internal dev.
2.0.0-b2 #
- Stabilize with dependency changes
- Add ssl capabilities
2.0.0-b1 #
- Tooling tests pass
2.0.0-a3 #
- Docs published
- Unit tests passed
2.0.0-a2 #
- Small clean up and fix templates
2.0.0-a1 #
-
Alpha release for Conduit NNBD included
-
Breaking changes Query.values can no longer be null as such to check if the set of values are empty you need to call Query.hasValues;
-
You can no longer set Query.values to null, instead use Query.clearValues().
Aqueduct #
3.3.0-b1 #
- Adds 'conduit build' command that generates an executable binary of an conduit app, with some known issues
- Windows is not currently supported.
- Compilation will fail for files that import relative URIs and declare at least one type that is a subclass of any of
ManagedObject
,ApplicationChannel
,Controller
,ResourceController
,Configuration
.- Convert relative URI imports to package imports to resolve.
- Body decoding behaviors such as
RequestBody.as<T>
RequestBody.decode<T>
have restrictions when running in compiled mode:- The type parameter
T
may be any of the five primitive typesint
,double
,num
,String
,bool
;Map<String, T>
whereT
is a primitive, andList<T>
whereT
is a primitive orMap<String, dynamic>
. - These restrictions apply to the type of a
@Bind.body
parameter (you may also bindSerializable
andList<Serializable>
).
- The type parameter
3.2.2-dev #
- #723 Fixes issue that prevented the
AuthServer
from granting tokens with sub-scopes when the serversAuthServerDelegate.getAllowedScopes()
didn't returnAuthScope.any
. - Deprecates
AuthScope.allowsScope()
, useAuthScope.isSubsetOrEqualTo()
instead.
3.2.1 #
- Fixes issue when using
QueryReduce
inside a transaction. - Fixes issue when generating an OpenAPI document with ManagedObjects that have enumerated properties
- Fixes is sue when generating an OpenAPI document with List
3.2.0 #
- Adds
read
method toSerializable
for filtering, ignoring or rejecting keys. - Fixes issues with Dart 2.1.1 mirror type checking changes
- Adds
like
matcher expression - Escapes postgres special characters in LIKE expressions for all other string matcher expressions
- Fixes security vulnerability where a specific authorization header value would be associated with the wrong token in rare cases (credit to Philipp Schiffmann)
- Adds
Validate.constant
to properties that use the@primaryKey
annotation. - Allows
Validate
annotations to be added to belongs-to relationship properties; the validation is run on the foreign key. - Allows any type - e.g.
Map<String, dynamic>
- to be bound withBind.body
.
3.1.0 #
- Adds the implicit authorization grant flow via the
AuthRedirectController
type. - Deprecates
AuthCodeController
in favor ofAuthRedirectController
. - Improves speed of many database CLI commands
- Improves error messaging of the CLI; no longer includes stack trace for expected errors.
- Allows self-referencing and cyclical relationships between managed objects
- Fixes bug where ManagedObjects cannot have mixins
- Adds
ManagedContext.insertObject
,ManagedContext.insertObjects
andManagedContext.fetchObjectWithID
.
3.0.3 #
- Fix regression when generating OpenAPI documentation for
ManagedObject
s - Adds
--resolve-relative-urls
flag todocument
commands to improve client applications - Adds
Serializable.documentSchema
instance method. RemovesSerializable.document
static method. - Adds optional
values
argument toQuery
constructor
3.0.3 #
Controller
is now an abstract class that requires implementinghandle
. This is a minor breaking change that should not have an impact.- 'Serializable' can now implement static 'document' method to override component documentation behavior
- Removes
conduit setup --heroku=<name>
and instead points to documentation. - Fixes issue ORM had with transformed values (e.g. enums) and nullable columns
3.0.0 #
- Adds
BodyDecoder.decode<T>
andBodyDecoder.as<T>
. This replaces existingdecodeAs*
andas*
methods. - Adds
AuthDelegate.addClient
andAuthServer.addClient
. - Adds
ManagedContext.transaction
to enable queries to be run in a database transaction. - Adds 'Scope' annotation to add granular scoping to
ResourceController
methods. - Adds
Recyclable<T>
to control whether controllers are instantiated per request or are reused. - Adds support for storing PostgreSQL JSON data with
Document
data type. - Adds
Query.insertObject
. - Adds support for OpenAPI 3.0.0 documentation generation.
- Adds
APIComponentDocumenter
,APIOperationDocumenter
,APIDocumentContext
. - Removes
PackagePathResolver
,ApplicationOptions.isDocumenting
andAPIDocumentable
.
- Adds
- Adds
MockHTTPServer.queueHandler
andMockHTTPServer.queueOutage
. Query.where
behavior has changed to consistently use property selector syntax.- Removes methods like
whereEqualTo
and replaced withQueryExpression
.
- Removes methods like
Controller.generate
renamed toController.link
. RemovedController.pipe
.package:conduit_core/test
moved topackage:conduit_test/conduit_test
, which is a separate dependency fromconduit
.- Renames methods in
AuthDelegate
to provide consistency. - Removes
ManagedContext.defaultContext
; context usage must be explicit. - Removes
HTTPResponseException
. Responses can now be thrown instead. QueryException
s are no longer thrown for every ORM exception. If a store chooses to interpret an exception, it will still throw aQueryException
. Otherwise, the underlying driver exception will be thrown.- Default constructor for
PostgreSQLPersistentStore
now takes connection info instead of closure. Controller.listen
renamedController.linkFunction
.- Change default port for
conduit serve
to 8888. - Binding metadata -
HTTPPath
,HTTPBody
,HTTPQuery
andHTTPHeader
- have been changed toBind.path
,Bind.body
,Bind.query
andBind.header
, respectively. - Remove
@httpGet
(and otherHTTPMethod
annotations) constants. Behavior replaced by@Operation
. - Removes
runOnMainIsolate
fromApplication.start()
and addedApplication.startOnMainIsolate()
as replacement. - Removes
ManagedSet.haveAtLeastOneWhere
. - Renames
RequestSink
toApplicationChannel
.- Replace constructor and
willOpen
withprepare
. - Replace
setupRouter
withentryPoint
.
- Replace constructor and
- Replaces
AuthCodeController.renderFunction
withAuthCodeControllerDelegate
. - Removes
AuthStrategy
in place ofAuthorizationParser<T>
.- Adds concrete implementations of
AuthorizationParser<T>
,AuthorizationBearerParser
andAuthorizationBasicParser
.
- Adds concrete implementations of
- Removes
AuthValidator.fromBearerToken
andAuthValidator.fromBasicCredentials
and replaces withAuthValidator.validate<T>
. - Renames the following:
Authorization.resourceOwnerIdentifier
->Authorization.ownerID
Request.innerRequest
->Request.raw
AuthStorage
->AuthServerDelegate
AuthServer.storage
->AuthServer.delegate
ApplicationConfiguration
->ApplicationOptions
Application.configuration
->Application.options
HTTPFileController
->FileController
HTTPSerializable
->Serializable
HTTPCachePolicy
->CachePolicy
HTTPCodecRepository
->CodecRegistry
requiredHTTPParameter
->requiredBinding
ManagedTableAttributes
->Table
ManagedRelationshipDeleteRule
->DeleteRule
ManagedRelationship
->Relate
ManagedColumnAttributes
->Column
managedPrimaryKey
->primaryKey
ManagedTransientAttribute
->Serialize
Serialize
now replacesmanagedTransientAttribute
,managedTransientInputAttribute
, andmanagedTransientOutputAttribute
.
RequestController
->Controller
RequestController.processRequest
->Controller.handle
HTTPController
->ResourceController
2.5.0 #
- Adds
conduit db schema
to print an application's data model. - Adds
conduit document serve
that serves the API documentation for an application. - Adds
--machine
flag toconduit
tool to only emit machine-readable output. - Adds
defaultDelay
toMockHTTPServer
. Defaults to null for no delay. - Adds
defaultResponse
toMockHTTPServer
. Defaults to a 503 response instead of a 200. - Adds option to set a custom delay for a specific response in
MockHTTPServer
'squeueResponse
function. - Performance improvements
2.4.0 #
- Adds
HTTPRequestBody.maxSize
to limit HTTP request body sizes. Defaults to 10MB. - Adds
ManagedTableAttributes
to configure underlying database table to use multiple columns to test for uniqueness.
2.3.2 #
- Adds
Request.addResponseModifier
to allow middleware to modify responses.
2.3.1 #
- Adds
Response.bufferOutput
to control whether the HTTP response bytes are buffered. - Adds
whereNot
to apply an inverse to otherQuery.where
expression, e.g.whereNot(whereIn(["a", "b"]))
. - Fixes bug where subclassing
ManagedObjectController
didn't work. - Renames
ResourceRegistry
toServiceRegistry
. - Improves feedback and interface for
package:conduit_core/test.dart
.
2.3.0 #
- Adds
Request.acceptableContentTypes
andRequest.acceptsContentType
for convenient usage of Accept header. - Adds
AuthStorage.allowedScopesForAuthenticatable
to provide user attribute-based scoping, e.g. roles. - Adds
Query.forEntity
andManagedObjectController.forEntity
to dynamically instantiate these types, i.e. use runtime values to build the query. - Adds
PersistentStore.newQuery
- allows aPersistentStore
implementation to provide its own implementation ofQuery
specific to its underlying database. - Adds
Query.reduce
to perform aggregate functions on database tables, e.g. sum, average, maximum, etc. enum
s may be used as persistent properties inManagedObject<T>
. The underlying database will store them a strings.- Speed of generating a template project has been greatly improved.
2.2.2 #
- Adds
ApplicationMessageHub
to send cross-isolate messages.
2.2.1 #
- Allow
HTTPCodecRepository.add
to use specify default charset for Content-Type if a request does not specify one.
2.2.0 #
- The default template created by
conduit create
is now mostly empty. Available templates can be listed withconduit create list-templates
and selected with the command-line option--template
. - Bug fixes where
conduit auth
would fail to insert new Client IDs. joinMany
andjoinOne
are deprecated, usejoin(set:)
andjoin(object:)
instead.HTTPCodecRepository
replacesResponse.addEncoder
andHTTPBody.addDecoder
.Stream
s may now beResponse
bodies.- Request bodies may be bound in
HTTPController
withHTTPBody
metadata. - Adds file serving with
HTTPFileController
. - Adds
HTTPCachePolicy
to control cache headers for aResponse
. Request.body
has significantly improved behavior and has been optimized.- Content-Length is included instead of
Transfer-Encoding: chunked
when the size of the response body can be determined efficiently.
2.1.1 #
- Adds
ResourceRegistry
: tracks port-consuming resources like database connections to ensure they are closed when an application shuts down during testing.
2.1.0 #
- Fixes race condition when stopping an application during test execution
- Adds validation behavior to
ManagedObject
s usingValidate
andManagedValidator
andManagedObject.validate
. ManagedObject
s now have callbackswillUpdate
andwillInsert
to modify their values before updating and inserting.- Fixes issue with
conduit serve
on Windows.
2.0.3 #
- Fixes issue with
conduit document
for routes usinglisten
- Fixes issue when using
TestClient
to execute requests with public OAuth2 client - Enables database migrations past the initial
conduit db generate
. - CLI tools print tool version, project version (when applicable)
2.0.2 #
- Allow binding to system-assigned port so tests can be run in parallel
- Change
conduit serve
default port to 8081 so can develop in parallel to Angular2 apps that default to 8080 - Remove
SecurityContext
reference fromApplicationConfiguration
. SSL configured via newconduit serve
argumentsssl-key-path
andssl-certificate-path
, or overridingsecurityContext
inRequestSink
.
2.0.1 #
- Fixes issue where some types of join queries would access the wrong properties
- Fixes issue where an object cannot be inserted without values; this matters when the inserted values will be created by the database.
2.0.0 #
-
Added
RequestController.letUncaughtExceptionsEscape
for better debugging during tests. -
Persistent types for
ManagedObject
s can now have superclasses. -
ManagedRelationship
s now have a.deferred()
constructor. This allowsManagedObject
s to have relationships toManagedObject
s in other packages. -
Added
RequestSink.initializeApplication
method to do one-time startup tasks that were previously done in a start script. -
RequestSink
constructor now takesApplicationConfiguration
, instead ofMap
. -
Added
configurationFilePath
toApplicationConfiguration
. -
Improved error reporting from failed application startups.
-
Automatically lowercase headers in
Response
objects so that other parts of an application can accurately read their values during processing. -
Added
HTTPBody
object to represent HTTP request bodies inRequest
. Decoders are now added to this type. -
ORM: Renamed
Query.matchOn
toQuery.where
. -
ORM: Removed
includeInResultSet
forQuery
's, instead, addedjoinOn
andjoinMany
which create subqueries that can be configured further. -
ORM: Allow
Query.where
to reference properties in related objects without including related objects in results, i.e. can fetchParent
objects and filter them by values in theirChild
relationships. -
ORM: Joins can now be applied to belongsTo relationship properties.
-
ORM: Matchers such as
whereNull
andwhereNotNull
can be applied to a relationship property inQuery.where
. -
ORM: Renamed
ManagedSet.matchOn
toManagedSet.haveAtLeastOneWhere
. -
ORM: Added matchers for case-insensitive string matching, and added case-insensitive option to
whereEquals
andwhereNotEquals
. -
Auth: Added
conduit/managed_auth
library. Implements storage of OAuth 2.0 tokens usingManagedObject
s. See API reference for more details. -
Auth: Improved error and response messaging to better align with the OAuth 2.0 spec, especially with regards to the authorization code flow.
-
Auth: Added distinction between public and confidential clients, as defined by OAuth 2.0 spec.
-
Auth: Improved class and property naming.
-
Tooling: Added
conduit auth
tool to create client ID and secrets and add them to a database for applications using theconduit/managed_auth
package. -
Tooling: Added more user-friendly configuration options for
conduit db
tool. -
Tooling: Added
conduit setup --heroku
for setting up projects to be deployed to Heroku. -
Tooling: Added
conduit serve
command for running conduit applications without having to write a start script. -
Tooling: Added
conduit document
command to generate OpenAPI specification for conduit applications, instead of relying on a script that came with the template.
1.0.4 #
- BREAKING CHANGE: Added new
Response.contentType
property. Adding "Content-Type" to the headers of aResponse
no longer has any effect; use this property instead. ManagedDataModel
s now scan all libraries forManagedObject<T>
subclasses to generate a data model. UseManagedDataModel.fromCurrentMirrorSystem
to create instances ofManagedDataModel
.- The last instantiated
ManagedContext
now becomes theManagedContext.defaultContext
; prior to this change, it was the first instantiated context. AddedManagedContext.standalone
to opt out of setting the default context. - @HTTPQuery parameters in HTTPController responder method will now only allow multiple keys in the query string if and only if the argument type is a List.
1.0.3 #
- Fix to allow Windows user to use
conduit setup
. - Fix to CORS processing.
- HTTPControllers now return 405 if there is no responder method match for a request.
1.0.2 #
- Fix type checking for transient map and list properties of ManagedObject.
- Add flags to
Process.runSync
that allow Windows user to useconduit
executable.
1.0.1 #
- Change behavior of isolate supervision. If an isolate has an uncaught exception, it logs the exception but does not restart the isolate.
1.0.0 #
- Initial stable release.