Skip to content

Commit

Permalink
feat: add buildData to track serverless functions api version (#6059)
Browse files Browse the repository at this point in the history
* feat: add buildData

* fix: snake case
  • Loading branch information
jenae-janzen authored Oct 12, 2023
1 parent 8e0d28d commit 3dee20c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/utils/deploy/hash-fns.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const hashFns = async (
tmpDir,
})
const fileObjs = functionZips.map(
({ displayName, generator, invocationMode, path: functionPath, runtime, runtimeVersion }) => ({
({ buildData, displayName, generator, invocationMode, path: functionPath, runtime, runtimeVersion }) => ({
filepath: functionPath,
root: tmpDir,
relname: path.relative(tmpDir, functionPath),
Expand All @@ -120,14 +120,20 @@ const hashFns = async (
displayName,
generator,
invocationMode,
buildData,
}),
)
const fnConfig = functionZips
.filter((func) => Boolean(func.displayName || func.generator || func.routes))
.filter((func) => Boolean(func.displayName || func.generator || func.routes || func.buildData))
.reduce(
(funcs, curr) => ({
...funcs,
[curr.name]: { display_name: curr.displayName, generator: curr.generator, routes: curr.routes },
[curr.name]: {
display_name: curr.displayName,
generator: curr.generator,
routes: curr.routes,
build_data: curr.buildData,
},
}),
{},
)
Expand Down

2 comments on commit 3dee20c

@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

  • Dependency count: 1,369
  • Package size: 379 MB

@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

  • Dependency count: 1,369
  • Package size: 379 MB

Please sign in to comment.