@drakkar.software/starfish-client 3.0.0-alpha.4 → 3.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bindings/zustand.d.ts +7 -0
- package/dist/bindings/zustand.js +34 -11
- package/dist/bindings/zustand.js.map +2 -2
- package/dist/client.d.ts +17 -2
- package/dist/index.js +33 -11
- package/dist/index.js.map +2 -2
- package/dist/types.d.ts +19 -0
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -48,6 +48,25 @@ export interface StarfishCapProvider {
|
|
|
48
48
|
export interface StarfishClientOptions {
|
|
49
49
|
/** Base URL of the Starfish server (e.g. "https://api.example.com/v1"). */
|
|
50
50
|
baseUrl: string;
|
|
51
|
+
/**
|
|
52
|
+
* Optional namespace for a namespace-mounted server. When set, every request
|
|
53
|
+
* path `/{action}/…` is rewritten to `/v1/{namespace}/{action}/…` for BOTH the
|
|
54
|
+
* URL the client hits AND the canonical path it signs, so the signature the
|
|
55
|
+
* server reconstructs from the namespaced URL verifies (no rewrite layer
|
|
56
|
+
* needed). Mirrors the Python client's `namespace` parameter.
|
|
57
|
+
*
|
|
58
|
+
* Crucially this also rewrites the paths that namespace-unaware SDK helpers
|
|
59
|
+
* build internally (e.g. `starfish-keyring`'s `addCollectionRecipient`, blob
|
|
60
|
+
* uploads), so consumers no longer hand-prefix paths or wrap the client to
|
|
61
|
+
* reach a namespaced deployment. Leave unset (default) for a root-mounted
|
|
62
|
+
* server — paths pass through unchanged, byte-identical to before.
|
|
63
|
+
*
|
|
64
|
+
* Pass the bare namespace name (e.g. `"octochat"`); `baseUrl` then carries only
|
|
65
|
+
* the origin (and any reverse-proxy mount the proxy strips), not the `/v1`
|
|
66
|
+
* version segment. Must match `[A-Za-z0-9_-]+` and not be a reserved route name
|
|
67
|
+
* (`pull`, `push`, `health`, `batch`).
|
|
68
|
+
*/
|
|
69
|
+
namespace?: string;
|
|
51
70
|
/**
|
|
52
71
|
* Cap-cert provider. When set, requests are signed with Ed25519 and carry
|
|
53
72
|
* `Authorization: Cap <…>`. Omit for unauthenticated public-read collections.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drakkar.software/starfish-client",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/Drakkar-Software/starfish.git",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@drakkar.software/starfish-protocol": "3.0.0-alpha.
|
|
63
|
+
"@drakkar.software/starfish-protocol": "3.0.0-alpha.6"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@legendapp/state": "^2.0.0",
|