@effect/atom-vue 4.0.4 → 4.0.6
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/ai-docs/package.json +1 -1
- package/ai-docs/src/06_schedule/10_schedules.ts +5 -4
- package/ai-docs/src/52_graphql/10_basics.ts +19 -13
- package/ai-docs/src/52_graphql/30_batching.ts +6 -4
- package/ai-docs/src/52_graphql/40_aliased-batching.ts +6 -4
- package/ai-docs/tsconfig.json +3 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +14 -0
package/ai-docs/package.json
CHANGED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Duration, Effect, Random, Schedule, Schema } from "effect"
|
|
7
7
|
|
|
8
|
-
// Production pattern: capped exponential backoff with jitter and
|
|
9
|
-
//
|
|
8
|
+
// Production pattern: capped exponential backoff with jitter and at most 5 retries (6 attempts).
|
|
9
|
+
// Base delays start at 250ms and grow exponentially, capped at 10s before jitter.
|
|
10
10
|
export const productionRetrySchedule = Schedule.min([
|
|
11
11
|
Schedule.exponential("250 millis"),
|
|
12
12
|
// Cap the delay at 10 seconds to avoid excessively long waits.
|
|
13
13
|
Schedule.spaced("10 seconds")
|
|
14
14
|
]).pipe(
|
|
15
15
|
Schedule.jittered,
|
|
16
|
+
Schedule.upTo({ times: 5 }),
|
|
16
17
|
Schedule.setInputType<HttpError>(),
|
|
17
18
|
Schedule.while(({ input }) => input.retryable)
|
|
18
19
|
)
|
|
@@ -44,8 +45,8 @@ export const fetchUserProfile = Effect.fn("fetchUserProfile")(
|
|
|
44
45
|
// Use the schedule with `Effect.retry` to retry failures.
|
|
45
46
|
export const loadUserWithRetry = fetchUserProfile("user-123").pipe(
|
|
46
47
|
Effect.retry(productionRetrySchedule),
|
|
47
|
-
//
|
|
48
|
-
//
|
|
48
|
+
// Turn the final error into a defect, either after exhausting the retries
|
|
49
|
+
// or immediately for a non-retryable error.
|
|
49
50
|
Effect.orDie
|
|
50
51
|
)
|
|
51
52
|
|
|
@@ -21,22 +21,28 @@ import { FetchHttpClient } from "effect/http"
|
|
|
21
21
|
// }
|
|
22
22
|
// }
|
|
23
23
|
//
|
|
24
|
-
// Each nested selection
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
// Each nested object selection has a Schema.Struct const and a same-named
|
|
25
|
+
// interface for its decoded type. The const handles decoding, encoding and
|
|
26
|
+
// `make`; use the interface in explicit type annotations when a named type
|
|
27
|
+
// is useful. Inferred types and editor hovers can expand structurally rather
|
|
28
|
+
// than showing the names, unlike the previous Schema.Opaque classes.
|
|
29
|
+
export const PageInfo = Schema.Struct({
|
|
30
|
+
hasNextPage: Schema.Boolean,
|
|
31
|
+
endCursor: Schema.NullOr(Schema.String)
|
|
32
|
+
})
|
|
33
|
+
export interface PageInfo extends Schema.Struct.Type<typeof PageInfo.fields> {}
|
|
28
34
|
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
) {}
|
|
35
|
+
export const Issue = Schema.Struct({ number: Schema.Int, title: Schema.String })
|
|
36
|
+
export interface Issue extends Schema.Struct.Type<typeof Issue.fields> {}
|
|
32
37
|
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
)
|
|
38
|
+
export const IssueConnection = Schema.Struct({
|
|
39
|
+
pageInfo: PageInfo,
|
|
40
|
+
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(Issue)))
|
|
41
|
+
})
|
|
42
|
+
export interface IssueConnection extends Schema.Struct.Type<typeof IssueConnection.fields> {}
|
|
36
43
|
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
) {}
|
|
44
|
+
export const Repository = Schema.Struct({ issues: IssueConnection })
|
|
45
|
+
export interface Repository extends Schema.Struct.Type<typeof Repository.fields> {}
|
|
40
46
|
|
|
41
47
|
export const RepoIssues = GraphQL.query("RepoIssues", {
|
|
42
48
|
document:
|
|
@@ -26,15 +26,17 @@ declare namespace Shared {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export
|
|
29
|
+
export const Repository = Schema.Struct({
|
|
30
30
|
__typename: Schema.Literal("Repository"),
|
|
31
31
|
nameWithOwner: Schema.String
|
|
32
|
-
})
|
|
32
|
+
})
|
|
33
|
+
export interface Repository extends Schema.Struct.Type<typeof Repository.fields> {}
|
|
33
34
|
|
|
34
35
|
// Unselected node types are represented by `otherTypename`.
|
|
35
|
-
export
|
|
36
|
+
export const NodeOther = Schema.Struct({
|
|
36
37
|
__typename: GraphQL.otherTypename<Shared.Typename.Node>()(["Repository"])
|
|
37
|
-
})
|
|
38
|
+
})
|
|
39
|
+
export interface NodeOther extends Schema.Struct.Type<typeof NodeOther.fields> {}
|
|
38
40
|
|
|
39
41
|
/** `query RepoNodes` */
|
|
40
42
|
export const RepoNodes = GraphQL.query("RepoNodes", {
|
|
@@ -23,14 +23,16 @@ import { GitHubAuth } from "./10_basics.ts"
|
|
|
23
23
|
// "../schema.graphql.ts"`); here `Shared` is declared inline.
|
|
24
24
|
const Shared = { Int: Schema.Number.check(Schema.isInt32()) }
|
|
25
25
|
|
|
26
|
-
export
|
|
26
|
+
export const PullRequestPullRequest = Schema.Struct({
|
|
27
27
|
number: Shared.Int,
|
|
28
28
|
title: Schema.String
|
|
29
|
-
})
|
|
29
|
+
})
|
|
30
|
+
export interface PullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestPullRequest.fields> {}
|
|
30
31
|
|
|
31
|
-
export
|
|
32
|
+
export const Repository = Schema.Struct({
|
|
32
33
|
pullRequest: Schema.NullOr(PullRequestPullRequest)
|
|
33
|
-
})
|
|
34
|
+
})
|
|
35
|
+
export interface Repository extends Schema.Struct.Type<typeof Repository.fields> {}
|
|
34
36
|
|
|
35
37
|
// The generator gives queries and mutations their document as a
|
|
36
38
|
// `GraphQL.DocumentTemplate`. The odd entries of each `body` are the names
|
package/ai-docs/tsconfig.json
CHANGED
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
"plugins": [
|
|
14
14
|
{
|
|
15
15
|
"name": "@effect/language-service",
|
|
16
|
+
"effectFn": ["untraced"],
|
|
16
17
|
"namespaceImportPackages": [],
|
|
17
18
|
"diagnosticSeverity": {
|
|
18
19
|
"floatingEffect": "off",
|
|
19
20
|
"preferSchemaOverJson": "off",
|
|
20
|
-
"unstableApiUsage": "off"
|
|
21
|
+
"unstableApiUsage": "off",
|
|
22
|
+
"effectFnOpportunity": "error"
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
]
|
package/dist/index.d.ts
CHANGED
|
@@ -79,6 +79,13 @@ export declare const injectRegistry: () => AtomRegistry.AtomRegistry;
|
|
|
79
79
|
/**
|
|
80
80
|
* Returns a reactive atom value and a setter with the requested write mode.
|
|
81
81
|
*
|
|
82
|
+
* **Gotchas**
|
|
83
|
+
*
|
|
84
|
+
* In `promise` and `promiseExit` modes, the setter observes the atom's next
|
|
85
|
+
* settled result, not a result correlated with that write. Overlapping writes
|
|
86
|
+
* can resolve with another write's result. Serialize writes when each caller
|
|
87
|
+
* needs its own result.
|
|
88
|
+
*
|
|
82
89
|
* @stability unstable
|
|
83
90
|
* @category composables
|
|
84
91
|
* @since 4.0.0
|
|
@@ -97,6 +104,13 @@ export declare const useAtomValue: <A>(atom: () => Atom.Atom<A>) => Readonly<Ref
|
|
|
97
104
|
/**
|
|
98
105
|
* Returns a setter for an atom, mounting it for the lifetime of the composable.
|
|
99
106
|
*
|
|
107
|
+
* **Gotchas**
|
|
108
|
+
*
|
|
109
|
+
* In `promise` and `promiseExit` modes, the setter observes the atom's next
|
|
110
|
+
* settled result, not a result correlated with that write. Overlapping writes
|
|
111
|
+
* can resolve with another write's result. Serialize writes when each caller
|
|
112
|
+
* needs its own result.
|
|
113
|
+
*
|
|
100
114
|
* @stability unstable
|
|
101
115
|
* @category composables
|
|
102
116
|
* @since 4.0.0
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAA;AACnC,OAAO,KAAK,KAAK,WAAW,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,KAAK,IAAI,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,KAAK,OAAO,MAAM,2BAA2B,CAAA;AACzD,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAsC,KAAK,YAAY,EAAE,KAAK,GAAG,EAA2B,MAAM,KAAK,CAAA;AAE9G;;;;;;GAMG;AACH,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAA;AAE9D;;;;;;GAMG;AACH,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAA;AAE5D;;;;;;GAMG;AACH,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAA;AAE9C;;;;;;GAMG;AACH,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAA;AAEpD;;;;;;GAMG;AACH,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAA;AAE5D;;;;;;GAMG;AACH,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAA;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAAiD,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,CAAA;AAEhH;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,YAAkC,CAAA;AAE7E;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QAAO,YAAY,CAAC,YAE9C,CAAA;AAcD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAA;AACnC,OAAO,KAAK,KAAK,WAAW,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,KAAK,IAAI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W,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CACjD,GACD,aAAa,SAAS,IAAI,GAAG,CACzB,CACE,KAAK,EAAE,CAAC,EACR,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;CAC1C,GAAG,SAAS,KACV,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAChG,GACH,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAQxC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,WAAW,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,KAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAWpF,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -99,6 +99,13 @@ const useAtomValueRef = atom => {
|
|
|
99
99
|
/**
|
|
100
100
|
* Returns a reactive atom value and a setter with the requested write mode.
|
|
101
101
|
*
|
|
102
|
+
* **Gotchas**
|
|
103
|
+
*
|
|
104
|
+
* In `promise` and `promiseExit` modes, the setter observes the atom's next
|
|
105
|
+
* settled result, not a result correlated with that write. Overlapping writes
|
|
106
|
+
* can resolve with another write's result. Serialize writes when each caller
|
|
107
|
+
* needs its own result.
|
|
108
|
+
*
|
|
102
109
|
* @stability unstable
|
|
103
110
|
* @category composables
|
|
104
111
|
* @since 4.0.0
|
|
@@ -136,6 +143,13 @@ function setAtom(registry, atomRef, options) {
|
|
|
136
143
|
/**
|
|
137
144
|
* Returns a setter for an atom, mounting it for the lifetime of the composable.
|
|
138
145
|
*
|
|
146
|
+
* **Gotchas**
|
|
147
|
+
*
|
|
148
|
+
* In `promise` and `promiseExit` modes, the setter observes the atom's next
|
|
149
|
+
* settled result, not a result correlated with that write. Overlapping writes
|
|
150
|
+
* can resolve with another write's result. Serialize writes when each caller
|
|
151
|
+
* needs its own result.
|
|
152
|
+
*
|
|
139
153
|
* @stability unstable
|
|
140
154
|
* @category composables
|
|
141
155
|
* @since 4.0.0
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;AAMA,OAAO,KAAK,KAAK,MAAM,cAAc;AACrC,OAAO,KAAK,MAAM,MAAM,eAAe;AACvC,OAAO,KAAK,IAAI,MAAM,aAAa;AAInC,OAAO,KAAK,YAAY,MAAM,gCAAgC;AAC9D,SAAS,QAAQ,EAAoB,MAAM,EAA+B,UAAU,EAAE,WAAW,QAAQ,KAAK;AAE9G;;;;;;;AAOA,OAAO,KAAK,YAAY,MAAM,gCAAgC;AAE9D;;;;;;;AAOA,OAAO,KAAK,WAAW,MAAM,+BAA+B;AAE5D;;;;;;;AAOA,OAAO,KAAK,IAAI,MAAM,wBAAwB;AAE9C;;;;;;;AAOA,OAAO,KAAK,OAAO,MAAM,2BAA2B;AAEpD;;;;;;;AAOA,OAAO,KAAK,WAAW,MAAM,+BAA+B;AAE5D;;;;;;;AAOA,OAAO,KAAK,OAAO,MAAM,2BAA2B;AAEpD;;;;;;;AAOA,OAAO,MAAM,WAAW,gBAAG,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAA4C;AAEhH;;;;;;;AAOA,OAAO,MAAM,eAAe,gBAA8B,YAAY,CAAC,IAAI,EAAE;AAE7E;;;;;;;AAOA,OAAO,MAAM,cAAc,GAAG,MAAgC;EAC5D,OAAO,MAAM,CAAC,WAAW,EAAE,eAAe,CAAC;AAC7C,CAAC;AAED,MAAM,eAAe,GAA8B,IAAa,IAAI;EAClE,MAAM,QAAQ,GAAG,cAAc,EAAE;EACjC,MAAM,OAAO,GAAG,Q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AAE,IAAO,IAAI;MAClC,KAAK,CAAC,KAAK,GAAG,IAAI;IACpB,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK;EACzB,CAAC,CAAC;EACF,OAAO,KAAyB;AAClC,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/atom-vue",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Vue bindings for the Effect Atom modules",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"provenance": true
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"vue": "^3.5.
|
|
51
|
-
"effect": "^4.0.
|
|
50
|
+
"vue": "^3.5.44",
|
|
51
|
+
"effect": "^4.0.6"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"vue": ">=3.5.39 <4.0.0",
|
|
55
|
-
"effect": "^4.0.
|
|
55
|
+
"effect": "^4.0.6"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "tsc -b tsconfig.json && pnpm babel",
|
package/src/index.ts
CHANGED
|
@@ -111,6 +111,13 @@ const useAtomValueRef = <A extends Atom.Atom<any>>(atom: () => A) => {
|
|
|
111
111
|
/**
|
|
112
112
|
* Returns a reactive atom value and a setter with the requested write mode.
|
|
113
113
|
*
|
|
114
|
+
* **Gotchas**
|
|
115
|
+
*
|
|
116
|
+
* In `promise` and `promiseExit` modes, the setter observes the atom's next
|
|
117
|
+
* settled result, not a result correlated with that write. Overlapping writes
|
|
118
|
+
* can resolve with another write's result. Serialize writes when each caller
|
|
119
|
+
* needs its own result.
|
|
120
|
+
*
|
|
114
121
|
* @stability unstable
|
|
115
122
|
* @category composables
|
|
116
123
|
* @since 4.0.0
|
|
@@ -194,6 +201,13 @@ function setAtom<R, W, Mode extends "value" | "promise" | "promiseExit" = never>
|
|
|
194
201
|
/**
|
|
195
202
|
* Returns a setter for an atom, mounting it for the lifetime of the composable.
|
|
196
203
|
*
|
|
204
|
+
* **Gotchas**
|
|
205
|
+
*
|
|
206
|
+
* In `promise` and `promiseExit` modes, the setter observes the atom's next
|
|
207
|
+
* settled result, not a result correlated with that write. Overlapping writes
|
|
208
|
+
* can resolve with another write's result. Serialize writes when each caller
|
|
209
|
+
* needs its own result.
|
|
210
|
+
*
|
|
197
211
|
* @stability unstable
|
|
198
212
|
* @category composables
|
|
199
213
|
* @since 4.0.0
|