@sentry/junior-scheduler 0.96.0 → 0.97.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.
@@ -0,0 +1,23 @@
1
+ CREATE TABLE "junior_scheduler_runs" (
2
+ "id" text PRIMARY KEY NOT NULL,
3
+ "task_id" text NOT NULL,
4
+ "status" text NOT NULL,
5
+ "scheduled_for_ms" bigint NOT NULL,
6
+ "record" jsonb NOT NULL
7
+ );
8
+ --> statement-breakpoint
9
+ CREATE TABLE "junior_scheduler_tasks" (
10
+ "id" text PRIMARY KEY NOT NULL,
11
+ "team_id" text NOT NULL,
12
+ "status" text NOT NULL,
13
+ "next_run_at_ms" bigint,
14
+ "run_now_at_ms" bigint,
15
+ "created_at_ms" bigint NOT NULL,
16
+ "record" jsonb NOT NULL
17
+ );
18
+ --> statement-breakpoint
19
+ CREATE INDEX "junior_scheduler_runs_task_status_idx" ON "junior_scheduler_runs" USING btree ("task_id","status","scheduled_for_ms");--> statement-breakpoint
20
+ CREATE INDEX "junior_scheduler_runs_status_idx" ON "junior_scheduler_runs" USING btree ("status","scheduled_for_ms");--> statement-breakpoint
21
+ CREATE INDEX "junior_scheduler_tasks_team_status_idx" ON "junior_scheduler_tasks" USING btree ("team_id","created_at_ms","id") WHERE "junior_scheduler_tasks"."status" <> 'deleted';--> statement-breakpoint
22
+ CREATE INDEX "junior_scheduler_tasks_run_now_due_idx" ON "junior_scheduler_tasks" USING btree ("run_now_at_ms","created_at_ms","id") WHERE "junior_scheduler_tasks"."status" = 'active' AND "junior_scheduler_tasks"."run_now_at_ms" IS NOT NULL;--> statement-breakpoint
23
+ CREATE INDEX "junior_scheduler_tasks_next_run_due_idx" ON "junior_scheduler_tasks" USING btree ("next_run_at_ms","created_at_ms","id") WHERE "junior_scheduler_tasks"."status" = 'active' AND "junior_scheduler_tasks"."next_run_at_ms" IS NOT NULL;
@@ -0,0 +1,251 @@
1
+ {
2
+ "id": "fd06fa0f-6037-44df-9c9c-680e14e4be97",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_scheduler_runs": {
8
+ "name": "junior_scheduler_runs",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "task_id": {
18
+ "name": "task_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "status": {
24
+ "name": "status",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "scheduled_for_ms": {
30
+ "name": "scheduled_for_ms",
31
+ "type": "bigint",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "record": {
36
+ "name": "record",
37
+ "type": "jsonb",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ }
41
+ },
42
+ "indexes": {
43
+ "junior_scheduler_runs_task_status_idx": {
44
+ "name": "junior_scheduler_runs_task_status_idx",
45
+ "columns": [
46
+ {
47
+ "expression": "task_id",
48
+ "isExpression": false,
49
+ "asc": true,
50
+ "nulls": "last"
51
+ },
52
+ {
53
+ "expression": "status",
54
+ "isExpression": false,
55
+ "asc": true,
56
+ "nulls": "last"
57
+ },
58
+ {
59
+ "expression": "scheduled_for_ms",
60
+ "isExpression": false,
61
+ "asc": true,
62
+ "nulls": "last"
63
+ }
64
+ ],
65
+ "isUnique": false,
66
+ "concurrently": false,
67
+ "method": "btree",
68
+ "with": {}
69
+ },
70
+ "junior_scheduler_runs_status_idx": {
71
+ "name": "junior_scheduler_runs_status_idx",
72
+ "columns": [
73
+ {
74
+ "expression": "status",
75
+ "isExpression": false,
76
+ "asc": true,
77
+ "nulls": "last"
78
+ },
79
+ {
80
+ "expression": "scheduled_for_ms",
81
+ "isExpression": false,
82
+ "asc": true,
83
+ "nulls": "last"
84
+ }
85
+ ],
86
+ "isUnique": false,
87
+ "concurrently": false,
88
+ "method": "btree",
89
+ "with": {}
90
+ }
91
+ },
92
+ "foreignKeys": {},
93
+ "compositePrimaryKeys": {},
94
+ "uniqueConstraints": {},
95
+ "policies": {},
96
+ "checkConstraints": {},
97
+ "isRLSEnabled": false
98
+ },
99
+ "public.junior_scheduler_tasks": {
100
+ "name": "junior_scheduler_tasks",
101
+ "schema": "",
102
+ "columns": {
103
+ "id": {
104
+ "name": "id",
105
+ "type": "text",
106
+ "primaryKey": true,
107
+ "notNull": true
108
+ },
109
+ "team_id": {
110
+ "name": "team_id",
111
+ "type": "text",
112
+ "primaryKey": false,
113
+ "notNull": true
114
+ },
115
+ "status": {
116
+ "name": "status",
117
+ "type": "text",
118
+ "primaryKey": false,
119
+ "notNull": true
120
+ },
121
+ "next_run_at_ms": {
122
+ "name": "next_run_at_ms",
123
+ "type": "bigint",
124
+ "primaryKey": false,
125
+ "notNull": false
126
+ },
127
+ "run_now_at_ms": {
128
+ "name": "run_now_at_ms",
129
+ "type": "bigint",
130
+ "primaryKey": false,
131
+ "notNull": false
132
+ },
133
+ "created_at_ms": {
134
+ "name": "created_at_ms",
135
+ "type": "bigint",
136
+ "primaryKey": false,
137
+ "notNull": true
138
+ },
139
+ "record": {
140
+ "name": "record",
141
+ "type": "jsonb",
142
+ "primaryKey": false,
143
+ "notNull": true
144
+ }
145
+ },
146
+ "indexes": {
147
+ "junior_scheduler_tasks_team_status_idx": {
148
+ "name": "junior_scheduler_tasks_team_status_idx",
149
+ "columns": [
150
+ {
151
+ "expression": "team_id",
152
+ "isExpression": false,
153
+ "asc": true,
154
+ "nulls": "last"
155
+ },
156
+ {
157
+ "expression": "created_at_ms",
158
+ "isExpression": false,
159
+ "asc": true,
160
+ "nulls": "last"
161
+ },
162
+ {
163
+ "expression": "id",
164
+ "isExpression": false,
165
+ "asc": true,
166
+ "nulls": "last"
167
+ }
168
+ ],
169
+ "isUnique": false,
170
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
171
+ "concurrently": false,
172
+ "method": "btree",
173
+ "with": {}
174
+ },
175
+ "junior_scheduler_tasks_run_now_due_idx": {
176
+ "name": "junior_scheduler_tasks_run_now_due_idx",
177
+ "columns": [
178
+ {
179
+ "expression": "run_now_at_ms",
180
+ "isExpression": false,
181
+ "asc": true,
182
+ "nulls": "last"
183
+ },
184
+ {
185
+ "expression": "created_at_ms",
186
+ "isExpression": false,
187
+ "asc": true,
188
+ "nulls": "last"
189
+ },
190
+ {
191
+ "expression": "id",
192
+ "isExpression": false,
193
+ "asc": true,
194
+ "nulls": "last"
195
+ }
196
+ ],
197
+ "isUnique": false,
198
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"run_now_at_ms\" IS NOT NULL",
199
+ "concurrently": false,
200
+ "method": "btree",
201
+ "with": {}
202
+ },
203
+ "junior_scheduler_tasks_next_run_due_idx": {
204
+ "name": "junior_scheduler_tasks_next_run_due_idx",
205
+ "columns": [
206
+ {
207
+ "expression": "next_run_at_ms",
208
+ "isExpression": false,
209
+ "asc": true,
210
+ "nulls": "last"
211
+ },
212
+ {
213
+ "expression": "created_at_ms",
214
+ "isExpression": false,
215
+ "asc": true,
216
+ "nulls": "last"
217
+ },
218
+ {
219
+ "expression": "id",
220
+ "isExpression": false,
221
+ "asc": true,
222
+ "nulls": "last"
223
+ }
224
+ ],
225
+ "isUnique": false,
226
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"next_run_at_ms\" IS NOT NULL",
227
+ "concurrently": false,
228
+ "method": "btree",
229
+ "with": {}
230
+ }
231
+ },
232
+ "foreignKeys": {},
233
+ "compositePrimaryKeys": {},
234
+ "uniqueConstraints": {},
235
+ "policies": {},
236
+ "checkConstraints": {},
237
+ "isRLSEnabled": false
238
+ }
239
+ },
240
+ "enums": {},
241
+ "schemas": {},
242
+ "sequences": {},
243
+ "roles": {},
244
+ "policies": {},
245
+ "views": {},
246
+ "_meta": {
247
+ "columns": {},
248
+ "schemas": {},
249
+ "tables": {}
250
+ }
251
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "postgresql",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "7",
8
+ "when": 1783781619505,
9
+ "tag": "0000_scheduler",
10
+ "breakpoints": true
11
+ }
12
+ ]
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-scheduler",
3
- "version": "0.96.0",
3
+ "version": "0.97.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,16 +25,17 @@
25
25
  "dependencies": {
26
26
  "drizzle-orm": "^0.45.2",
27
27
  "zod": "^4.4.3",
28
- "@sentry/junior-plugin-api": "0.96.0"
28
+ "@sentry/junior-plugin-api": "0.97.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^25.9.1",
32
+ "drizzle-kit": "^0.31.8",
32
33
  "tsup": "^8.5.1",
33
34
  "typescript": "^6.0.3"
34
35
  },
