From 5d3bd68a6397cf851e506dc2a95b8dfd87629c63 Mon Sep 17 00:00:00 2001 From: "Timothy J. Aveni" Date: Thu, 3 Sep 2026 09:50:30 -0700 Subject: [PATCH] Generate protobuf value declarations for runtime fields --- dist/codegen-ts-runtime.js | 5 ++++- src/codegen-ts-runtime.ts | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dist/codegen-ts-runtime.js b/dist/codegen-ts-runtime.js index 5a0c0eb..d5857bf 100755 --- a/dist/codegen-ts-runtime.js +++ b/dist/codegen-ts-runtime.js @@ -280,7 +280,10 @@ const renderRuntime = (schema, root) => { serveQuixosPackageRuntime, } from "@quixos/camino-package-runtime"; -${collectProtoDeclarations(root, schema.implements.flatMap((entry) => entry.typeBindings.map((binding) => binding.type)))} +${collectProtoDeclarations(root, [ + ...writableFields.map((field) => field.type), + ...schema.implements.flatMap((entry) => entry.typeBindings.map((binding) => binding.type)), + ])} ${interfaceRefTypes ? `${interfaceRefTypes}\n\n` : ""}export type ${refTypeName} = ${refType}; diff --git a/src/codegen-ts-runtime.ts b/src/codegen-ts-runtime.ts index bacc582..0d40c8a 100644 --- a/src/codegen-ts-runtime.ts +++ b/src/codegen-ts-runtime.ts @@ -386,7 +386,12 @@ const renderRuntime = (schema: ClassSchema, root: protobuf.Root) => { serveQuixosPackageRuntime, } from "@quixos/camino-package-runtime"; -${collectProtoDeclarations(root, schema.implements.flatMap((entry) => entry.typeBindings.map((binding) => binding.type)))} +${collectProtoDeclarations(root, [ + ...writableFields.map((field) => field.type), + ...schema.implements.flatMap((entry) => + entry.typeBindings.map((binding) => binding.type), + ), +])} ${interfaceRefTypes ? `${interfaceRefTypes}\n\n` : ""}export type ${refTypeName} = ${refType};