vovk-hello-world 0.0.49 → 0.0.50
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 +5 -5
- package/index.cjs +3 -17
- package/index.d.cts +12 -29
- package/index.d.mts +12 -29
- package/index.mjs +3 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<!-- Generated by vovk-cli v0.0.1-draft.390 at 2025-11-
|
|
1
|
+
<!-- Generated by vovk-cli v0.0.1-draft.390 at 2025-11-02T08:54:18.822Z -->
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
# vovk-hello-world v0.0.
|
|
4
|
+
# vovk-hello-world v0.0.50 [](https://www.typescriptlang.org/) [](https://vovk.dev)
|
|
5
5
|
|
|
6
6
|
> A showcase for Next.js + Vovk.ts + Zod, demonstrating its capabilities with TypeScript, Rust, and Python RPC.
|
|
7
7
|
|
|
@@ -22,7 +22,7 @@ npm install vovk-hello-world
|
|
|
22
22
|
Update user by ID
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
`POST
|
|
25
|
+
`POST http://localhost:3000/api/users/{id}`
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
28
|
import { UserRPC } from 'vovk-hello-world';
|
|
@@ -80,7 +80,7 @@ console.log(response);
|
|
|
80
80
|
Stream tokens to the client
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
`GET
|
|
83
|
+
`GET http://localhost:3000/api/streams/tokens`
|
|
84
84
|
|
|
85
85
|
```ts
|
|
86
86
|
import { StreamRPC } from 'vovk-hello-world';
|
|
@@ -112,7 +112,7 @@ for await (const item of response) {
|
|
|
112
112
|
Get the OpenAPI spec for the "Hello World" app API
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
`GET
|
|
115
|
+
`GET http://localhost:3000/api/static/openapi.json`
|
|
116
116
|
|
|
117
117
|
```ts
|
|
118
118
|
import { OpenApiRPC } from 'vovk-hello-world';
|
package/index.cjs
CHANGED
|
@@ -178,20 +178,6 @@ var _meta_default = {
|
|
|
178
178
|
$schema: "https://vovk.dev/api/schema/v3/meta.json",
|
|
179
179
|
config: {
|
|
180
180
|
"libs": {},
|
|
181
|
-
"outputConfig": {
|
|
182
|
-
"imports": { "validateOnClient": "vovk-ajv" },
|
|
183
|
-
"openAPIObject": { "info": {
|
|
184
|
-
"title": "\"Hello World\" app API",
|
|
185
|
-
"description": "API for \"Hello World\" app hosted at https://hello-world.vovk.dev/. Source code is available on Github https://github.com/finom/vovk-hello-world.",
|
|
186
|
-
"license": {
|
|
187
|
-
"name": "MIT",
|
|
188
|
-
"url": "https://opensource.org/licenses/MIT"
|
|
189
|
-
},
|
|
190
|
-
"version": "1.0.0"
|
|
191
|
-
} },
|
|
192
|
-
"origin": "",
|
|
193
|
-
"segments": {}
|
|
194
|
-
},
|
|
195
181
|
"$schema": "https://vovk.dev/api/schema/v3/config.json"
|
|
196
182
|
}
|
|
197
183
|
};
|
|
@@ -457,15 +443,15 @@ var openapi_default = {
|
|
|
457
443
|
//#region tmp_prebundle/index.ts
|
|
458
444
|
const UserRPC = (0, vovk.createRPC)(schema, "", "UserRPC", import("vovk"), {
|
|
459
445
|
validateOnClient: import("vovk-ajv"),
|
|
460
|
-
apiRoot: "
|
|
446
|
+
apiRoot: "http://localhost:3000/api"
|
|
461
447
|
});
|
|
462
448
|
const StreamRPC = (0, vovk.createRPC)(schema, "", "StreamRPC", import("vovk"), {
|
|
463
449
|
validateOnClient: import("vovk-ajv"),
|
|
464
|
-
apiRoot: "
|
|
450
|
+
apiRoot: "http://localhost:3000/api"
|
|
465
451
|
});
|
|
466
452
|
const OpenApiRPC = (0, vovk.createRPC)(schema, "static", "OpenApiRPC", import("vovk"), {
|
|
467
453
|
validateOnClient: import("vovk-ajv"),
|
|
468
|
-
apiRoot: "
|
|
454
|
+
apiRoot: "http://localhost:3000/api"
|
|
469
455
|
});
|
|
470
456
|
|
|
471
457
|
//#endregion
|
package/index.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vovk0 from "vovk";
|
|
2
2
|
import * as _standard_schema_spec0 from "@standard-schema/spec";
|
|
3
3
|
import * as zod0 from "zod";
|
|
4
4
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
5
5
|
import * as vovk_mjs_client_types0 from "vovk/mjs/client/types";
|
|
6
|
+
import * as openapi3_ts_oas310 from "openapi3-ts/oas31";
|
|
6
7
|
|
|
7
8
|
//#region tmp_prebundle/schema.d.ts
|
|
8
9
|
declare const schema: {
|
|
@@ -170,24 +171,6 @@ declare const schema: {
|
|
|
170
171
|
$schema: string;
|
|
171
172
|
config: {
|
|
172
173
|
libs: {};
|
|
173
|
-
outputConfig: {
|
|
174
|
-
imports: {
|
|
175
|
-
validateOnClient: string;
|
|
176
|
-
};
|
|
177
|
-
openAPIObject: {
|
|
178
|
-
info: {
|
|
179
|
-
title: string;
|
|
180
|
-
description: string;
|
|
181
|
-
license: {
|
|
182
|
-
name: string;
|
|
183
|
-
url: string;
|
|
184
|
-
};
|
|
185
|
-
version: string;
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
origin: string;
|
|
189
|
-
segments: {};
|
|
190
|
-
};
|
|
191
174
|
$schema: string;
|
|
192
175
|
};
|
|
193
176
|
};
|
|
@@ -392,7 +375,7 @@ declare namespace __json_default_export {
|
|
|
392
375
|
//#endregion
|
|
393
376
|
//#region tmp_prebundle/index.d.ts
|
|
394
377
|
declare const UserRPC: {
|
|
395
|
-
updateUser: vovk_mjs_client_types0.ClientMethod<((req:
|
|
378
|
+
updateUser: vovk_mjs_client_types0.ClientMethod<((req: vovk0.VovkRequest<{
|
|
396
379
|
email: string;
|
|
397
380
|
profile: {
|
|
398
381
|
name: string;
|
|
@@ -431,8 +414,8 @@ declare const UserRPC: {
|
|
|
431
414
|
};
|
|
432
415
|
isRPC?: boolean;
|
|
433
416
|
} & {
|
|
434
|
-
schema: Omit<
|
|
435
|
-
wrapper?: (req:
|
|
417
|
+
schema: Omit<vovk0.VovkHandlerSchema, "httpMethod" | "path"> & Partial<vovk0.VovkHandlerSchema>;
|
|
418
|
+
wrapper?: (req: vovk0.VovkRequest<any, any, any>, params: {
|
|
436
419
|
id: string;
|
|
437
420
|
}) => Promise<{
|
|
438
421
|
success: true;
|
|
@@ -518,8 +501,8 @@ declare const UserRPC: {
|
|
|
518
501
|
}, {
|
|
519
502
|
apiRoot?: string;
|
|
520
503
|
disableClientValidation?: boolean;
|
|
521
|
-
validateOnClient?:
|
|
522
|
-
validateOnClient:
|
|
504
|
+
validateOnClient?: vovk0.VovkValidateOnClient<unknown> | Promise<{
|
|
505
|
+
validateOnClient: vovk0.VovkValidateOnClient<unknown>;
|
|
523
506
|
}> | undefined;
|
|
524
507
|
interpretAs?: string;
|
|
525
508
|
init?: RequestInit;
|
|
@@ -541,8 +524,8 @@ declare const StreamRPC: {
|
|
|
541
524
|
};
|
|
542
525
|
isRPC?: boolean;
|
|
543
526
|
} & {
|
|
544
|
-
schema: Omit<
|
|
545
|
-
wrapper?: (req:
|
|
527
|
+
schema: Omit<vovk0.VovkHandlerSchema, "httpMethod" | "path"> & Partial<vovk0.VovkHandlerSchema>;
|
|
528
|
+
wrapper?: (req: vovk0.VovkRequest<any, any, any>, params: undefined) => AsyncGenerator<{
|
|
546
529
|
message: string;
|
|
547
530
|
}, void, unknown>;
|
|
548
531
|
} & {
|
|
@@ -592,15 +575,15 @@ declare const StreamRPC: {
|
|
|
592
575
|
}, {
|
|
593
576
|
apiRoot?: string;
|
|
594
577
|
disableClientValidation?: boolean;
|
|
595
|
-
validateOnClient?:
|
|
596
|
-
validateOnClient:
|
|
578
|
+
validateOnClient?: vovk0.VovkValidateOnClient<unknown> | Promise<{
|
|
579
|
+
validateOnClient: vovk0.VovkValidateOnClient<unknown>;
|
|
597
580
|
}> | undefined;
|
|
598
581
|
interpretAs?: string;
|
|
599
582
|
init?: RequestInit;
|
|
600
583
|
}, unknown>;
|
|
601
584
|
};
|
|
602
585
|
declare const OpenApiRPC: {
|
|
603
|
-
getSpec: () =>
|
|
586
|
+
getSpec: () => openapi3_ts_oas310.OpenAPIObject;
|
|
604
587
|
};
|
|
605
588
|
//#endregion
|
|
606
589
|
export { OpenApiRPC, StreamRPC, UserRPC, __json_default_export as openapi, schema };
|
package/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vovk0 from "vovk";
|
|
2
2
|
import * as _standard_schema_spec0 from "@standard-schema/spec";
|
|
3
3
|
import * as zod0 from "zod";
|
|
4
4
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
5
5
|
import * as vovk_mjs_client_types0 from "vovk/mjs/client/types";
|
|
6
|
+
import * as openapi3_ts_oas310 from "openapi3-ts/oas31";
|
|
6
7
|
|
|
7
8
|
//#region tmp_prebundle/schema.d.ts
|
|
8
9
|
declare const schema: {
|
|
@@ -170,24 +171,6 @@ declare const schema: {
|
|
|
170
171
|
$schema: string;
|
|
171
172
|
config: {
|
|
172
173
|
libs: {};
|
|
173
|
-
outputConfig: {
|
|
174
|
-
imports: {
|
|
175
|
-
validateOnClient: string;
|
|
176
|
-
};
|
|
177
|
-
openAPIObject: {
|
|
178
|
-
info: {
|
|
179
|
-
title: string;
|
|
180
|
-
description: string;
|
|
181
|
-
license: {
|
|
182
|
-
name: string;
|
|
183
|
-
url: string;
|
|
184
|
-
};
|
|
185
|
-
version: string;
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
origin: string;
|
|
189
|
-
segments: {};
|
|
190
|
-
};
|
|
191
174
|
$schema: string;
|
|
192
175
|
};
|
|
193
176
|
};
|
|
@@ -392,7 +375,7 @@ declare namespace __json_default_export {
|
|
|
392
375
|
//#endregion
|
|
393
376
|
//#region tmp_prebundle/index.d.ts
|
|
394
377
|
declare const UserRPC: {
|
|
395
|
-
updateUser: vovk_mjs_client_types0.ClientMethod<((req:
|
|
378
|
+
updateUser: vovk_mjs_client_types0.ClientMethod<((req: vovk0.VovkRequest<{
|
|
396
379
|
email: string;
|
|
397
380
|
profile: {
|
|
398
381
|
name: string;
|
|
@@ -431,8 +414,8 @@ declare const UserRPC: {
|
|
|
431
414
|
};
|
|
432
415
|
isRPC?: boolean;
|
|
433
416
|
} & {
|
|
434
|
-
schema: Omit<
|
|
435
|
-
wrapper?: (req:
|
|
417
|
+
schema: Omit<vovk0.VovkHandlerSchema, "httpMethod" | "path"> & Partial<vovk0.VovkHandlerSchema>;
|
|
418
|
+
wrapper?: (req: vovk0.VovkRequest<any, any, any>, params: {
|
|
436
419
|
id: string;
|
|
437
420
|
}) => Promise<{
|
|
438
421
|
success: true;
|
|
@@ -518,8 +501,8 @@ declare const UserRPC: {
|
|
|
518
501
|
}, {
|
|
519
502
|
apiRoot?: string;
|
|
520
503
|
disableClientValidation?: boolean;
|
|
521
|
-
validateOnClient?:
|
|
522
|
-
validateOnClient:
|
|
504
|
+
validateOnClient?: vovk0.VovkValidateOnClient<unknown> | Promise<{
|
|
505
|
+
validateOnClient: vovk0.VovkValidateOnClient<unknown>;
|
|
523
506
|
}> | undefined;
|
|
524
507
|
interpretAs?: string;
|
|
525
508
|
init?: RequestInit;
|
|
@@ -541,8 +524,8 @@ declare const StreamRPC: {
|
|
|
541
524
|
};
|
|
542
525
|
isRPC?: boolean;
|
|
543
526
|
} & {
|
|
544
|
-
schema: Omit<
|
|
545
|
-
wrapper?: (req:
|
|
527
|
+
schema: Omit<vovk0.VovkHandlerSchema, "httpMethod" | "path"> & Partial<vovk0.VovkHandlerSchema>;
|
|
528
|
+
wrapper?: (req: vovk0.VovkRequest<any, any, any>, params: undefined) => AsyncGenerator<{
|
|
546
529
|
message: string;
|
|
547
530
|
}, void, unknown>;
|
|
548
531
|
} & {
|
|
@@ -592,15 +575,15 @@ declare const StreamRPC: {
|
|
|
592
575
|
}, {
|
|
593
576
|
apiRoot?: string;
|
|
594
577
|
disableClientValidation?: boolean;
|
|
595
|
-
validateOnClient?:
|
|
596
|
-
validateOnClient:
|
|
578
|
+
validateOnClient?: vovk0.VovkValidateOnClient<unknown> | Promise<{
|
|
579
|
+
validateOnClient: vovk0.VovkValidateOnClient<unknown>;
|
|
597
580
|
}> | undefined;
|
|
598
581
|
interpretAs?: string;
|
|
599
582
|
init?: RequestInit;
|
|
600
583
|
}, unknown>;
|
|
601
584
|
};
|
|
602
585
|
declare const OpenApiRPC: {
|
|
603
|
-
getSpec: () =>
|
|
586
|
+
getSpec: () => openapi3_ts_oas310.OpenAPIObject;
|
|
604
587
|
};
|
|
605
588
|
//#endregion
|
|
606
589
|
export { OpenApiRPC, StreamRPC, UserRPC, __json_default_export as openapi, schema };
|
package/index.mjs
CHANGED
|
@@ -154,20 +154,6 @@ var _meta_default = {
|
|
|
154
154
|
$schema: "https://vovk.dev/api/schema/v3/meta.json",
|
|
155
155
|
config: {
|
|
156
156
|
"libs": {},
|
|
157
|
-
"outputConfig": {
|
|
158
|
-
"imports": { "validateOnClient": "vovk-ajv" },
|
|
159
|
-
"openAPIObject": { "info": {
|
|
160
|
-
"title": "\"Hello World\" app API",
|
|
161
|
-
"description": "API for \"Hello World\" app hosted at https://hello-world.vovk.dev/. Source code is available on Github https://github.com/finom/vovk-hello-world.",
|
|
162
|
-
"license": {
|
|
163
|
-
"name": "MIT",
|
|
164
|
-
"url": "https://opensource.org/licenses/MIT"
|
|
165
|
-
},
|
|
166
|
-
"version": "1.0.0"
|
|
167
|
-
} },
|
|
168
|
-
"origin": "",
|
|
169
|
-
"segments": {}
|
|
170
|
-
},
|
|
171
157
|
"$schema": "https://vovk.dev/api/schema/v3/config.json"
|
|
172
158
|
}
|
|
173
159
|
};
|
|
@@ -433,15 +419,15 @@ var openapi_default = {
|
|
|
433
419
|
//#region tmp_prebundle/index.ts
|
|
434
420
|
const UserRPC = createRPC(schema, "", "UserRPC", import("vovk"), {
|
|
435
421
|
validateOnClient: import("vovk-ajv"),
|
|
436
|
-
apiRoot: "
|
|
422
|
+
apiRoot: "http://localhost:3000/api"
|
|
437
423
|
});
|
|
438
424
|
const StreamRPC = createRPC(schema, "", "StreamRPC", import("vovk"), {
|
|
439
425
|
validateOnClient: import("vovk-ajv"),
|
|
440
|
-
apiRoot: "
|
|
426
|
+
apiRoot: "http://localhost:3000/api"
|
|
441
427
|
});
|
|
442
428
|
const OpenApiRPC = createRPC(schema, "static", "OpenApiRPC", import("vovk"), {
|
|
443
429
|
validateOnClient: import("vovk-ajv"),
|
|
444
|
-
apiRoot: "
|
|
430
|
+
apiRoot: "http://localhost:3000/api"
|
|
445
431
|
});
|
|
446
432
|
|
|
447
433
|
//#endregion
|
package/package.json
CHANGED