Skip to content

Commit

Permalink
feat: add generator to functions config on deploy (#5483)
Browse files Browse the repository at this point in the history
  • Loading branch information
khendrikse authored Feb 17, 2023
1 parent f6f9cf9 commit 03af1a7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/utils/deploy/hash-fns.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const hashFns = async (
statusCb,
tmpDir,
})
const fileObjs = functionZips.map(({ displayName, path: functionPath, runtime }) => ({
const fileObjs = functionZips.map(({ displayName, generator, path: functionPath, runtime }) => ({
filepath: functionPath,
root: tmpDir,
relname: path.relative(tmpDir, functionPath),
Expand All @@ -119,10 +119,14 @@ const hashFns = async (
normalizedPath: path.basename(functionPath, path.extname(functionPath)),
runtime,
displayName,
generator,
}))
const fnConfig = functionZips
.filter((func) => Boolean(func.displayName))
.reduce((funcs, curr) => ({ ...funcs, [curr.name]: { display_name: curr.displayName } }), {})
.filter((func) => Boolean(func.displayName || func.generator))
.reduce(
(funcs, curr) => ({ ...funcs, [curr.name]: { display_name: curr.displayName, generator: curr.generator } }),
{},
)
const functionSchedules = functionZips
.map(({ name, schedule }) => schedule && { name, cron: schedule })
.filter(Boolean)
Expand Down

1 comment on commit 03af1a7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Package size: 263 MB

Please sign in to comment.