@architect/inventory 3.3.4-RC.0 → 3.3.5

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.3.4-RC.0",
3
+ "version": "3.3.5",
4
4
  "description": "Architect project resource enumeration utility",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -21,6 +21,8 @@ module.exports = function configureStatic ({ arc, inventory, errors }) {
21
21
  staging: null,
22
22
  production: null,
23
23
  }
24
+ let validSettings = Object.entries(_static).map(([ setting ]) => setting)
25
+ let validSetting = key => validSettings.includes(key)
24
26
 
25
27
  if (is.array(arc.static)) {
26
28
  let disabled = [ false, 'disable', 'disabled' ]
@@ -36,15 +38,25 @@ module.exports = function configureStatic ({ arc, inventory, errors }) {
36
38
  type: 'static',
37
39
  })
38
40
 
39
- let settings = Object.entries(_static).map(([ setting ]) => setting)
40
- let validSetting = key => settings.includes(key)
41
41
  for (let setting of staticPragma) {
42
- // The ignore setting can come in a couple shapes, so we have to handle those
42
+ // The ignore setting can come in one of two shapes, handle both
43
+ let ignore
44
+
45
+ // Ignore is a named vector
43
46
  if (setting.ignore) {
44
- _static.ignore = setting.ignore
47
+ ignore = setting.ignore
45
48
  }
49
+ // Plain vector settings
46
50
  else if (is.array(setting) && validSetting(setting[0])) {
47
- _static[setting[0]] = setting[0] === 'ignore' ? [ ...setting.slice(1) ] : setting[1]
51
+ if (setting[0] === 'ignore') ignore = setting.slice(1)
52
+ else _static[setting[0]] = setting[1]
53
+ }
54
+
55
+ // Merge manifest + plugin ignore patterns
56
+ if (ignore) {
57
+ _static.ignore = _static.ignore
58
+ ? [ ...new Set([ ..._static.ignore, ...setting.ignore ]) ] // De-dupe
59
+ : ignore
48
60
  }
49
61
  }
50
62
 
@@ -55,7 +55,7 @@ module.exports = function setRuntimePlugins (params, project) {
55
55
  if (is.string(runtime.build)) build = runtime.build
56
56
  }
57
57
  if (type === 'transpiled' && !allRuntimes.includes(baseRuntime)) {
58
- return errors.push(`Runtime '${name}' must include a valid baseRuntime property corresponding to a valid Lambda runtime (e.g. 'nodejs14.x')`)
58
+ return errors.push(`Runtime '${name}' must include a valid baseRuntime property corresponding to a valid Lambda runtime (e.g. 'nodejs16.x')`)
59
59
  }
60
60
  runtimes.runtimes.push(name)
61
61
  runtimes[name] = runtime
@@ -5,7 +5,7 @@ module.exports = function createDefaultFunctionConfig () {
5
5
  return {
6
6
  timeout: 5,
7
7
  memory: 1152,
8
- runtime: 'nodejs14.x',
8
+ runtime: 'nodejs16.x',
9
9
  architecture: 'x86_64', // TODO [BREAKING]: default to 'arm64'
10
10
  handler: 'index.handler',
11
11
  state: 'n/a',