pipework 0.205.0 → 0.207.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/CHANGELOG.md +8 -0
- package/REFERENCE.md +2 -0
- package/dist/REFERENCE.md +16 -472
- package/dist/async/jobs/listener.d.ts +2 -2
- package/dist/async/jobs/listener.d.ts.map +1 -1
- package/dist/async/jobs/listener.js +10 -10
- package/dist/async/jobs/listener.js.map +1 -1
- package/dist/async/jobs/queue.d.ts.map +1 -1
- package/dist/async/jobs/queue.js +67 -29
- package/dist/async/jobs/queue.js.map +1 -1
- package/dist/async/pipeline/define.d.ts.map +1 -1
- package/dist/async/pipeline/define.js +3 -2
- package/dist/async/pipeline/define.js.map +1 -1
- package/dist/async/steps/graph.d.ts.map +1 -1
- package/dist/async/steps/graph.js +11 -7
- package/dist/async/steps/graph.js.map +1 -1
- package/dist/auth/auth/email-links.d.ts.map +1 -1
- package/dist/auth/auth/email-links.js +3 -2
- package/dist/auth/auth/email-links.js.map +1 -1
- package/dist/auth/auth/multi-org.d.ts.map +1 -1
- package/dist/auth/auth/multi-org.js +3 -2
- package/dist/auth/auth/multi-org.js.map +1 -1
- package/dist/auth/auth/sessions.d.ts.map +1 -1
- package/dist/auth/auth/sessions.js +3 -2
- package/dist/auth/auth/sessions.js.map +1 -1
- package/dist/auth/tenant/scoped-db.d.ts +24 -0
- package/dist/auth/tenant/scoped-db.d.ts.map +1 -1
- package/dist/auth/tenant/scoped-db.js +64 -1
- package/dist/auth/tenant/scoped-db.js.map +1 -1
- package/dist/data/db/advisory-lock.d.ts.map +1 -1
- package/dist/data/db/advisory-lock.js +3 -2
- package/dist/data/db/advisory-lock.js.map +1 -1
- package/dist/data/db/bulk-set.d.ts +1 -1
- package/dist/data/db/bulk-set.d.ts.map +1 -1
- package/dist/data/db/bulk-set.js +7 -2
- package/dist/data/db/bulk-set.js.map +1 -1
- package/dist/data/db/insert-split.d.ts +17 -0
- package/dist/data/db/insert-split.d.ts.map +1 -0
- package/dist/data/db/insert-split.js +108 -0
- package/dist/data/db/insert-split.js.map +1 -0
- package/dist/data/db/pool.d.ts.map +1 -1
- package/dist/data/db/pool.js +3 -2
- package/dist/data/db/pool.js.map +1 -1
- package/dist/data/db/timeouts.d.ts.map +1 -1
- package/dist/data/db/timeouts.js +2 -1
- package/dist/data/db/timeouts.js.map +1 -1
- package/dist/data/write/execute.d.ts.map +1 -1
- package/dist/data/write/execute.js +3 -15
- package/dist/data/write/execute.js.map +1 -1
- package/dist/infra/email/mail.d.ts.map +1 -1
- package/dist/infra/email/mail.js +6 -3
- package/dist/infra/email/mail.js.map +1 -1
- package/dist/infra/email/sigv4.d.ts +24 -0
- package/dist/infra/email/sigv4.d.ts.map +1 -0
- package/dist/infra/email/sigv4.js +55 -0
- package/dist/infra/email/sigv4.js.map +1 -0
- package/dist/infra/idempotency/store.d.ts.map +1 -1
- package/dist/infra/idempotency/store.js +13 -6
- package/dist/infra/idempotency/store.js.map +1 -1
- package/dist/infra/webhook/outbound.d.ts.map +1 -1
- package/dist/infra/webhook/outbound.js +15 -7
- package/dist/infra/webhook/outbound.js.map +1 -1
- package/dist/test/plugin.d.ts.map +1 -1
- package/dist/test/plugin.js +3 -1
- package/dist/test/plugin.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.207.0
|
|
4
|
+
|
|
5
|
+
- **Fixed: queue ops threw on a fitting's tenant-scoped handle** (#786). `enqueue`, `enqueueAndWait`, `cancel`, `retryNow`, `flowOf`, `waitFor`, `requeueDeadLetter` and `totals` now run on the handle a fitting gets from `.use('app')` or `pipe()` under a tenant, on the caller's transaction, confined to that tenant's jobs (`flow_tenant`): another tenant's job behaves as a missing one, and enqueuing for another tenant throws. The worker and schedule ops (`claim`, `heartbeat`, `complete`, `fail`, `failAttempt`, `later`, `handBack`, `reap`, `schedule`, `syncSchedules`, `fireSchedule`, `runDueSchedules`, `unschedule`, `listSchedules`, `startScheduler`) act across tenants and now refuse a scoped handle up front, naming the unscoped handle to pass. The same holds across APIs that take a `DB`: `pipe.advisoryLock`, `pipe.tryAdvisoryLock` and `pipe.withTimeouts` run on a scoped handle; `pipe.bulkSet`, webhook `send` / `registerEndpoint` / `listEndpoints` / `removeEndpoint`, idempotency `find` / `lock` / `complete` / `remove`, `mail.send` and step graphs run confined to its tenant; webhook `deliver` / `processPending`, idempotency `cleanup`, `mail.sentTo`, `sessions`, `emailLinks`, `multiOrg` and pipelines refuse it with that error instead of the generic `execute()` one. `.execute()` on a scoped handle still throws, and unscoped handles behave as before.
|
|
6
|
+
|
|
7
|
+
## 0.206.0
|
|
8
|
+
|
|
9
|
+
- **Fixed: `insert(T).values(list)` on a DB handle or its `tx` failed past Postgres's parameter limit** (#783, #784). A handle from `tap()`, `pool.getOrCreate().drizzle` or the test fixture, and the `tx` of its `.transaction(...)` (nested too), now splits a list over the limit into several statements the way `pipe.insert` does, with `onConflictDoNothing`, `onConflictDoUpdate` and `returning` applied to each. They run on that handle, so they commit and roll back with the caller's transaction (a savepoint when it is already one). A list under the limit is drizzle's own builder, unchanged. `toSQL()`, `prepare()` and `$dynamic()` of an over-limit list throw. `pipe.insert` inside a `db.transaction` callback still does not join that `tx`; use the `tx`'s own `insert`.
|
|
10
|
+
|
|
3
11
|
## 0.205.0
|
|
4
12
|
|
|
5
13
|
- **Fixed: a PDF with bytes before `%PDF-` was refused as not a PDF** (#781). Byte detection now names a file `application/pdf` when `%PDF-` starts anywhere in its first 1024 bytes, as PDF readers do, so an upload with a leading CRLF, BOM or mail header passes `mediaTypes: ['application/pdf']`. The search runs only when no other signature matches, so a zip or PNG that contains `%PDF-` keeps its type, and every other signature is still read from the first 512 bytes. **Behavior change:** `SNIFF_BYTES` is now 1024, so `.upload()` and inbound email attachments hold the first 1024 bytes of a file to detect its type.
|
package/REFERENCE.md
CHANGED
|
@@ -994,6 +994,8 @@ interface ManagedConnection
|
|
|
994
994
|
|
|
995
995
|
**`ConnectOptions`** — Options for `tap()` — pool size (default 1), idle timeout in seconds, and `settings` (see below).
|
|
996
996
|
|
|
997
|
+
**Large inserts on a handle** — `insert(T).values(list)` on a `tap()` or `pool.getOrCreate().drizzle` handle, and on the `tx` of its `.transaction(...)` (nested too), splits a list over Postgres's parameter limit into several statements the way `pipe.insert` does, with `onConflictDoNothing`, `onConflictDoUpdate` and `returning` applied to each. They run on that handle, so they stay in the caller's transaction (a savepoint when it is already one), and a throw later in the callback rolls them all back. `toSQL()` and `prepare()` of an over-limit list throw.
|
|
998
|
+
|
|
997
999
|
**Session settings (`databases.<name>.pool.settings`, `tap({ settings })`)** — `Record<string, string | number | boolean>`, default none. Each entry is a Postgres session setting (GUC) sent in the connection's startup packet, so every pooled socket carries it from its first packet, including a connection the pool replaced at `max_lifetime` or after a backend was terminated. A session `SET` on a pooled connection does not survive replacement; use `settings` for anything that must hold for the life of the pool. Names are `name` or `prefix.name` (letters, digits, underscores); anything else is a config error. Values are stringified (`true` is `on`, `false` is `off`). A dotted custom name (`myapp.tenant`) is always accepted. An unknown non-dotted name is rejected by Postgres: the connection fails, and the first query on the pool rejects, and the error's `cause` is Postgres's own (`unrecognized configuration parameter "..."`); pipework does not translate it.
|
|
998
1000
|
|
|
999
1001
|
```typescript
|