@architect/inventory 2.1.2 → 2.1.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/changelog.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@architect/inventory",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Architect project resource enumeration utility",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -39,5 +39,12 @@
|
|
|
39
39
|
},
|
|
40
40
|
"eslintConfig": {
|
|
41
41
|
"extends": "@architect/eslint-config"
|
|
42
|
+
},
|
|
43
|
+
"nyc": {
|
|
44
|
+
"check-coverage": true,
|
|
45
|
+
"branches": 100,
|
|
46
|
+
"lines": 100,
|
|
47
|
+
"functions": 100,
|
|
48
|
+
"statements": 100
|
|
42
49
|
}
|
|
43
50
|
}
|
package/readme.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[<img src="https://
|
|
1
|
+
[<img src="https://assets.arc.codes/architect-logo-500b@2x.png" width=500>](https://www.npmjs.com/package/@architect/inventory)
|
|
2
2
|
|
|
3
3
|
## [`@architect/inventory`](https://www.npmjs.com/package/@architect/inventory)
|
|
4
4
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
let is = require('../../../lib/is')
|
|
1
2
|
let { aliases, runtimes, runtimeList } = require('lambda-runtimes')
|
|
2
3
|
|
|
3
4
|
// Runtime interpolater
|
|
@@ -18,5 +19,9 @@ module.exports = function getRuntime (config) {
|
|
|
18
19
|
config.runtimeAlias = runtime
|
|
19
20
|
}
|
|
20
21
|
}
|
|
22
|
+
else if (is.defined(runtime)) {
|
|
23
|
+
// Someone did something funky like specify a number or bool, so coerce and let it fail validation
|
|
24
|
+
config.runtime = `${config.runtime}`
|
|
25
|
+
}
|
|
21
26
|
return config
|
|
22
27
|
}
|
package/src/validate/config.js
CHANGED
|
@@ -17,9 +17,9 @@ module.exports = function configValidator (params, inventory, errors) {
|
|
|
17
17
|
errors.push(invalidMemoryMsg(`${globalMemory} MB (@aws)`))
|
|
18
18
|
}
|
|
19
19
|
// Runtime
|
|
20
|
-
if (globalRuntime &&
|
|
21
|
-
!allRuntimes.includes(globalRuntime) &&
|
|
22
|
-
|
|
20
|
+
if ((globalRuntime && !is.string(globalRuntime)) ||
|
|
21
|
+
(globalRuntime && !allRuntimes.includes(globalRuntime) &&
|
|
22
|
+
!aliases[globalRuntime] && !aliases[globalRuntime.toLowerCase()])) {
|
|
23
23
|
errors.push(`Invalid project-level runtime: ${globalRuntime}`)
|
|
24
24
|
}
|
|
25
25
|
// Timeout
|