rlz-engine 1.0.36 → 1.0.38
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/dist/back/rpc/gen.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ts, { NewLineKind, ScriptKind, ScriptTarget } from 'typescript';
|
|
2
|
-
import {
|
|
2
|
+
import { zodToTs } from 'zod-to-ts';
|
|
3
3
|
const F = ts.factory;
|
|
4
4
|
export function generateClient(fileName, ...rpcBuilders) {
|
|
5
5
|
const sourceFile = ts.createSourceFile(fileName, '', ScriptTarget.Latest, false, ScriptKind.TS);
|
|
@@ -44,11 +44,11 @@ function generateTypes(rpcName, e, p) {
|
|
|
44
44
|
const resp = [];
|
|
45
45
|
const bodyTypeName = createBodyTypeName(rpcName, e);
|
|
46
46
|
const bodyType = zodToTs(e.bodySchema, bodyTypeName);
|
|
47
|
-
const bodyTypeAlias =
|
|
47
|
+
const bodyTypeAlias = F.createTypeAliasDeclaration([F.createToken(ts.SyntaxKind.ExportKeyword)], F.createIdentifier(bodyTypeName), undefined, bodyType.node);
|
|
48
48
|
resp.push(p(bodyTypeAlias));
|
|
49
49
|
const respTypeName = createRespTypeName(rpcName, e);
|
|
50
50
|
const respType = zodToTs(e.respSchema, respTypeName);
|
|
51
|
-
const respTypeAlias =
|
|
51
|
+
const respTypeAlias = F.createTypeAliasDeclaration([F.createToken(ts.SyntaxKind.ExportKeyword)], F.createIdentifier(respTypeName), undefined, respType.node);
|
|
52
52
|
resp.push(p(respTypeAlias));
|
|
53
53
|
return resp;
|
|
54
54
|
}
|
package/dist/back/rpc/rpc.js
CHANGED
|
@@ -9,7 +9,7 @@ function makeReg(pluginName, endpoint) {
|
|
|
9
9
|
bodySchema: endpoint.bodySchema,
|
|
10
10
|
respSchema: endpoint.respSchema,
|
|
11
11
|
reg(app, opts) {
|
|
12
|
-
app.post(`/rpc/${pluginName}
|
|
12
|
+
app.post(`/rpc/${pluginName}_${this.name}_v${this.v}`, {
|
|
13
13
|
schema: {
|
|
14
14
|
body: zodToJsonSchema(this.bodySchema),
|
|
15
15
|
response: {
|
package/dist/client/rpc.js
CHANGED
|
@@ -29,7 +29,7 @@ export class NotFound extends HttpError {
|
|
|
29
29
|
}
|
|
30
30
|
function url(rpcName, callName, version) {
|
|
31
31
|
const domain = getFrontConfig().apiDomain;
|
|
32
|
-
return `${domain}rpc/${rpcName}
|
|
32
|
+
return `${domain}rpc/${rpcName}_${callName}_v${version}`;
|
|
33
33
|
}
|
|
34
34
|
const GZIP_THRESHOLD = 16 * 1024;
|
|
35
35
|
async function prepareBody(request) {
|
|
@@ -8,14 +8,16 @@ export interface AuthState {
|
|
|
8
8
|
login: (id: string, name: string, email: string, tempPassword: string) => void;
|
|
9
9
|
logout: () => void;
|
|
10
10
|
}
|
|
11
|
-
export declare const useAuthState: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<AuthState>, "persist"> & {
|
|
11
|
+
export declare const useAuthState: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<AuthState>, "setState" | "persist"> & {
|
|
12
|
+
setState(partial: AuthState | Partial<AuthState> | ((state: AuthState) => AuthState | Partial<AuthState>), replace?: false | undefined): unknown;
|
|
13
|
+
setState(state: AuthState | ((state: AuthState) => AuthState), replace: true): unknown;
|
|
12
14
|
persist: {
|
|
13
|
-
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<AuthState, AuthState>>) => void;
|
|
15
|
+
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<AuthState, AuthState, unknown>>) => void;
|
|
14
16
|
clearStorage: () => void;
|
|
15
17
|
rehydrate: () => Promise<void> | void;
|
|
16
18
|
hasHydrated: () => boolean;
|
|
17
19
|
onHydrate: (fn: (state: AuthState) => void) => () => void;
|
|
18
20
|
onFinishHydration: (fn: (state: AuthState) => void) => () => void;
|
|
19
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<AuthState, AuthState>>;
|
|
21
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<AuthState, AuthState, unknown>>;
|
|
20
22
|
};
|
|
21
23
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rlz-engine",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.38",
|
|
4
4
|
"description": "Deps and tools for my style of development",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@types/react-router-dom": "^5.3.3",
|
|
53
53
|
"acme-client": "^5.4.0",
|
|
54
54
|
"ajv-formats": "^3.0.1",
|
|
55
|
-
"cmd-ts": "^0.
|
|
55
|
+
"cmd-ts": "^0.14.2",
|
|
56
56
|
"embla-carousel-react": "^8.5.1",
|
|
57
57
|
"embla-carousel-wheel-gestures": "^8.0.1",
|
|
58
58
|
"fastify": "^5.1.0",
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"iterator-helpers-polyfill": "^3.0.1",
|
|
63
63
|
"luxon": "^3.5.0",
|
|
64
64
|
"mongodb": "^6.12.0",
|
|
65
|
-
"pino": "^
|
|
65
|
+
"pino": "^10.0.0",
|
|
66
66
|
"pino-pretty": "^13.0.0",
|
|
67
67
|
"react": "^19.0.0",
|
|
68
68
|
"react-dom": "^19.0.0",
|
|
69
69
|
"react-resize-detector": "^12.0.2",
|
|
70
70
|
"react-router-dom": "^7.1.1",
|
|
71
71
|
"uuidv7": "^1.0.2",
|
|
72
|
-
"zod": "^3.
|
|
72
|
+
"zod": "^3.25.76",
|
|
73
73
|
"zod-to-json-schema": "^3.23.5",
|
|
74
74
|
"zod-to-ts": "^1.2.0",
|
|
75
75
|
"zustand": "^5.0.3"
|