Skip to content

Releases

Kotlin SDK 1.0.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 22:58
9622d47

First stable release of AWS CDK Blocks for Kotlin.

Breaking

  • The Gradle plugin's extension, tasks and types are renamed from AwsBlocks to
    CdkBlocks: configure it with cdkBlocks { }, and the codegen tasks are
    cdkBlocksCodegen<Variant> and cdkBlocksDumpModel. Inside the extension,
    oidc { redirectUrl } is renamed relayTo, matching the backend's
    allowedRelayOrigins.
  • The generated Api(server: BlocksServer = Servers.local) constructor is gone. Build a
    Blocks instance and take the API from it: Api() becomes Blocks().api, and
    Api(server = s) becomes Blocks(s).api. One Blocks serves every API over a single
    HTTP engine, so keep the instance and close() it when done.
  • One error taxonomy, shared with the Swift and Dart clients: every exception extends
    BlocksException. Transport failures are TransportException (was
    NetworkException). ApiException replaces code and data with status, name
    and retriable — match errors by name with the new isBlocksError.
    TransferableIOException is now FileTransferException. A JSON-RPC error arriving
    with a non-2xx HTTP status throws the same ApiException as one arriving with
    HTTP 200.
  • Each API namespace is called at its own path, {url}/{namespace}, instead of the
    shared /cdk-blocks/api. Deploy the backend with @aws-blocks/core 0.8.0 or later,
    or any @aws-cdk-blocks/core, before shipping an app built with this version: an
    older backend serves only the shared path and rejects the per-namespace one. A proxy
    in front of the API must forward the whole /cdk-blocks/api/* subtree.
  • Generated clients and the codegen defaults use the /cdk-blocks/api and
    /cdk-blocks/auth/* paths. A server URL still configured with /aws-blocks/api keeps
    working; a bare origin does not, so append /cdk-blocks/api to a servers {} override
    such as local("http://10.0.2.2:3001"). A servers {} URL that reaches no RPC is
    rejected, and the unused x-blocks-endpoint spec key is dropped.
  • Unions and string enums that a response can carry are open: an arm or value a newer
    backend adds decodes to an unknown variant instead of throwing
    SerializationException, so an exhaustive when needs that branch. Such an enum is
    now a sealed class rather than a Kotlin enum class: use value and fromValue in
    place of name and valueOf, and entries in place of values(). ordinal,
    EnumSet and comparisons no longer apply.
  • On the JVM, set BlocksConfig.applicationId to keep the session across restarts.
    0.2.0 always persisted to ~/.blocks; without an applicationId the session is now
    held in memory and is gone when the process exits, with no error. The cookie jar also
    moved to a single stored entry with no fallback read, so every signed-in user on
    Android, iOS and the JVM signs in once more after upgrading.
  • OidcClient is typed by the spec's provider names, so a provider a method does not
    declare no longer compiles.
  • OidcClient.signOut() throws when the backend refuses the sign-out.
  • A realtime subscription that ends throws instead of going quiet.
  • Built with Kotlin 2.2.21 (0.2.0: 2.1.21), and depends on kotlinx-serialization-json
    1.9.0 (was 1.7.3) and Ktor 3.3.3 (was 3.1.3), which brings OkHttp 5 on JVM and
    Android.

Other changes

  • Add OIDC sign-in on iOS and JVM. iOS uses ASWebAuthenticationSession; the JVM
    receives the relay on a loopback address it binds per sign-in, so desktop apps need no
    relay configuration, and its landing pages are configurable. The JVM holds its session
    encryption key in the operating system.
  • Add OidcClient.restore(), which reads the backend's session for the client's cookie,
    and OidcUser gains the optional fields an Auth block reports.
  • Generated clients hydrate transferables inside lists, maps and models, accept a
    $ref, emit the declared type and factory call for a bound transferable result, and
    produce UnknownTransferable for a tag with no binding. Codegen reports a declared
    binding it cannot apply, and warns when excludeNativePackages names a package the
    spec does not declare.
  • Set default HTTP timeouts of 30 s connect and 60 s socket.
  • Hold the Android credential store on an Android Keystore key, and pin
    androidx.security:security-crypto to the stable 1.1.0.
  • Store the iOS cookie jar with a this-device-only Keychain accessibility class, and
    check the result of the system random number generator.
  • Generated clients compile and round-trip across the whole schema surface: unions with
    no discriminator or a boolean one, tuples, self-referencing types, objects with no
    properties, inline-object properties, format: uuid, unknown fields, additional
    properties, names that collide, type names that are valid files on Windows, and
    escaped schema-controlled strings.
  • Cookie storage no longer loses, over-sends or shares cookies.
  • Raw routes resolve against the server URL cut at its first cdk-blocks or
    aws-blocks path segment.
  • Send an aws-blocks-kotlin user-agent token on outbound requests.
  • Document the org.jetbrains.kotlin.plugin.serialization plugin the Gradle plugin
    requires, the RPC, OIDC and file-transfer exceptions, that an upload to a handle
    signed with a content length must send exactly that length, and how the JVM cookie
    store keeps its encryption key. The Android and multiplatform examples point at the
    shared backend setup and explain how to use the stub identity provider for testing.
  • The codegen task's "no spec found" error names the .cdk-blocks-sandbox config
    directory.

Thanks to @cadivus, @ekjotmultani, @harsh62, @ikenyal, @mattcreaser, @Simone319,
@soberm and @VarshithaPamisetty for their contributions to this release.

aws-cdk-blocks@1.0.0

Choose a tag to compare

@pranavosu pranavosu released this 20 Nov 22:21
92cf8fb

The first stable release. The changes since 1.0.0-rc.2 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.

Changes since @aws-blocks/blocks 0.x

  • The package is now aws-cdk-blocks. Install it in place of @aws-blocks/blocks, and change the import specifiers.
  • be8864c: Check conversation ownership in stream(), resume(), getConversation() and getPendingInterrupts(), and scope getChannel() to the caller.
  • c4e4e67: Scope inferenceOnly sessions to the user by default.
  • 5f55dac: A web frontend served from another origin than its API can sign in with a federated provider.
  • 5f55dac: Auth can share its user pool with a frontend that signs in directly against Cognito, such as one built with the Amplify client libraries.
  • 5f55dac: Adds AuthErrors, the auth error names, with the AuthErrorName type and the isAuthError() and isAuthErrorName() guards.
  • 5f55dac: AuthBasic, AuthCognito and AuthOIDC are removed.
  • c95d7c7: Auth lets you keep end users from writing an attribute your app relies on for authorization.
  • 5f55dac: Show local social and SAML sign-in as unavailable.
  • 5f55dac: The local user pool can check authenticator-app (TOTP) codes as Cognito does.
  • 5f55dac: Auth options: a block-level store and one providers map.
  • 5f55dac: Accept a Secret as a provider client secret.
  • 5f55dac: Auth can send its user pool's email through your own Amazon SES identity, with the email option.
  • 5f55dac: Add auth test helpers to aws-cdk-blocks/utils.
  • 5f55dac: A signed-in user can set up an authenticator app (TOTP) through auth.createApi(), with no backend code.
  • 5f55dac: subscribeAuthState, getAuthStateSnapshot and a shared auth-state store behind submitAuthAction. A sign-in or sign-out reaches every component and tab once.
  • 5f55dac: Add Auth (@aws-cdk-blocks/bb-auth), the single authentication Building Block, exported from aws-cdk-blocks.
  • 7c1eec5: An app that deployed a SQL block of an earlier release keeps its database.
  • c67048e: Database is the only SQL block. @aws-blocks/bb-data and @aws-blocks/bb-distributed-data are removed. See "Upgrade from @aws-blocks/bb-data" in the bb-database README.
  • 7c23ab9: Upload URLs carry signed constraints, download disposition is opt-in, key validation is stricter, and invalid input returns 400.
  • 684e22d: npm run dev starts the Nuxt and Astro dev servers.
  • b2eb306: Lifecycle tasks return 0 for success, 1 for failure, 2 for invalid usage and 130 for an interruption. --output json gives a structured result.
  • 792e269: Migration moves recognized generated script wrappers to package tasks and carries generated dev settings into package.json#blocks.dev.
  • a34c850: The documentation tasks read the docs shipped with the installed aws-cdk-blocks, including in hoisted workspaces.
  • c42ba42: The hidden .blocks/ folder is now .cdk-blocks/, and local data moves from .bb-data/ to .cdk-blocks/local/data/.
  • 703238f: The scaffolded backend folder is cdk-blocks/ instead of aws-blocks/.
  • 45a05d1: The per-deploy state directory is now .cdk-blocks-sandbox/.
  • 1de6ea4: The reserved URL prefix is now /cdk-blocks/ (/cdk-blocks/api, /cdk-blocks/auth/* and others). /aws-blocks/ still works as an alias.
  • 9ebf67a: An API namespace can run on a container compute.
  • 5f55dac: Opt in to HTTP error statuses for an API namespace.
  • 4665f81: defaults.appIdentity gives each app an identity, so many apps can share one AWS account.
  • 8894669: Telemetry follows your CDK CLI telemetry setting. The old opt-out (AWS_BLOCKS_DISABLE_TELEMETRY) is removed. To opt out, run cdk cli-telemetry --disable or set CDK_DISABLE_CLI_TELEMETRY=1.
  • 2c9005f: Reject malformed native declarations instead of dropping them.
  • 44c7377: defaults.strictNamespacePlacement serves each API namespace only on the compute it is placed on.
  • 227a856: withAuth(fn, cookies, { allowAnonymous: true }) runs fn signed out when no cookies are found, instead of throwing a 401.
  • afad513: A plain allowedOrigins entry such as https://app.example.com now matches exactly, ignoring case.
  • 5f55dac: New apps now use the unified Auth block.
  • 9801a5b: Each deploy stage has its own CDK outputs file.
  • 64f7247: EmailClient.sendBatch() now takes at most 100 messages per call by default.
  • 93d533a: Add allowPlainHttp, an explicit opt-out for builders who need a plain-HTTP front door in production.
  • adb6077: A production synth fails for a front door that would carry sign-in, session cookies or the origin-verify secret over plain HTTP. To keep such a door, set allowPlainHttp.
  • fb29c06: Lock the CloudFront door's server origin with a random secret, a regional web ACL and opt-in access logs.
  • 40d25ec: Keep credentialed and cookie-setting SSR responses out of the shared edge cache.
  • d51b8ee: Add KnowledgeBase.asAgentTool(), which returns a search tool for an Agent's tools callback.
  • 6d3077e: KVStore is the only key-value block: DistributedTable is folded in. A store of release 0.4.0 or earlier needs LegacyKVStore. See "Upgrade from release 0.4.0 or earlier" in the bb-kv-store README.
  • e1e4844: Tasks run as package scripts (npm run dev, npm run deploy and the others) instead of the cdk-blocks executable. Run npm run migrate to update an older app.
  • 2095f31: ctx.request.url.pathname no longer includes the API Gateway stage when deployed.
  • 42b84b2: Add getChannel(namespace, channel, { scope: 'exact' }) and validate channel names.
  • eb60b04: Bind channel handles to the signed-in user, re-check subscriptions on ping, and add revokeAccess().
  • 8894669: The telemetry app task is gone.
  • 58817b0: Service-principal trust policies get aws:SourceAccount and aws:SourceArn conditions, and the synth checks for them.

Since 1.0.0-rc.2

  • 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.

@aws-cdk-blocks/pipeline@1.0.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 22:12
92cf8fb

The first stable release. The changes since 1.0.0-rc.1 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0 and 1.0.0-rc.1.

Changes since @aws-blocks/pipeline 0.x

  • The package is now @aws-cdk-blocks/pipeline. Install it in place of @aws-blocks/pipeline, and change the import specifiers.

Since 1.0.0-rc.1

  • 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.

@aws-cdk-blocks/hosting@1.0.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 22:12
92cf8fb

The first stable release. The changes since 1.0.0-rc.1 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0 and 1.0.0-rc.1.

Changes since @aws-blocks/hosting 0.x

  • The package is now @aws-cdk-blocks/hosting. Install it in place of @aws-blocks/hosting, and change the import specifiers.
  • c42ba42: The hidden .blocks/ folder is now .cdk-blocks/, and local data moves from .bb-data/ to .cdk-blocks/local/data/.
  • 703238f: The scaffolded backend folder is cdk-blocks/ instead of aws-blocks/.
  • 45a05d1: The per-deploy state directory is now .cdk-blocks-sandbox/.
  • 1de6ea4: The reserved URL prefix is now /cdk-blocks/ (/cdk-blocks/api, /cdk-blocks/auth/* and others). /aws-blocks/ still works as an alias.
  • 4665f81: defaults.appIdentity gives each app an identity, so many apps can share one AWS account.
  • 93d533a: Add allowPlainHttp, an explicit opt-out for builders who need a plain-HTTP front door in production.
  • adb6077: A production synth fails for a front door that would carry sign-in, session cookies or the origin-verify secret over plain HTTP. To keep such a door, set allowPlainHttp.
  • fb29c06: Lock the CloudFront door's server origin with a random secret, a regional web ACL and opt-in access logs.
  • 40d25ec: Keep credentialed and cookie-setting SSR responses out of the shared edge cache.
  • c1fabce: secret and config CLIs print help for --help and -h.

Since 1.0.0-rc.1

  • 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.

@aws-cdk-blocks/create-blocks-app@1.0.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 22:12
92cf8fb

The first stable release. The changes since 1.0.0-rc.2 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.

Changes since @aws-blocks/create-blocks-app 0.x

  • The package is now @aws-cdk-blocks/create-blocks-app. Install it in place of @aws-blocks/create-blocks-app, and change the import specifiers.
  • c67048e: Database is the only SQL block. @aws-blocks/bb-data and @aws-blocks/bb-distributed-data are removed. See "Upgrade from @aws-blocks/bb-data" in the bb-database README.
  • c42ba42: The hidden .blocks/ folder is now .cdk-blocks/, and local data moves from .bb-data/ to .cdk-blocks/local/data/.
  • 703238f: The scaffolded backend folder is cdk-blocks/ instead of aws-blocks/.
  • 45a05d1: The per-deploy state directory is now .cdk-blocks-sandbox/.
  • 1de6ea4: The reserved URL prefix is now /cdk-blocks/ (/cdk-blocks/api, /cdk-blocks/auth/* and others). /aws-blocks/ still works as an alias.
  • 8894669: Telemetry follows your CDK CLI telemetry setting. The old opt-out (AWS_BLOCKS_DISABLE_TELEMETRY) is removed. To opt out, run cdk cli-telemetry --disable or set CDK_DISABLE_CLI_TELEMETRY=1.
  • 184df0b: Typecheck the backend with Node types and the browser code without them.
  • ba80bbd: Generated apps keep their existing npm lifecycle script names without generating cdk-blocks/scripts/*.ts wrappers.
  • 5f55dac: New apps create a user pool where users sign in with their email address, matched ignoring case.
  • 5f55dac: New apps now use the unified Auth block.
  • f32185c: Adds the dashboard command, which starts the Admin UI against your app on a free loopback port.
  • 6d3077e: Scaffold data models on KVStore with a schema and a key.
  • e1e4844: Tasks run as package scripts (npm run dev, npm run deploy and the others) instead of the cdk-blocks executable. Run npm run migrate to update an older app.
  • 8894669: The telemetry app task is gone.

Since 1.0.0-rc.2

  • 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.

@aws-cdk-blocks/create-block@1.0.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 22:12
92cf8fb

The first stable release. The changes since 1.0.0-rc.2 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.

Changes since @aws-blocks/create-block 0.x

  • The package is now @aws-cdk-blocks/create-block. Install it in place of @aws-blocks/create-block, and change the import specifiers.
  • 703238f: The scaffolded backend folder is cdk-blocks/ instead of aws-blocks/.

Since 1.0.0-rc.2

  • 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.

@aws-cdk-blocks/core@1.0.0

Choose a tag to compare

@pranavosu pranavosu released this 20 Nov 22:21
92cf8fb

The first stable release. The changes since 1.0.0-rc.2 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.

Changes since @aws-blocks/core 0.x

  • The package is now @aws-cdk-blocks/core. Install it in place of @aws-blocks/core, and change the import specifiers.
  • 5f55dac: Auth has protect(), for an API namespace that is deny by default.
  • c67048e: Database is the only SQL block. @aws-blocks/bb-data and @aws-blocks/bb-distributed-data are removed. See "Upgrade from @aws-blocks/bb-data" in the bb-database README.
  • c42ba42: The hidden .blocks/ folder is now .cdk-blocks/, and local data moves from .bb-data/ to .cdk-blocks/local/data/.
  • 703238f: The scaffolded backend folder is cdk-blocks/ instead of aws-blocks/.
  • 45a05d1: The per-deploy state directory is now .cdk-blocks-sandbox/.
  • 1de6ea4: The reserved URL prefix is now /cdk-blocks/ (/cdk-blocks/api, /cdk-blocks/auth/* and others). /aws-blocks/ still works as an alias.
  • f133ff8: With apiFrontDoor: 'cloudfront', CloudFront routes a namespace on a container compute straight to its load balancer, so a call can run up to 60 seconds.
  • 9ebf67a: An API namespace can run on a container compute.
  • 5f55dac: Opt in to HTTP error statuses for an API namespace.
  • 4665f81: defaults.appIdentity gives each app an identity, so many apps can share one AWS account.
  • c1fabce: Honor BLOCKS_LOG_LEVEL and BLOCKS_LOG_STREAM in the lifecycle scripts.
  • 41968b7: AWS_BLOCKS_DISABLE_TEMPLATE_METADATA is renamed to CDK_BLOCKS_DISABLE_TEMPLATE_METADATA.
  • 8894669: Telemetry follows your CDK CLI telemetry setting. The old opt-out (AWS_BLOCKS_DISABLE_TELEMETRY) is removed. To opt out, run cdk cli-telemetry --disable or set CDK_DISABLE_CLI_TELEMETRY=1.
  • 5f55dac: The OpenRPC spec generator describes every schema under a type name with the right shape, and gets an experimental tag for Building Block authors.
  • d46dfaf: A deploy no longer points the local dev loop at AWS.
  • 81113a3: The local dev server refuses cross-site text/plain POST requests to the API. Deployed APIs are unchanged.
  • 2c9005f: Reject malformed native declarations instead of dropping them.
  • ebfe2ed: Constructing a Scope whose fullId is already used by a different scope path now logs a warning that names both paths.
  • 99660fd: cdk synth fails when a scope or block id puts a character into a resource name that the resource's service rejects.
  • c1fabce: Read the deploy identity and credentials without deploying.
  • 5f55dac: The OpenRPC spec generator describes a TypeScript tuple as a JSON array of positional elements, and a rest parameter typed as a tuple as one parameter per element.
  • 44c7377: defaults.strictNamespacePlacement serves each API namespace only on the compute it is placed on.
  • 072c3ff: An unrecognized encryption value on KVStore or FileBucket fails the synth instead of falling back to the default key.
  • c67048e: VpcRequirements gains endpointClientSecurityGroups and endpointClientDependents, for a block that provisions its own compute.
  • 227a856: withAuth(fn, cookies, { allowAnonymous: true }) runs fn signed out when no cookies are found, instead of throwing a 401.
  • afad513: A plain allowedOrigins entry such as https://app.example.com now matches exactly, ignoring case.
  • f32185c: Adds the dashboard command, which starts the Admin UI against your app on a free loopback port.
  • f32185c: Every deploy is recorded in .cdk-blocks/deploy-history.jsonl.
  • 9801a5b: Each deploy stage has its own CDK outputs file.
  • 93d533a: Add allowPlainHttp, an explicit opt-out for builders who need a plain-HTTP front door in production.
  • adb6077: A production synth fails for a front door that would carry sign-in, session cookies or the origin-verify secret over plain HTTP. To keep such a door, set allowPlainHttp.
  • dd1c554: The shared execution role's statements are merged before CDK moves any overflow into managed policies. No permission is added.
  • 8ece10a: Require source conditions on KMS key policies that name a service principal.
  • c607deb: Behind a CloudFront front door, ctx.request.url is the URL the client called, not the API Gateway URL.
  • 2095f31: ctx.request.url.pathname no longer includes the API Gateway stage when deployed.
  • d354055: Add secretsStore: 'ssm' | 'secrets-manager' to BlocksDefaults.
  • 58817b0: Service-principal trust policies get aws:SourceAccount and aws:SourceArn conditions, and the synth checks for them.

Since 1.0.0-rc.2

  • 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.

@aws-cdk-blocks/bb-tracer@1.0.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 22:13
92cf8fb

The first stable release, with no changes since 1.0.0-rc.2. The full notes for every change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.

Changes since @aws-blocks/bb-tracer 0.x

  • The package is now @aws-cdk-blocks/bb-tracer. Install it in place of @aws-blocks/bb-tracer, and change the import specifiers.

@aws-cdk-blocks/bb-secret@1.0.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 22:13
92cf8fb

The first stable release. The changes since 1.0.0-rc.2 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.

Changes since @aws-blocks/bb-secret 0.x

  • The package is now @aws-cdk-blocks/bb-secret. Install it in place of @aws-blocks/bb-secret, and change the import specifiers.
  • d354055: Adds an internal @aws-cdk-blocks/bb-secret/internal entry point for the generated keys of other blocks.

Since 1.0.0-rc.2

  • 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.

@aws-cdk-blocks/bb-realtime@1.0.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 22:13
92cf8fb

The first stable release. The changes since 1.0.0-rc.2 are listed below. The full notes for every other change since 0.x are in CHANGELOG.md under 1.0.0-rc.0, 1.0.0-rc.1 and 1.0.0-rc.2.

Changes since @aws-blocks/bb-realtime 0.x

  • The package is now @aws-cdk-blocks/bb-realtime. Install it in place of @aws-blocks/bb-realtime, and change the import specifiers.
  • 42b84b2: Add getChannel(namespace, channel, { scope: 'exact' }) and validate channel names.
  • eb60b04: Bind channel handles to the signed-in user, re-check subscriptions on ping, and add revokeAccess().
  • d354055: The connection token key now follows defaults.secretsStore.

Since 1.0.0-rc.2

  • 63e571c: Use AWS CDK Blocks consistently in starter apps, CLI messages, package metadata, and documentation. Package imports and commands are unchanged.