mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-27 07:13:11 +09:00
## Outcome Builder-owned code now routes standard ID generation through `@webstudio-is/sdk/createId` while preserving existing NanoID and UUID formats. Closes #6322 ## Technical choices - Use `createId("nano")` for Builder records, assets, transaction IDs, and other existing NanoID-backed values. - Use `createId()` for UUID-backed database records and browser-side client IDs. - Keep `BuilderRuntimeContext.createId` as an injectable dependency. Runtime operations, copy/paste, and deterministic tests rely on that injection. - Keep Node's `randomUUID` in CLI paths that explicitly support running without the Web Crypto global. - Keep specialized generators for custom-alphabet project domains and actual hash generation. - Remove direct `nanoid` dependencies from packages where no specialized use remains. - Do not migrate existing data or change database schemas. ## Todo - [x] Migrate Builder app ID creation. - [x] Migrate project runtime and template defaults. - [x] Migrate asset, project, domain, and authorization-token IDs. - [x] Preserve runtime ID injection. - [x] Review remaining direct generators as explicit exceptions. - [x] Add NanoID-format regression coverage for the default runtime context. - [x] Review documentation impact: no user-facing documentation changes are needed. - [x] Review fixture impact: no fixture input or generated output format changes are needed. - [x] Run targeted tests, typechecks, lint, and package-boundary checks. ## Verification - Targeted Builder tests: 153 passed after preserving runtime-context injection. - Project-build runtime tests: 270 passed. - Asset uploader tests: 61 passed. - Authorization-token tests: 17 passed. - Project tests: 52 passed. - Domain tests: 18 passed. - CLI tests: 32 passed. - Typechecks passed for Builder, project-build, asset-uploader, authorization-token, project, and domain. - `pnpm lint` passed. - `pnpm check:package-boundaries` passed. - The runtime-context format test was demonstrated to fail with a UUID default and pass with the NanoID default. - Agent evaluations were not run because they require separate explicit approval.
42 lines
1.1 KiB
JSON
42 lines
1.1 KiB
JSON
{
|
|
"name": "@webstudio-is/sync-client",
|
|
"version": "0.0.0",
|
|
"description": "Client runtime for Webstudio synchronization",
|
|
"author": "Webstudio <github@webstudio.is>",
|
|
"license": "AGPL-3.0-or-later",
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"webstudio": "./src/index.ts",
|
|
"import": "./src/index.ts",
|
|
"default": "./src/index.ts"
|
|
},
|
|
"./backoff": {
|
|
"webstudio": "./src/backoff.ts",
|
|
"import": "./src/backoff.ts",
|
|
"default": "./src/backoff.ts"
|
|
},
|
|
"./websocket": {
|
|
"webstudio": "./src/multiplayer/websocket-emitter.ts",
|
|
"import": "./src/multiplayer/websocket-emitter.ts",
|
|
"default": "./src/multiplayer/websocket-emitter.ts"
|
|
}
|
|
},
|
|
"sideEffects": false,
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"@emotion/hash": "^0.9.2",
|
|
"@webstudio-is/multiplayer-protocol": "workspace:*",
|
|
"nanostores": "^0.11.3",
|
|
"immerhin": "*",
|
|
"partysocket": "^1.1.18"
|
|
},
|
|
"devDependencies": {
|
|
"@webstudio-is/tsconfig": "workspace:*",
|
|
"vitest": "^3.1.2"
|
|
}
|
|
}
|