@stacksjs/defaults 0.75.500 → 0.75.503

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.
@@ -71,7 +71,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
71
71
  | `@stacksjs/payments` | [`stacks-payments`](../stacks-payments/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/payments/src/index.ts) | 39 |
72
72
  | `@stacksjs/push` | [`stacks-push`](../stacks-push/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/push/src/index.ts) | 8 |
73
73
  | `@stacksjs/query-builder` | [`stacks-query-builder`](../stacks-query-builder/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/query-builder/src/index.ts) | 7 |
74
- | `@stacksjs/queue` | [`stacks-queue`](../stacks-queue/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/index.ts) | 56 |
74
+ | `@stacksjs/queue` | [`stacks-queue`](../stacks-queue/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/index.ts) | 58 |
75
75
  | `@stacksjs/realtime` | [`stacks-realtime`](../stacks-realtime/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/realtime/src/index.ts) | 13 |
76
76
  | `@stacksjs/registry` | [`stacks-registry`](../stacks-registry/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/registry/src/index.ts) | 1 |
77
77
  | `@stacksjs/repl` | [`stacks-repl`](../stacks-repl/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/repl/src/index.ts) | 2 |
@@ -695,11 +695,11 @@ Evidence directory: [7 retained tests](https://github.com/stacksjs/stacks/blob/m
695
695
 
696
696
  Guidance: [`stacks-queue`](../stacks-queue/SKILL.md). Source: [storage/framework/core/queue/src/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/index.ts).
697
697
 
698
- Declared runtime exports: `Batch`, `DispatchedBatch`, `FailedJobNotifier`, `JOB_ENVELOPE_VERSION`, `Job`, `Jobs`, `OnQueueEvent`, `PendingBatch`, `QueueEvents`, `QueueMetrics`, `QueueTester`, `aggregateWorkerMetrics`, `assertEnvelopeSerializable`, `cancelJob`, `checkQueueHealth`, `claimDispatchKey`, `clearEnvelopeWarnings`, `clearJobState`, `configureFailedJobNotifications`, `createEnvelope`, `createHealthCheckHandler`, `createQueueTester`, `discoverJobs`, `emitQueueEvent`, `executeFailedJobs`, `executeJob`, `expectJobToFail`, `fake`, `getActionRunner`, `getActiveJobCount`, `getAllJobs`, `getBatchCallbacks`, `getFailedJobNotifier`, `getFakeQueue`, `getGlobalMetrics`, `getJob`, `getJobProgress`, `getQueueEvents`, `getRedisQueue`, `getRegisteredJobs`, `getScheduledJobs`, `getSchedulerStatus`, `getWorkerTracker`, `hasDispatchedKey`, `hashPayload`, `isBatchCancelled`, `isCircuitOpen`, `isFaked`, `isJobCancelled`, `isQuarantined`, `isQueueHealthy`, `isSchedulerRunning`, `isWorkerRunning`, `job`, `jobBatch`, `jobRegistry`, `listCircuitState`, `listDeadLetterJobs`, `listQuarantined`, `moveToDeadLetter`, `notifyJobFailed`, `onQueueEvent`, `parseEnvelope`, `pauseQueue`, `purgeDeadLetterJobs`, `quarantineJob`, `queuedJobState`, `readWorkerSnapshots`, `recordBatchJobCompletion`, `recordBatchJobFailure`, `recordCircuitFailure`, `recordCircuitSuccess`, `recordDispatchedKey`, `recordFailureForPoison`, `releaseDispatchKey`, `resolveQueueDriver`, `restore`, `resumeQueue`, `retryDeadLetterJob`, `retryFailedJob`, `runJob`, `runTestJob`, `serializeEnvelope`, `setActionRunner`, `setJobProgress`, `startProcessor`, `startScheduler`, `stopProcessor`, `stopScheduler`, `toJobOptions`, `triggerJob`, `unquarantineJob`, `withEvents`.
698
+ Declared runtime exports: `Batch`, `DispatchedBatch`, `FailedJobNotifier`, `JOB_ENVELOPE_VERSION`, `Job`, `Jobs`, `OnQueueEvent`, `PendingBatch`, `QueueEvents`, `QueueMetrics`, `QueueTester`, `aggregateWorkerMetrics`, `assertEnvelopeSerializable`, `cancelJob`, `captureProcessLeaseOwner`, `checkQueueHealth`, `claimDispatchKey`, `clearEnvelopeWarnings`, `clearJobState`, `configureFailedJobNotifications`, `createEnvelope`, `createHealthCheckHandler`, `createQueueTester`, `discoverJobs`, `emitQueueEvent`, `executeFailedJobs`, `executeJob`, `expectJobToFail`, `fake`, `getActionRunner`, `getActiveJobCount`, `getAllJobs`, `getBatchCallbacks`, `getFailedJobNotifier`, `getFakeQueue`, `getGlobalMetrics`, `getJob`, `getJobProgress`, `getQueueEvents`, `getRedisQueue`, `getRegisteredJobs`, `getScheduledJobs`, `getSchedulerStatus`, `getWorkerTracker`, `hasDispatchedKey`, `hashPayload`, `isBatchCancelled`, `isCircuitOpen`, `isFaked`, `isJobCancelled`, `isQuarantined`, `isQueueHealthy`, `isSchedulerRunning`, `isWorkerRunning`, `job`, `jobBatch`, `jobRegistry`, `listCircuitState`, `listDeadLetterJobs`, `listQuarantined`, `moveToDeadLetter`, `notifyJobFailed`, `onQueueEvent`, `parseEnvelope`, `pauseQueue`, `processLeaseOwnerStatus`, `purgeDeadLetterJobs`, `quarantineJob`, `queuedJobState`, `readWorkerSnapshots`, `recordBatchJobCompletion`, `recordBatchJobFailure`, `recordCircuitFailure`, `recordCircuitSuccess`, `recordDispatchedKey`, `recordFailureForPoison`, `releaseDispatchKey`, `resolveQueueDriver`, `restore`, `resumeQueue`, `retryDeadLetterJob`, `retryFailedJob`, `runJob`, `runTestJob`, `serializeEnvelope`, `setActionRunner`, `setJobProgress`, `startProcessor`, `startScheduler`, `stopProcessor`, `stopScheduler`, `toJobOptions`, `triggerJob`, `unquarantineJob`, `withEvents`.
699
699
 
700
- Local source modules: [src/action-runner.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/action-runner.ts), [src/action.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/action.ts), [src/batch.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/batch.ts), [src/bun-queue.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/bun-queue.ts), [src/circuit-breaker.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/circuit-breaker.ts), [src/dead-letter.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/dead-letter.ts), [src/discovery.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/discovery.ts), [src/driver.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/driver.ts), [src/drivers/redis.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/drivers/redis.ts), [src/envelope.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/envelope.ts), [src/events.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/events.ts), [src/health.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/health.ts), [src/idempotency.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/idempotency.ts), [src/job-progress.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/job-progress.ts), [src/job.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/job.ts), [src/notifications.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/notifications.ts), [src/poison.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/poison.ts), [src/scheduler.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/scheduler.ts), [src/testing.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/testing.ts), [src/worker-monitor.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/worker-monitor.ts), [src/worker.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/worker.ts).
700
+ Local source modules: [src/action-runner.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/action-runner.ts), [src/action.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/action.ts), [src/batch.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/batch.ts), [src/bun-queue.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/bun-queue.ts), [src/circuit-breaker.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/circuit-breaker.ts), [src/dead-letter.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/dead-letter.ts), [src/discovery.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/discovery.ts), [src/driver.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/driver.ts), [src/drivers/redis.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/drivers/redis.ts), [src/envelope.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/envelope.ts), [src/events.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/events.ts), [src/health.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/health.ts), [src/idempotency.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/idempotency.ts), [src/job-progress.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/job-progress.ts), [src/job.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/job.ts), [src/notifications.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/notifications.ts), [src/poison.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/poison.ts), [src/process-owner.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/process-owner.ts), [src/scheduler.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/scheduler.ts), [src/testing.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/testing.ts), [src/worker-monitor.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/worker-monitor.ts), [src/worker.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/src/worker.ts).
701
701
 
702
- Evidence directory: [56 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
702
+ Evidence directory: [58 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/queue/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
703
703
 
704
704
  ### @stacksjs/realtime
705
705
 
@@ -15,6 +15,13 @@ allowed-tools: Read Edit Write Bash Grep Glob
15
15
  - Job model: `storage/framework/defaults/app/Models/Job.ts`
16
16
  - Failed job model: `storage/framework/defaults/app/Models/FailedJob.ts`
17
17
 
18
+ Database reservations record Linux process incarnation ownership. After a
19
+ worker exits, the normal reservation sweep can recover its positively dead
20
+ local reservations before their TTL. Foreign, unsupported and legacy owners
21
+ retain TTL protection. Application leases can share this proof through
22
+ `captureProcessLeaseOwner()` and `processLeaseOwnerStatus(owner)`; only `dead`
23
+ authorizes early recovery, never `unknown`. No custom heartbeat is needed.
24
+
18
25
  ## Source Files
19
26
  ```
20
27
  queue/src/
@@ -132,15 +132,21 @@ export function createDashboardSidebarOrder(options: {
132
132
  }
133
133
  let drag: { source: Target, handle: HTMLElement, x: number, y: number, pointer: number, moved: boolean } | undefined
134
134
  let destination: { target: Target, after: boolean } | undefined
135
+ let pointer: Pick<PointerEvent, 'clientX' | 'clientY'> | undefined
136
+ let frame: number | undefined
137
+ const view = pane.ownerDocument.defaultView
135
138
  function clear() {
136
139
  const previous = drag
137
140
  drag = undefined
141
+ pointer = undefined
142
+ if (frame !== undefined) view?.cancelAnimationFrame(frame)
143
+ frame = undefined
138
144
  if (previous?.handle.hasPointerCapture(previous.pointer)) previous.handle.releasePointerCapture(previous.pointer)
139
145
  previous?.source.element.removeAttribute('data-order-dragging')
140
146
  destination?.target.element.removeAttribute('data-order-drop')
141
147
  destination = undefined
142
148
  }
143
- function targetAt(event: PointerEvent): Target | undefined {
149
+ function targetAt(event: Pick<PointerEvent, 'clientX' | 'clientY'>): Target | undefined {
144
150
  const hit = pane!.ownerDocument.elementFromPoint(event.clientX, event.clientY)
145
151
  const element = hit?.closest<HTMLElement>(drag?.source.kind === 'section' ? '[data-sidebar-section]' : '[data-sidebar-row]')
146
152
  return [...targets.values()].find(target => target.element === element && target.kind === drag?.source.kind && target.group === drag.source.group)
@@ -151,7 +157,7 @@ export function createDashboardSidebarOrder(options: {
151
157
  if (!source || !ready || event.button !== 0) return
152
158
  event.preventDefault()
153
159
  event.stopPropagation()
154
- handle.focus()
160
+ handle.focus({ preventScroll: true })
155
161
  handle.setPointerCapture(event.pointerId)
156
162
  drag = { source, handle, x: event.clientX, y: event.clientY, pointer: event.pointerId, moved: false }
157
163
  }
@@ -159,19 +165,35 @@ export function createDashboardSidebarOrder(options: {
159
165
  if (!drag || drag.pointer !== event.pointerId) return
160
166
  if (Math.hypot(event.clientX - drag.x, event.clientY - drag.y) < 5 && !drag.moved) return
161
167
  drag.moved = true
168
+ pointer = { clientX: event.clientX, clientY: event.clientY }
162
169
  drag.source.element.setAttribute('data-order-dragging', 'true')
170
+ updateDestination()
171
+ if (frame === undefined) frame = view?.requestAnimationFrame(scrollDrag)
172
+ }
173
+ function updateDestination() {
163
174
  destination?.target.element.removeAttribute('data-order-drop')
164
175
  destination = undefined
165
- const target = targetAt(event)
176
+ if (!drag || !pointer) return
177
+ const target = targetAt(pointer)
166
178
  if (!target || target.id === drag.source.id) return
167
179
  const rect = (target.kind === 'section' ? target.element.querySelector('[data-sidebar-section-header]') ?? target.element : target.element).getBoundingClientRect()
168
- const after = event.clientY >= rect.top + Math.min(rect.height, 40) / 2
180
+ const after = pointer.clientY >= rect.top + Math.min(rect.height, 40) / 2
169
181
  destination = { target, after }
170
182
  target.element.setAttribute('data-order-drop', after ? 'after' : 'before')
183
+ }
184
+ function scrollDrag() {
185
+ frame = undefined
186
+ if (!drag || !pointer || !view) return
171
187
  const scroll = pane!.querySelector<HTMLElement>('[data-sidebar-scroll]') ?? pane!
172
188
  const bounds = scroll.getBoundingClientRect()
173
- if (event.clientY < bounds.top + 36) scroll.scrollBy(0, -24)
174
- else if (event.clientY > bounds.bottom - 36) scroll.scrollBy(0, 24)
189
+ const inside = pointer.clientX >= bounds.left && pointer.clientX <= bounds.right && pointer.clientY >= bounds.top - 36 && pointer.clientY <= bounds.bottom + 36
190
+ const amount = !inside ? 0 : pointer.clientY < bounds.top + 36 ? -24 : pointer.clientY > bounds.bottom - 36 ? 24 : 0
191
+ if (amount) {
192
+ const previous = scroll.scrollTop
193
+ scroll.scrollBy({ top: amount, behavior: 'instant' })
194
+ if (scroll.scrollTop !== previous) updateDestination()
195
+ }
196
+ if (drag) frame = view.requestAnimationFrame(scrollDrag)
175
197
  }
176
198
  function pointerup(event: PointerEvent) {
177
199
  if (!drag || event.pointerId !== drag.pointer) return
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.500",
5
+ "version": "0.75.503",
6
6
  "description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.500",
5
+ "version": "0.75.503",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -45,10 +45,10 @@
45
45
  "dependencies": {
46
46
  "@iconify-json/f7": "^1.2.2",
47
47
  "@iconify-json/hugeicons": "^1.2.35",
48
- "@stacksjs/mobile": "0.75.500",
48
+ "@stacksjs/mobile": "0.75.503",
49
49
  "@stacksjs/sanitizer": "0.2.807",
50
50
  "@stacksjs/stx": "0.2.807",
51
- "@stacksjs/strings": "0.75.500",
51
+ "@stacksjs/strings": "0.75.503",
52
52
  "@xterm/addon-fit": "^0.11.0",
53
53
  "@xterm/xterm": "^6.0.0",
54
54
  "ts-qr-codes": "^0.1.8"