Skip to content

Commit b8ac3aa

Browse files
nl0renovate[bot]
andauthored
Update effect (#4387)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 3c8e547 commit b8ac3aa

File tree

15 files changed

+311
-71
lines changed

15 files changed

+311
-71
lines changed

catalog/app/components/Assistant/Model/GlobalContext/__snapshots__/navigation.spec.ts.snap

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
2424
"enum": [
2525
"Boolean",
2626
],
27+
"type": "string",
2728
},
2829
"value": {
2930
"$ref": "#/$defs/BooleanPredicateState",
@@ -60,6 +61,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
6061
"enum": [
6162
"Datetime",
6263
],
64+
"type": "string",
6365
},
6466
"value": {
6567
"$ref": "#/$defs/DatetimePredicateState",
@@ -92,6 +94,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
9294
"enum": [
9395
"KeywordEnum",
9496
],
97+
"type": "string",
9598
},
9699
"value": {
97100
"$ref": "#/$defs/KeywordEnumPredicateState",
@@ -124,6 +127,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
124127
"enum": [
125128
"KeywordWildcard",
126129
],
130+
"type": "string",
127131
},
128132
"value": {
129133
"$ref": "#/$defs/KeywordWildcardPredicateState",
@@ -156,6 +160,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
156160
"enum": [
157161
"Number",
158162
],
163+
"type": "string",
159164
},
160165
"value": {
161166
"$ref": "#/$defs/NumberPredicateState",
@@ -185,6 +190,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
185190
"enum": [
186191
"Text",
187192
],
193+
"type": "string",
188194
},
189195
"value": {
190196
"$ref": "#/$defs/TextPredicateState",
@@ -211,6 +217,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
211217
"enum": [
212218
"home",
213219
],
220+
"type": "string",
214221
},
215222
"params": {
216223
"$id": "/schemas/{}",
@@ -238,6 +245,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
238245
"enum": [
239246
"install",
240247
],
248+
"type": "string",
241249
},
242250
"params": {
243251
"$id": "/schemas/{}",
@@ -265,6 +273,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
265273
"enum": [
266274
"search",
267275
],
276+
"type": "string",
268277
},
269278
"params": {
270279
"additionalProperties": false,
@@ -285,18 +294,21 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
285294
"BEST_MATCH",
286295
],
287296
"title": "BEST_MATCH",
297+
"type": "string",
288298
},
289299
{
290300
"enum": [
291301
"NEWEST",
292302
],
293303
"title": "NEWEST",
304+
"type": "string",
294305
},
295306
{
296307
"enum": [
297308
"OLDEST",
298309
],
299310
"title": "OLDEST",
311+
"type": "string",
300312
},
301313
],
302314
"description": "Order of search results",
@@ -318,6 +330,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
318330
"enum": [
319331
"modified",
320332
],
333+
"type": "string",
321334
},
322335
"predicate": {
323336
"$ref": "#/$defs/DatetimePredicateState",
@@ -337,6 +350,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
337350
"enum": [
338351
"size",
339352
],
353+
"type": "string",
340354
},
341355
"predicate": {
342356
"$ref": "#/$defs/NumberPredicateState",
@@ -356,6 +370,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
356370
"enum": [
357371
"name",
358372
],
373+
"type": "string",
359374
},
360375
"predicate": {
361376
"$ref": "#/$defs/KeywordWildcardPredicateState",
@@ -375,6 +390,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
375390
"enum": [
376391
"hash",
377392
],
393+
"type": "string",
378394
},
379395
"predicate": {
380396
"$ref": "#/$defs/KeywordWildcardPredicateState",
@@ -394,6 +410,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
394410
"enum": [
395411
"entries",
396412
],
413+
"type": "string",
397414
},
398415
"predicate": {
399416
"$ref": "#/$defs/NumberPredicateState",
@@ -413,6 +430,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
413430
"enum": [
414431
"comment",
415432
],
433+
"type": "string",
416434
},
417435
"predicate": {
418436
"$ref": "#/$defs/TextPredicateState",
@@ -432,6 +450,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
432450
"enum": [
433451
"workflow",
434452
],
453+
"type": "string",
435454
},
436455
"predicate": {
437456
"$ref": "#/$defs/KeywordEnumPredicateState",
@@ -459,6 +478,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
459478
"p",
460479
],
461480
"title": "Result type: Quilt Package",
481+
"type": "string",
462482
},
463483
"userMetaFilters": {
464484
"description": "Filter results by user metadata",
@@ -520,6 +540,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
520540
"enum": [
521541
"modified",
522542
],
543+
"type": "string",
523544
},
524545
"predicate": {
525546
"$ref": "#/$defs/DatetimePredicateState",
@@ -539,6 +560,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
539560
"enum": [
540561
"size",
541562
],
563+
"type": "string",
542564
},
543565
"predicate": {
544566
"$ref": "#/$defs/NumberPredicateState",
@@ -558,6 +580,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
558580
"enum": [
559581
"ext",
560582
],
583+
"type": "string",
561584
},
562585
"predicate": {
563586
"$ref": "#/$defs/KeywordEnumPredicateState",
@@ -577,6 +600,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
577600
"enum": [
578601
"key",
579602
],
603+
"type": "string",
580604
},
581605
"predicate": {
582606
"$ref": "#/$defs/KeywordWildcardPredicateState",
@@ -596,6 +620,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
596620
"enum": [
597621
"content",
598622
],
623+
"type": "string",
599624
},
600625
"predicate": {
601626
"$ref": "#/$defs/TextPredicateState",
@@ -615,6 +640,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
615640
"enum": [
616641
"deleted",
617642
],
643+
"type": "string",
618644
},
619645
"predicate": {
620646
"$ref": "#/$defs/BooleanPredicateState",
@@ -637,6 +663,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
637663
"o",
638664
],
639665
"title": "Result type: S3 Object",
666+
"type": "string",
640667
},
641668
},
642669
"required": [
@@ -674,6 +701,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
674701
"enum": [
675702
"activate",
676703
],
704+
"type": "string",
677705
},
678706
"params": {
679707
"$id": "/schemas/{}",
@@ -701,6 +729,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
701729
"enum": [
702730
"bucket.object",
703731
],
732+
"type": "string",
704733
},
705734
"params": {
706735
"additionalProperties": false,
@@ -745,6 +774,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
745774
"enum": [
746775
"bucket.prefix",
747776
],
777+
"type": "string",
748778
},
749779
"params": {
750780
"additionalProperties": false,
@@ -779,6 +809,7 @@ exports[`components/Assistant/Model/GlobalTools/navigation NavigateSchema produc
779809
"enum": [
780810
"bucket.overview",
781811
],
812+
"type": "string",
782813
},
783814
"params": {
784815
"additionalProperties": false,

catalog/app/components/Assistant/Model/GlobalContext/navigation.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as Eff from 'effect'
2-
import { JSONSchema, Schema } from '@effect/schema'
32

43
import * as nav from './navigation'
54

@@ -12,7 +11,7 @@ describe('components/Assistant/Model/GlobalTools/navigation', () => {
1211
describe('NavigateSchema', () => {
1312
describe('produced JSON Schema', () => {
1413
it('should match the snapshot', () => {
15-
const jsonSchema = JSONSchema.make(nav.NavigateSchema)
14+
const jsonSchema = Eff.JSONSchema.make(nav.NavigateSchema)
1615
expect(jsonSchema).toMatchSnapshot()
1716
})
1817
})
@@ -80,7 +79,7 @@ describe('components/Assistant/Model/GlobalTools/navigation', () => {
8079
]
8180

8281
const encode = Eff.flow(
83-
Schema.decodeUnknown(nav.NavigableRouteSchema),
82+
Eff.Schema.decodeUnknown(nav.NavigableRouteSchema),
8483
Eff.Effect.andThen(nav.locationFromRoute),
8584
Eff.Effect.runPromise,
8685
)

catalog/app/components/Assistant/Model/GlobalContext/navigation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as Eff from 'effect'
2+
import { Schema as S } from 'effect'
23
import * as React from 'react'
34
import * as RR from 'react-router-dom'
4-
import { Schema as S } from '@effect/schema'
55

66
import bucketRoutes from 'containers/Bucket/Routes'
77
import search from 'containers/Search/Route'

catalog/app/components/Assistant/Model/GlobalContext/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { basename, extname } from 'path'
22

33
import type AWSSDK from 'aws-sdk'
44
import * as Eff from 'effect'
5-
import * as S from '@effect/schema/Schema'
5+
import { Schema as S } from 'effect'
66

77
import cfg from 'constants/config'
88
import { S3ObjectLocation } from 'model/S3'

catalog/app/components/Assistant/Model/Tool.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as Eff from 'effect'
22
import * as React from 'react'
3-
import { JSONSchema, Schema } from '@effect/schema'
43

54
import * as Content from './Content'
65

@@ -24,16 +23,19 @@ export type Executor<I> = (params: I) => Eff.Effect.Effect<ResultOption>
2423

2524
export interface Descriptor<I> {
2625
description?: string
27-
schema: JSONSchema.JsonSchema7Root
26+
schema: Eff.JSONSchema.JsonSchema7Root
2827
executor: Executor<I>
2928
}
3029

3130
export type Collection = Record<string, Descriptor<any>>
3231

33-
export function make<A, I>(schema: Schema.Schema<A, I>, fn: Executor<A>): Descriptor<A> {
34-
const jsonSchema = JSONSchema.make(schema)
32+
export function make<A, I>(
33+
schema: Eff.Schema.Schema<A, I>,
34+
fn: Executor<A>,
35+
): Descriptor<A> {
36+
const jsonSchema = Eff.JSONSchema.make(schema)
3537

36-
const decode = Schema.decodeUnknown(schema, {
38+
const decode = Eff.Schema.decodeUnknown(schema, {
3739
errors: 'all',
3840
onExcessProperty: 'error',
3941
})
@@ -67,7 +69,7 @@ export function make<A, I>(schema: Schema.Schema<A, I>, fn: Executor<A>): Descri
6769
const EMPTY_DEPS: React.DependencyList = []
6870

6971
export function useMakeTool<A, I>(
70-
schema: Schema.Schema<A, I>,
72+
schema: Eff.Schema.Schema<A, I>,
7173
fn: Executor<A>,
7274
deps: React.DependencyList = EMPTY_DEPS,
7375
): Descriptor<A> {

catalog/app/containers/Bucket/Routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as Eff from 'effect'
2-
import * as S from '@effect/schema/Schema'
2+
import { Schema as S } from 'effect'
33

44
import * as routes from 'constants/routes'
55
// import * as Model from 'model'

catalog/app/containers/Bucket/Workflows/search.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as S from '@effect/schema/Schema'
1+
import { Schema as S } from 'effect'
22

33
import SearchRoute from 'containers/Search/Route'
44
import * as SearchModel from 'containers/Search/model'

catalog/app/containers/Search/Filter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as Eff from 'effect'
2-
import * as S from '@effect/schema/Schema'
2+
import { Schema as S } from 'effect'
33

44
import * as Nav from 'utils/Navigation'
55

catalog/app/containers/Search/Predicates.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as dateFns from 'date-fns'
22
import * as Eff from 'effect'
3-
import * as S from '@effect/schema/Schema'
3+
import { Schema as S } from 'effect'
44

55
import { JsonRecord, Json } from 'utils/types'
66

catalog/app/containers/Search/Route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as Eff from 'effect'
2-
import * as S from '@effect/schema/Schema'
2+
import { Schema as S } from 'effect'
33

44
import * as SearchModel from 'containers/Search/model'
55
import * as routes from 'constants/routes'

0 commit comments

Comments
 (0)