Repository navigation
Release v2.1.0: driver workflows, socket tokens and a working Node transport - #47
Merged
Merged
Conversation
Adds a Socket helper on the client (fleetbase.socket.token()) that calls
POST socket/token and resolves to { token, expires_in, expires_at }.
Documents the server-side mint / browser authenticate flow.
NodeAdapter overrode request() with (method, url) while the inherited get() calls request(path, 'GET', ...), so every GET under Node went to '/<ns>/GET' with the path as its method. It also read the constructor-time config, so headers set later with setHeaders (Customer-Token, Accept-Language) and host changes were dropped. NodeAdapter now only adds its User-Agent and inherits the browser transport.
This was referenced Oct 8, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #47 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 18 +1
Lines 866 860 -6
Branches 144 143 -1
=========================================
- Hits 866 860 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fix(node): send Node requests through the shared Fetch transport
…ource-map-js New high and critical advisories in development tooling (eslint, stryker, vitest) failed the dependency audit. None of these ship in the package.
feat(socket-auth): add socket.token() to mint realtime socket tokens
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.1.0 release branch. It contains:
mainand were pending release:manifests,manifestStops,trailers,fuelReports,issuesandworkOrders;fleetbase.socket.token(). Mints realtime socket tokens and is retargeted to this branch.NodeAdapterfix. Under Node, GET requests went to the wrong path and headers set after construction were dropped.The release prep commit:
package.jsonto 2.1.0;RELEASE.mdand the 2.1.0 changelog entry;Merging this PR into
maintags and publishes v2.1.0 to npm. Merge it only after the items below are done.Before merging
.changeset/socket-token.md, since the 2.1.0 notes already cover it.Downstream
The Storefront SDK v2.0.0 release (fleetbase/storefront-js) moves Storefront onto
@fleetbase/sdk2 as a dependency. It should require^2.1.0once this release is published, so Node consumers get the transport fix. The storefront mobile app will then upgrade to both.