mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-30 16:47:54 +09:00
## Summary - Add CLI project import support from synced `.webstudio/data.json` into another project via a destination share link. - Move project bundle import/export contract into `@webstudio-is/protocol`, including bundle versioning, staged upload constants, schema validation, and fixture coverage. - Upload project bundle data through staged TUS upload before calling the import RPC to avoid request body limits. - Upload referenced assets as binary files through the existing asset upload route before importing asset rows. - Add `--skip-assets` and `--ignore-version-check` import options. - Add retry handling for transient missing imported asset files by re-uploading only the reported missing assets. - Share missing-asset import error formatting/parsing through protocol to avoid duplicated string contracts. - Preserve browser asset upload behavior while adding API upload support. - Normalize schema naming across the branch to lower-case names without `Schema` suffix.
15 lines
425 B
TypeScript
15 lines
425 B
TypeScript
import { z } from "zod";
|
|
import { procedure, router } from "@webstudio-is/trpc-interface/index.server";
|
|
import {
|
|
updateUserProjectsTags,
|
|
userProjectTag,
|
|
} from "../shared/db/user.server";
|
|
|
|
export const userRouter = router({
|
|
updateProjectsTags: procedure
|
|
.input(z.object({ tags: z.array(userProjectTag) }))
|
|
.mutation(async ({ input, ctx }) => {
|
|
return await updateUserProjectsTags(input, ctx);
|
|
}),
|
|
});
|