@architect/inventory 2.1.1-RC.0 → 2.1.1

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
@@ -13,6 +13,11 @@
13
13
 
14
14
  - Internal change: implement [Lambda runtimes module](https://www.npmjs.com/package/lambda-runtimes) instead of maintaining valid runtime list in Inventory
15
15
 
16
+
17
+ ### Fixed
18
+
19
+ - Fixed `@scheduled` parsing in `app.json` + `package.json` > `arc.scheduled`
20
+
16
21
  ---
17
22
 
18
23
  ## [2.1.0] 2021-10-11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@architect/inventory",
3
- "version": "2.1.1-RC.0",
3
+ "version": "2.1.1",
4
4
  "description": "Architect project resource enumeration utility",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -33,7 +33,7 @@ let get = {
33
33
  module.exports = function populateScheduled ({ item, dir, cwd, errors }) {
34
34
  let rate = null
35
35
  let cron = null
36
- if (is.array(item) && item.length >= 3) {
36
+ if (is.array(item)) {
37
37
  let name = item[0]
38
38
 
39
39
  // Hacky but it works
@@ -52,9 +52,17 @@ module.exports = function populateScheduled ({ item, dir, cwd, errors }) {
52
52
  else if (is.object(item)) {
53
53
  let name = Object.keys(item)[0]
54
54
 
55
- // Handle rate + cron
56
- if (item[name].rate) rate = get.rate(item[name].rate.join(' '))
57
- if (item[name].cron) cron = get.cron(item[name].cron.join(' '))
55
+ // Handle rate + cron props
56
+ if (item[name].rate) {
57
+ let itemRate = item[name].rate
58
+ let exp = is.array(itemRate) ? itemRate.join(' ') : itemRate
59
+ rate = get.rate(exp)
60
+ }
61
+ if (item[name].cron) {
62
+ let itemCron = item[name].cron
63
+ let exp = is.array(itemCron) ? itemCron.join(' ') : itemCron
64
+ cron = get.cron(exp)
65
+ }
58
66
 
59
67
  let src = item[name].src
60
68
  ? join(cwd, item[name].src)