Skip to content

Commit

Permalink
Pass functions manifest runtimeVersion to api when uploading functi…
Browse files Browse the repository at this point in the history
…ons (#6020)

* fix: when uploading functions, respect runtimeVersion field from functions manifest

* chore: styling
  • Loading branch information
Skn0tt authored Sep 22, 2023
1 parent afef98f commit 6aa53d6
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/utils/deploy/hash-fns.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,22 @@ const hashFns = async (
statusCb,
tmpDir,
})
const fileObjs = functionZips.map(({ displayName, generator, invocationMode, path: functionPath, runtime }) => ({
filepath: functionPath,
root: tmpDir,
relname: path.relative(tmpDir, functionPath),
basename: path.basename(functionPath),
extname: path.extname(functionPath),
type: 'file',
assetType: 'function',
normalizedPath: path.basename(functionPath, path.extname(functionPath)),
runtime,
displayName,
generator,
invocationMode,
}))
const fileObjs = functionZips.map(
({ displayName, generator, invocationMode, path: functionPath, runtime, runtimeVersion }) => ({
filepath: functionPath,
root: tmpDir,
relname: path.relative(tmpDir, functionPath),
basename: path.basename(functionPath),
extname: path.extname(functionPath),
type: 'file',
assetType: 'function',
normalizedPath: path.basename(functionPath, path.extname(functionPath)),
runtime: runtimeVersion ?? runtime,
displayName,
generator,
invocationMode,
}),
)
const fnConfig = functionZips
.filter((func) => Boolean(func.displayName || func.generator))
.reduce(
Expand Down

1 comment on commit 6aa53d6

@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,365
  • Package size: 366 MB

Please sign in to comment.