@alepha/protobuf 0.13.8 → 0.14.1
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 +1 -1
- package/dist/index.d.ts +32 -1
- package/package.json +4 -4
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -255,9 +255,38 @@ declare class JsonSchemaCodec extends SchemaCodec {
|
|
|
255
255
|
decode<T>(schema: TSchema, value: unknown): T;
|
|
256
256
|
}
|
|
257
257
|
//#endregion
|
|
258
|
+
//#region ../alepha/src/core/primitives/$hook.d.ts
|
|
259
|
+
interface HookOptions<T extends keyof Hooks> {
|
|
260
|
+
/**
|
|
261
|
+
* The name of the hook. "configure", "start", "ready", "stop", ...
|
|
262
|
+
*/
|
|
263
|
+
on: T;
|
|
264
|
+
/**
|
|
265
|
+
* The handler to run when the hook is triggered.
|
|
266
|
+
*/
|
|
267
|
+
handler: (args: Hooks[T]) => Async<any>;
|
|
268
|
+
/**
|
|
269
|
+
* Force the hook to run first or last on the list of hooks.
|
|
270
|
+
*/
|
|
271
|
+
priority?: "first" | "last";
|
|
272
|
+
/**
|
|
273
|
+
* Empty placeholder, not implemented yet. :-)
|
|
274
|
+
*/
|
|
275
|
+
before?: object | Array<object>;
|
|
276
|
+
/**
|
|
277
|
+
* Empty placeholder, not implemented yet. :-)
|
|
278
|
+
*/
|
|
279
|
+
after?: object | Array<object>;
|
|
280
|
+
}
|
|
281
|
+
declare class HookPrimitive<T extends keyof Hooks> extends Primitive<HookOptions<T>> {
|
|
282
|
+
called: number;
|
|
283
|
+
protected onInit(): void;
|
|
284
|
+
}
|
|
285
|
+
//#endregion
|
|
258
286
|
//#region ../alepha/src/core/providers/SchemaValidator.d.ts
|
|
259
287
|
declare class SchemaValidator {
|
|
260
288
|
protected cache: Map<TSchema, Validator<typebox3.TProperties, TSchema, unknown, unknown>>;
|
|
289
|
+
protected useEval: boolean;
|
|
261
290
|
/**
|
|
262
291
|
* Validate the value against the provided schema.
|
|
263
292
|
*
|
|
@@ -276,6 +305,8 @@ declare class SchemaValidator {
|
|
|
276
305
|
* Used by `beforeParse` to determine if a schema allows null values.
|
|
277
306
|
*/
|
|
278
307
|
protected isSchemaNullable: (schema: any) => boolean;
|
|
308
|
+
protected onConfigure: HookPrimitive<"configure">;
|
|
309
|
+
protected canEval(): boolean;
|
|
279
310
|
}
|
|
280
311
|
interface ValidateOptions {
|
|
281
312
|
trim?: boolean;
|
|
@@ -877,7 +908,7 @@ interface Env {
|
|
|
877
908
|
/**
|
|
878
909
|
* Optional environment variable that indicates the current environment.
|
|
879
910
|
*/
|
|
880
|
-
NODE_ENV?:
|
|
911
|
+
NODE_ENV?: string;
|
|
881
912
|
/**
|
|
882
913
|
* Optional name of the application.
|
|
883
914
|
*/
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@alepha/protobuf",
|
|
3
3
|
"description": "Protocol Buffers (Protobuf) codec support for Alepha framework.",
|
|
4
4
|
"author": "Nicolas Foures",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.14.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22.0.0"
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"protobufjs": "^8.0.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"alepha": "0.
|
|
22
|
-
"tsdown": "^0.18.
|
|
21
|
+
"alepha": "0.14.1",
|
|
22
|
+
"tsdown": "^0.18.4",
|
|
23
23
|
"typescript": "^5.9.3",
|
|
24
24
|
"vitest": "^4.0.16"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"alepha": "0.
|
|
27
|
+
"alepha": "0.14.1"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"lint": "alepha lint",
|