@coji/durably 0.6.0 → 0.7.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/dist/chunk-UCUP6NMJ.js +22 -0
- package/dist/chunk-UCUP6NMJ.js.map +1 -0
- package/dist/index-4aPZWn8r.d.ts +650 -0
- package/dist/index.d.ts +5 -631
- package/dist/index.js +271 -353
- package/dist/index.js.map +1 -1
- package/dist/plugins/index.d.ts +3 -8
- package/dist/plugins/index.js +3 -6
- package/dist/plugins/index.js.map +1 -1
- package/docs/llms.md +15 -1
- package/package.json +1 -1
package/dist/plugins/index.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"durably is not yet implemented. This is a placeholder package. See https://github.com/coji/durably for updates."
|
|
5
|
-
);
|
|
6
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
withLogPersistence
|
|
3
|
+
} from "../chunk-UCUP6NMJ.js";
|
|
7
4
|
export {
|
|
8
5
|
withLogPersistence
|
|
9
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/docs/llms.md
CHANGED
|
@@ -145,8 +145,15 @@ if (run?.status === 'completed') {
|
|
|
145
145
|
console.log(run.output.syncedCount)
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
// Via durably instance (
|
|
148
|
+
// Via durably instance (untyped)
|
|
149
149
|
const run = await durably.getRun(runId)
|
|
150
|
+
|
|
151
|
+
// Via durably instance (typed with generic parameter)
|
|
152
|
+
type MyRun = Run & {
|
|
153
|
+
payload: { userId: string }
|
|
154
|
+
output: { count: number } | null
|
|
155
|
+
}
|
|
156
|
+
const typedRun = await durably.getRun<MyRun>(runId)
|
|
150
157
|
```
|
|
151
158
|
|
|
152
159
|
### Query Runs
|
|
@@ -162,6 +169,13 @@ const runs = await durably.getRuns({
|
|
|
162
169
|
limit: 10,
|
|
163
170
|
offset: 0,
|
|
164
171
|
})
|
|
172
|
+
|
|
173
|
+
// Typed getRuns with generic parameter
|
|
174
|
+
type MyRun = Run & {
|
|
175
|
+
payload: { userId: string }
|
|
176
|
+
output: { count: number } | null
|
|
177
|
+
}
|
|
178
|
+
const typedRuns = await durably.getRuns<MyRun>({ jobName: 'my-job' })
|
|
165
179
|
```
|
|
166
180
|
|
|
167
181
|
### Retry Failed Runs
|