@arrirpc/schema 0.70.1 → 0.71.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 +41 -39
- package/dist/index.cjs +35 -28
- package/dist/index.d.cts +17 -10
- package/dist/index.d.mts +17 -10
- package/dist/index.d.ts +17 -10
- package/dist/index.mjs +35 -30
- package/dist/shared/{schema.TlNJgMz1.cjs → schema.BcsXcrqv.cjs} +380 -256
- package/dist/shared/{schema.C-0ZU_OQ.d.cts → schema.DLX0nTwB.d.cts} +4 -3
- package/dist/shared/{schema.C-0ZU_OQ.d.mts → schema.DLX0nTwB.d.mts} +4 -3
- package/dist/shared/{schema.C-0ZU_OQ.d.ts → schema.DLX0nTwB.d.ts} +4 -3
- package/dist/shared/{schema.lowJcmic.mjs → schema.O5uzRO_D.mjs} +379 -257
- package/dist/testSuites.cjs +10 -10
- package/dist/testSuites.d.cts +6 -5
- package/dist/testSuites.d.mts +6 -5
- package/dist/testSuites.d.ts +6 -5
- package/dist/testSuites.mjs +10 -10
- package/package.json +3 -2
package/dist/testSuites.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('@arrirpc/type-defs');
|
|
4
4
|
require('scule');
|
|
5
|
-
const timestamp = require('./shared/schema.
|
|
5
|
+
const timestamp = require('./shared/schema.BcsXcrqv.cjs');
|
|
6
6
|
|
|
7
7
|
const User = timestamp.object({
|
|
8
8
|
id: timestamp.string(),
|
|
@@ -127,7 +127,7 @@ world`,
|
|
|
127
127
|
},
|
|
128
128
|
"nullable float64": {
|
|
129
129
|
schema: timestamp.nullable(timestamp.float64()),
|
|
130
|
-
goodInputs: [null, 113511.5, -
|
|
130
|
+
goodInputs: [null, 113511.5, -1351351.05],
|
|
131
131
|
badInputs: ["hello world", true]
|
|
132
132
|
},
|
|
133
133
|
float32: {
|
|
@@ -177,7 +177,7 @@ world`,
|
|
|
177
177
|
"nullable int16": {
|
|
178
178
|
schema: timestamp.nullable(timestamp.int16()),
|
|
179
179
|
goodInputs: [null, -32768, 32767],
|
|
180
|
-
badInputs: [
|
|
180
|
+
badInputs: [undefined, "hello world", 1.5]
|
|
181
181
|
},
|
|
182
182
|
int8: {
|
|
183
183
|
schema: timestamp.int8(),
|
|
@@ -192,7 +192,7 @@ world`,
|
|
|
192
192
|
"nullable uint8": {
|
|
193
193
|
schema: timestamp.nullable(timestamp.uint8()),
|
|
194
194
|
goodInputs: [0, 255, null],
|
|
195
|
-
badInputs: [
|
|
195
|
+
badInputs: [undefined, -1, 1.5, "hello world"]
|
|
196
196
|
},
|
|
197
197
|
enum: {
|
|
198
198
|
schema: timestamp.stringEnum(["A", "B", "C"]),
|
|
@@ -259,7 +259,7 @@ world`,
|
|
|
259
259
|
type: "text",
|
|
260
260
|
title: "Hello World",
|
|
261
261
|
content: "Hello World",
|
|
262
|
-
tags:
|
|
262
|
+
tags: undefined,
|
|
263
263
|
createdAt: /* @__PURE__ */ new Date(),
|
|
264
264
|
updatedAt: /* @__PURE__ */ new Date(),
|
|
265
265
|
numComments: 134,
|
|
@@ -276,7 +276,7 @@ world`,
|
|
|
276
276
|
userId: "2",
|
|
277
277
|
user: {
|
|
278
278
|
id: "2",
|
|
279
|
-
photo:
|
|
279
|
+
photo: undefined
|
|
280
280
|
},
|
|
281
281
|
text: "You suck"
|
|
282
282
|
},
|
|
@@ -285,7 +285,7 @@ world`,
|
|
|
285
285
|
userId: "3",
|
|
286
286
|
user: {
|
|
287
287
|
id: "3",
|
|
288
|
-
photo:
|
|
288
|
+
photo: undefined
|
|
289
289
|
},
|
|
290
290
|
imageUrl: ""
|
|
291
291
|
}
|
|
@@ -320,7 +320,7 @@ world`,
|
|
|
320
320
|
type: "text",
|
|
321
321
|
title: "Hello World",
|
|
322
322
|
content: "Hello World",
|
|
323
|
-
tags:
|
|
323
|
+
tags: undefined,
|
|
324
324
|
createdAt: /* @__PURE__ */ new Date(),
|
|
325
325
|
updatedAt: /* @__PURE__ */ new Date(),
|
|
326
326
|
numComments: 134,
|
|
@@ -337,7 +337,7 @@ world`,
|
|
|
337
337
|
userId: "2",
|
|
338
338
|
user: {
|
|
339
339
|
id: "2",
|
|
340
|
-
photo:
|
|
340
|
+
photo: undefined
|
|
341
341
|
},
|
|
342
342
|
text: "You suck"
|
|
343
343
|
},
|
|
@@ -346,7 +346,7 @@ world`,
|
|
|
346
346
|
userId: "3",
|
|
347
347
|
user: {
|
|
348
348
|
id: "3",
|
|
349
|
-
photo:
|
|
349
|
+
photo: undefined
|
|
350
350
|
},
|
|
351
351
|
imageUrl: ""
|
|
352
352
|
}
|
package/dist/testSuites.d.cts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { d as AObjectSchema, e as ADiscriminatorSchema, A as ASchema } from './shared/schema.
|
|
1
|
+
import { d as AObjectSchema, e as ADiscriminatorSchema, A as ASchema } from './shared/schema.DLX0nTwB.cjs';
|
|
2
2
|
import '@arrirpc/type-defs';
|
|
3
|
+
import '@standard-schema/spec';
|
|
3
4
|
|
|
4
5
|
type RecursiveUnion = {
|
|
5
|
-
type:
|
|
6
|
+
type: 'CHILD';
|
|
6
7
|
data: RecursiveUnion;
|
|
7
8
|
} | {
|
|
8
|
-
type:
|
|
9
|
+
type: 'CHILDREN';
|
|
9
10
|
data: RecursiveUnion[];
|
|
10
11
|
} | {
|
|
11
|
-
type:
|
|
12
|
+
type: 'TEXT';
|
|
12
13
|
data: string;
|
|
13
14
|
} | {
|
|
14
|
-
type:
|
|
15
|
+
type: 'SHAPE';
|
|
15
16
|
data: {
|
|
16
17
|
width: number;
|
|
17
18
|
height: number;
|
package/dist/testSuites.d.mts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { d as AObjectSchema, e as ADiscriminatorSchema, A as ASchema } from './shared/schema.
|
|
1
|
+
import { d as AObjectSchema, e as ADiscriminatorSchema, A as ASchema } from './shared/schema.DLX0nTwB.mjs';
|
|
2
2
|
import '@arrirpc/type-defs';
|
|
3
|
+
import '@standard-schema/spec';
|
|
3
4
|
|
|
4
5
|
type RecursiveUnion = {
|
|
5
|
-
type:
|
|
6
|
+
type: 'CHILD';
|
|
6
7
|
data: RecursiveUnion;
|
|
7
8
|
} | {
|
|
8
|
-
type:
|
|
9
|
+
type: 'CHILDREN';
|
|
9
10
|
data: RecursiveUnion[];
|
|
10
11
|
} | {
|
|
11
|
-
type:
|
|
12
|
+
type: 'TEXT';
|
|
12
13
|
data: string;
|
|
13
14
|
} | {
|
|
14
|
-
type:
|
|
15
|
+
type: 'SHAPE';
|
|
15
16
|
data: {
|
|
16
17
|
width: number;
|
|
17
18
|
height: number;
|
package/dist/testSuites.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { d as AObjectSchema, e as ADiscriminatorSchema, A as ASchema } from './shared/schema.
|
|
1
|
+
import { d as AObjectSchema, e as ADiscriminatorSchema, A as ASchema } from './shared/schema.DLX0nTwB.js';
|
|
2
2
|
import '@arrirpc/type-defs';
|
|
3
|
+
import '@standard-schema/spec';
|
|
3
4
|
|
|
4
5
|
type RecursiveUnion = {
|
|
5
|
-
type:
|
|
6
|
+
type: 'CHILD';
|
|
6
7
|
data: RecursiveUnion;
|
|
7
8
|
} | {
|
|
8
|
-
type:
|
|
9
|
+
type: 'CHILDREN';
|
|
9
10
|
data: RecursiveUnion[];
|
|
10
11
|
} | {
|
|
11
|
-
type:
|
|
12
|
+
type: 'TEXT';
|
|
12
13
|
data: string;
|
|
13
14
|
} | {
|
|
14
|
-
type:
|
|
15
|
+
type: 'SHAPE';
|
|
15
16
|
data: {
|
|
16
17
|
width: number;
|
|
17
18
|
height: number;
|
package/dist/testSuites.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@arrirpc/type-defs';
|
|
2
2
|
import 'scule';
|
|
3
|
-
import {
|
|
3
|
+
import { L as object, X as string, N as optional, J as nullable, G as int32, A as discriminator, x as boolean, Y as stringEnum, w as array, Z as timestamp, $ as uint32, v as any, K as number, R as record, S as recursive, E as float64, D as float32, H as int64, F as int16, _ as uint16, I as int8, a1 as uint8, P as partial, a0 as uint64, Q as pick, B as enumerator } from './shared/schema.O5uzRO_D.mjs';
|
|
4
4
|
|
|
5
5
|
const User = object({
|
|
6
6
|
id: string(),
|
|
@@ -125,7 +125,7 @@ world`,
|
|
|
125
125
|
},
|
|
126
126
|
"nullable float64": {
|
|
127
127
|
schema: nullable(float64()),
|
|
128
|
-
goodInputs: [null, 113511.5, -
|
|
128
|
+
goodInputs: [null, 113511.5, -1351351.05],
|
|
129
129
|
badInputs: ["hello world", true]
|
|
130
130
|
},
|
|
131
131
|
float32: {
|
|
@@ -175,7 +175,7 @@ world`,
|
|
|
175
175
|
"nullable int16": {
|
|
176
176
|
schema: nullable(int16()),
|
|
177
177
|
goodInputs: [null, -32768, 32767],
|
|
178
|
-
badInputs: [
|
|
178
|
+
badInputs: [undefined, "hello world", 1.5]
|
|
179
179
|
},
|
|
180
180
|
int8: {
|
|
181
181
|
schema: int8(),
|
|
@@ -190,7 +190,7 @@ world`,
|
|
|
190
190
|
"nullable uint8": {
|
|
191
191
|
schema: nullable(uint8()),
|
|
192
192
|
goodInputs: [0, 255, null],
|
|
193
|
-
badInputs: [
|
|
193
|
+
badInputs: [undefined, -1, 1.5, "hello world"]
|
|
194
194
|
},
|
|
195
195
|
enum: {
|
|
196
196
|
schema: stringEnum(["A", "B", "C"]),
|
|
@@ -257,7 +257,7 @@ world`,
|
|
|
257
257
|
type: "text",
|
|
258
258
|
title: "Hello World",
|
|
259
259
|
content: "Hello World",
|
|
260
|
-
tags:
|
|
260
|
+
tags: undefined,
|
|
261
261
|
createdAt: /* @__PURE__ */ new Date(),
|
|
262
262
|
updatedAt: /* @__PURE__ */ new Date(),
|
|
263
263
|
numComments: 134,
|
|
@@ -274,7 +274,7 @@ world`,
|
|
|
274
274
|
userId: "2",
|
|
275
275
|
user: {
|
|
276
276
|
id: "2",
|
|
277
|
-
photo:
|
|
277
|
+
photo: undefined
|
|
278
278
|
},
|
|
279
279
|
text: "You suck"
|
|
280
280
|
},
|
|
@@ -283,7 +283,7 @@ world`,
|
|
|
283
283
|
userId: "3",
|
|
284
284
|
user: {
|
|
285
285
|
id: "3",
|
|
286
|
-
photo:
|
|
286
|
+
photo: undefined
|
|
287
287
|
},
|
|
288
288
|
imageUrl: ""
|
|
289
289
|
}
|
|
@@ -318,7 +318,7 @@ world`,
|
|
|
318
318
|
type: "text",
|
|
319
319
|
title: "Hello World",
|
|
320
320
|
content: "Hello World",
|
|
321
|
-
tags:
|
|
321
|
+
tags: undefined,
|
|
322
322
|
createdAt: /* @__PURE__ */ new Date(),
|
|
323
323
|
updatedAt: /* @__PURE__ */ new Date(),
|
|
324
324
|
numComments: 134,
|
|
@@ -335,7 +335,7 @@ world`,
|
|
|
335
335
|
userId: "2",
|
|
336
336
|
user: {
|
|
337
337
|
id: "2",
|
|
338
|
-
photo:
|
|
338
|
+
photo: undefined
|
|
339
339
|
},
|
|
340
340
|
text: "You suck"
|
|
341
341
|
},
|
|
@@ -344,7 +344,7 @@ world`,
|
|
|
344
344
|
userId: "3",
|
|
345
345
|
user: {
|
|
346
346
|
id: "3",
|
|
347
|
-
photo:
|
|
347
|
+
photo: undefined
|
|
348
348
|
},
|
|
349
349
|
imageUrl: ""
|
|
350
350
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arrirpc/schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.71.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"scule": "^1.3.0",
|
|
26
26
|
"uncrypto": "^0.1.3",
|
|
27
|
-
"@
|
|
27
|
+
"@standard-schema/spec": "1.0.0-rc.0",
|
|
28
|
+
"@arrirpc/type-defs": "0.71.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"ajv": "^8.17.1",
|