@wonsukchoi/crondex 0.9.0 → 0.9.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/catalog.json CHANGED
@@ -258,7 +258,7 @@
258
258
  },
259
259
  {
260
260
  "id": "bill-due-reminder",
261
- "version": 1,
261
+ "version": 2,
262
262
  "name": "Bill Due Reminder",
263
263
  "description": "Warns you a few days before a recurring monthly bill is due. Use this if you've ever paid a late fee just because you forgot the date.",
264
264
  "category": "personal",
@@ -656,7 +656,7 @@
656
656
  },
657
657
  {
658
658
  "id": "competitor-page-diff-watch",
659
- "version": 1,
659
+ "version": 2,
660
660
  "name": "Competitor Page Diff Watch",
661
661
  "description": "Snapshots a competitor's pricing or landing page and diffs it against the last snapshot, turning any real change into a short action memo instead of a wall of markup diff. Use this if a competitor has ever changed pricing or repositioned a page and you found out from a customer instead of noticing it yourself.",
662
662
  "category": "marketing",
@@ -760,7 +760,7 @@
760
760
  },
761
761
  {
762
762
  "id": "cost-alert",
763
- "version": 1,
763
+ "version": 2,
764
764
  "name": "Cloud/API Cost Alert",
765
765
  "description": "Checks your recent cloud or API spend against a budget and warns you if you're over or on pace to go over. Use this if you've ever been surprised by a bill.",
766
766
  "category": "devops",
@@ -2637,7 +2637,7 @@
2637
2637
  },
2638
2638
  {
2639
2639
  "id": "open-port-check",
2640
- "version": 1,
2640
+ "version": 2,
2641
2641
  "name": "Expected Open Ports Check",
2642
2642
  "description": "Checks that the ports you expect to be open on a host actually are, and flags any that aren't. Use this if a service has ever silently stopped listening and you found out from a user instead of a monitor.",
2643
2643
  "category": "security",
@@ -3126,7 +3126,7 @@
3126
3126
  },
3127
3127
  {
3128
3128
  "id": "recurring-task-queue-reset",
3129
- "version": 1,
3129
+ "version": 2,
3130
3130
  "name": "Recurring Task Queue Reset",
3131
3131
  "description": "Clears out last week's completed recurring-task checklist and creates a fresh one from your template, so every cycle starts with the same predefined owners and checklist instead of a copy-pasted mess. Use this if your recurring weekly checklist has ever quietly drifted because someone edited last week's copy instead of starting clean.",
3132
3132
  "category": "productivity",
@@ -3199,7 +3199,7 @@
3199
3199
  },
3200
3200
  {
3201
3201
  "id": "repo-health-check",
3202
- "version": 1,
3202
+ "version": 2,
3203
3203
  "name": "Git Repo Health Check",
3204
3204
  "description": "Checks a git repo for branches nobody's touched in a while, uncommitted changes sitting around, and pull requests waiting on review, then reports a short digest. Use this if you want a daily nudge on repo hygiene without checking everything by hand.",
3205
3205
  "category": "devops",
@@ -3973,7 +3973,7 @@
3973
3973
  },
