@cronwatch/sdk 0.1.0 → 0.3.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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -12
  3. package/dist/anthropic.cjs +19 -5
  4. package/dist/anthropic.cjs.map +1 -1
  5. package/dist/anthropic.d.cts +1 -1
  6. package/dist/anthropic.d.ts +1 -1
  7. package/dist/anthropic.js +19 -5
  8. package/dist/anthropic.js.map +1 -1
  9. package/dist/discord.cjs +14 -2
  10. package/dist/discord.cjs.map +1 -1
  11. package/dist/discord.d.cts +6 -2
  12. package/dist/discord.d.ts +6 -2
  13. package/dist/discord.js +13 -3
  14. package/dist/discord.js.map +1 -1
  15. package/dist/index.cjs +676 -285
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +100 -44
  18. package/dist/index.d.ts +100 -44
  19. package/dist/index.js +677 -283
  20. package/dist/index.js.map +1 -1
  21. package/dist/postgres.cjs +140 -73
  22. package/dist/postgres.cjs.map +1 -1
  23. package/dist/postgres.d.cts +2 -2
  24. package/dist/postgres.d.ts +2 -2
  25. package/dist/postgres.js +140 -73
  26. package/dist/postgres.js.map +1 -1
  27. package/dist/slack.cjs +12 -6
  28. package/dist/slack.cjs.map +1 -1
  29. package/dist/slack.d.cts +1 -1
  30. package/dist/slack.d.ts +1 -1
  31. package/dist/slack.js +12 -6
  32. package/dist/slack.js.map +1 -1
  33. package/dist/sqlite.cjs +142 -71
  34. package/dist/sqlite.cjs.map +1 -1
  35. package/dist/sqlite.d.cts +3 -1
  36. package/dist/sqlite.d.ts +3 -1
  37. package/dist/sqlite.js +143 -72
  38. package/dist/sqlite.js.map +1 -1
  39. package/dist/{types-BQ1P8z55.d.cts → types-C1PyRjI5.d.cts} +63 -5
  40. package/dist/{types-BQ1P8z55.d.ts → types-C1PyRjI5.d.ts} +63 -5
  41. package/dist/webhook.cjs +10 -2
  42. package/dist/webhook.cjs.map +1 -1
  43. package/dist/webhook.d.cts +1 -1
  44. package/dist/webhook.d.ts +1 -1
  45. package/dist/webhook.js +10 -2
  46. package/dist/webhook.js.map +1 -1
  47. package/package.json +95 -32
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cronwatch/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Cron and scheduled-job monitoring that lives inside your app. Wrap a job, mount a route, get told when it is missed, failed, slow or over budget. No server to run.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -22,57 +22,108 @@
22
22
  "type": "module",
23
23
  "sideEffects": false,
24
24
  "engines": {
25
- "node": ">=20"
25
+ "node": ">=22"
26
26
  },
27
27
  "files": [
28
28
  "dist",
29
- "README.md"
29
+ "README.md",
30
+ "LICENSE"
30
31
  ],
31
32
  "main": "./dist/index.cjs",
32
33
  "module": "./dist/index.js",
