@lockerverse/sdk 0.2.161 → 0.2.163
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/MIGRATIONS.md +149 -0
- package/README.md +5 -0
- package/SDK_RULES.md +122 -0
- package/dist/types.js +1 -1
- package/package.json +5 -3
package/MIGRATIONS.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# SDK migrations
|
|
2
|
+
|
|
3
|
+
This file ships in both @lockerverse/sdk and @lockerverse/react. Use the copy in
|
|
4
|
+
the target installed release. This is an agent-run procedure, not an install
|
|
5
|
+
script. Installing a package does not edit host code or guarantee these steps ran.
|
|
6
|
+
|
|
7
|
+
## Upgrade procedure
|
|
8
|
+
|
|
9
|
+
1. Before installation, record the resolved installed version of each package
|
|
10
|
+
from the lockfile or package manager, the host framework, and the features in
|
|
11
|
+
use. Do not use a dependency range as proof of the installed version.
|
|
12
|
+
2. Select a published matching stable SDK/React pair. A copy-prompt version is a
|
|
13
|
+
minimum, not a request to downgrade. Preserve a newer matching stable pair.
|
|
14
|
+
Core-only consumers do not need to add React. Use the existing package manager
|
|
15
|
+
and update the real lockfile. Follow peer requirements in the target manifests.
|
|
16
|
+
3. After installation, read this target file and SDK_RULES.md. React consumers
|
|
17
|
+
must also read guides/integration.md and each applicable resource guide.
|
|
18
|
+
Follow SDK_RULES.md to create or merge the short host-root AGENTS.md section
|
|
19
|
+
so future upgrades use this procedure even without a new integration prompt.
|
|
20
|
+
4. For each affected package, apply all entries where old version < entry version
|
|
21
|
+
<= target version, from oldest to newest. Include releases skipped by the
|
|
22
|
+
upgrade. Use semantic version comparison, not string comparison. An Unreleased
|
|
23
|
+
section is not a published migration and must not be applied to a stable host.
|
|
24
|
+
5. Apply required steps. Apply recommended steps when the feature and host support
|
|
25
|
+
them and they fit the task. Keep deliberate host choices. For every skipped
|
|
26
|
+
step, state why it does not apply or what prevents it. Do not silently count it
|
|
27
|
+
as complete. Do not replace a framework, change payment mode, or publish a site
|
|
28
|
+
merely because a migration recommends a capability.
|
|
29
|
+
6. Run the host's relevant existing build and checks. Inspect initial HTML when
|
|
30
|
+
SSR applies and the browser behavior for the changed feature. Do not create
|
|
31
|
+
live transactions. Report old/new versions, applied entries, automatic changes,
|
|
32
|
+
skipped actions and reasons, check results, and any remaining work.
|
|
33
|
+
|
|
34
|
+
If the old version is unknown, identify it from the prior lockfile or Git history.
|
|
35
|
+
If it cannot be found, report that limit and use the baseline review below. Do not
|
|
36
|
+
claim that every historical migration was applied. Read this file even if the
|
|
37
|
+
version already matches: a previous upgrade may have missed host adoption steps.
|
|
38
|
+
|
|
39
|
+
## Existing integration baseline through 0.2.161
|
|
40
|
+
|
|
41
|
+
This guide starts with the current integration baseline. It is not a complete
|
|
42
|
+
record of older breaking changes. For an integration created before this guide,
|
|
43
|
+
review this section once, including when its version already matches the target.
|
|
44
|
+
The feature guide and public types in the target package define the exact API.
|
|
45
|
+
|
|
46
|
+
### Required when applicable
|
|
47
|
+
|
|
48
|
+
- **Hosts that use both React and Core:** keep installed versions matched and use public entry points.
|
|
49
|
+
Read the installed contract instead of an old copied integration prompt.
|
|
50
|
+
- **Auction media proxy:** if using mediaBaseUrl, pass the full loaded auction
|
|
51
|
+
snapshot to components and initialAuction. Forward w and f query parameters
|
|
52
|
+
unchanged. Check that a resized response has the expected dimensions and type.
|
|
53
|
+
- **Public route identity:** keep configured community and auction identity fixed.
|
|
54
|
+
Use real item and return links. Handle missing items without selecting another
|
|
55
|
+
item silently. Follow the host router's missing-page behavior.
|
|
56
|
+
- **Checkout and recovery:** preserve supported recovery state and private data
|
|
57
|
+
handling. Never restart an uncertain transaction to recover from a load error.
|
|
58
|
+
|
|
59
|
+
### Recommended host adoption
|
|
60
|
+
|
|
61
|
+
- **Existing SSR hosts:** load public data on the server and seed
|
|
62
|
+
useLockerverseAuction with initialAuction or useLockerverseAuctions with
|
|
63
|
+
initialAuctions. Keep public content outside client-only payment boundaries.
|
|
64
|
+
Keep that content visible during silent refresh. Verify it in the raw response.
|
|
65
|
+
- **Dedicated auction item pages:** set itemHeadingLevel={1}; avoid a competing
|
|
66
|
+
page title heading. Embedded item views can keep the default level 2.
|
|
67
|
+
- **Gallery:** set galleryImageSizes when the host differs from the default
|
|
68
|
+
full-width mobile / 45vw desktop layout. Check the first image before hydration
|
|
69
|
+
and selected photos after interaction. Keep full-screen sizing separate.
|
|
70
|
+
- **Import boundaries:** use feature entry points such as
|
|
71
|
+
@lockerverse/react/auction-item and @lockerverse/react/auction-data. Remove host
|
|
72
|
+
imports that eagerly load payment UI when the page does not yet need it.
|
|
73
|
+
- **Host metadata and assets:** check offer descriptions against current prices.
|
|
74
|
+
Keep local fonts, responsive photos, and background videos within the host's
|
|
75
|
+
performance budget. These are host tasks, not automatic SDK transformations.
|
|
76
|
+
|
|
77
|
+
### Automatic SDK behavior in the baseline
|
|
78
|
+
|
|
79
|
+
Supported auction media paths use responsive sizes through the configured proxy.
|
|
80
|
+
The gallery gives the first photo high priority and uses eager/lazy loading for
|
|
81
|
+
selected/other photos. Transaction headings follow the item heading level.
|
|
82
|
+
Auction checkout code is deferred until payment or recovery needs it. These
|
|
83
|
+
benefits require the supported components and data paths; custom host UI must
|
|
84
|
+
adopt the corresponding APIs itself. The SDK cannot remove the host's own eager
|
|
85
|
+
imports or server-render a browser-only website.
|
|
86
|
+
|
|
87
|
+
## Versioned changes
|
|
88
|
+
|
|
89
|
+
### 0.2.161 — Deferred auction checkout code
|
|
90
|
+
|
|
91
|
+
Affected: @lockerverse/react auction item and transaction UI.
|
|
92
|
+
|
|
93
|
+
- **Automatic:** the supported auction UI loads checkout code when payment or
|
|
94
|
+
recovery needs it. No public prop change is required.
|
|
95
|
+
- **Recommended:** use the narrow auction imports and remove unused eager payment
|
|
96
|
+
imports from the host. Do not remove payment peers required by the chosen flow.
|
|
97
|
+
- **Check:** compare initial page requests with checkout requests. Public item
|
|
98
|
+
content must remain available before checkout loads; recovery must keep its
|
|
99
|
+
existing state. Do not expect the total size of every reachable chunk to shrink.
|
|
100
|
+
|
|
101
|
+
### 0.2.160 — Transaction heading hierarchy
|
|
102
|
+
|
|
103
|
+
Affected: @lockerverse/react auction item UI.
|
|
104
|
+
|
|
105
|
+
- **Automatic:** transaction and status headings follow the item heading level.
|
|
106
|
+
- **Recommended:** dedicated pages should use itemHeadingLevel={1}. Embedded
|
|
107
|
+
views should retain the level that fits their surrounding page.
|
|
108
|
+
- **Check:** inspect the rendered heading order, including transaction states.
|
|
109
|
+
This change must not require a new host CSS workaround or a widget remount.
|
|
110
|
+
|
|
111
|
+
### 0.2.159 — Gallery loading and item heading controls
|
|
112
|
+
|
|
113
|
+
Affected: @lockerverse/react auction item UI.
|
|
114
|
+
|
|
115
|
+
- **Automatic:** selected photos load eagerly and other photos load lazily. The
|
|
116
|
+
first photo has high fetch priority; lazy photos can use automatic image sizing.
|
|
117
|
+
- **Recommended:** set galleryImageSizes for a custom host container and use
|
|
118
|
+
itemHeadingLevel={1} on a dedicated item page. Read guides/auctions.md for the
|
|
119
|
+
supported props. Embedded views can keep the defaults.
|
|
120
|
+
- **Check:** inspect the first response, image request sizes, and heading order.
|
|
121
|
+
Check gallery selection and full-screen viewing without changing image quality.
|
|
122
|
+
|
|
123
|
+
### 0.2.158 — Responsive images through a configured proxy
|
|
124
|
+
|
|
125
|
+
Affected: @lockerverse/react auction images and @lockerverse/sdk auction data.
|
|
126
|
+
|
|
127
|
+
- **Automatic:** supported auction images retain responsive resize URLs through
|
|
128
|
+
the configured mediaBaseUrl instead of losing resizing on that proxy path.
|
|
129
|
+
- **Required when using a proxy:** pass the full loaded snapshot to the UI and
|
|
130
|
+
server seed. Configure the host rewrite to forward w and f unchanged to the
|
|
131
|
+
media service. Do not reconstruct the snapshot and discard mediaBaseUrl.
|
|
132
|
+
- **Check:** confirm resized response dimensions and content type through the
|
|
133
|
+
actual proxy. Signed, external, and unsupported URLs must keep their original
|
|
134
|
+
behavior. Hosts without a custom proxy do not need a proxy configuration change.
|
|
135
|
+
|
|
136
|
+
## Entry format for future releases
|
|
137
|
+
|
|
138
|
+
Add new version entries above older entries. Before publication, replace any
|
|
139
|
+
Unreleased heading with the actual release version. Keep prior entries intact.
|
|
140
|
+
Each entry must state:
|
|
141
|
+
|
|
142
|
+
- Version and affected packages/features.
|
|
143
|
+
- Required changes, with the old and new API or behavior for breaking changes.
|
|
144
|
+
- Recommended host changes and the conditions where they apply.
|
|
145
|
+
- Automatic improvements and cases that need no host edit.
|
|
146
|
+
- Completion checks and any limits or manual follow-up.
|
|
147
|
+
|
|
148
|
+
For a new installation, use the current feature guides and baseline instead of
|
|
149
|
+
reproducing old APIs from migration examples.
|
package/README.md
CHANGED
|
@@ -12,6 +12,11 @@ Online documentation can describe a newer release. Import public package entry
|
|
|
12
12
|
points, not private `dist` files. For ready-made React UI, use the README shipped
|
|
13
13
|
with `@lockerverse/react`.
|
|
14
14
|
|
|
15
|
+
Read [SDK quality rules](SDK_RULES.md) before integration changes. For every
|
|
16
|
+
upgrade, read [MIGRATIONS.md](MIGRATIONS.md) from the target package and apply
|
|
17
|
+
all applicable steps, including skipped releases. A version bump alone does not
|
|
18
|
+
complete an upgrade. Record the old installed versions before installation.
|
|
19
|
+
|
|
15
20
|
## Usage guide
|
|
16
21
|
|
|
17
22
|
- [Checkout and payment recovery](#checkout)
|
package/SDK_RULES.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# SDK quality rules
|
|
2
|
+
|
|
3
|
+
These rules apply to SDK maintenance and host integration. Read the installed
|
|
4
|
+
package README, public types, resource guide, and MIGRATIONS.md with this file.
|
|
5
|
+
Use the instructions from the target release. Do not copy APIs from newer docs.
|
|
6
|
+
|
|
7
|
+
## Keep the host instructions available
|
|
8
|
+
|
|
9
|
+
On the first integration or upgrade, create or merge a short `Lockerverse SDK
|
|
10
|
+
maintenance` section in the host project's root `AGENTS.md`. Preserve unrelated
|
|
11
|
+
instructions and update an existing equivalent section instead of duplicating it.
|
|
12
|
+
Use the block below. Do not copy this entire guide or pin a release in that file.
|
|
13
|
+
For a monorepo, keep this pointer in the root and name the affected app directories;
|
|
14
|
+
resolve node_modules and lockfiles from the relevant package-manager workspace.
|
|
15
|
+
|
|
16
|
+
```markdown
|
|
17
|
+
## Lockerverse SDK maintenance
|
|
18
|
+
|
|
19
|
+
For any install, update, or integration edit involving @lockerverse/sdk or
|
|
20
|
+
@lockerverse/react:
|
|
21
|
+
- Record the old resolved package versions before installation. Use the existing
|
|
22
|
+
package manager; keep React/Core matched when both are used, without downgrades.
|
|
23
|
+
- Read SDK_RULES.md and MIGRATIONS.md in the target installed package under
|
|
24
|
+
node_modules/@lockerverse/react/ (or @lockerverse/sdk/ for Core-only hosts).
|
|
25
|
+
React users must also read guides/integration.md and the relevant resource guides.
|
|
26
|
+
- Apply all applicable migrations, including skipped releases, and review the
|
|
27
|
+
existing-integration baseline even if the version already matches. New
|
|
28
|
+
integrations use the current guides and baseline.
|
|
29
|
+
- If files are missing, select a published matching stable release that includes
|
|
30
|
+
them without downgrading, or report the blocked step. Do not invent instructions.
|
|
31
|
+
- If a tool already updated dependencies, recover the old versions from the prior
|
|
32
|
+
lockfile or Git history. Report old/new versions, applied steps, skipped steps
|
|
33
|
+
with reasons, and checks. A version bump alone does not complete a migration.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
For Lovable, this short pointer can also be kept in workspace knowledge, scoped
|
|
37
|
+
to tasks that use Lockerverse. Do not install the SDK in unrelated projects.
|
|
38
|
+
Workspace knowledge covers projects that have not yet received their root file;
|
|
39
|
+
the root file keeps the rule with the project when it moves to another workspace
|
|
40
|
+
or agent. Do not assume files inside node_modules are read automatically.
|
|
41
|
+
See [Lovable's knowledge documentation](https://docs.lovable.dev/features/knowledge).
|
|
42
|
+
If the host file cannot be edited, report that persistence is incomplete.
|
|
43
|
+
A package installation does not run these instructions or modify the host file.
|
|
44
|
+
|
|
45
|
+
## Public content and search
|
|
46
|
+
|
|
47
|
+
- In an existing server-rendered host, load public auction data in its server
|
|
48
|
+
loader. Pass the complete snapshot through the supported initial-data API.
|
|
49
|
+
Keep text, images, status, and real links in the first HTML response. Do not
|
|
50
|
+
put the whole auction in a client-only boundary to protect payment code.
|
|
51
|
+
- Keep browser storage, Stripe, and browser globals outside server rendering.
|
|
52
|
+
Retain the seed or last good snapshot during refresh. Refresh silently; do
|
|
53
|
+
not add an “Updating auction” banner or replace ready content with a loader.
|
|
54
|
+
Show initial loading only when no data exists. Keep useful failure feedback.
|
|
55
|
+
- Use real href links for item and return navigation. Preserve direct entry,
|
|
56
|
+
reload, Back, Forward, and opening in a new tab. The host must handle unknown
|
|
57
|
+
item URLs; do not silently show the first item for an invalid identity.
|
|
58
|
+
- On a dedicated item page, use itemHeadingLevel={1}. Keep transaction headings
|
|
59
|
+
below the item heading. Embedded items normally use the default level 2.
|
|
60
|
+
Use public props, not DOM patches or private CSS selectors.
|
|
61
|
+
- The host owns titles, descriptions, canonicals, robots rules, sitemap, HTTP
|
|
62
|
+
status codes, and structured data. Keep price and availability claims aligned
|
|
63
|
+
with current public data. Do not hard-code a second copy of an offer.
|
|
64
|
+
- A browser-only app does not gain server rendering from an SDK update. Explain
|
|
65
|
+
this limit. Do not replace its framework or add a server without task scope.
|
|
66
|
+
|
|
67
|
+
## Images, fonts, and initial download
|
|
68
|
+
|
|
69
|
+
- Use supported responsive image URLs and sizes. A proxy URL alone does not
|
|
70
|
+
prove resizing. Check the returned dimensions, content type, and transfer size.
|
|
71
|
+
- With mediaBaseUrl, preserve the complete auction snapshot and forward w and f
|
|
72
|
+
query parameters to the configured media service. Use only the supported
|
|
73
|
+
public media path. Preserve signed, private, external, and unsupported image
|
|
74
|
+
URLs and the existing original-image fallback.
|
|
75
|
+
- Match galleryImageSizes to the host layout. Reserve image space to prevent
|
|
76
|
+
layout shifts. Load the first visible image eagerly with high priority; load
|
|
77
|
+
off-screen images lazily. Keep selected and full-screen photos clear at their
|
|
78
|
+
rendered size and device pixel ratio. Do not lower quality only for a score.
|
|
79
|
+
- Import the narrow public entry point for the feature. Keep payment code and
|
|
80
|
+
optional Stripe peers out of unrelated catalog, event, and signup imports.
|
|
81
|
+
Defer auction checkout code until payment or recovery needs it.
|
|
82
|
+
- Keep required first-screen styles available. Scope widget styles and inherit
|
|
83
|
+
host fonts where supported. Do not add remote fonts or global font rules to
|
|
84
|
+
widgets. The host owns font compression, preload choices, background video,
|
|
85
|
+
and page-wide CSS. Avoid preloading every font or media file.
|
|
86
|
+
- Inspect the actual initial bundle and network requests when changing import
|
|
87
|
+
boundaries. A smaller entry file alone does not prove a smaller first load.
|
|
88
|
+
|
|
89
|
+
## State, failures, and logging
|
|
90
|
+
|
|
91
|
+
- Keep resource identity stable. Do not remount a widget for background refresh,
|
|
92
|
+
metadata changes, or styling changes. Preserve contact and checkout state.
|
|
93
|
+
- Never reset or retry an uncertain bid or payment as a new transaction. Preserve
|
|
94
|
+
the supported recovery flow. Do not add automatic page reloads to unresolved
|
|
95
|
+
payment recovery. A failed dynamic import needs useful failure feedback;
|
|
96
|
+
repeating the same import is not a reliable recovery method in every browser.
|
|
97
|
+
- Use the existing failure-only telemetry contract. Do not add routine request,
|
|
98
|
+
polling, success, or render logs. Report only the safe fields allowed by that
|
|
99
|
+
contract; do not serialize request bodies or arbitrary error objects.
|
|
100
|
+
- Keep contact data, payment tokens, secrets, and recovery credentials out of
|
|
101
|
+
URLs, public loader data, metadata, analytics, console output, and logs.
|
|
102
|
+
Public configuration and public resource identity are not credentials.
|
|
103
|
+
- Use the selected environment and supported public APIs. Do not introduce an
|
|
104
|
+
unrelated payment backend or change saved resource settings during an upgrade.
|
|
105
|
+
|
|
106
|
+
## Maintainer completion rules
|
|
107
|
+
|
|
108
|
+
- For every release, review MIGRATIONS.md. Add an entry for a changed public
|
|
109
|
+
contract, default, or host adoption step. Include useful optional improvements,
|
|
110
|
+
not only breaking changes. State when a change needs no host edit.
|
|
111
|
+
- Include affected packages/features, required and recommended actions, unchanged
|
|
112
|
+
cases, and a way to check completion. Do not call a version bump a migration.
|
|
113
|
+
- Use a concrete release version for dated entries. If the release version is
|
|
114
|
+
not yet known, put steps in an Unreleased section, then assign the actual
|
|
115
|
+
version before publication. Do not publish pending steps as completed history.
|
|
116
|
+
- These two root Markdown files are the maintained source. The package builds
|
|
117
|
+
copy them into both npm packages. Do not edit generated package copies.
|
|
118
|
+
- Use focused existing checks and inspect packed files for documentation changes.
|
|
119
|
+
Do not create tests just because a file changed. Do not use real bids, payments,
|
|
120
|
+
or signups for an integration check. Report checks not run and remaining limits.
|
|
121
|
+
- Do not promise a Lighthouse score, indexing, or search rank. Package rules help
|
|
122
|
+
prevent regressions; website content, hosting, and external services also matter.
|
package/dist/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=`0.2.
|
|
1
|
+
const e=`0.2.163`;var t=class extends Error{code;operation;reportable;recoveryRecommended;sdkVersion;serverCode;status;constructor({code:t,message:n,operation:r,reportable:i,recoveryRecommended:a=!1,serverCode:o,status:s}){super(n),this.name=`LockerverseSdkError`,this.code=t,this.operation=r,this.reportable=i,this.recoveryRecommended=a,this.sdkVersion=e,this.serverCode=o,this.status=s}};export{t as n,e as t};
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lockerverse/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.163",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/Lockerverse/lockerverse-sdk.git",
|
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
"types": "./dist/index.d.ts",
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|
|
42
|
-
"README.md"
|
|
42
|
+
"README.md",
|
|
43
|
+
"SDK_RULES.md",
|
|
44
|
+
"MIGRATIONS.md"
|
|
43
45
|
],
|
|
44
46
|
"dependencies": {
|
|
45
47
|
"valibot": "1.4.2"
|
|
@@ -93,7 +95,7 @@
|
|
|
93
95
|
}
|
|
94
96
|
],
|
|
95
97
|
"scripts": {
|
|
96
|
-
"build": "tsdown",
|
|
98
|
+
"build": "node ../../scripts/copy-package-instructions.mjs sdk && tsdown",
|
|
97
99
|
"contract:backend": "node test/contract/verify-backend-contract.mjs",
|
|
98
100
|
"contract:check": "node test/contract/generate-public-api.mjs check",
|
|
99
101
|
"contract:generate": "node test/contract/generate-public-api.mjs generate",
|