vovk-hello-world 0.0.56 → 0.0.58
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 +14 -29
- package/index.d.cts +7 -1
- package/index.d.mts +7 -1
- package/index.mjs +14 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<!-- Generated by vovk-cli v0.0.1-draft.
|
|
1
|
+
<!-- Generated by vovk-cli v0.0.1-draft.397 at 2025-11-07T07:40:56.991Z -->
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
# vovk-hello-world v0.0.
|
|
4
|
+
# vovk-hello-world v0.0.58 [](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';
|
|
@@ -84,7 +84,7 @@ console.log(response);
|
|
|
84
84
|
Stream tokens to the client
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
`GET
|
|
87
|
+
`GET http://localhost:3000/api/streams/tokens`
|
|
88
88
|
|
|
89
89
|
```ts
|
|
90
90
|
import { StreamRPC } from 'vovk-hello-world';
|
|
@@ -116,7 +116,7 @@ for await (const item of response) {
|
|
|
116
116
|
Get the OpenAPI spec for the "Hello World" app API
|
|
117
117
|
|
|
118
118
|
|
|
119
|
-
`GET
|
|
119
|
+
`GET http://localhost:3000/api/static/openapi.json`
|
|
120
120
|
|
|
121
121
|
```ts
|
|
122
122
|
import { OpenApiRPC } from 'vovk-hello-world';
|
package/index.cjs
CHANGED
|
@@ -1,28 +1,4 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
-
key = keys[i];
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
-
get: ((k) => from[k]).bind(null, key),
|
|
13
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
-
value: mod,
|
|
20
|
-
enumerable: true
|
|
21
|
-
}) : target, mod));
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
1
|
let vovk = require("vovk");
|
|
25
|
-
vovk = __toESM(vovk);
|
|
26
2
|
|
|
27
3
|
//#region .vovk-schema/root.json
|
|
28
4
|
var root_default = {
|
|
@@ -56,7 +32,8 @@ var root_default = {
|
|
|
56
32
|
"name": {
|
|
57
33
|
"description": "User full name",
|
|
58
34
|
"examples": ["John Doe", "Jane Smith"],
|
|
59
|
-
"type": "string"
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 2
|
|
60
37
|
},
|
|
61
38
|
"age": {
|
|
62
39
|
"description": "User age",
|
|
@@ -228,6 +205,13 @@ var openapi_default = {
|
|
|
228
205
|
"url": "https://opensource.org/licenses/MIT"
|
|
229
206
|
}
|
|
230
207
|
},
|
|
208
|
+
servers: [{
|
|
209
|
+
"url": "https://hello-world.vovk.dev",
|
|
210
|
+
"description": "Production"
|
|
211
|
+
}, {
|
|
212
|
+
"url": "http://localhost:3000",
|
|
213
|
+
"description": "Localhost"
|
|
214
|
+
}],
|
|
231
215
|
components: { "schemas": {
|
|
232
216
|
"HttpStatus": {
|
|
233
217
|
"type": "integer",
|
|
@@ -410,7 +394,8 @@ var openapi_default = {
|
|
|
410
394
|
"name": {
|
|
411
395
|
"description": "User full name",
|
|
412
396
|
"examples": ["John Doe", "Jane Smith"],
|
|
413
|
-
"type": "string"
|
|
397
|
+
"type": "string",
|
|
398
|
+
"minLength": 2
|
|
414
399
|
},
|
|
415
400
|
"age": {
|
|
416
401
|
"description": "User age",
|
|
@@ -493,15 +478,15 @@ var openapi_default = {
|
|
|
493
478
|
//#region tmp_prebundle/index.ts
|
|
494
479
|
const UserRPC = (0, vovk.createRPC)(schema, "", "UserRPC", import("vovk"), {
|
|
495
480
|
validateOnClient: import("vovk-ajv"),
|
|
496
|
-
apiRoot: "
|
|
481
|
+
apiRoot: "http://localhost:3000/api"
|
|
497
482
|
});
|
|
498
483
|
const StreamRPC = (0, vovk.createRPC)(schema, "", "StreamRPC", import("vovk"), {
|
|
499
484
|
validateOnClient: import("vovk-ajv"),
|
|
500
|
-
apiRoot: "
|
|
485
|
+
apiRoot: "http://localhost:3000/api"
|
|
501
486
|
});
|
|
502
487
|
const OpenApiRPC = (0, vovk.createRPC)(schema, "static", "OpenApiRPC", import("vovk"), {
|
|
503
488
|
validateOnClient: import("vovk-ajv"),
|
|
504
|
-
apiRoot: "
|
|
489
|
+
apiRoot: "http://localhost:3000/api"
|
|
505
490
|
});
|
|
506
491
|
|
|
507
492
|
//#endregion
|
package/index.d.cts
CHANGED
|
@@ -42,6 +42,7 @@ declare const schema: {
|
|
|
42
42
|
description: string;
|
|
43
43
|
examples: string[];
|
|
44
44
|
type: string;
|
|
45
|
+
minLength: number;
|
|
45
46
|
};
|
|
46
47
|
age: {
|
|
47
48
|
description: string;
|
|
@@ -198,6 +199,10 @@ declare namespace info {
|
|
|
198
199
|
let url: string;
|
|
199
200
|
}
|
|
200
201
|
}
|
|
202
|
+
declare let servers: {
|
|
203
|
+
url: string;
|
|
204
|
+
description: string;
|
|
205
|
+
}[];
|
|
201
206
|
declare namespace components {
|
|
202
207
|
namespace schemas {
|
|
203
208
|
namespace HttpStatus {
|
|
@@ -333,6 +338,7 @@ declare let paths: {
|
|
|
333
338
|
description: string;
|
|
334
339
|
examples: string[];
|
|
335
340
|
type: string;
|
|
341
|
+
minLength: number;
|
|
336
342
|
};
|
|
337
343
|
age: {
|
|
338
344
|
description: string;
|
|
@@ -401,7 +407,7 @@ declare let paths: {
|
|
|
401
407
|
};
|
|
402
408
|
};
|
|
403
409
|
declare namespace __json_default_export {
|
|
404
|
-
export { openapi, info, components, paths };
|
|
410
|
+
export { openapi, info, servers, components, paths };
|
|
405
411
|
}
|
|
406
412
|
//#endregion
|
|
407
413
|
//#region tmp_prebundle/index.d.ts
|
package/index.d.mts
CHANGED
|
@@ -42,6 +42,7 @@ declare const schema: {
|
|
|
42
42
|
description: string;
|
|
43
43
|
examples: string[];
|
|
44
44
|
type: string;
|
|
45
|
+
minLength: number;
|
|
45
46
|
};
|
|
46
47
|
age: {
|
|
47
48
|
description: string;
|
|
@@ -198,6 +199,10 @@ declare namespace info {
|
|
|
198
199
|
let url: string;
|
|
199
200
|
}
|
|
200
201
|
}
|
|
202
|
+
declare let servers: {
|
|
203
|
+
url: string;
|
|
204
|
+
description: string;
|
|
205
|
+
}[];
|
|
201
206
|
declare namespace components {
|
|
202
207
|
namespace schemas {
|
|
203
208
|
namespace HttpStatus {
|
|
@@ -333,6 +338,7 @@ declare let paths: {
|
|
|
333
338
|
description: string;
|
|
334
339
|
examples: string[];
|
|
335
340
|
type: string;
|
|
341
|
+
minLength: number;
|
|
336
342
|
};
|
|
337
343
|
age: {
|
|
338
344
|
description: string;
|
|
@@ -401,7 +407,7 @@ declare let paths: {
|
|
|
401
407
|
};
|
|
402
408
|
};
|
|
403
409
|
declare namespace __json_default_export {
|
|
404
|
-
export { openapi, info, components, paths };
|
|
410
|
+
export { openapi, info, servers, components, paths };
|
|
405
411
|
}
|
|
406
412
|
//#endregion
|
|
407
413
|
//#region tmp_prebundle/index.d.ts
|
package/index.mjs
CHANGED
|
@@ -32,7 +32,8 @@ var root_default = {
|
|
|
32
32
|
"name": {
|
|
33
33
|
"description": "User full name",
|
|
34
34
|
"examples": ["John Doe", "Jane Smith"],
|
|
35
|
-
"type": "string"
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 2
|
|
36
37
|
},
|
|
37
38
|
"age": {
|
|
38
39
|
"description": "User age",
|
|
@@ -204,6 +205,13 @@ var openapi_default = {
|
|
|
204
205
|
"url": "https://opensource.org/licenses/MIT"
|
|
205
206
|
}
|
|
206
207
|
},
|
|
208
|
+
servers: [{
|
|
209
|
+
"url": "https://hello-world.vovk.dev",
|
|
210
|
+
"description": "Production"
|
|
211
|
+
}, {
|
|
212
|
+
"url": "http://localhost:3000",
|
|
213
|
+
"description": "Localhost"
|
|
214
|
+
}],
|
|
207
215
|
components: { "schemas": {
|
|
208
216
|
"HttpStatus": {
|
|
209
217
|
"type": "integer",
|
|
@@ -386,7 +394,8 @@ var openapi_default = {
|
|
|
386
394
|
"name": {
|
|
387
395
|
"description": "User full name",
|
|
388
396
|
"examples": ["John Doe", "Jane Smith"],
|
|
389
|
-
"type": "string"
|
|
397
|
+
"type": "string",
|
|
398
|
+
"minLength": 2
|
|
390
399
|
},
|
|
391
400
|
"age": {
|
|
392
401
|
"description": "User age",
|
|
@@ -469,15 +478,15 @@ var openapi_default = {
|
|
|
469
478
|
//#region tmp_prebundle/index.ts
|
|
470
479
|
const UserRPC = createRPC(schema, "", "UserRPC", import("vovk"), {
|
|
471
480
|
validateOnClient: import("vovk-ajv"),
|
|
472
|
-
apiRoot: "
|
|
481
|
+
apiRoot: "http://localhost:3000/api"
|
|
473
482
|
});
|
|
474
483
|
const StreamRPC = createRPC(schema, "", "StreamRPC", import("vovk"), {
|
|
475
484
|
validateOnClient: import("vovk-ajv"),
|
|
476
|
-
apiRoot: "
|
|
485
|
+
apiRoot: "http://localhost:3000/api"
|
|
477
486
|
});
|
|
478
487
|
const OpenApiRPC = createRPC(schema, "static", "OpenApiRPC", import("vovk"), {
|
|
479
488
|
validateOnClient: import("vovk-ajv"),
|
|
480
|
-
apiRoot: "
|
|
489
|
+
apiRoot: "http://localhost:3000/api"
|
|
481
490
|
});
|
|
482
491
|
|
|
483
492
|
//#endregion
|
package/package.json
CHANGED