apitally 0.8.3 → 0.9.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.
package/README.md CHANGED
@@ -29,6 +29,7 @@ frameworks:
29
29
  - [NestJS](https://docs.apitally.io/frameworks/nestjs) (with Express)
30
30
  - [Fastify](https://docs.apitally.io/frameworks/fastify)
31
31
  - [Koa](https://docs.apitally.io/frameworks/koa)
32
+ - [Hono](https://docs.apitally.io/frameworks/hono)
32
33
 
33
34
  Learn more about Apitally on our 🌎 [website](https://apitally.io) or check out
34
35
  the 📚 [documentation](https://docs.apitally.io).
@@ -152,6 +153,24 @@ useApitally(app, {
152
153
  });
153
154
  ```
154
155
 
156
+ ### Hono
157
+
158
+ This is an example of how to use the Apitally middleware with a Hono application.
159
+ For further instructions, see our
160
+ [setup guide for Koa](https://docs.apitally.io/frameworks/hono).
161
+
162
+ ```javascript
163
+ import { Hono } from "hono";
164
+ import { useApitally } from "apitally/hono";
165
+
166
+ const app = new Hono();
167
+
168
+ useApitally(app, {
169
+ clientId: "your-client-id",
170
+ env: "dev", // or "prod" etc.
171
+ });
172
+ ```
173
+
155
174
  ## Getting help
156
175
 
157
176
  If you need help please [create a new discussion](https://github.com/orgs/apitally/discussions/categories/q-a) on GitHub
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/common/types.ts"],"sourcesContent":["import { Logger } from \"./logging.js\";\n\nexport type ApitallyConfig = {\n clientId: string;\n env?: string;\n openApiUrl?: string;\n appVersion?: string;\n logger?: Logger;\n};\n\nexport type ApitallyConsumer = {\n identifier: string;\n name?: string | null;\n group?: string | null;\n};\n\nexport type PathInfo = {\n method: string;\n path: string;\n};\n\nexport type StartupData = {\n paths: PathInfo[];\n versions: Record<string, string>;\n client: string;\n};\n\nexport type StartupPayload = {\n instance_uuid: string;\n message_uuid: string;\n} & StartupData;\n\nexport type ConsumerMethodPath = {\n consumer?: string | null;\n method: string;\n path: string;\n};\n\nexport type RequestInfo = ConsumerMethodPath & {\n statusCode: number;\n responseTime: number;\n requestSize?: string | number;\n responseSize?: string | number;\n};\n\nexport type RequestsItem = ConsumerMethodPath & {\n status_code: number;\n request_count: number;\n request_size_sum: number;\n response_size_sum: number;\n response_times: Record<number, number>;\n request_sizes: Record<number, number>;\n response_sizes: Record<number, number>;\n};\n\nexport type ValidationError = {\n loc: string;\n msg: string;\n type: string;\n};\n\nexport type ValidationErrorsItem = ConsumerMethodPath & {\n loc: Array<string>;\n msg: string;\n type: string;\n error_count: number;\n};\n\nexport type ServerError = {\n type: string;\n msg: string;\n traceback: string;\n};\n\nexport type ServerErrorsItem = ConsumerMethodPath & {\n type: string;\n msg: string;\n traceback: string;\n sentry_event_id: string | null;\n error_count: number;\n};\n\nexport type ConsumerItem = ApitallyConsumer;\n\nexport type SyncPayload = {\n time_offset: number;\n instance_uuid: string;\n message_uuid: string;\n requests: Array<RequestsItem>;\n validation_errors: Array<ValidationErrorsItem>;\n server_errors: Array<ServerErrorsItem>;\n consumers: Array<ConsumerItem>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAoFA;;","names":[]}
1
+ {"version":3,"sources":["../../src/common/types.ts"],"sourcesContent":["import { Logger } from \"./logging.js\";\n\nexport type ApitallyConfig = {\n clientId: string;\n env?: string;\n openApiUrl?: string;\n appVersion?: string;\n logger?: Logger;\n};\n\nexport type ApitallyConsumer = {\n identifier: string;\n name?: string | null;\n group?: string | null;\n};\n\nexport type PathInfo = {\n method: string;\n path: string;\n};\n\nexport type StartupData = {\n paths: PathInfo[];\n versions: Record<string, string>;\n client: string;\n};\n\nexport type StartupPayload = {\n instance_uuid: string;\n message_uuid: string;\n} & StartupData;\n\nexport type ConsumerMethodPath = {\n consumer?: string | null;\n method: string;\n path: string;\n};\n\nexport type RequestInfo = ConsumerMethodPath & {\n statusCode: number;\n responseTime: number;\n requestSize?: string | number | null;\n responseSize?: string | number | null;\n};\n\nexport type RequestsItem = ConsumerMethodPath & {\n status_code: number;\n request_count: number;\n request_size_sum: number;\n response_size_sum: number;\n response_times: Record<number, number>;\n request_sizes: Record<number, number>;\n response_sizes: Record<number, number>;\n};\n\nexport type ValidationError = {\n loc: string;\n msg: string;\n type: string;\n};\n\nexport type ValidationErrorsItem = ConsumerMethodPath & {\n loc: Array<string>;\n msg: string;\n type: string;\n error_count: number;\n};\n\nexport type ServerError = {\n type: string;\n msg: string;\n traceback: string;\n};\n\nexport type ServerErrorsItem = ConsumerMethodPath & {\n type: string;\n msg: string;\n traceback: string;\n sentry_event_id: string | null;\n error_count: number;\n};\n\nexport type ConsumerItem = ApitallyConsumer;\n\nexport type SyncPayload = {\n time_offset: number;\n instance_uuid: string;\n message_uuid: string;\n requests: Array<RequestsItem>;\n validation_errors: Array<ValidationErrorsItem>;\n server_errors: Array<ServerErrorsItem>;\n consumers: Array<ConsumerItem>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAoFA;;","names":[]}
@@ -34,8 +34,8 @@ type ConsumerMethodPath = {
34
34
  type RequestInfo = ConsumerMethodPath & {
35
35
  statusCode: number;
36
36
  responseTime: number;
37
- requestSize?: string | number;
38
- responseSize?: string | number;
37
+ requestSize?: string | number | null;
38
+ responseSize?: string | number | null;
39
39
  };
40
40
  type RequestsItem = ConsumerMethodPath & {
41
41
  status_code: number;
@@ -34,8 +34,8 @@ type ConsumerMethodPath = {
34
34
  type RequestInfo = ConsumerMethodPath & {
35
35
  statusCode: number;
36
36
  responseTime: number;
37
- requestSize?: string | number;
38
- responseSize?: string | number;
37
+ requestSize?: string | number | null;
38
+ responseSize?: string | number | null;
39
39
  };
40
40
  type RequestsItem = ConsumerMethodPath & {
41
41
  status_code: number;