From d7453e0902db7678a4ef077280aa77d4e7947577 Mon Sep 17 00:00:00 2001 From: seven Date: Mon, 9 Dec 2024 22:41:19 +0800 Subject: [PATCH] fix: resolve function name variables Signed-off-by: seven --- src/stack/rosStack/function.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/stack/rosStack/function.ts b/src/stack/rosStack/function.ts index d67e286..b37a56d 100644 --- a/src/stack/rosStack/function.ts +++ b/src/stack/rosStack/function.ts @@ -24,7 +24,11 @@ export const resolveFunctions = ( } const fileSources = functions ?.filter(({ code }) => readCodeSize(code) > CODE_ZIP_SIZE_LIMIT) - .map(({ code, name }) => ({ fcName: name, ...getFileSource(name, code) })); + .map(({ code, name }) => { + const fcName = replaceReference(name, context); + + return { fcName, ...getFileSource(fcName, code) }; + }); let destinationBucket: oss.Bucket; if (!isEmpty(fileSources)) {