-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path+page.svelte
54 lines (49 loc) · 1.41 KB
/
+page.svelte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<script lang="ts">
import { JsonView } from '@zerodevx/svelte-json-view';
export let data;
</script>
<h1>Validating {data.filepath}</h1>
{#await data.streamed.unknownJSONDoc}
<code>Fetching file from disk...</code>
{:then unknownJSONDoc}
<JsonView json={unknownJSONDoc} />
{/await}
<div style="margin-top: 20px">
<span>UDR Validation: </span>
{#await data.streamed.validatedUDRDoc}
<span>in progess...</span>
{:then validatedUDRDoc}
{#if validatedUDRDoc.valid}
<span style="color: green">
Successfully read "{validatedUDRDoc.contents.userIdentifier}".
</span>
{:else}
<span style="color: red">Error parsing {data.filepath}.</span>
{#each validatedUDRDoc.errors || [] as error}
<p style="color: red">{error.message}</p>
{/each}
{/if}
{/await}
<br />
<span>UDRnext Validation: </span>
{#await data.streamed.validatedUDRNextDoc}
<span>in progess...</span>
{:then validatedUDRNextDoc}
{#if validatedUDRNextDoc.valid}
<span style="color: green"
>Successfully read "{validatedUDRNextDoc.contents.userIdentifier}" with "{validatedUDRNextDoc
.contents.test}".</span
>
{:else}
<span style="color: red">Error parsing {data.filepath}.</span>
{#each validatedUDRNextDoc.errors || [] as error}
<span style="color: red">→ {error.message}</span>
{/each}
{/if}
{/await}
</div>
<style>
:global(body) {
font-family: Ubuntu, 'Helvetica Neue', sans-serif;
}
</style>