Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/invoke-lambda/run-in-deno.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ let spawn = require('./spawn')

module.exports = function runInNode (params, callback) {
let deno = join(__dirname, 'runtimes', 'deno.js')
let root = params.options.env.LAMBDA_TASK_ROOT
params.options.env = { ...params.options.env, 'DENO_DIR': join(root, 'vendor', '.deno_cache') }
spawn({
command: 'deno',
args: [
'run', '-A', '--unstable', '--reload', deno
'run', '-A', '--unstable', deno
],
...params,
}, callback)
Expand Down
7 changes: 7 additions & 0 deletions src/lib/maybe-hydrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ module.exports = function maybeHydrate ({ cwd, inventory }, callback) {
}
else callback()
},
function _deno (callback) {
let isDenoRuntime = (path !== shared && path !== views && inv.lambdasBySrcDir[path].config.runtime === 'deno')
if (isDenoRuntime) {
install(callback)
}
else callback()
}
], callback)
}
})
Expand Down