35
36
  "scripts": {
36
37
  "build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",
37
- "db:generate": "pnpm dlx drizzle-kit@0.31.10 generate --config drizzle.config.ts",
38
+ "db:generate": "pnpm exec drizzle-kit generate --config drizzle.config.ts",
38
39
  "typecheck": "tsc --noEmit"
39
40
  }
40
41
  }
@@ -1,35 +0,0 @@
1
- CREATE TABLE IF NOT EXISTS junior_scheduler_tasks (
2
- id TEXT PRIMARY KEY,
3
- team_id TEXT NOT NULL,
4
- status TEXT NOT NULL,
5
- next_run_at_ms BIGINT,
6
- run_now_at_ms BIGINT,
7
- created_at_ms BIGINT NOT NULL,
8
- record JSONB NOT NULL
9
- );
10
-
11
- CREATE INDEX IF NOT EXISTS junior_scheduler_tasks_team_status_idx
12
- ON junior_scheduler_tasks (team_id, created_at_ms, id)
13
- WHERE status <> 'deleted';
14
-
15
- CREATE INDEX IF NOT EXISTS junior_scheduler_tasks_run_now_due_idx
16
- ON junior_scheduler_tasks (run_now_at_ms, created_at_ms, id)
17
- WHERE status = 'active' AND run_now_at_ms IS NOT NULL;
18
-
19
- CREATE INDEX IF NOT EXISTS junior_scheduler_tasks_next_run_due_idx
20
- ON junior_scheduler_tasks (next_run_at_ms, created_at_ms, id)
21
- WHERE status = 'active' AND next_run_at_ms IS NOT NULL;
22
-
23
- CREATE TABLE IF NOT EXISTS junior_scheduler_runs (
24
- id TEXT PRIMARY KEY,
25
- task_id TEXT NOT NULL,
26
- status TEXT NOT NULL,
27
- scheduled_for_ms BIGINT NOT NULL,
28
- record JSONB NOT NULL
29
- );
30
-
31
- CREATE INDEX IF NOT EXISTS junior_scheduler_runs_task_status_idx
32
- ON junior_scheduler_runs (task_id, status, scheduled_for_ms);
33
-
34
- CREATE INDEX IF NOT EXISTS junior_scheduler_runs_status_idx
35
- ON junior_scheduler_runs (status, scheduled_for_ms);