Repository navigation
Release v2.0.0: built on the core SDK v2, with realtime socket tokens - #26
Merged
Merged
Conversation
POST customers/socket-token with the customer's Customer-Token header,
resolving to { token, expires_in, expires_at } (SocketTokenResponse).
Declarations under types/ updated by hand; dist/ needs regenerating.
The core SDK is now a regular dependency. Its ESM and CommonJS entries, declarations and Fetch transport resolve cleanly, so the module builds import it instead of inlining a copy, and applications that also use the core SDK share one copy of its resources and adapters. Only the browser bundle inlines it. - Drop the local @fleetbase/sdk declaration shim and the axios-era overrides. - Type resources and stores against the SDK 2 declarations; listing endpoints keep resolving to collections in Storefront's types. - Send no Customer-Token header when signed out instead of an empty one. - Rebuild dist and types.
feat(socket-auth): add customer.socketToken() for realtime channels
feat!: build on @fleetbase/sdk 2 instead of a bundled 1.2.13
2.1.0 fixes the core SDK's Node transport (GET paths and headers set after construction), which Storefront uses under Node and server rendering. The browser bundle is rebuilt with it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the v2.0.0 release branch of the Storefront SDK. It contains:
customer.socketToken(). Mints a customer-scoped realtime token (POST customers/socket-token) for authenticated socket channels. Retargeted here.@fleetbase/sdk2. Storefront uses the core SDK as a regular dependency instead of bundling a copy of 1.2.13. Requests go through the core SDK's Fetch transport, apps share one copy of the core SDK, and axios is gone.The release prep commit:
package.jsonto 2.0.0;RELEASE.md, including the breaking changes;It's a major version because resources now follow core SDK 2 behaviour, for example
getAttributefallbacks fornull. The Storefront API surface itself is unchanged.Merging this PR into
maintags and publishes v2.0.0 to npm. Merge it only after the items below are done.Before merging
@fleetbase/sdk2.1.0, then raise the dependency to^2.1.0. 2.1.0 fixes the Node transport (fix(node): send Node requests through the shared Fetch transport fleetbase-js#46).Downstream
The storefront mobile app (
release/v0.1.0) will move to@fleetbase/sdk2.1 and@fleetbase/storefront2.0 together.