From cf9ba6f0ab261b29c683144b737cdb23bb85e8f7 Mon Sep 17 00:00:00 2001 From: benjdlambert Date: Thu, 19 Jun 2025 11:29:50 +0200 Subject: [PATCH] chore: fixing cookiecutter input values Signed-off-by: benjdlambert --- .changeset/sixty-ties-matter.md | 5 +++++ .../src/actions/fetch/cookiecutter.ts | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 .changeset/sixty-ties-matter.md diff --git a/.changeset/sixty-ties-matter.md b/.changeset/sixty-ties-matter.md new file mode 100644 index 0000000000..3be0bb08a8 --- /dev/null +++ b/.changeset/sixty-ties-matter.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch +--- + +Fixing the typescript issue with using `z.unknown()` diff --git a/plugins/scaffolder-backend-module-cookiecutter/src/actions/fetch/cookiecutter.ts b/plugins/scaffolder-backend-module-cookiecutter/src/actions/fetch/cookiecutter.ts index 3a4ee8c3d7..9a9df95dea 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/src/actions/fetch/cookiecutter.ts +++ b/plugins/scaffolder-backend-module-cookiecutter/src/actions/fetch/cookiecutter.ts @@ -169,9 +169,14 @@ export function createFetchCookiecutterAction(options: { }) .optional(), values: z => - z.record(z.unknown(), { - description: 'Values to pass on to cookiecutter for templating', - }), + z + .object( + {}, + { + description: 'Values to pass on to cookiecutter for templating', + }, + ) + .passthrough(), copyWithoutRender: z => z .array(z.string(), {