@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
|
@@ -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
|
|
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
|
-
|
|
47
|
+
ignore = setting.ignore
|
|
45
48
|
}
|
|
49
|
+
// Plain vector settings
|
|
46
50
|
else if (is.array(setting) && validSetting(setting[0])) {
|
|
47
|
-
|
|
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. '
|
|
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
|