@happyvertical/smrt-jobs 0.37.2 → 0.37.4

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.
@@ -1,179 +1,167 @@
1
1
  import { JOBS_MODULE_META } from "./ui.js";
2
- const noop = () => {
3
- };
4
- const sampleJobs = [
5
- {
6
- id: "job-publish-1",
7
- queue: "content",
8
- objectType: "@happyvertical/smrt-content:Article",
9
- objectId: "article-aurora-kitchen",
10
- method: "publish",
11
- args: { force: false },
12
- status: "running",
13
- priority: 80,
14
- attempts: 1,
15
- maxAttempts: 3,
16
- timeout: 6e5,
17
- timeoutBehavior: "fail",
18
- runAt: "2026-03-21T16:15:00.000Z",
19
- startedAt: "2026-03-21T16:15:15.000Z",
20
- completedAt: null,
21
- lastError: null,
22
- resultPointer: null,
23
- workerId: "worker-content-1",
24
- createdAt: "2026-03-21T16:14:50.000Z",
25
- updatedAt: "2026-03-21T16:15:20.000Z"
26
- },
27
- {
28
- id: "job-review-2",
29
- queue: "governance",
30
- objectType: "@happyvertical/smrt-content:GovernancePolicy",
31
- objectId: "policy-facts",
32
- method: "recalculateReadiness",
33
- args: { profileKey: "publication" },
34
- status: "failed",
35
- priority: 95,
36
- attempts: 3,
37
- maxAttempts: 3,
38
- timeout: 3e5,
39
- timeoutBehavior: "fail",
40
- runAt: "2026-03-21T15:40:00.000Z",
41
- startedAt: "2026-03-21T15:40:02.000Z",
42
- completedAt: "2026-03-21T15:41:11.000Z",
43
- lastError: "Relationship column missing during readiness sync.",
44
- resultPointer: null,
45
- workerId: "worker-governance-2",
46
- createdAt: "2026-03-21T15:39:30.000Z",
47
- updatedAt: "2026-03-21T15:41:11.000Z"
48
- },
49
- {
50
- id: "job-export-3",
51
- queue: "exports",
52
- objectType: "@happyvertical/smrt-content:ArticleCollection",
53
- objectId: null,
54
- method: "buildStaticFeed",
55
- args: { destination: "cdn" },
56
- status: "completed",
57
- priority: 40,
58
- attempts: 1,
59
- maxAttempts: 2,
60
- timeout: 9e5,
61
- timeoutBehavior: "warn",
62
- runAt: "2026-03-21T14:30:00.000Z",
63
- startedAt: "2026-03-21T14:30:00.000Z",
64
- completedAt: "2026-03-21T14:31:25.000Z",
65
- lastError: null,
66
- resultPointer: "results/exports/build-static-feed-3.json",
67
- workerId: "worker-export-1",
68
- createdAt: "2026-03-21T14:29:52.000Z",
69
- updatedAt: "2026-03-21T14:31:25.000Z"
70
- }
2
+ //#region src/svelte/playground.ts
3
+ var noop = () => {};
4
+ var sampleJobs = [
5
+ {
6
+ id: "job-publish-1",
7
+ queue: "content",
8
+ objectType: "@happyvertical/smrt-content:Article",
9
+ objectId: "article-aurora-kitchen",
10
+ method: "publish",
11
+ args: { force: false },
12
+ status: "running",
13
+ priority: 80,
14
+ attempts: 1,
15
+ maxAttempts: 3,
16
+ timeout: 6e5,
17
+ timeoutBehavior: "fail",
18
+ runAt: "2026-03-21T16:15:00.000Z",
19
+ startedAt: "2026-03-21T16:15:15.000Z",
20
+ completedAt: null,
21
+ lastError: null,
22
+ resultPointer: null,
23
+ workerId: "worker-content-1",
24
+ createdAt: "2026-03-21T16:14:50.000Z",
25
+ updatedAt: "2026-03-21T16:15:20.000Z"
26
+ },
27
+ {
28
+ id: "job-review-2",
29
+ queue: "governance",
30
+ objectType: "@happyvertical/smrt-content:GovernancePolicy",
31
+ objectId: "policy-facts",
32
+ method: "recalculateReadiness",
33
+ args: { profileKey: "publication" },
34
+ status: "failed",
35
+ priority: 95,
36
+ attempts: 3,
37
+ maxAttempts: 3,
38
+ timeout: 3e5,
39
+ timeoutBehavior: "fail",
40
+ runAt: "2026-03-21T15:40:00.000Z",
41
+ startedAt: "2026-03-21T15:40:02.000Z",
42
+ completedAt: "2026-03-21T15:41:11.000Z",
43
+ lastError: "Relationship column missing during readiness sync.",
44
+ resultPointer: null,
45
+ workerId: "worker-governance-2",
46
+ createdAt: "2026-03-21T15:39:30.000Z",
47
+ updatedAt: "2026-03-21T15:41:11.000Z"
48
+ },
49
+ {
50
+ id: "job-export-3",
51
+ queue: "exports",
52
+ objectType: "@happyvertical/smrt-content:ArticleCollection",
53
+ objectId: null,
54
+ method: "buildStaticFeed",
55
+ args: { destination: "cdn" },
56
+ status: "completed",
57
+ priority: 40,
58
+ attempts: 1,
59
+ maxAttempts: 2,
60
+ timeout: 9e5,
61
+ timeoutBehavior: "warn",
62
+ runAt: "2026-03-21T14:30:00.000Z",
63
+ startedAt: "2026-03-21T14:30:00.000Z",
64
+ completedAt: "2026-03-21T14:31:25.000Z",
65
+ lastError: null,
66
+ resultPointer: "results/exports/build-static-feed-3.json",
67
+ workerId: "worker-export-1",
68
+ createdAt: "2026-03-21T14:29:52.000Z",
69
+ updatedAt: "2026-03-21T14:31:25.000Z"
70
+ }
71
71
  ];
72
- const sampleStats = {
73
- total: 3421,
74
- pending: 24,
75
- ready: 13,
76
- running: 4,
77
- completed: 3340,
78
- failed: 31,
79
- cancelled: 9,
80
- avgDuration: 18450,
81
- successRate: 0.976
72
+ var sampleStats = {
73
+ total: 3421,
74
+ pending: 24,
75
+ ready: 13,
76
+ running: 4,
77
+ completed: 3340,
78
+ failed: 31,
79
+ cancelled: 9,
80
+ avgDuration: 18450,
81
+ successRate: .976
82
82
  };
83
- const sampleQueues = [
84
- {
85
- name: "content",
86
- pending: 8,
87
- running: 2,
88
- completed24h: 412,
89
- failed24h: 4,
90
- avgDuration: 22800
91
- },
92
- {
93
- name: "governance",
94
- pending: 5,
95
- running: 1,
96
- completed24h: 188,
97
- failed24h: 7,
98
- avgDuration: 31200
99
- },
100
- {
101
- name: "exports",
102
- pending: 11,
103
- running: 1,
104
- completed24h: 94,
105
- failed24h: 1,
106
- avgDuration: 52200
107
- }
83
+ var sampleQueues = [
84
+ {
85
+ name: "content",
86
+ pending: 8,
87
+ running: 2,
88
+ completed24h: 412,
89
+ failed24h: 4,
90
+ avgDuration: 22800
91
+ },
92
+ {
93
+ name: "governance",
94
+ pending: 5,
95
+ running: 1,
96
+ completed24h: 188,
97
+ failed24h: 7,
98
+ avgDuration: 31200
99
+ },
100
+ {
101
+ name: "exports",
102
+ pending: 11,
103
+ running: 1,
104
+ completed24h: 94,
105
+ failed24h: 1,
106
+ avgDuration: 52200
107
+ }
108
108
  ];
109
- const loadJobDashboard = () => import("./svelte/components/JobDashboard.svelte");
110
- const loadJobDetail = () => import("./svelte/components/JobDetail.svelte");
111
- const loadJobStatusBadge = () => import("./svelte/components/JobStatusBadge.svelte");
112
- const playground = {
113
- packageName: "@happyvertical/smrt-jobs",
114
- displayName: JOBS_MODULE_META.displayName,
115
- description: JOBS_MODULE_META.description,
116
- moduleMeta: JOBS_MODULE_META,
117
- entries: [
118
- {
119
- id: "job-dashboard",
120
- title: "Job Dashboard",
121
- description: "Operational overview for background job queues with recent and failed work.",
122
- loadComponent: loadJobDashboard,
123
- order: 1,
124
- props: {
125
- stats: sampleStats,
126
- queues: sampleQueues,
127
- recentJobs: sampleJobs,
128
- failedJobs: sampleJobs.filter((job) => job.status === "failed"),
129
- onJobClick: noop,
130
- onRetry: noop,
131
- onCancel: noop,
132
- onViewAll: noop,
133
- onViewFailed: noop
134
- },
135
- modes: {
136
- mock: {
137
- label: "Mock"
138
- }
139
- }
140
- },
141
- {
142
- id: "job-detail",
143
- title: "Job Detail",
144
- description: "Detailed execution view for a single background job with retry and cancellation actions.",
145
- loadComponent: loadJobDetail,
146
- order: 2,
147
- props: {
148
- job: sampleJobs[1],
149
- onRetry: noop,
150
- onDelete: noop
151
- },
152
- modes: {
153
- mock: {
154
- label: "Mock"
155
- }
156
- }
157
- },
158
- {
159
- id: "job-status-badge",
160
- title: "Job Status Badge",
161
- description: "Compact status treatment used throughout the jobs surface.",
162
- loadComponent: loadJobStatusBadge,
163
- order: 3,
164
- props: {
165
- status: "running",
166
- size: "md"
167
- },
168
- modes: {
169
- mock: {
170
- label: "Mock"
171
- }
172
- }
173
- }
174
- ]
175
- };
176
- export {
177
- playground as default
109
+ var loadJobDashboard = () => import("./svelte/components/JobDashboard.svelte");
110
+ var loadJobDetail = () => import("./svelte/components/JobDetail.svelte");
111
+ var loadJobStatusBadge = () => import("./svelte/components/JobStatusBadge.svelte");
112
+ var playground_default = {
113
+ packageName: "@happyvertical/smrt-jobs",
114
+ displayName: JOBS_MODULE_META.displayName,
115
+ description: JOBS_MODULE_META.description,
116
+ moduleMeta: JOBS_MODULE_META,
117
+ entries: [
118
+ {
119
+ id: "job-dashboard",
120
+ title: "Job Dashboard",
121
+ description: "Operational overview for background job queues with recent and failed work.",
122
+ loadComponent: loadJobDashboard,
123
+ order: 1,
124
+ props: {
125
+ stats: sampleStats,
126
+ queues: sampleQueues,
127
+ recentJobs: sampleJobs,
128
+ failedJobs: sampleJobs.filter((job) => job.status === "failed"),
129
+ onJobClick: noop,
130
+ onRetry: noop,
131
+ onCancel: noop,
132
+ onViewAll: noop,
133
+ onViewFailed: noop
134
+ },
135
+ modes: { mock: { label: "Mock" } }
136
+ },
137
+ {
138
+ id: "job-detail",
139
+ title: "Job Detail",
140
+ description: "Detailed execution view for a single background job with retry and cancellation actions.",
141
+ loadComponent: loadJobDetail,
142
+ order: 2,
143
+ props: {
144
+ job: sampleJobs[1],
145
+ onRetry: noop,
146
+ onDelete: noop
147
+ },
148
+ modes: { mock: { label: "Mock" } }
149
+ },
150
+ {
151
+ id: "job-status-badge",
152
+ title: "Job Status Badge",
153
+ description: "Compact status treatment used throughout the jobs surface.",
154
+ loadComponent: loadJobStatusBadge,
155
+ order: 3,
156
+ props: {
157
+ status: "running",
158
+ size: "md"
159
+ },
160
+ modes: { mock: { label: "Mock" } }
161
+ }
162
+ ]
178
163
  };
179
- //# sourceMappingURL=playground.js.map
164
+ //#endregion
165
+ export { playground_default as default };
166
+
167
+ //# sourceMappingURL=playground.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"playground.js","sources":["../src/svelte/playground.ts"],"sourcesContent":["import { JOBS_MODULE_META } from '../ui.js';\n\nconst noop = () => {};\n\nconst sampleJobs = [\n {\n id: 'job-publish-1',\n queue: 'content',\n objectType: '@happyvertical/smrt-content:Article',\n objectId: 'article-aurora-kitchen',\n method: 'publish',\n args: { force: false },\n status: 'running',\n priority: 80,\n attempts: 1,\n maxAttempts: 3,\n timeout: 600000,\n timeoutBehavior: 'fail',\n runAt: '2026-03-21T16:15:00.000Z',\n startedAt: '2026-03-21T16:15:15.000Z',\n completedAt: null,\n lastError: null,\n resultPointer: null,\n workerId: 'worker-content-1',\n createdAt: '2026-03-21T16:14:50.000Z',\n updatedAt: '2026-03-21T16:15:20.000Z',\n },\n {\n id: 'job-review-2',\n queue: 'governance',\n objectType: '@happyvertical/smrt-content:GovernancePolicy',\n objectId: 'policy-facts',\n method: 'recalculateReadiness',\n args: { profileKey: 'publication' },\n status: 'failed',\n priority: 95,\n attempts: 3,\n maxAttempts: 3,\n timeout: 300000,\n timeoutBehavior: 'fail',\n runAt: '2026-03-21T15:40:00.000Z',\n startedAt: '2026-03-21T15:40:02.000Z',\n completedAt: '2026-03-21T15:41:11.000Z',\n lastError: 'Relationship column missing during readiness sync.',\n resultPointer: null,\n workerId: 'worker-governance-2',\n createdAt: '2026-03-21T15:39:30.000Z',\n updatedAt: '2026-03-21T15:41:11.000Z',\n },\n {\n id: 'job-export-3',\n queue: 'exports',\n objectType: '@happyvertical/smrt-content:ArticleCollection',\n objectId: null,\n method: 'buildStaticFeed',\n args: { destination: 'cdn' },\n status: 'completed',\n priority: 40,\n attempts: 1,\n maxAttempts: 2,\n timeout: 900000,\n timeoutBehavior: 'warn',\n runAt: '2026-03-21T14:30:00.000Z',\n startedAt: '2026-03-21T14:30:00.000Z',\n completedAt: '2026-03-21T14:31:25.000Z',\n lastError: null,\n resultPointer: 'results/exports/build-static-feed-3.json',\n workerId: 'worker-export-1',\n createdAt: '2026-03-21T14:29:52.000Z',\n updatedAt: '2026-03-21T14:31:25.000Z',\n },\n];\n\nconst sampleStats = {\n total: 3421,\n pending: 24,\n ready: 13,\n running: 4,\n completed: 3340,\n failed: 31,\n cancelled: 9,\n avgDuration: 18450,\n successRate: 0.976,\n};\n\nconst sampleQueues = [\n {\n name: 'content',\n pending: 8,\n running: 2,\n completed24h: 412,\n failed24h: 4,\n avgDuration: 22800,\n },\n {\n name: 'governance',\n pending: 5,\n running: 1,\n completed24h: 188,\n failed24h: 7,\n avgDuration: 31200,\n },\n {\n name: 'exports',\n pending: 11,\n running: 1,\n completed24h: 94,\n failed24h: 1,\n avgDuration: 52200,\n },\n];\n\nconst loadJobDashboard = () => import('./components/JobDashboard.svelte');\nconst loadJobDetail = () => import('./components/JobDetail.svelte');\nconst loadJobStatusBadge = () => import('./components/JobStatusBadge.svelte');\n\nexport default {\n packageName: '@happyvertical/smrt-jobs',\n displayName: JOBS_MODULE_META.displayName,\n description: JOBS_MODULE_META.description,\n moduleMeta: JOBS_MODULE_META,\n entries: [\n {\n id: 'job-dashboard',\n title: 'Job Dashboard',\n description:\n 'Operational overview for background job queues with recent and failed work.',\n loadComponent: loadJobDashboard,\n order: 1,\n props: {\n stats: sampleStats,\n queues: sampleQueues,\n recentJobs: sampleJobs,\n failedJobs: sampleJobs.filter((job) => job.status === 'failed'),\n onJobClick: noop,\n onRetry: noop,\n onCancel: noop,\n onViewAll: noop,\n onViewFailed: noop,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'job-detail',\n title: 'Job Detail',\n description:\n 'Detailed execution view for a single background job with retry and cancellation actions.',\n loadComponent: loadJobDetail,\n order: 2,\n props: {\n job: sampleJobs[1],\n onRetry: noop,\n onDelete: noop,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'job-status-badge',\n title: 'Job Status Badge',\n description: 'Compact status treatment used throughout the jobs surface.',\n loadComponent: loadJobStatusBadge,\n order: 3,\n props: {\n status: 'running',\n size: 'md',\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n ],\n};\n"],"names":[],"mappings":";AAEA,MAAM,OAAO,MAAM;AAAC;AAEpB,MAAM,aAAa;AAAA,EACjB;AAAA,I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,eAAe;AAAA,MACf,OAAO;AAAA,MACP,OAAO;AAAA,QACL,KAAK,WAAW,CAAC;AAAA,QACjB,SAAS;AAAA,QACT,UAAU;AAAA,MAAA;AAAA,MAEZ,OAAO;AAAA,QACL,MAAM;AAAA,UACJ,OAAO;AAAA,QAAA;AAAA,MACT;AAAA,IACF;AAAA,IAEF;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,aAAa;AAAA,MACb,eAAe;AAAA,MACf,OAAO;AAAA,MACP,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,MAAM;AAAA,MAAA;AAAA,MAER,OAAO;AAAA,QACL,MAAM;AAAA,UACJ,OAAO;AAAA,QAAA;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"playground.js","names":[],"sources":["../src/svelte/playground.ts"],"sourcesContent":["import { JOBS_MODULE_META } from '../ui.js';\n\nconst noop = () => {};\n\nconst sampleJobs = [\n {\n id: 'job-publish-1',\n queue: 'content',\n objectType: '@happyvertical/smrt-content:Article',\n objectId: 'article-aurora-kitchen',\n method: 'publish',\n args: { force: false },\n status: 'running',\n priority: 80,\n attempts: 1,\n maxAttempts: 3,\n timeout: 600000,\n timeoutBehavior: 'fail',\n runAt: '2026-03-21T16:15:00.000Z',\n startedAt: '2026-03-21T16:15:15.000Z',\n completedAt: null,\n lastError: null,\n resultPointer: null,\n workerId: 'worker-content-1',\n createdAt: '2026-03-21T16:14:50.000Z',\n updatedAt: '2026-03-21T16:15:20.000Z',\n },\n {\n id: 'job-review-2',\n queue: 'governance',\n objectType: '@happyvertical/smrt-content:GovernancePolicy',\n objectId: 'policy-facts',\n method: 'recalculateReadiness',\n args: { profileKey: 'publication' },\n status: 'failed',\n priority: 95,\n attempts: 3,\n maxAttempts: 3,\n timeout: 300000,\n timeoutBehavior: 'fail',\n runAt: '2026-03-21T15:40:00.000Z',\n startedAt: '2026-03-21T15:40:02.000Z',\n completedAt: '2026-03-21T15:41:11.000Z',\n lastError: 'Relationship column missing during readiness sync.',\n resultPointer: null,\n workerId: 'worker-governance-2',\n createdAt: '2026-03-21T15:39:30.000Z',\n updatedAt: '2026-03-21T15:41:11.000Z',\n },\n {\n id: 'job-export-3',\n queue: 'exports',\n objectType: '@happyvertical/smrt-content:ArticleCollection',\n objectId: null,\n method: 'buildStaticFeed',\n args: { destination: 'cdn' },\n status: 'completed',\n priority: 40,\n attempts: 1,\n maxAttempts: 2,\n timeout: 900000,\n timeoutBehavior: 'warn',\n runAt: '2026-03-21T14:30:00.000Z',\n startedAt: '2026-03-21T14:30:00.000Z',\n completedAt: '2026-03-21T14:31:25.000Z',\n lastError: null,\n resultPointer: 'results/exports/build-static-feed-3.json',\n workerId: 'worker-export-1',\n createdAt: '2026-03-21T14:29:52.000Z',\n updatedAt: '2026-03-21T14:31:25.000Z',\n },\n];\n\nconst sampleStats = {\n total: 3421,\n pending: 24,\n ready: 13,\n running: 4,\n completed: 3340,\n failed: 31,\n cancelled: 9,\n avgDuration: 18450,\n successRate: 0.976,\n};\n\nconst sampleQueues = [\n {\n name: 'content',\n pending: 8,\n running: 2,\n completed24h: 412,\n failed24h: 4,\n avgDuration: 22800,\n },\n {\n name: 'governance',\n pending: 5,\n running: 1,\n completed24h: 188,\n failed24h: 7,\n avgDuration: 31200,\n },\n {\n name: 'exports',\n pending: 11,\n running: 1,\n completed24h: 94,\n failed24h: 1,\n avgDuration: 52200,\n },\n];\n\nconst loadJobDashboard = () => import('./components/JobDashboard.svelte');\nconst loadJobDetail = () => import('./components/JobDetail.svelte');\nconst loadJobStatusBadge = () => import('./components/JobStatusBadge.svelte');\n\nexport default {\n packageName: '@happyvertical/smrt-jobs',\n displayName: JOBS_MODULE_META.displayName,\n description: JOBS_MODULE_META.description,\n moduleMeta: JOBS_MODULE_META,\n entries: [\n {\n id: 'job-dashboard',\n title: 'Job Dashboard',\n description:\n 'Operational overview for background job queues with recent and failed work.',\n loadComponent: loadJobDashboard,\n order: 1,\n props: {\n stats: sampleStats,\n queues: sampleQueues,\n recentJobs: sampleJobs,\n failedJobs: sampleJobs.filter((job) => job.status === 'failed'),\n onJobClick: noop,\n onRetry: noop,\n onCancel: noop,\n onViewAll: noop,\n onViewFailed: noop,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'job-detail',\n title: 'Job Detail',\n description:\n 'Detailed execution view for a single background job with retry and cancellation actions.',\n loadComponent: loadJobDetail,\n order: 2,\n props: {\n job: sampleJobs[1],\n onRetry: noop,\n onDelete: noop,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'job-status-badge',\n title: 'Job Status Badge',\n description: 'Compact status treatment used throughout the jobs surface.',\n loadComponent: loadJobStatusBadge,\n order: 3,\n props: {\n status: 'running',\n size: 'md',\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n ],\n};\n"],"mappings":";;AAEA,IAAM,aAAa,CAAC;AAEpB,IAAM,aAAa;CACjB;EACE,IAAI;EACJ,OAAO;EACP,YAAY;EACZ,UAAU;EACV,QAAQ;EACR,MAAM,EAAE,OAAO,MAAM;EACrB,QAAQ;EACR,UAAU;EACV,UAAU;EACV,aAAa;EACb,SAAS;EACT,iBAAiB;EACjB,OAAO;EACP,WAAW;EACX,aAAa;EACb,WAAW;EACX,eAAe;EACf,UAAU;EACV,WAAW;EACX,WAAW;CACb;CACA;EACE,IAAI;EACJ,OAAO;EACP,YAAY;EACZ,UAAU;EACV,QAAQ;EACR,MAAM,EAAE,YAAY,cAAc;EAClC,QAAQ;EACR,UAAU;EACV,UAAU;EACV,aAAa;EACb,SAAS;EACT,iBAAiB;EACjB,OAAO;EACP,WAAW;EACX,aAAa;EACb,WAAW;EACX,eAAe;EACf,UAAU;EACV,WAAW;EACX,WAAW;CACb;CACA;EACE,IAAI;EACJ,OAAO;EACP,YAAY;EACZ,UAAU;EACV,QAAQ;EACR,MAAM,EAAE,aAAa,MAAM;EAC3B,QAAQ;EACR,UAAU;EACV,UAAU;EACV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OAAO,OACT,EACF;EACF;CACF;AACF"}
package/dist/runner.js CHANGED
@@ -1,16 +1,2 @@
1
- import { e, T, m, T as T2 } from "./chunks/runner-2zRlEef7.js";
2
- import "node:events";
3
- import "node:worker_threads";
4
- import "@happyvertical/jobs";
5
- import "@happyvertical/logger";
6
- import "@happyvertical/smrt-core";
7
- import "@happyvertical/smrt-tenancy";
8
- import "@happyvertical/utils";
9
- import "./chunks/worker-liveness-DOTjoIjr.js";
10
- export {
11
- e as JobTimeoutError,
12
- T as TaskRunner,
13
- m as createTaskRunner,
14
- T2 as default
15
- };
16
- //# sourceMappingURL=runner.js.map
1
+ import { n as TaskRunner, r as createTaskRunner, t as JobTimeoutError } from "./chunks/runner-DLsWfeY-.js";
2
+ export { JobTimeoutError, TaskRunner, TaskRunner as default, createTaskRunner };
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-07-01T02:35:37.983Z",
3
+ "generatedAt": "2026-07-01T22:06:27.330Z",
4
4
  "packageName": "@happyvertical/smrt-jobs",
5
- "packageVersion": "0.37.2",
5
+ "packageVersion": "0.37.4",
6
6
  "sourceManifestPath": "dist/manifest.json",
7
7
  "agentDocPath": "AGENTS.md",
8
8
  "sourceHashes": {
9
- "manifest": "0909748ccb16275fc46359c5bf6a2ecbf0372c42f416b612c86d0cc472eae4f6",
10
- "packageJson": "ea08af1d2cd2d085a3ede240a4a7abd7313dff0cc21271b4b8f0b0bf640cd999",
9
+ "manifest": "ffd049f73b82d6e0e2ecd5a17fe782a58f2a05bac119721baca0a58ce3c57690",
10
+ "packageJson": "481b513835d04320191e929892dc24192976cc1bdb298b0cebb8f4b4465a7cdc",
11
11
  "agents": "2684535d0fdc2f7d44296046cc8ea4a2cb7c0a14089b6910f29dd2e7194e2015"
12
12
  },
13
13
  "exports": [
@@ -31,14 +31,14 @@
31
31
  "@happyvertical/sql": "catalog:",
32
32
  "@happyvertical/utils": "catalog:",
33
33
  "@happyvertical/smrt-vitest": "workspace:*",
34
- "@sveltejs/package": "^2.5.7",
35
- "@sveltejs/vite-plugin-svelte": "^6.2.4",
36
- "@types/node": "25.0.9",
37
- "svelte": "^5.18.0",
38
- "svelte-check": "^4.3.5",
34
+ "@sveltejs/package": "^2.5.8",
35
+ "@sveltejs/vite-plugin-svelte": "^7.1.2",
36
+ "@types/node": "24.13.2",
37
+ "svelte": "^5.56.4",
38
+ "svelte-check": "^4.7.1",
39
39
  "typescript": "^5.9.3",
40
- "vite": "^7.3.6",
41
- "vitest": "^4.0.17"
40
+ "vite": "^8.1.2",
41
+ "vitest": "^4.1.9"
42
42
  },
43
43
  "smrtDependencies": [
44
44
  "@happyvertical/smrt-config",
package/dist/ui.js CHANGED
@@ -1,69 +1,69 @@
1
- const JOBS_UI_SLOTS = {
2
- "job-dashboard": {
3
- id: "job-dashboard",
4
- label: "Job Dashboard",
5
- description: "Combined overview panel for background jobs",
6
- icon: "briefcase",
7
- category: "admin",
8
- order: 1,
9
- propsInterface: "JobDashboardProps"
10
- },
11
- "job-list": {
12
- id: "job-list",
13
- label: "Job List",
14
- description: "Filterable, sortable list of background jobs",
15
- icon: "list",
16
- category: "list",
17
- order: 2,
18
- propsInterface: "JobListProps"
19
- },
20
- "job-detail": {
21
- id: "job-detail",
22
- label: "Job Detail",
23
- description: "Detailed view of a single job",
24
- icon: "file-text",
25
- category: "detail",
26
- order: 3,
27
- propsInterface: "JobDetailProps"
28
- },
29
- "job-stats": {
30
- id: "job-stats",
31
- label: "Job Stats",
32
- description: "Statistics dashboard for job queues",
33
- icon: "bar-chart",
34
- category: "display",
35
- order: 4,
36
- propsInterface: "JobStatsProps"
37
- },
38
- "job-actions": {
39
- id: "job-actions",
40
- label: "Job Actions",
41
- description: "Action buttons for job operations",
42
- icon: "more-horizontal",
43
- category: "action",
44
- order: 5,
45
- propsInterface: "JobActionsProps"
46
- },
47
- "job-status-badge": {
48
- id: "job-status-badge",
49
- label: "Job Status Badge",
50
- description: "Status indicator for job states",
51
- icon: "tag",
52
- category: "display",
53
- order: 6,
54
- propsInterface: "JobStatusBadgeProps"
55
- }
1
+ //#region src/ui.ts
2
+ var JOBS_UI_SLOTS = {
3
+ "job-dashboard": {
4
+ id: "job-dashboard",
5
+ label: "Job Dashboard",
6
+ description: "Combined overview panel for background jobs",
7
+ icon: "briefcase",
8
+ category: "admin",
9
+ order: 1,
10
+ propsInterface: "JobDashboardProps"
11
+ },
12
+ "job-list": {
13
+ id: "job-list",
14
+ label: "Job List",
15
+ description: "Filterable, sortable list of background jobs",
16
+ icon: "list",
17
+ category: "list",
18
+ order: 2,
19
+ propsInterface: "JobListProps"
20
+ },
21
+ "job-detail": {
22
+ id: "job-detail",
23
+ label: "Job Detail",
24
+ description: "Detailed view of a single job",
25
+ icon: "file-text",
26
+ category: "detail",
27
+ order: 3,
28
+ propsInterface: "JobDetailProps"
29
+ },
30
+ "job-stats": {
31
+ id: "job-stats",
32
+ label: "Job Stats",
33
+ description: "Statistics dashboard for job queues",
34
+ icon: "bar-chart",
35
+ category: "display",
36
+ order: 4,
37
+ propsInterface: "JobStatsProps"
38
+ },
39
+ "job-actions": {
40
+ id: "job-actions",
41
+ label: "Job Actions",
42
+ description: "Action buttons for job operations",
43
+ icon: "more-horizontal",
44
+ category: "action",
45
+ order: 5,
46
+ propsInterface: "JobActionsProps"
47
+ },
48
+ "job-status-badge": {
49
+ id: "job-status-badge",
50
+ label: "Job Status Badge",
51
+ description: "Status indicator for job states",
52
+ icon: "tag",
53
+ category: "display",
54
+ order: 6,
55
+ propsInterface: "JobStatusBadgeProps"
56
+ }
56
57
  };
57
- const JOBS_MODULE_META = {
58
- name: "@happyvertical/smrt-jobs",
59
- displayName: "Jobs",
60
- description: "Background job processing with persistence and scheduling",
61
- uiSlots: JOBS_UI_SLOTS,
62
- models: ["Job", "JobQueue"],
63
- collections: ["JobCollection", "JobQueueCollection"]
58
+ var JOBS_MODULE_META = {
59
+ name: "@happyvertical/smrt-jobs",
60
+ displayName: "Jobs",
61
+ description: "Background job processing with persistence and scheduling",
62
+ uiSlots: JOBS_UI_SLOTS,
63
+ models: ["Job", "JobQueue"],
64
+ collections: ["JobCollection", "JobQueueCollection"]
64
65
  };
65
- export {
66
- JOBS_MODULE_META,
67
- JOBS_UI_SLOTS
68
- };
69
- //# sourceMappingURL=ui.js.map
66
+ //#endregion
67
+ export { JOBS_MODULE_META, JOBS_UI_SLOTS };
68
+
69
+ //# sourceMappingURL=ui.js.map
package/dist/ui.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ui.js","sources":["../src/ui.ts"],"sourcesContent":["/**\n * Jobs Module UI Slot Declarations\n *\n * This file defines the UI extension points for the jobs module.\n * UI components are implemented in the ./svelte subpath.\n */\n\nimport type { ModuleUISlot, SmrtModuleMeta } from '@happyvertical/smrt-types';\n\n/**\n * Jobs module UI slots\n */\nexport const JOBS_UI_SLOTS: Record<string, ModuleUISlot> = {\n 'job-dashboard': {\n id: 'job-dashboard',\n label: 'Job Dashboard',\n description: 'Combined overview panel for background jobs',\n icon: 'briefcase',\n category: 'admin',\n order: 1,\n propsInterface: 'JobDashboardProps',\n },\n 'job-list': {\n id: 'job-list',\n label: 'Job List',\n description: 'Filterable, sortable list of background jobs',\n icon: 'list',\n category: 'list',\n order: 2,\n propsInterface: 'JobListProps',\n },\n 'job-detail': {\n id: 'job-detail',\n label: 'Job Detail',\n description: 'Detailed view of a single job',\n icon: 'file-text',\n category: 'detail',\n order: 3,\n propsInterface: 'JobDetailProps',\n },\n 'job-stats': {\n id: 'job-stats',\n label: 'Job Stats',\n description: 'Statistics dashboard for job queues',\n icon: 'bar-chart',\n category: 'display',\n order: 4,\n propsInterface: 'JobStatsProps',\n },\n 'job-actions': {\n id: 'job-actions',\n label: 'Job Actions',\n description: 'Action buttons for job operations',\n icon: 'more-horizontal',\n category: 'action',\n order: 5,\n propsInterface: 'JobActionsProps',\n },\n 'job-status-badge': {\n id: 'job-status-badge',\n label: 'Job Status Badge',\n description: 'Status indicator for job states',\n icon: 'tag',\n category: 'display',\n order: 6,\n propsInterface: 'JobStatusBadgeProps',\n },\n};\n\n/**\n * Jobs module metadata\n */\nexport const JOBS_MODULE_META: SmrtModuleMeta = {\n name: '@happyvertical/smrt-jobs',\n displayName: 'Jobs',\n description: 'Background job processing with persistence and scheduling',\n uiSlots: JOBS_UI_SLOTS,\n models: ['Job', 'JobQueue'],\n collections: ['JobCollection', 'JobQueueCollection'],\n};\n"],"names":[],"mappings":"AAYO,MAAM,gBAA8C;AAAA,EACzD,iBAAiB;AAAA,IACf,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,IACP,gBAAgB;AAAA,EAAA;AAAA,EAElB,YAAY;AAAA,IACV,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,IACP,gBAAgB;AAAA,EAAA;AAAA,EAElB,cAAc;AAAA,IACZ,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,IACP,gBAAgB;AAAA,EAAA;AAAA,EAElB,aAAa;AAAA,IACX,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,IACP,gBAAgB;AAAA,EAAA;AAAA,EAElB,eAAe;AAAA,IACb,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,IACP,gBAAgB;AAAA,EAAA;AAAA,EAElB,oBAAoB;AAAA,IAClB,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,IACP,gBAAgB;AAAA,EAAA;AAEpB;AAKO,MAAM,mBAAmC;AAAA,EAC9C,MAAM;AAAA,EACN,aAAa;AAAA,EACb,aAAa;AAAA,EACb,SAAS;AAAA,EACT,QAAQ,CAAC,OAAO,UAAU;AAAA,EAC1B,aAAa,CAAC,iBAAiB,oBAAoB;AACrD;"}
1
+ {"version":3,"file":"ui.js","names":[],"sources":["../src/ui.ts"],"sourcesContent":["/**\n * Jobs Module UI Slot Declarations\n *\n * This file defines the UI extension points for the jobs module.\n * UI components are implemented in the ./svelte subpath.\n */\n\nimport type { ModuleUISlot, SmrtModuleMeta } from '@happyvertical/smrt-types';\n\n/**\n * Jobs module UI slots\n */\nexport const JOBS_UI_SLOTS: Record<string, ModuleUISlot> = {\n 'job-dashboard': {\n id: 'job-dashboard',\n label: 'Job Dashboard',\n description: 'Combined overview panel for background jobs',\n icon: 'briefcase',\n category: 'admin',\n order: 1,\n propsInterface: 'JobDashboardProps',\n },\n 'job-list': {\n id: 'job-list',\n label: 'Job List',\n description: 'Filterable, sortable list of background jobs',\n icon: 'list',\n category: 'list',\n order: 2,\n propsInterface: 'JobListProps',\n },\n 'job-detail': {\n id: 'job-detail',\n label: 'Job Detail',\n description: 'Detailed view of a single job',\n icon: 'file-text',\n category: 'detail',\n order: 3,\n propsInterface: 'JobDetailProps',\n },\n 'job-stats': {\n id: 'job-stats',\n label: 'Job Stats',\n description: 'Statistics dashboard for job queues',\n icon: 'bar-chart',\n category: 'display',\n order: 4,\n propsInterface: 'JobStatsProps',\n },\n 'job-actions': {\n id: 'job-actions',\n label: 'Job Actions',\n description: 'Action buttons for job operations',\n icon: 'more-horizontal',\n category: 'action',\n order: 5,\n propsInterface: 'JobActionsProps',\n },\n 'job-status-badge': {\n id: 'job-status-badge',\n label: 'Job Status Badge',\n description: 'Status indicator for job states',\n icon: 'tag',\n category: 'display',\n order: 6,\n propsInterface: 'JobStatusBadgeProps',\n },\n};\n\n/**\n * Jobs module metadata\n */\nexport const JOBS_MODULE_META: SmrtModuleMeta = {\n name: '@happyvertical/smrt-jobs',\n displayName: 'Jobs',\n description: 'Background job processing with persistence and scheduling',\n uiSlots: JOBS_UI_SLOTS,\n models: ['Job', 'JobQueue'],\n collections: ['JobCollection', 'JobQueueCollection'],\n};\n"],"mappings":";AAYO,IAAM,gBAA8C;CACzD,iBAAiB;EACf,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,YAAY;EACV,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,cAAc;EACZ,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,aAAa;EACX,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,eAAe;EACb,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;CACA,oBAAoB;EAClB,IAAI;EACJ,OAAO;EACP,aAAa;EACb,MAAM;EACN,UAAU;EACV,OAAO;EACP,gBAAgB;CAClB;AACF;AAKO,IAAM,mBAAmC;CAC9C,MAAM;CACN,aAAa;CACb,aAAa;CACb,SAAS;CACT,QAAQ,CAAC,OAAO,UAAU;CAC1B,aAAa,CAAC,iBAAiB,oBAAoB;AACrD"}