@architect/inventory 3.5.7 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -41,6 +41,8 @@ let nodeHandlers = [ 'index.js', 'index.mjs', 'index.cjs' ]
|
|
|
41
41
|
let denoHandlers = [ 'mod.ts', 'mod.js' ]
|
|
42
42
|
// TODO: these are all prob going away
|
|
43
43
|
.concat([ 'mod.tsx', 'index.ts', 'index.js', 'index.tsx' ])
|
|
44
|
+
let rubyHandlers = [ 'lambda.rb', 'handler.rb', 'index.rb' ]
|
|
45
|
+
let snekHandlers = [ 'lambda.py', 'handler.py', 'index.py' ]
|
|
44
46
|
|
|
45
47
|
function getExt ({ runtime, src, errors }) {
|
|
46
48
|
try {
|
|
@@ -71,8 +73,14 @@ function getExt ({ runtime, src, errors }) {
|
|
|
71
73
|
}
|
|
72
74
|
return { file, ext, handlerModuleSystem }
|
|
73
75
|
}
|
|
74
|
-
if (runtime.startsWith('python'))
|
|
75
|
-
|
|
76
|
+
if (runtime.startsWith('python')) {
|
|
77
|
+
let { file = 'lambda', ext = 'py' } = findHandler(snekHandlers, src)
|
|
78
|
+
return { file, ext }
|
|
79
|
+
}
|
|
80
|
+
if (runtime.startsWith('ruby')) {
|
|
81
|
+
let { file = 'lambda', ext = 'rb' } = findHandler(rubyHandlers, src)
|
|
82
|
+
return { file, ext }
|
|
83
|
+
}
|
|
76
84
|
if (runtime.startsWith('deno')) {
|
|
77
85
|
let { file = 'mod', ext = 'ts' } = findHandler(denoHandlers, src)
|
|
78
86
|
return { file, ext }
|