@wonsukchoi/crondex 0.8.0 → 0.9.0
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/README.md +22 -8
- package/bin/crondex.js +44 -0
- package/catalog.json +859 -13
- package/jobs/agriculture/equipment-maintenance-due-reminder.yaml +36 -0
- package/jobs/agriculture/irrigation-schedule-check.yaml +41 -0
- package/jobs/agriculture/weather-frost-alert.yaml +41 -0
- package/jobs/crypto/gas-price-alert.yaml +34 -0
- package/jobs/crypto/smart-contract-upgrade-watch.yaml +49 -0
- package/jobs/crypto/wallet-balance-watch.yaml +37 -0
- package/jobs/devops/github-issue-triage.yaml +38 -0
- package/jobs/ecommerce/abandoned-cart-recovery-check.yaml +38 -0
- package/jobs/ecommerce/low-stock-reorder-alert.yaml +33 -0
- package/jobs/ecommerce/return-refund-backlog-check.yaml +29 -0
- package/jobs/finance/subscription-price-hike-watch.yaml +44 -0
- package/jobs/gaming/game-patch-notes-watch.yaml +39 -0
- package/jobs/gaming/stream-schedule-reminder.yaml +30 -0
- package/jobs/gaming/subscriber-churn-watch.yaml +39 -0
- package/jobs/healthcare/appointment-no-show-follow-up.yaml +32 -0
- package/jobs/healthcare/license-credential-expiry-check.yaml +35 -0
- package/jobs/healthcare/patient-recall-reminder.yaml +34 -0
- package/jobs/hr/benefits-enrollment-deadline-reminder.yaml +34 -0
- package/jobs/hr/new-hire-paperwork-check.yaml +35 -0
- package/jobs/hr/payroll-run-reminder.yaml +30 -0
- package/jobs/insurance/claim-status-check.yaml +30 -0
- package/jobs/insurance/coverage-gap-audit.yaml +37 -0
- package/jobs/insurance/policy-renewal-reminder.yaml +35 -0
- package/jobs/marketing/competitor-page-diff-watch.yaml +48 -0
- package/jobs/personal/end-of-day-wrap-message.yaml +32 -0
- package/jobs/personal/new-restaurant-roundup.yaml +35 -0
- package/jobs/productivity/morning-briefing-digest.yaml +42 -0
- package/jobs/productivity/recurring-task-queue-reset.yaml +37 -0
- package/jobs/restaurant/health-inspection-prep-reminder.yaml +29 -0
- package/jobs/restaurant/inventory-waste-log-review.yaml +32 -0
- package/jobs/restaurant/reservation-noshow-deposit-check.yaml +32 -0
- package/jobs/sales/newly-funded-leads-scout.yaml +44 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,9 +25,11 @@ blocked by npm's anti-typosquat check). The command itself is still
|
|
|
25
25
|
```bash
|
|
26
26
|
npx @wonsukchoi/crondex list # browse everything
|
|
27
27
|
npx @wonsukchoi/crondex list --category devops # filter by category or --tag
|
|
28
|
+
npx @wonsukchoi/crondex categories # list categories with job counts
|
|
28
29
|
npx @wonsukchoi/crondex show backup-reminder # print one job's YAML
|
|
29
30
|
npx @wonsukchoi/crondex add backup-reminder --dest ./cron/backup-reminder.yaml
|
|
30
31
|
npx @wonsukchoi/crondex recommend "warn me before my SSL cert expires"
|
|
32
|
+
npx @wonsukchoi/crondex init ssl-cert-expiry-check --category security
|
|
31
33
|
```
|
|
32
34
|
|
|
33
35
|
`recommend` takes a free-text description of what you want and ranks the
|
|
@@ -37,6 +39,10 @@ got asked "can you set up something for X" and needs to check whether a
|
|
|
37
39
|
ready-made job already covers it before writing one from scratch. Add
|
|
38
40
|
`--limit <n>` to control how many results come back (default 5).
|
|
39
41
|
|
|
42
|
+
`init` scaffolds a new job file from `templates/job.template.yaml` into your
|
|
43
|
+
own project (default `./<id>.yaml`) — for writing a job that isn't in the
|
|
44
|
+
catalog yet, whether or not you plan to contribute it back.
|
|
45
|
+
|
|
40
46
|
Or install once and drop the scope prefix on every call:
|
|
41
47
|
|
|
42
48
|
```bash
|
|
@@ -60,7 +66,7 @@ node bin/crondex.js list
|
|
|
60
66
|
|
|
61
67
|
```
|
|
62
68
|
crondex/
|
|
63
|
-
├── bin/crondex.js CLI: list / show / add / recommend
|
|
69
|
+
├── bin/crondex.js CLI: list / categories / show / add / recommend / init
|
|
64
70
|
├── catalog.json generated index of every job — read this first
|
|
65
71
|
├── schema/job.schema.json spec every job file follows
|
|
66
72
|
├── jobs/ one YAML per job, grouped by category subdirectory
|
|
@@ -78,35 +84,43 @@ counts below are regenerated by `npm run build-catalog`, so they never drift
|
|
|
78
84
|
from what's actually in `jobs/`.
|
|
79
85
|
|
|
80
86
|
<!-- BEGIN JOB SUMMARY -->
|
|
81
|
-
|
|
87
|
+
182 jobs across 37 categories:
|
|
82
88
|
|
|
83
89
|
| category | jobs |
|
|
84
90
|
|---|---|
|
|
91
|
+
| `agriculture` | 3 |
|
|
85
92
|
| `construction` | 3 |
|
|
86
93
|
| `content` | 12 |
|
|
87
94
|
| `creator` | 3 |
|
|
88
|
-
| `
|
|
95
|
+
| `crypto` | 3 |
|
|
96
|
+
| `devops` | 26 |
|
|
97
|
+
| `ecommerce` | 3 |
|
|
89
98
|
| `education` | 3 |
|
|
90
99
|
| `events` | 3 |
|
|
91
|
-
| `finance` |
|
|
100
|
+
| `finance` | 10 |
|
|
92
101
|
| `fleet` | 3 |
|
|
102
|
+
| `gaming` | 3 |
|
|
93
103
|
| `growth` | 4 |
|
|
104
|
+
| `healthcare` | 3 |
|
|
94
105
|
| `hiring` | 3 |
|
|
95
106
|
| `home` | 5 |
|
|
96
107
|
| `hospitality` | 3 |
|
|
108
|
+
| `hr` | 3 |
|
|
109
|
+
| `insurance` | 3 |
|
|
97
110
|
| `inventory` | 3 |
|
|
98
111
|
| `investing` | 3 |
|
|
99
112
|
| `learning` | 5 |
|
|
100
113
|
| `legal` | 3 |
|
|
101
114
|
| `logistics` | 3 |
|
|
102
115
|
| `manufacturing` | 3 |
|
|
103
|
-
| `marketing` |
|
|
116
|
+
| `marketing` | 4 |
|
|
104
117
|
| `nonprofit` | 3 |
|
|
105
|
-
| `personal` |
|
|
118
|
+
| `personal` | 8 |
|
|
106
119
|
| `podcast` | 3 |
|
|
107
|
-
| `productivity` |
|
|
120
|
+
| `productivity` | 9 |
|
|
108
121
|
| `realestate` | 3 |
|
|
109
|
-
| `
|
|
122
|
+
| `restaurant` | 3 |
|
|
123
|
+
| `sales` | 4 |
|
|
110
124
|
| `security` | 14 |
|
|
111
125
|
| `support` | 3 |
|
|
112
126
|
| `team` | 4 |
|
package/bin/crondex.js
CHANGED
|
@@ -28,15 +28,19 @@ function printHelp() {
|
|
|
28
28
|
|
|
29
29
|
Usage:
|
|
30
30
|
crondex list [--category <name>] [--tag <name>]
|
|
31
|
+
crondex categories
|
|
31
32
|
crondex show <id>
|
|
32
33
|
crondex add <id> [--dest <path>]
|
|
33
34
|
crondex recommend "<what you want done>" [--limit <n>]
|
|
35
|
+
crondex init <id> [--category <name>] [--dest <path>]
|
|
34
36
|
|
|
35
37
|
Examples:
|
|
36
38
|
crondex list --category devops
|
|
39
|
+
crondex categories
|
|
37
40
|
crondex show dependency-audit
|
|
38
41
|
crondex add backup-reminder --dest ./cron/backup-reminder.yaml
|
|
39
42
|
crondex recommend "warn me before my SSL cert expires"
|
|
43
|
+
crondex init ssl-cert-expiry-check --category security
|
|
40
44
|
`);
|
|
41
45
|
}
|
|
42
46
|
|
|
@@ -147,6 +151,36 @@ function show(id) {
|
|
|
147
151
|
console.log(readFileSync(join(ROOT, findJob(id).path), "utf8"));
|
|
148
152
|
}
|
|
149
153
|
|
|
154
|
+
function categories() {
|
|
155
|
+
const counts = {};
|
|
156
|
+
for (const j of CATALOG.jobs) counts[j.category] = (counts[j.category] ?? 0) + 1;
|
|
157
|
+
console.log(catalogInfoLine());
|
|
158
|
+
console.log();
|
|
159
|
+
for (const [cat, n] of Object.entries(counts).sort(([a], [b]) => a.localeCompare(b))) {
|
|
160
|
+
console.log(`${cat} (${n})`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const ID_RE = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
165
|
+
|
|
166
|
+
function init(id) {
|
|
167
|
+
if (!ID_RE.test(id)) {
|
|
168
|
+
console.error(`"${id}" isn't a valid job id — use lowercase letters, digits, and hyphens (e.g. ssl-cert-expiry-check).`);
|
|
169
|
+
process.exit(1);
|
|
170
|
+
}
|
|
171
|
+
const category = flag("category") ?? "productivity";
|
|
172
|
+
const dest = flag("dest") ?? `./${id}.yaml`;
|
|
173
|
+
if (existsSync(dest)) {
|
|
174
|
+
console.error(`${dest} already exists — refusing to overwrite. Pass --dest to choose another path.`);
|
|
175
|
+
process.exit(1);
|
|
176
|
+
}
|
|
177
|
+
const template = readFileSync(join(ROOT, "templates/job.template.yaml"), "utf8")
|
|
178
|
+
.replace("id: your-job-id", `id: ${id}`)
|
|
179
|
+
.replace("category: devops", `category: ${category}`);
|
|
180
|
+
writeFileSync(dest, template);
|
|
181
|
+
console.log(`wrote ${dest} — fill in the fields, then \`npm run validate\` (see CONTRIBUTING.md to submit it upstream).`);
|
|
182
|
+
}
|
|
183
|
+
|
|
150
184
|
function add(id) {
|
|
151
185
|
const meta = findJob(id);
|
|
152
186
|
const dest = flag("dest") ?? `./${id}.yaml`;
|
|
@@ -162,6 +196,16 @@ switch (cmd) {
|
|
|
162
196
|
case "list":
|
|
163
197
|
list();
|
|
164
198
|
break;
|
|
199
|
+
case "categories":
|
|
200
|
+
categories();
|
|
201
|
+
break;
|
|
202
|
+
case "init":
|
|
203
|
+
if (!args[0]) {
|
|
204
|
+
console.error("usage: crondex init <id> [--category <name>] [--dest <path>]");
|
|
205
|
+
process.exit(1);
|
|
206
|
+
}
|
|
207
|
+
init(args[0]);
|
|
208
|
+
break;
|
|
165
209
|
case "show":
|
|
166
210
|
if (!args[0]) {
|
|
167
211
|
console.error("usage: crondex show <id>");
|