@architect/inventory 3.4.3-RC.0 → 3.4.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@architect/inventory",
3
- "version": "3.4.3-RC.0",
3
+ "version": "3.4.3",
4
4
  "description": "Architect project resource enumeration utility",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -23,8 +23,8 @@
23
23
  "dependencies": {
24
24
  "@architect/asap": "~5.1.1",
25
25
  "@architect/parser": "~6.0.2",
26
- "@architect/utils": "~3.1.2",
27
- "lambda-runtimes": "~1.1.3"
26
+ "@architect/utils": "~3.1.6",
27
+ "lambda-runtimes": "~1.1.4"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@architect/eslint-config": "~2.1.1",
@@ -32,7 +32,7 @@
32
32
  "aws-sdk-mock": "~5.8.0",
33
33
  "cross-env": "~7.0.3",
34
34
  "dotenv": "~16.0.3",
35
- "eslint": "~8.32.0",
35
+ "eslint": "~8.37.0",
36
36
  "mock-fs": "~5.2.0",
37
37
  "nyc": "~15.1.0",
38
38
  "tap-spec": "^5.0.0",
@@ -21,8 +21,7 @@ module.exports = function getHandler ({ config, src, build, errors }) {
21
21
  }
22
22
  // Compiled to a binary
23
23
  else if (customRuntimeType === 'compiled') {
24
- handlerFile = join(build, runtimeConfig.buildSubpath || '', runtimeConfig.handlerFile || 'bootstrap')
25
- handlerMethod = null
24
+ handlerFile = join(build, runtimeConfig.handlerFile || 'handler')
26
25
  }
27
26
  // Interpreted
28
27
  else if (customRuntimeType === 'interpreted') {
@@ -42,36 +41,31 @@ let denoHandlers = [ 'mod.ts', 'mod.js' ]
42
41
  function getExt ({ runtime, src, errors }) {
43
42
  try {
44
43
  if (runtime.startsWith('node')) {
45
- if (runtime === 'nodejs12.x') {
46
- return { ext: 'js', handlerModuleSystem: 'cjs' }
47
- }
48
44
  // This presumes Node.js ≥14 Lambda releases use the same CJS/ESM pattern
49
45
  // Generally in Lambda: CJS wins, but in Architect-land we attempt to default to ESM
50
- else {
51
- let { file, ext } = findHandler(nodeHandlers, src)
46
+ let { file, ext } = findHandler(nodeHandlers, src)
52
47
 
53
- // Early return on extensions that imply module type
54
- if (ext === 'mjs') return { file, ext, handlerModuleSystem: 'esm' }
55
- if (ext === 'cjs') return { file, ext, handlerModuleSystem: 'cjs' }
48
+ // Early return on extensions that imply module type
49
+ if (ext === 'mjs') return { file, ext, handlerModuleSystem: 'esm' }
50
+ if (ext === 'cjs') return { file, ext, handlerModuleSystem: 'cjs' }
56
51
 
57
- // In the odd case that there only exists an `index` file (no ext), default to ESM and let other things blow up when it's not found
58
- ext = ext || 'mjs'
59
- let handlerModuleSystem = ext === 'mjs' ? 'esm' : 'cjs'
52
+ // In the odd case that there only exists an `index` file (no ext), default to ESM and let other things blow up when it's not found
53
+ ext = ext || 'mjs'
54
+ let handlerModuleSystem = ext === 'mjs' ? 'esm' : 'cjs'
60
55
 
61
- let pkgFile = join(src, 'package.json')
62
- if (existsSync(pkgFile)) {
63
- let pkg = JSON.parse(readFileSync(pkgFile))
56
+ let pkgFile = join(src, 'package.json')
57
+ if (existsSync(pkgFile)) {
58
+ let pkg = JSON.parse(readFileSync(pkgFile))
64
59
 
65
- /**/ if (pkg?.type === 'module') handlerModuleSystem = 'esm'
66
- else if (pkg?.type === 'commonjs') handlerModuleSystem = 'cjs'
67
- else if (pkg?.type) throw Error(`Invalid 'type' field: ${pkg.type}`)
68
- else handlerModuleSystem = 'cjs' // Lambda's default, not ours
60
+ /**/ if (pkg?.type === 'module') handlerModuleSystem = 'esm'
61
+ else if (pkg?.type === 'commonjs') handlerModuleSystem = 'cjs'
62
+ else if (pkg?.type) throw Error(`Invalid 'type' field: ${pkg.type}`)
63
+ else handlerModuleSystem = 'cjs' // Lambda's default, not ours
69
64
 
70
- // We always get to make this a .js file, even if it's ESM!
71
- ext = 'js'
72
- }
73
- return { file, ext, handlerModuleSystem }
65
+ // We always get to make this a .js file, even if it's ESM!
66
+ ext = 'js'
74
67
  }
68
+ return { file, ext, handlerModuleSystem }
75
69
  }
76
70
  if (runtime.startsWith('python')) return { ext: 'py' }
77
71
  if (runtime.startsWith('ruby')) return { ext: 'rb' }