@storystick/client 0.2.0-rc.4 → 0.2.0-rc.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/PUBLIC-API.md +2 -2
- package/dist/.source-hash +1 -1
- package/dist/query-client.d.ts +1 -1
- package/dist/query-client.js +9 -4
- package/package.json +3 -3
package/PUBLIC-API.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @storystick/client API contract
|
|
2
2
|
|
|
3
|
-
Install this candidate explicitly with `@storystick/client@0.2.0-rc.
|
|
3
|
+
Install this candidate explicitly with `@storystick/client@0.2.0-rc.6` after registry bootstrap and publication. This repository alone does not make the candidate or beta channel available on npm.
|
|
4
4
|
|
|
5
|
-
Version 0.2.0-rc.
|
|
5
|
+
Version 0.2.0-rc.6, cohort `sdk-0.2.0-rc.8`. ESM distribution; no CommonJS or universal Edge compatibility is promised.
|
|
6
6
|
|
|
7
7
|
This package is a product integration facade. Reserved contracts are required between SDK packages and must be upgraded with the same cohort. Their public export paths do not promise independent stability.
|
|
8
8
|
|
package/dist/.source-hash
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ab56f1bfbd5b16c277b8f8d98295f858544af3ea6d4c9685ffeeb3fe971336ea
|
package/dist/query-client.d.ts
CHANGED
|
@@ -52,6 +52,6 @@ export declare function clientMatchesPreviewAuthority(authority: Client, expecte
|
|
|
52
52
|
* Internal adapter primitive: keep a trusted client's transport authority and
|
|
53
53
|
* request scope while replacing only its generated schema surface.
|
|
54
54
|
*/
|
|
55
|
-
export declare function bindClientSchemaToAuthority<const TSchema extends QuerySchemaDefinition>(authority: Client, schema: TSchema): Client<TSchema>;
|
|
55
|
+
export declare function bindClientSchemaToAuthority<const TSchema extends QuerySchemaDefinition>(authority: Client, schema: TSchema, rendering?: Pick<RequestContext, 'previewCodeVersion' | 'unstable_previewProvenanceReadLifecycle'>): Client<TSchema>;
|
|
56
56
|
export declare function createClient<const TSchema extends QuerySchemaDefinition>(options: ClientOptions<TSchema>): Client<TSchema>;
|
|
57
57
|
export declare function createInternalClient<const TSchema extends QuerySchemaDefinition>(options: InternalClientOptions<TSchema>): Client<TSchema>;
|
package/dist/query-client.js
CHANGED
|
@@ -33,26 +33,31 @@ export function clientMatchesPreviewAuthority(authority, expected) {
|
|
|
33
33
|
* Internal adapter primitive: keep a trusted client's transport authority and
|
|
34
34
|
* request scope while replacing only its generated schema surface.
|
|
35
35
|
*/
|
|
36
|
-
export function bindClientSchemaToAuthority(authority, schema) {
|
|
36
|
+
export function bindClientSchemaToAuthority(authority, schema, rendering) {
|
|
37
37
|
let schemas = AUTHORITY_SCHEMA_CLIENTS.get(authority);
|
|
38
38
|
if (!schemas) {
|
|
39
39
|
schemas = new WeakMap();
|
|
40
40
|
AUTHORITY_SCHEMA_CLIENTS.set(authority, schemas);
|
|
41
41
|
}
|
|
42
42
|
const existing = schemas.get(schema);
|
|
43
|
-
if (existing)
|
|
43
|
+
if (existing && rendering === undefined)
|
|
44
44
|
return existing;
|
|
45
45
|
const runtime = getInternalClientRuntime(authority);
|
|
46
46
|
const options = normalizeClientOptions({
|
|
47
47
|
schema,
|
|
48
48
|
projectId: authority.projectId,
|
|
49
49
|
publishableKey: 'internal-authority-binding',
|
|
50
|
-
requestContext: runtime.requestContext
|
|
50
|
+
requestContext: rendering === undefined ? runtime.requestContext : {
|
|
51
|
+
...runtime.requestContext,
|
|
52
|
+
previewCodeVersion: rendering.previewCodeVersion,
|
|
53
|
+
unstable_previewProvenanceReadLifecycle: rendering.unstable_previewProvenanceReadLifecycle,
|
|
54
|
+
},
|
|
51
55
|
defaults: runtime.defaults,
|
|
52
56
|
localeRouting: runtime.localeRouting,
|
|
53
57
|
});
|
|
54
58
|
const bound = createClientWithTransport(options, runtime.transport, runtime.readServiceIdentity);
|
|
55
|
-
|
|
59
|
+
if (rendering === undefined)
|
|
60
|
+
schemas.set(schema, bound);
|
|
56
61
|
return bound;
|
|
57
62
|
}
|
|
58
63
|
export function createClient(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storystick/client",
|
|
3
|
-
"version": "0.2.0-rc.
|
|
3
|
+
"version": "0.2.0-rc.6",
|
|
4
4
|
"license": "FSL-1.1-MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"tag": "beta"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@storystick/media": "0.2.0-rc.
|
|
47
|
-
"@storystick/types": "0.1.0-rc.
|
|
46
|
+
"@storystick/media": "0.2.0-rc.5",
|
|
47
|
+
"@storystick/types": "0.1.0-rc.5"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"typescript": "^5.8.2",
|