owebjs 1.1.2 → 1.1.4

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/index.d.ts CHANGED
@@ -16,6 +16,7 @@ export { FastifyRegister, FastifyRegisterOptions, RegisterOptions } from 'fastif
16
16
  export { FastifySchema, FastifySchemaCompiler, FastifySchemaValidationError, SchemaErrorDataVar, SchemaErrorFormatter } from 'fastify/types/schema';
17
17
  export { FastifyServerFactory, FastifyServerFactoryHandler } from 'fastify/types/serverFactory';
18
18
  export { FastifyTypeProvider, FastifyTypeProviderDefault } from 'fastify/types/type-provider';
19
+ export { HTTPMethods } from 'fastify/types/utils';
19
20
 
20
21
  interface OwebOptions extends FastifyServerOptions {
21
22
  uWebSocketsEnabled?: boolean;
@@ -32,7 +32,12 @@ class Oweb extends _FastifyInstance {
32
32
  return server;
33
33
  };
34
34
  }
35
- return Object.assign(this, Fastify(this._options));
35
+ const fastifyInstance = Object.assign(this, Fastify(this._options));
36
+ this.addHook("onRequest", (_, res, done) => {
37
+ res.header("X-Powered-By", "Oweb");
38
+ done();
39
+ });
40
+ return fastifyInstance;
36
41
  }
37
42
  loadRoutes({ directory }) {
38
43
  return assignRoutes(directory, this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owebjs",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Flexible handler that built on top of Fastify",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",