33
- "types": "./dist/index.d.ts",
34
+ "types": "./dist/index.d.cts",
35
+ "typesVersions": {
36
+ "*": {
37
+ "sqlite": [
38
+ "./dist/sqlite.d.cts"
39
+ ],
40
+ "postgres": [
41
+ "./dist/postgres.d.cts"
42
+ ],
43
+ "slack": [
44
+ "./dist/slack.d.cts"
45
+ ],
46
+ "discord": [
47
+ "./dist/discord.d.cts"
48
+ ],
49
+ "webhook": [
50
+ "./dist/webhook.d.cts"
51
+ ],
52
+ "anthropic": [
53
+ "./dist/anthropic.d.cts"
54
+ ]
55
+ }
56
+ },
34
57
  "exports": {
35
58
  ".": {
36
- "types": "./dist/index.d.ts",
37
- "import": "./dist/index.js",
38
- "require": "./dist/index.cjs",
39
- "default": "./dist/index.js"
59
+ "import": {
60
+ "types": "./dist/index.d.ts",
61
+ "default": "./dist/index.js"
62
+ },
63
+ "require": {
64
+ "types": "./dist/index.d.cts",
65
+ "default": "./dist/index.cjs"
66
+ }
40
67
  },
41
68
  "./sqlite": {
42
- "types": "./dist/sqlite.d.ts",
43
- "import": "./dist/sqlite.js",
44
- "require": "./dist/sqlite.cjs",
45
- "default": "./dist/sqlite.js"
69
+ "import": {
70
+ "types": "./dist/sqlite.d.ts",
71
+ "default": "./dist/sqlite.js"
72
+ },
73
+ "require": {
74
+ "types": "./dist/sqlite.d.cts",
75
+ "default": "./dist/sqlite.cjs"
76
+ }
46
77
  },
47
78
  "./postgres": {
48
- "types": "./dist/postgres.d.ts",
49
- "import": "./dist/postgres.js",
50
- "require": "./dist/postgres.cjs",
51
- "default": "./dist/postgres.js"
79
+ "import": {
80
+ "types": "./dist/postgres.d.ts",
81
+ "default": "./dist/postgres.js"
82
+ },
83
+ "require": {
84
+ "types": "./dist/postgres.d.cts",
85
+ "default": "./dist/postgres.cjs"
86
+ }
52
87
  },
53
88
  "./slack": {
54
- "types": "./dist/slack.d.ts",
55
- "import": "./dist/slack.js",
56
- "require": "./dist/slack.cjs",
57
- "default": "./dist/slack.js"
89
+ "import": {
90
+ "types": "./dist/slack.d.ts",
91
+ "default": "./dist/slack.js"
92
+ },
93
+ "require": {
94
+ "types": "./dist/slack.d.cts",
95
+ "default": "./dist/slack.cjs"
96
+ }
58
97
  },
59
98
  "./discord": {
60
- "types": "./dist/discord.d.ts",
61
- "import": "./dist/discord.js",
62
- "require": "./dist/discord.cjs",
63
- "default": "./dist/discord.js"
99
+ "import": {
100
+ "types": "./dist/discord.d.ts",
101
+ "default": "./dist/discord.js"
102
+ },
103
+ "require": {
104
+ "types": "./dist/discord.d.cts",
105
+ "default": "./dist/discord.cjs"
106
+ }
64
107
  },
65
108
  "./webhook": {
66
- "types": "./dist/webhook.d.ts",
67
- "import": "./dist/webhook.js",
68
- "require": "./dist/webhook.cjs",
69
- "default": "./dist/webhook.js"
109
+ "import": {
110
+ "types": "./dist/webhook.d.ts",
111
+ "default": "./dist/webhook.js"
112
+ },
113
+ "require": {
114
+ "types": "./dist/webhook.d.cts",
115
+ "default": "./dist/webhook.cjs"
116
+ }
70
117
  },
71
118
  "./anthropic": {
72
- "types": "./dist/anthropic.d.ts",
73
- "import": "./dist/anthropic.js",
74
- "require": "./dist/anthropic.cjs",
75
- "default": "./dist/anthropic.js"
119
+ "import": {
120
+ "types": "./dist/anthropic.d.ts",
121
+ "default": "./dist/anthropic.js"
122
+ },
123
+ "require": {
124
+ "types": "./dist/anthropic.d.cts",
125
+ "default": "./dist/anthropic.cjs"
126
+ }
76
127
  },
77
128
  "./package.json": "./package.json"
78
129
  },
@@ -86,10 +137,22 @@
86
137
  "croner": "^10.0.1"
87
138
  },
88
139
  "peerDependencies": {
140
+ "@anthropic-ai/sdk": ">=0.115.0",
141
+ "@types/better-sqlite3": ">=7.6",
142
+ "@types/pg": ">=8.11",
89
143
  "better-sqlite3": ">=9",
90
144
  "pg": ">=8"
91
145
  },
92
146
  "peerDependenciesMeta": {
147
+ "@anthropic-ai/sdk": {
148
+ "optional": true
149
+ },
150
+ "@types/better-sqlite3": {
151
+ "optional": true
152
+ },
153
+ "@types/pg": {
154
+ "optional": true
155
+ },
93
156
  "better-sqlite3": {
94
157
  "optional": true
95
158
  },