3974
3974
  {
3975
3975
  "id": "subscription-price-hike-watch",
3976
- "version": 1,
3976
+ "version": 2,
3977
3977
  "name": "Subscription Price Hike Watch",
3978
3978
  "description": "Checks a tracked subscription's current price against the last price you recorded and flags any increase. Use this if a service has ever quietly raised its price and you only noticed months later scrolling through a bank statement.",
3979
3979
  "category": "finance",
@@ -1,5 +1,5 @@
1
1
  id: cost-alert
2
- version: 1
2
+ version: 2
3
3
  name: Cloud/API Cost Alert
4
4
  description: >
5
5
  Checks your recent cloud or API spend against a budget and warns you if
@@ -14,7 +14,7 @@ command: >
14
14
  if command -v aws >/dev/null 2>&1; then
15
15
  start=$(date -d "-{{lookback_days}} days" +%Y-%m-%d 2>/dev/null || date -v-{{lookback_days}}d +%Y-%m-%d);
16
16
  end=$(date +%Y-%m-%d);
17
- aws ce get-cost-and-usage --time-period Start=$start,End=$end --granularity DAILY --metrics UnblendedCost 2>/dev/null || echo "aws cost explorer call failed (check credentials/permissions)";
17
+ aws ce get-cost-and-usage --time-period Start="$start",End="$end" --granularity DAILY --metrics UnblendedCost 2>/dev/null || echo "aws cost explorer call failed (check credentials/permissions)";
18
18
  elif command -v vercel >/dev/null 2>&1; then
19
19
  vercel billing 2>/dev/null || echo "vercel CLI present but no billing subcommand available";
20
20
  else
@@ -1,5 +1,5 @@
1
1
  id: repo-health-check
2
- version: 1
2
+ version: 2
3
3
  name: Git Repo Health Check
4
4
  description: >
5
5
  Checks a git repo for branches nobody's touched in a while, uncommitted
@@ -15,7 +15,7 @@ command: >
15
15
  cd {{repo_path}} && now=$(date +%s) &&
16
16
  echo "--- branches stale >{{stale_branch_days}}d ---" &&
17
17
  git for-each-ref --format='%(committerdate:unix) %(refname:short)' refs/heads/ |
18
- while read ts name; do age=$(( (now-ts)/86400 )); [ "$age" -gt {{stale_branch_days}} ] && echo "$name: ${age}d"; done;
18
+ while read -r ts name; do age=$(( (now-ts)/86400 )); [ "$age" -gt {{stale_branch_days}} ] && echo "$name: ${age}d"; done;
19
19
  echo "--- uncommitted changes ---"; git status --short;
20
20
  command -v gh >/dev/null && { echo "--- open PRs ---"; gh pr list --state open; } || echo "(gh not installed, skipping PR check)"
21
21
  prompt: |
@@ -1,5 +1,5 @@
1
1
  id: subscription-price-hike-watch
2
- version: 1
2
+ version: 2
3
3
  name: Subscription Price Hike Watch
4
4
  description: >
5
5
  Checks a tracked subscription's current price against the last price you
@@ -18,7 +18,7 @@ command: >
18
18
  if [ -z "$current_price" ]; then
19
19
  echo "could not extract a price from {{pricing_page_url}} — check {{price_pattern}} still matches the page.";
20
20
  exit 0;
21
- fi
21
+ fi;
22
22
  last_price=$(tail -1 "$history_file" | cut -d',' -f2);
23
23
  today=$(date +%Y-%m-%d);
24
24
  echo "$today,$current_price" >> "$history_file";
@@ -1,5 +1,5 @@
1
1
  id: competitor-page-diff-watch
2
- version: 1
2
+ version: 2
3
3
  name: Competitor Page Diff Watch
4
4
  description: >
5
5
  Snapshots a competitor's pricing or landing page and diffs it against the
@@ -17,7 +17,11 @@ command: >
17
17
  mkdir -p "$snapshot_dir";
18
18
  today_file="$snapshot_dir/$(date +%Y-%m-%d).html";
19
19
  curl -s -A "Mozilla/5.0" "{{competitor_url}}" -o "$today_file";
20
- prev_file=$(ls -1 "$snapshot_dir" | grep -v "$(basename "$today_file")" | sort | tail -1);
20
+ prev_file="";
21
+ for f in "$snapshot_dir"/*.html; do
22
+ [ "$(basename "$f")" = "$(basename "$today_file")" ] && continue;
23
+ prev_file=$(basename "$f");
24
+ done;
21
25
  if [ -n "$prev_file" ]; then
22
26
  diff "$snapshot_dir/$prev_file" "$today_file" | head -100;
23
27
  else
@@ -1,5 +1,5 @@
1
1
  id: bill-due-reminder
2
- version: 1
2
+ version: 2
3
3
  name: Bill Due Reminder
4
4
  description: >
5
5
  Warns you a few days before a recurring monthly bill is due. Use this if
@@ -13,7 +13,7 @@ command: >
13
13
  due={{due_day_of_month}}; warn={{warn_days}}; name="{{bill_name}}";
14
14
  today=$(date +%-d);
15
15
  days_left=$(( due - today ));
16
- if [ "$days_left" -lt 0 ]; then days_left=$(( days_left + 30 )); fi
16
+ if [ "$days_left" -lt 0 ]; then days_left=$(( days_left + 30 )); fi;
17
17
  if [ "$days_left" -le "$warn" ]; then echo "REMINDER: $name due in $days_left day(s) (on day $due of the month)";
18
18
  else echo "OK: $name due in $days_left day(s)"; fi
19
19
  variables:
@@ -1,5 +1,5 @@
1
1
  id: recurring-task-queue-reset
2
- version: 1
2
+ version: 2
3
3
  name: Recurring Task Queue Reset
4
4
  description: >
5
5
  Clears out last week's completed recurring-task checklist and creates a
@@ -16,7 +16,7 @@ command: >
16
16
  if [ ! -f "{{template_path}}" ]; then
17
17
  echo "template not found at {{template_path}} — nothing to reset from.";
18
18
  exit 1;
19
- fi
19
+ fi;
20
20
  week_label=$(date +%G-W%V);
21
21
  dest="{{output_dir}}/${week_label}.md";
22
22
  mkdir -p "{{output_dir}}";
@@ -1,5 +1,5 @@
1
1
  id: open-port-check
2
- version: 1
2
+ version: 2
3
3
  name: Expected Open Ports Check
4
4
  description: >
5
5
  Checks that the ports you expect to be open on a host actually are, and
@@ -16,7 +16,7 @@ command: >
16
16
  if command -v nc >/dev/null 2>&1; then
17
17
  nc -z -w2 "$host" "$p" 2>/dev/null && echo "OK: $host:$p open" || { echo "MISSING: $host:$p expected open but isn't"; fail=1; };
18
18
  else
19
- (echo > /dev/tcp/$host/$p) 2>/dev/null && echo "OK: $host:$p open" || { echo "MISSING: $host:$p expected open but isn't"; fail=1; };
19
+ (echo > "/dev/tcp/$host/$p") 2>/dev/null && echo "OK: $host:$p open" || { echo "MISSING: $host:$p expected open but isn't"; fail=1; };
20
20
  fi
21
21
  done;
22
22
  exit $fail
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonsukchoi/crondex",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "A public directory of pre-made, agent-editable cron jobs.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -32,7 +32,8 @@
32
32
  },
33
33
  "scripts": {
34
34
  "build-catalog": "node scripts/build-catalog.js",
35
- "validate": "node scripts/validate-jobs.js"
35
+ "validate": "node scripts/validate-jobs.js",
36
+ "lint-shell": "node scripts/lint-shell.js"
36
37
  },
37
38
  "devDependencies": {
38
39
  "ajv": "^8.17.1",