@alepha/protobuf 0.13.7 → 0.14.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +31 -0
  2. package/package.json +7 -8
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;
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.13.7",
5
+ "version": "0.14.0",
6
6
  "type": "module",
7
7
  "engines": {
8
8
  "node": ">=22.0.0"
@@ -15,16 +15,16 @@
15
15
  "src"
16
16
  ],
17
17
  "dependencies": {
18
- "protobufjs": "^7.5.4"
18
+ "protobufjs": "^8.0.0"
19
19
  },
20
20
  "devDependencies": {
21
- "alepha": "0.13.7",
22
- "tsdown": "^0.17.2",
21
+ "alepha": "0.14.0",
22
+ "tsdown": "^0.18.3",
23
23
  "typescript": "^5.9.3",
24
- "vitest": "^4.0.15"
24
+ "vitest": "^4.0.16"
25
25
  },
26
26
  "peerDependencies": {
27
- "alepha": "0.13.7"
27
+ "alepha": "0.14.0"
28
28
  },
29
29
  "scripts": {
30
30
  "lint": "alepha lint",
@@ -41,6 +41,5 @@
41
41
  "alepha",
42
42
  "protobuf",
43
43
  "typebox"
44
- ],
45
- "module": "./dist/index.js"
44
+ ]
46
45
  }