@temporal-contract/contract 2.3.1 → 3.0.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/README.md +4 -4
- package/dist/result-async.cjs +39 -23
- package/dist/result-async.d.cts +32 -13
- package/dist/result-async.d.cts.map +1 -1
- package/dist/result-async.d.mts +32 -13
- package/dist/result-async.d.mts.map +1 -1
- package/dist/result-async.mjs +38 -23
- package/dist/result-async.mjs.map +1 -1
- package/package.json +13 -9
package/README.md
CHANGED
|
@@ -32,11 +32,11 @@ export const myContract = defineContract({
|
|
|
32
32
|
|
|
33
33
|
## Documentation
|
|
34
34
|
|
|
35
|
-
📖 **[Read the full documentation →](https://
|
|
35
|
+
📖 **[Read the full documentation →](https://btravstack.github.io/temporal-contract)**
|
|
36
36
|
|
|
37
|
-
- [API Reference](https://
|
|
38
|
-
- [Getting Started](https://
|
|
39
|
-
- [Core Concepts](https://
|
|
37
|
+
- [API Reference](https://btravstack.github.io/temporal-contract/api/contract)
|
|
38
|
+
- [Getting Started](https://btravstack.github.io/temporal-contract/guide/getting-started)
|
|
39
|
+
- [Core Concepts](https://btravstack.github.io/temporal-contract/guide/core-concepts)
|
|
40
40
|
|
|
41
41
|
## License
|
|
42
42
|
|
package/dist/result-async.cjs
CHANGED
|
@@ -1,41 +1,57 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
let
|
|
2
|
+
let unthrown = require("unthrown");
|
|
3
3
|
//#region src/result-async.ts
|
|
4
4
|
/**
|
|
5
5
|
* Internal helper shared across `@temporal-contract/client` and
|
|
6
6
|
* `@temporal-contract/worker` for wrapping a result-producing async function
|
|
7
|
-
* in
|
|
8
|
-
*
|
|
7
|
+
* in an `AsyncResult`, routing any unanticipated rejection through unthrown's
|
|
8
|
+
* `defect` channel.
|
|
9
9
|
*
|
|
10
10
|
* Lives in `@temporal-contract/contract` so the two consuming packages don't
|
|
11
11
|
* each carry their own copy. Exported from the package's public surface
|
|
12
|
-
* under a deliberately-internal-looking name (`
|
|
12
|
+
* under a deliberately-internal-looking name (`_internal_makeAsyncResult`)
|
|
13
13
|
* so users don't import it by accident — there is no semver guarantee on
|
|
14
14
|
* this entry point.
|
|
15
15
|
*/
|
|
16
16
|
/**
|
|
17
|
-
* Wrap an async function returning `Promise<Result<T, E>>` in
|
|
18
|
-
* `
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* Wrap an async function returning `Promise<Result<T, E>>` in an
|
|
18
|
+
* `AsyncResult<T, E>`, catching synchronous throws and rejected promises and
|
|
19
|
+
* routing them through unthrown's `defect` channel — so an *unanticipated*
|
|
20
|
+
* failure surfaces as a defect (a bug, re-thrown at the edge) rather than an
|
|
21
|
+
* unhandled rejection, while the work function's own domain `err(...)` flows
|
|
22
|
+
* through untouched.
|
|
21
23
|
*
|
|
22
|
-
* `
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* `fromSafePromise(thunk)` invokes the thunk, capturing both a synchronous
|
|
25
|
+
* throw before the promise is produced and an eventual rejection as a `defect`
|
|
26
|
+
* (its error channel is `never`) — the work function is expected to model its
|
|
27
|
+
* own domain errors as `err(...)`, so any *thrown* failure is by definition
|
|
28
|
+
* unmodeled. The `.flatMap((inner) => inner)` flattens the nested
|
|
29
|
+
* `Result<T, E>` the thunk resolves with, surfacing its modeled error channel.
|
|
27
30
|
*
|
|
28
|
-
* @internal — exported under `
|
|
31
|
+
* @internal — exported under `_internal_makeAsyncResult` for use by the
|
|
29
32
|
* sibling client and worker packages. Not part of the public API.
|
|
30
33
|
*/
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
function _internal_makeAsyncResult(work) {
|
|
35
|
+
return (0, unthrown.fromSafePromise)(work).flatMap((inner) => inner);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Assert that a `Result` is not a `Defect`, narrowing it to `Ok | Err`.
|
|
39
|
+
*
|
|
40
|
+
* unthrown's `Result<T, E>` type always includes the out-of-band `Defect`
|
|
41
|
+
* variant, so `if (r.isErr()) … else r.value` does not type-check — the `else`
|
|
42
|
+
* branch is still `Ok | Defect`. For an internally-produced result that is
|
|
43
|
+
* *known* to be built only from `ok(...)` / `err(...)`, this collapses the
|
|
44
|
+
* "impossible defect" case in one call: it re-throws a present defect's cause
|
|
45
|
+
* (so a genuine bug still rides the defect channel at the boundary) and
|
|
46
|
+
* narrows the result to `Ok | Err` for the caller, which can then branch on
|
|
47
|
+
* `isErr` / `isOk` and reach `.value` / `.error` cleanly.
|
|
48
|
+
*
|
|
49
|
+
* @internal — exported under `_internal_assertNoDefect` for the sibling client
|
|
50
|
+
* and worker packages. Not part of the public API.
|
|
51
|
+
*/
|
|
52
|
+
function _internal_assertNoDefect(result) {
|
|
53
|
+
if (result.isDefect()) throw result.cause;
|
|
39
54
|
}
|
|
40
55
|
//#endregion
|
|
41
|
-
exports.
|
|
56
|
+
exports._internal_assertNoDefect = _internal_assertNoDefect;
|
|
57
|
+
exports._internal_makeAsyncResult = _internal_makeAsyncResult;
|
package/dist/result-async.d.cts
CHANGED
|
@@ -1,22 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AsyncResult, ErrView, OkView, Result } from "unthrown";
|
|
2
2
|
|
|
3
3
|
//#region src/result-async.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* Wrap an async function returning `Promise<Result<T, E>>` in
|
|
6
|
-
* `
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Wrap an async function returning `Promise<Result<T, E>>` in an
|
|
6
|
+
* `AsyncResult<T, E>`, catching synchronous throws and rejected promises and
|
|
7
|
+
* routing them through unthrown's `defect` channel — so an *unanticipated*
|
|
8
|
+
* failure surfaces as a defect (a bug, re-thrown at the edge) rather than an
|
|
9
|
+
* unhandled rejection, while the work function's own domain `err(...)` flows
|
|
10
|
+
* through untouched.
|
|
9
11
|
*
|
|
10
|
-
* `
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* `fromSafePromise(thunk)` invokes the thunk, capturing both a synchronous
|
|
13
|
+
* throw before the promise is produced and an eventual rejection as a `defect`
|
|
14
|
+
* (its error channel is `never`) — the work function is expected to model its
|
|
15
|
+
* own domain errors as `err(...)`, so any *thrown* failure is by definition
|
|
16
|
+
* unmodeled. The `.flatMap((inner) => inner)` flattens the nested
|
|
17
|
+
* `Result<T, E>` the thunk resolves with, surfacing its modeled error channel.
|
|
15
18
|
*
|
|
16
|
-
* @internal — exported under `
|
|
19
|
+
* @internal — exported under `_internal_makeAsyncResult` for use by the
|
|
17
20
|
* sibling client and worker packages. Not part of the public API.
|
|
18
21
|
*/
|
|
19
|
-
declare function
|
|
22
|
+
declare function _internal_makeAsyncResult<T, E>(work: () => Promise<Result<T, E>>): AsyncResult<T, E>;
|
|
23
|
+
/**
|
|
24
|
+
* Assert that a `Result` is not a `Defect`, narrowing it to `Ok | Err`.
|
|
25
|
+
*
|
|
26
|
+
* unthrown's `Result<T, E>` type always includes the out-of-band `Defect`
|
|
27
|
+
* variant, so `if (r.isErr()) … else r.value` does not type-check — the `else`
|
|
28
|
+
* branch is still `Ok | Defect`. For an internally-produced result that is
|
|
29
|
+
* *known* to be built only from `ok(...)` / `err(...)`, this collapses the
|
|
30
|
+
* "impossible defect" case in one call: it re-throws a present defect's cause
|
|
31
|
+
* (so a genuine bug still rides the defect channel at the boundary) and
|
|
32
|
+
* narrows the result to `Ok | Err` for the caller, which can then branch on
|
|
33
|
+
* `isErr` / `isOk` and reach `.value` / `.error` cleanly.
|
|
34
|
+
*
|
|
35
|
+
* @internal — exported under `_internal_assertNoDefect` for the sibling client
|
|
36
|
+
* and worker packages. Not part of the public API.
|
|
37
|
+
*/
|
|
38
|
+
declare function _internal_assertNoDefect<T, E>(result: Result<T, E>): asserts result is OkView<T, E> | ErrView<E, T>;
|
|
20
39
|
//#endregion
|
|
21
|
-
export {
|
|
40
|
+
export { _internal_assertNoDefect, _internal_makeAsyncResult };
|
|
22
41
|
//# sourceMappingURL=result-async.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-async.d.cts","names":[],"sources":["../src/result-async.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"result-async.d.cts","names":[],"sources":["../src/result-async.ts"],"mappings":";;;;;;;;;;;;;;;;AAwCmB;AAmBnB;;;;iBArBgB,yBAAA,OACd,IAAA,QAAY,OAAA,CAAQ,MAAA,CAAO,CAAA,EAAG,CAAA,KAC7B,WAAA,CAAY,CAAA,EAAG,CAAA;;;;;;;;;;;;;;;;iBAmBF,wBAAA,OACd,MAAA,EAAQ,MAAA,CAAO,CAAA,EAAG,CAAA,YACT,MAAA,IAAU,MAAA,CAAO,CAAA,EAAG,CAAA,IAAK,OAAA,CAAQ,CAAA,EAAG,CAAA"}
|
package/dist/result-async.d.mts
CHANGED
|
@@ -1,22 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AsyncResult, ErrView, OkView, Result } from "unthrown";
|
|
2
2
|
|
|
3
3
|
//#region src/result-async.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* Wrap an async function returning `Promise<Result<T, E>>` in
|
|
6
|
-
* `
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Wrap an async function returning `Promise<Result<T, E>>` in an
|
|
6
|
+
* `AsyncResult<T, E>`, catching synchronous throws and rejected promises and
|
|
7
|
+
* routing them through unthrown's `defect` channel — so an *unanticipated*
|
|
8
|
+
* failure surfaces as a defect (a bug, re-thrown at the edge) rather than an
|
|
9
|
+
* unhandled rejection, while the work function's own domain `err(...)` flows
|
|
10
|
+
* through untouched.
|
|
9
11
|
*
|
|
10
|
-
* `
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* `fromSafePromise(thunk)` invokes the thunk, capturing both a synchronous
|
|
13
|
+
* throw before the promise is produced and an eventual rejection as a `defect`
|
|
14
|
+
* (its error channel is `never`) — the work function is expected to model its
|
|
15
|
+
* own domain errors as `err(...)`, so any *thrown* failure is by definition
|
|
16
|
+
* unmodeled. The `.flatMap((inner) => inner)` flattens the nested
|
|
17
|
+
* `Result<T, E>` the thunk resolves with, surfacing its modeled error channel.
|
|
15
18
|
*
|
|
16
|
-
* @internal — exported under `
|
|
19
|
+
* @internal — exported under `_internal_makeAsyncResult` for use by the
|
|
17
20
|
* sibling client and worker packages. Not part of the public API.
|
|
18
21
|
*/
|
|
19
|
-
declare function
|
|
22
|
+
declare function _internal_makeAsyncResult<T, E>(work: () => Promise<Result<T, E>>): AsyncResult<T, E>;
|
|
23
|
+
/**
|
|
24
|
+
* Assert that a `Result` is not a `Defect`, narrowing it to `Ok | Err`.
|
|
25
|
+
*
|
|
26
|
+
* unthrown's `Result<T, E>` type always includes the out-of-band `Defect`
|
|
27
|
+
* variant, so `if (r.isErr()) … else r.value` does not type-check — the `else`
|
|
28
|
+
* branch is still `Ok | Defect`. For an internally-produced result that is
|
|
29
|
+
* *known* to be built only from `ok(...)` / `err(...)`, this collapses the
|
|
30
|
+
* "impossible defect" case in one call: it re-throws a present defect's cause
|
|
31
|
+
* (so a genuine bug still rides the defect channel at the boundary) and
|
|
32
|
+
* narrows the result to `Ok | Err` for the caller, which can then branch on
|
|
33
|
+
* `isErr` / `isOk` and reach `.value` / `.error` cleanly.
|
|
34
|
+
*
|
|
35
|
+
* @internal — exported under `_internal_assertNoDefect` for the sibling client
|
|
36
|
+
* and worker packages. Not part of the public API.
|
|
37
|
+
*/
|
|
38
|
+
declare function _internal_assertNoDefect<T, E>(result: Result<T, E>): asserts result is OkView<T, E> | ErrView<E, T>;
|
|
20
39
|
//#endregion
|
|
21
|
-
export {
|
|
40
|
+
export { _internal_assertNoDefect, _internal_makeAsyncResult };
|
|
22
41
|
//# sourceMappingURL=result-async.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-async.d.mts","names":[],"sources":["../src/result-async.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"result-async.d.mts","names":[],"sources":["../src/result-async.ts"],"mappings":";;;;;;;;;;;;;;;;AAwCmB;AAmBnB;;;;iBArBgB,yBAAA,OACd,IAAA,QAAY,OAAA,CAAQ,MAAA,CAAO,CAAA,EAAG,CAAA,KAC7B,WAAA,CAAY,CAAA,EAAG,CAAA;;;;;;;;;;;;;;;;iBAmBF,wBAAA,OACd,MAAA,EAAQ,MAAA,CAAO,CAAA,EAAG,CAAA,YACT,MAAA,IAAU,MAAA,CAAO,CAAA,EAAG,CAAA,IAAK,OAAA,CAAQ,CAAA,EAAG,CAAA"}
|
package/dist/result-async.mjs
CHANGED
|
@@ -1,42 +1,57 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fromSafePromise } from "unthrown";
|
|
2
2
|
//#region src/result-async.ts
|
|
3
3
|
/**
|
|
4
4
|
* Internal helper shared across `@temporal-contract/client` and
|
|
5
5
|
* `@temporal-contract/worker` for wrapping a result-producing async function
|
|
6
|
-
* in
|
|
7
|
-
*
|
|
6
|
+
* in an `AsyncResult`, routing any unanticipated rejection through unthrown's
|
|
7
|
+
* `defect` channel.
|
|
8
8
|
*
|
|
9
9
|
* Lives in `@temporal-contract/contract` so the two consuming packages don't
|
|
10
10
|
* each carry their own copy. Exported from the package's public surface
|
|
11
|
-
* under a deliberately-internal-looking name (`
|
|
11
|
+
* under a deliberately-internal-looking name (`_internal_makeAsyncResult`)
|
|
12
12
|
* so users don't import it by accident — there is no semver guarantee on
|
|
13
13
|
* this entry point.
|
|
14
14
|
*/
|
|
15
15
|
/**
|
|
16
|
-
* Wrap an async function returning `Promise<Result<T, E>>` in
|
|
17
|
-
* `
|
|
18
|
-
*
|
|
19
|
-
*
|
|
16
|
+
* Wrap an async function returning `Promise<Result<T, E>>` in an
|
|
17
|
+
* `AsyncResult<T, E>`, catching synchronous throws and rejected promises and
|
|
18
|
+
* routing them through unthrown's `defect` channel — so an *unanticipated*
|
|
19
|
+
* failure surfaces as a defect (a bug, re-thrown at the edge) rather than an
|
|
20
|
+
* unhandled rejection, while the work function's own domain `err(...)` flows
|
|
21
|
+
* through untouched.
|
|
20
22
|
*
|
|
21
|
-
* `
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* `fromSafePromise(thunk)` invokes the thunk, capturing both a synchronous
|
|
24
|
+
* throw before the promise is produced and an eventual rejection as a `defect`
|
|
25
|
+
* (its error channel is `never`) — the work function is expected to model its
|
|
26
|
+
* own domain errors as `err(...)`, so any *thrown* failure is by definition
|
|
27
|
+
* unmodeled. The `.flatMap((inner) => inner)` flattens the nested
|
|
28
|
+
* `Result<T, E>` the thunk resolves with, surfacing its modeled error channel.
|
|
26
29
|
*
|
|
27
|
-
* @internal — exported under `
|
|
30
|
+
* @internal — exported under `_internal_makeAsyncResult` for use by the
|
|
28
31
|
* sibling client and worker packages. Not part of the public API.
|
|
29
32
|
*/
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
function _internal_makeAsyncResult(work) {
|
|
34
|
+
return fromSafePromise(work).flatMap((inner) => inner);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Assert that a `Result` is not a `Defect`, narrowing it to `Ok | Err`.
|
|
38
|
+
*
|
|
39
|
+
* unthrown's `Result<T, E>` type always includes the out-of-band `Defect`
|
|
40
|
+
* variant, so `if (r.isErr()) … else r.value` does not type-check — the `else`
|
|
41
|
+
* branch is still `Ok | Defect`. For an internally-produced result that is
|
|
42
|
+
* *known* to be built only from `ok(...)` / `err(...)`, this collapses the
|
|
43
|
+
* "impossible defect" case in one call: it re-throws a present defect's cause
|
|
44
|
+
* (so a genuine bug still rides the defect channel at the boundary) and
|
|
45
|
+
* narrows the result to `Ok | Err` for the caller, which can then branch on
|
|
46
|
+
* `isErr` / `isOk` and reach `.value` / `.error` cleanly.
|
|
47
|
+
*
|
|
48
|
+
* @internal — exported under `_internal_assertNoDefect` for the sibling client
|
|
49
|
+
* and worker packages. Not part of the public API.
|
|
50
|
+
*/
|
|
51
|
+
function _internal_assertNoDefect(result) {
|
|
52
|
+
if (result.isDefect()) throw result.cause;
|
|
38
53
|
}
|
|
39
54
|
//#endregion
|
|
40
|
-
export {
|
|
55
|
+
export { _internal_assertNoDefect, _internal_makeAsyncResult };
|
|
41
56
|
|
|
42
57
|
//# sourceMappingURL=result-async.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-async.mjs","names":[],"sources":["../src/result-async.ts"],"sourcesContent":["/**\n * Internal helper shared across `@temporal-contract/client` and\n * `@temporal-contract/worker` for wrapping a result-producing async function\n * in
|
|
1
|
+
{"version":3,"file":"result-async.mjs","names":[],"sources":["../src/result-async.ts"],"sourcesContent":["/**\n * Internal helper shared across `@temporal-contract/client` and\n * `@temporal-contract/worker` for wrapping a result-producing async function\n * in an `AsyncResult`, routing any unanticipated rejection through unthrown's\n * `defect` channel.\n *\n * Lives in `@temporal-contract/contract` so the two consuming packages don't\n * each carry their own copy. Exported from the package's public surface\n * under a deliberately-internal-looking name (`_internal_makeAsyncResult`)\n * so users don't import it by accident — there is no semver guarantee on\n * this entry point.\n */\nimport {\n fromSafePromise,\n type AsyncResult,\n type ErrView,\n type OkView,\n type Result,\n} from \"unthrown\";\n\n/**\n * Wrap an async function returning `Promise<Result<T, E>>` in an\n * `AsyncResult<T, E>`, catching synchronous throws and rejected promises and\n * routing them through unthrown's `defect` channel — so an *unanticipated*\n * failure surfaces as a defect (a bug, re-thrown at the edge) rather than an\n * unhandled rejection, while the work function's own domain `err(...)` flows\n * through untouched.\n *\n * `fromSafePromise(thunk)` invokes the thunk, capturing both a synchronous\n * throw before the promise is produced and an eventual rejection as a `defect`\n * (its error channel is `never`) — the work function is expected to model its\n * own domain errors as `err(...)`, so any *thrown* failure is by definition\n * unmodeled. The `.flatMap((inner) => inner)` flattens the nested\n * `Result<T, E>` the thunk resolves with, surfacing its modeled error channel.\n *\n * @internal — exported under `_internal_makeAsyncResult` for use by the\n * sibling client and worker packages. Not part of the public API.\n */\nexport function _internal_makeAsyncResult<T, E>(\n work: () => Promise<Result<T, E>>,\n): AsyncResult<T, E> {\n return fromSafePromise(work).flatMap((inner) => inner);\n}\n\n/**\n * Assert that a `Result` is not a `Defect`, narrowing it to `Ok | Err`.\n *\n * unthrown's `Result<T, E>` type always includes the out-of-band `Defect`\n * variant, so `if (r.isErr()) … else r.value` does not type-check — the `else`\n * branch is still `Ok | Defect`. For an internally-produced result that is\n * *known* to be built only from `ok(...)` / `err(...)`, this collapses the\n * \"impossible defect\" case in one call: it re-throws a present defect's cause\n * (so a genuine bug still rides the defect channel at the boundary) and\n * narrows the result to `Ok | Err` for the caller, which can then branch on\n * `isErr` / `isOk` and reach `.value` / `.error` cleanly.\n *\n * @internal — exported under `_internal_assertNoDefect` for the sibling client\n * and worker packages. Not part of the public API.\n */\nexport function _internal_assertNoDefect<T, E>(\n result: Result<T, E>,\n): asserts result is OkView<T, E> | ErrView<E, T> {\n if (result.isDefect()) {\n throw result.cause;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,SAAgB,0BACd,MACmB;CACnB,OAAO,gBAAgB,IAAI,CAAC,CAAC,SAAS,UAAU,KAAK;AACvD;;;;;;;;;;;;;;;;AAiBA,SAAgB,yBACd,QACgD;CAChD,IAAI,OAAO,SAAS,GAClB,MAAM,OAAO;AAEjB"}
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporal-contract/contract",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Contract builder for temporal-contract",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contract",
|
|
7
7
|
"temporal",
|
|
8
8
|
"typescript"
|
|
9
9
|
],
|
|
10
|
-
"homepage": "https://github.com/
|
|
10
|
+
"homepage": "https://github.com/btravstack/temporal-contract#readme",
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/
|
|
12
|
+
"url": "https://github.com/btravstack/temporal-contract/issues"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"author": "Benoit TRAVERS <benoit.travers.fr@gmail.com>",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/
|
|
18
|
+
"url": "https://github.com/btravstack/temporal-contract.git",
|
|
19
19
|
"directory": "packages/contract"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
@@ -53,26 +53,30 @@
|
|
|
53
53
|
"zod": "4.4.3"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
+
"@unthrown/vitest": "0.2.0",
|
|
56
57
|
"@vitest/coverage-v8": "4.1.8",
|
|
57
|
-
"arktype": "2.2.
|
|
58
|
-
"
|
|
59
|
-
"tsdown": "0.22.2",
|
|
58
|
+
"arktype": "2.2.1",
|
|
59
|
+
"tsdown": "0.22.3",
|
|
60
60
|
"typedoc": "0.28.19",
|
|
61
61
|
"typedoc-plugin-markdown": "4.12.0",
|
|
62
62
|
"typescript": "6.0.3",
|
|
63
|
+
"unthrown": "0.2.0",
|
|
63
64
|
"valibot": "1.4.1",
|
|
64
65
|
"vitest": "4.1.8",
|
|
65
66
|
"@temporal-contract/tsconfig": "1.0.0",
|
|
66
67
|
"@temporal-contract/typedoc": "0.1.0"
|
|
67
68
|
},
|
|
68
69
|
"peerDependencies": {
|
|
69
|
-
"
|
|
70
|
+
"unthrown": "^0.2"
|
|
70
71
|
},
|
|
71
72
|
"peerDependenciesMeta": {
|
|
72
|
-
"
|
|
73
|
+
"unthrown": {
|
|
73
74
|
"optional": true
|
|
74
75
|
}
|
|
75
76
|
},
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">=22.19.0"
|
|
79
|
+
},
|
|
76
80
|
"scripts": {
|
|
77
81
|
"build": "tsdown src/index.ts src/result-async.ts --format cjs,esm --dts --clean",
|
|
78
82
|
"build:docs": "typedoc",
|