arky-sdk 0.11.2 → 0.11.3
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/README.md +15 -6
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,17 +10,17 @@ npm install arky-sdk
|
|
|
10
10
|
|
|
11
11
|
## Storefront quick start
|
|
12
12
|
|
|
13
|
-
The current browser contract is `arky-sdk@0.11.
|
|
13
|
+
The current browser contract is `arky-sdk@0.11.3`. Pin that exact version during the coordinated
|
|
14
14
|
prelaunch cutover so the Server, App, and storefront route/header contracts move together:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm install --save-exact arky-sdk@0.11.
|
|
17
|
+
npm install --save-exact arky-sdk@0.11.3
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Copy the Store publishable key from Developer and initialize one client:
|
|
21
21
|
|
|
22
22
|
```typescript
|
|
23
|
-
import { initialize } from "arky-sdk";
|
|
23
|
+
import { initialize } from "arky-sdk/storefront";
|
|
24
24
|
|
|
25
25
|
export const arky = initialize(import.meta.env.PUBLIC_ARKY_PUBLISHABLE_KEY);
|
|
26
26
|
```
|
|
@@ -221,6 +221,13 @@ initialize(publishableKey: string, {
|
|
|
221
221
|
|
|
222
222
|
One storefront client always represents one publishable key and one Store. To connect to another Store, initialize a second explicit client with its publishable key.
|
|
223
223
|
|
|
224
|
+
## Releasing
|
|
225
|
+
|
|
226
|
+
SDK packages are released only by tagging the current protected `master` commit with the exact
|
|
227
|
+
`v<package.json version>` tag. The `Publish SDK` workflow reruns `npm test` and publishes through
|
|
228
|
+
npm trusted publishing with provenance; configure that workflow as the package's trusted publisher
|
|
229
|
+
instead of storing a long-lived npm token.
|
|
230
|
+
|
|
224
231
|
## Admin client
|
|
225
232
|
|
|
226
233
|
Private operator integrations use the separate Admin client. Personal API tokens must never be exposed in browser code:
|
|
@@ -256,7 +263,7 @@ import {
|
|
|
256
263
|
type ArkyStore,
|
|
257
264
|
type StorefrontDto,
|
|
258
265
|
type StorefrontSetup,
|
|
259
|
-
} from "arky-sdk";
|
|
266
|
+
} from "arky-sdk/storefront";
|
|
260
267
|
import type { Block, Cart, Order, Price, Product, Service } from "arky-sdk";
|
|
261
268
|
|
|
262
269
|
type StorefrontProduct = StorefrontDto<Product>;
|
|
@@ -273,8 +280,10 @@ Run the complete SDK package contract with one command:
|
|
|
273
280
|
npm test
|
|
274
281
|
```
|
|
275
282
|
|
|
276
|
-
It builds the distributable package and runs every SDK contract case.
|
|
277
|
-
|
|
283
|
+
It builds the distributable package and runs every SDK contract case. App alone owns cross-repository
|
|
284
|
+
Server compatibility against the exact immutable test Server image digest. Each storefront owns a
|
|
285
|
+
hermetic repo-local build/preview Playwright smoke through its own `npm test`; storefronts never pull
|
|
286
|
+
or run the shared test Server image.
|
|
278
287
|
|
|
279
288
|
## Adding an endpoint
|
|
280
289
|
|