@buenojs/bueno 0.8.3 → 0.8.5
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 +136 -16
- package/dist/cli/{index.js → bin.js} +3036 -1421
- package/dist/container/index.js +250 -0
- package/dist/context/index.js +219 -0
- package/dist/database/index.js +493 -0
- package/dist/frontend/index.js +7697 -0
- package/dist/health/index.js +364 -0
- package/dist/i18n/index.js +345 -0
- package/dist/index.js +11043 -6482
- package/dist/jobs/index.js +819 -0
- package/dist/lock/index.js +367 -0
- package/dist/logger/index.js +281 -0
- package/dist/metrics/index.js +289 -0
- package/dist/middleware/index.js +77 -0
- package/dist/migrations/index.js +571 -0
- package/dist/modules/index.js +3346 -0
- package/dist/notification/index.js +484 -0
- package/dist/observability/index.js +331 -0
- package/dist/openapi/index.js +776 -0
- package/dist/orm/index.js +1356 -0
- package/dist/router/index.js +886 -0
- package/dist/rpc/index.js +691 -0
- package/dist/schema/index.js +400 -0
- package/dist/telemetry/index.js +595 -0
- package/dist/template/index.js +640 -0
- package/dist/templates/index.js +640 -0
- package/dist/testing/index.js +1111 -0
- package/dist/types/index.js +60 -0
- package/package.json +121 -27
- package/src/cache/index.ts +2 -1
- package/src/cli/bin.ts +2 -2
- package/src/cli/commands/build.ts +183 -165
- package/src/cli/commands/dev.ts +96 -89
- package/src/cli/commands/generate.ts +142 -111
- package/src/cli/commands/help.ts +20 -16
- package/src/cli/commands/index.ts +3 -6
- package/src/cli/commands/migration.ts +124 -105
- package/src/cli/commands/new.ts +392 -438
- package/src/cli/commands/start.ts +81 -79
- package/src/cli/core/args.ts +68 -50
- package/src/cli/core/console.ts +89 -95
- package/src/cli/core/index.ts +4 -4
- package/src/cli/core/prompt.ts +65 -62
- package/src/cli/core/spinner.ts +23 -20
- package/src/cli/index.ts +46 -38
- package/src/cli/templates/database/index.ts +61 -0
- package/src/cli/templates/database/mysql.ts +14 -0
- package/src/cli/templates/database/none.ts +16 -0
- package/src/cli/templates/database/postgresql.ts +14 -0
- package/src/cli/templates/database/sqlite.ts +14 -0
- package/src/cli/templates/deploy.ts +29 -26
- package/src/cli/templates/docker.ts +41 -30
- package/src/cli/templates/frontend/index.ts +63 -0
- package/src/cli/templates/frontend/none.ts +17 -0
- package/src/cli/templates/frontend/react.ts +140 -0
- package/src/cli/templates/frontend/solid.ts +134 -0
- package/src/cli/templates/frontend/svelte.ts +131 -0
- package/src/cli/templates/frontend/vue.ts +130 -0
- package/src/cli/templates/generators/index.ts +339 -0
- package/src/cli/templates/generators/types.ts +56 -0
- package/src/cli/templates/index.ts +35 -2
- package/src/cli/templates/project/api.ts +81 -0
- package/src/cli/templates/project/default.ts +140 -0
- package/src/cli/templates/project/fullstack.ts +111 -0
- package/src/cli/templates/project/index.ts +95 -0
- package/src/cli/templates/project/minimal.ts +45 -0
- package/src/cli/templates/project/types.ts +94 -0
- package/src/cli/templates/project/website.ts +263 -0
- package/src/cli/utils/fs.ts +55 -41
- package/src/cli/utils/index.ts +3 -2
- package/src/cli/utils/strings.ts +47 -33
- package/src/cli/utils/version.ts +47 -0
- package/src/config/env-validation.ts +100 -0
- package/src/config/env.ts +169 -41
- package/src/config/index.ts +28 -20
- package/src/config/loader.ts +25 -16
- package/src/config/merge.ts +21 -10
- package/src/config/types.ts +545 -25
- package/src/config/validation.ts +215 -7
- package/src/container/forward-ref.ts +22 -22
- package/src/container/index.ts +34 -12
- package/src/context/index.ts +11 -1
- package/src/database/index.ts +7 -190
- package/src/database/orm/builder.ts +457 -0
- package/src/database/orm/casts/index.ts +130 -0
- package/src/database/orm/casts/types.ts +25 -0
- package/src/database/orm/compiler.ts +304 -0
- package/src/database/orm/hooks/index.ts +114 -0
- package/src/database/orm/index.ts +61 -0
- package/src/database/orm/model-registry.ts +59 -0
- package/src/database/orm/model.ts +821 -0
- package/src/database/orm/relationships/base.ts +146 -0
- package/src/database/orm/relationships/belongs-to-many.ts +179 -0
- package/src/database/orm/relationships/belongs-to.ts +56 -0
- package/src/database/orm/relationships/has-many.ts +45 -0
- package/src/database/orm/relationships/has-one.ts +41 -0
- package/src/database/orm/relationships/index.ts +11 -0
- package/src/database/orm/scopes/index.ts +55 -0
- package/src/events/__tests__/event-system.test.ts +235 -0
- package/src/events/config.ts +238 -0
- package/src/events/example-usage.ts +185 -0
- package/src/events/index.ts +278 -0
- package/src/events/manager.ts +385 -0
- package/src/events/registry.ts +182 -0
- package/src/events/types.ts +124 -0
- package/src/frontend/api-routes.ts +65 -23
- package/src/frontend/bundler.ts +76 -34
- package/src/frontend/console-client.ts +2 -2
- package/src/frontend/console-stream.ts +94 -38
- package/src/frontend/dev-server.ts +94 -46
- package/src/frontend/file-router.ts +61 -19
- package/src/frontend/frameworks/index.ts +37 -10
- package/src/frontend/frameworks/react.ts +10 -8
- package/src/frontend/frameworks/solid.ts +11 -9
- package/src/frontend/frameworks/svelte.ts +15 -9
- package/src/frontend/frameworks/vue.ts +13 -11
- package/src/frontend/hmr-client.ts +12 -10
- package/src/frontend/hmr.ts +146 -103
- package/src/frontend/index.ts +14 -5
- package/src/frontend/islands.ts +41 -22
- package/src/frontend/isr.ts +59 -37
- package/src/frontend/layout.ts +36 -21
- package/src/frontend/ssr/react.ts +74 -27
- package/src/frontend/ssr/solid.ts +54 -20
- package/src/frontend/ssr/svelte.ts +48 -14
- package/src/frontend/ssr/vue.ts +50 -18
- package/src/frontend/ssr.ts +83 -39
- package/src/frontend/types.ts +91 -56
- package/src/health/index.ts +21 -9
- package/src/i18n/engine.ts +305 -0
- package/src/i18n/index.ts +38 -0
- package/src/i18n/loader.ts +218 -0
- package/src/i18n/middleware.ts +164 -0
- package/src/i18n/negotiator.ts +162 -0
- package/src/i18n/types.ts +158 -0
- package/src/index.ts +179 -27
- package/src/jobs/drivers/memory.ts +315 -0
- package/src/jobs/drivers/redis.ts +459 -0
- package/src/jobs/index.ts +30 -0
- package/src/jobs/queue.ts +281 -0
- package/src/jobs/types.ts +295 -0
- package/src/jobs/worker.ts +380 -0
- package/src/logger/index.ts +1 -3
- package/src/logger/transports/index.ts +62 -22
- package/src/metrics/index.ts +25 -16
- package/src/migrations/index.ts +9 -0
- package/src/modules/filters.ts +13 -17
- package/src/modules/guards.ts +49 -26
- package/src/modules/index.ts +409 -298
- package/src/modules/interceptors.ts +58 -20
- package/src/modules/lazy.ts +11 -19
- package/src/modules/lifecycle.ts +15 -7
- package/src/modules/metadata.ts +15 -5
- package/src/modules/pipes.ts +94 -72
- package/src/notification/channels/base.ts +68 -0
- package/src/notification/channels/email.ts +105 -0
- package/src/notification/channels/push.ts +104 -0
- package/src/notification/channels/sms.ts +105 -0
- package/src/notification/channels/whatsapp.ts +104 -0
- package/src/notification/index.ts +48 -0
- package/src/notification/service.ts +354 -0
- package/src/notification/types.ts +344 -0
- package/src/observability/__tests__/observability.test.ts +483 -0
- package/src/observability/breadcrumbs.ts +114 -0
- package/src/observability/index.ts +136 -0
- package/src/observability/interceptor.ts +85 -0
- package/src/observability/service.ts +303 -0
- package/src/observability/trace.ts +37 -0
- package/src/observability/types.ts +196 -0
- package/src/openapi/__tests__/decorators.test.ts +335 -0
- package/src/openapi/__tests__/document-builder.test.ts +285 -0
- package/src/openapi/__tests__/route-scanner.test.ts +334 -0
- package/src/openapi/__tests__/schema-generator.test.ts +275 -0
- package/src/openapi/decorators.ts +328 -0
- package/src/openapi/document-builder.ts +274 -0
- package/src/openapi/index.ts +112 -0
- package/src/openapi/metadata.ts +112 -0
- package/src/openapi/route-scanner.ts +289 -0
- package/src/openapi/schema-generator.ts +256 -0
- package/src/openapi/swagger-module.ts +166 -0
- package/src/openapi/types.ts +398 -0
- package/src/orm/index.ts +10 -0
- package/src/rpc/index.ts +3 -1
- package/src/schema/index.ts +9 -0
- package/src/security/index.ts +15 -6
- package/src/ssg/index.ts +9 -8
- package/src/telemetry/index.ts +76 -22
- package/src/template/index.ts +7 -0
- package/src/templates/engine.ts +224 -0
- package/src/templates/index.ts +9 -0
- package/src/templates/loader.ts +331 -0
- package/src/templates/renderers/markdown.ts +212 -0
- package/src/templates/renderers/simple.ts +269 -0
- package/src/templates/types.ts +154 -0
- package/src/testing/index.ts +100 -27
- package/src/types/optional-deps.d.ts +347 -187
- package/src/validation/index.ts +92 -2
- package/src/validation/schemas.ts +536 -0
- package/tests/integration/fullstack.test.ts +4 -4
- package/tests/unit/database.test.ts +2 -72
- package/tests/unit/env-validation.test.ts +166 -0
- package/tests/unit/events.test.ts +910 -0
- package/tests/unit/i18n.test.ts +455 -0
- package/tests/unit/jobs.test.ts +493 -0
- package/tests/unit/notification.test.ts +988 -0
- package/tests/unit/observability.test.ts +453 -0
- package/tests/unit/orm/builder.test.ts +323 -0
- package/tests/unit/orm/casts.test.ts +179 -0
- package/tests/unit/orm/compiler.test.ts +220 -0
- package/tests/unit/orm/eager-loading.test.ts +285 -0
- package/tests/unit/orm/hooks.test.ts +191 -0
- package/tests/unit/orm/model.test.ts +373 -0
- package/tests/unit/orm/relationships.test.ts +303 -0
- package/tests/unit/orm/scopes.test.ts +74 -0
- package/tests/unit/templates-simple.test.ts +53 -0
- package/tests/unit/templates.test.ts +454 -0
- package/tests/unit/validation.test.ts +18 -24
- package/tsconfig.json +11 -3
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __export = (target, all) => {
|
|
4
|
+
for (var name in all)
|
|
5
|
+
__defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
set: (newValue) => all[name] = () => newValue
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
var __legacyDecorateClassTS = function(decorators, target, key, desc) {
|
|
13
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
15
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
16
|
+
else
|
|
17
|
+
for (var i = decorators.length - 1;i >= 0; i--)
|
|
18
|
+
if (d = decorators[i])
|
|
19
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
+
};
|
|
22
|
+
var __legacyMetadataTS = (k, v) => {
|
|
23
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
24
|
+
return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
27
|
+
var __require = import.meta.require;
|
|
28
|
+
|
|
29
|
+
// src/types/index.ts
|
|
30
|
+
class BuenoError extends Error {
|
|
31
|
+
statusCode;
|
|
32
|
+
code;
|
|
33
|
+
constructor(message, statusCode = 500, code) {
|
|
34
|
+
super(message);
|
|
35
|
+
this.statusCode = statusCode;
|
|
36
|
+
this.code = code;
|
|
37
|
+
this.name = "BuenoError";
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
class ValidationError extends BuenoError {
|
|
42
|
+
issues;
|
|
43
|
+
constructor(message, issues) {
|
|
44
|
+
super(message, 422, "VALIDATION_ERROR");
|
|
45
|
+
this.issues = issues;
|
|
46
|
+
this.name = "ValidationError";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
class NotFoundError extends BuenoError {
|
|
51
|
+
constructor(message = "Not Found") {
|
|
52
|
+
super(message, 404, "NOT_FOUND");
|
|
53
|
+
this.name = "NotFoundError";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
ValidationError,
|
|
58
|
+
NotFoundError,
|
|
59
|
+
BuenoError
|
|
60
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buenojs/bueno",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"description": "A Bun-Native Full-Stack Framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,9 +17,125 @@
|
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"import": "./dist/index.js"
|
|
19
19
|
},
|
|
20
|
+
"./database": {
|
|
21
|
+
"types": "./dist/database/index.d.ts",
|
|
22
|
+
"import": "./dist/database/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./schema": {
|
|
25
|
+
"types": "./dist/schema/index.d.ts",
|
|
26
|
+
"import": "./dist/schema/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./migrations": {
|
|
29
|
+
"types": "./dist/migrations/index.d.ts",
|
|
30
|
+
"import": "./dist/migrations/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./orm": {
|
|
33
|
+
"types": "./dist/orm/index.d.ts",
|
|
34
|
+
"import": "./dist/orm/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./jobs": {
|
|
37
|
+
"types": "./dist/jobs/index.d.ts",
|
|
38
|
+
"import": "./dist/jobs/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./notification": {
|
|
41
|
+
"types": "./dist/notification/index.d.ts",
|
|
42
|
+
"import": "./dist/notification/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./template": {
|
|
45
|
+
"types": "./dist/template/index.d.ts",
|
|
46
|
+
"import": "./dist/template/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./openapi": {
|
|
49
|
+
"types": "./dist/openapi/index.d.ts",
|
|
50
|
+
"import": "./dist/openapi/index.js"
|
|
51
|
+
},
|
|
52
|
+
"./i18n": {
|
|
53
|
+
"types": "./dist/i18n/index.d.ts",
|
|
54
|
+
"import": "./dist/i18n/index.js"
|
|
55
|
+
},
|
|
20
56
|
"./cli": {
|
|
21
57
|
"types": "./dist/cli/index.d.ts",
|
|
22
58
|
"import": "./dist/cli/index.js"
|
|
59
|
+
},
|
|
60
|
+
"./frontend": {
|
|
61
|
+
"types": "./dist/frontend/index.d.ts",
|
|
62
|
+
"import": "./dist/frontend/index.js"
|
|
63
|
+
},
|
|
64
|
+
"./router": {
|
|
65
|
+
"types": "./dist/router/index.d.ts",
|
|
66
|
+
"import": "./dist/router/index.js"
|
|
67
|
+
},
|
|
68
|
+
"./middleware": {
|
|
69
|
+
"types": "./dist/middleware/index.d.ts",
|
|
70
|
+
"import": "./dist/middleware/index.js"
|
|
71
|
+
},
|
|
72
|
+
"./modules": {
|
|
73
|
+
"types": "./dist/modules/index.d.ts",
|
|
74
|
+
"import": "./dist/modules/index.js"
|
|
75
|
+
},
|
|
76
|
+
"./validation": {
|
|
77
|
+
"types": "./dist/validation/index.d.ts",
|
|
78
|
+
"import": "./dist/validation/index.js"
|
|
79
|
+
},
|
|
80
|
+
"./websocket": {
|
|
81
|
+
"types": "./dist/websocket/index.d.ts",
|
|
82
|
+
"import": "./dist/websocket/index.js"
|
|
83
|
+
},
|
|
84
|
+
"./storage": {
|
|
85
|
+
"types": "./dist/storage/index.d.ts",
|
|
86
|
+
"import": "./dist/storage/index.js"
|
|
87
|
+
},
|
|
88
|
+
"./security": {
|
|
89
|
+
"types": "./dist/security/index.d.ts",
|
|
90
|
+
"import": "./dist/security/index.js"
|
|
91
|
+
},
|
|
92
|
+
"./ssg": {
|
|
93
|
+
"types": "./dist/ssg/index.d.ts",
|
|
94
|
+
"import": "./dist/ssg/index.js"
|
|
95
|
+
},
|
|
96
|
+
"./telemetry": {
|
|
97
|
+
"types": "./dist/telemetry/index.d.ts",
|
|
98
|
+
"import": "./dist/telemetry/index.js"
|
|
99
|
+
},
|
|
100
|
+
"./observability": {
|
|
101
|
+
"types": "./dist/observability/index.d.ts",
|
|
102
|
+
"import": "./dist/observability/index.js"
|
|
103
|
+
},
|
|
104
|
+
"./lock": {
|
|
105
|
+
"types": "./dist/lock/index.d.ts",
|
|
106
|
+
"import": "./dist/lock/index.js"
|
|
107
|
+
},
|
|
108
|
+
"./health": {
|
|
109
|
+
"types": "./dist/health/index.d.ts",
|
|
110
|
+
"import": "./dist/health/index.js"
|
|
111
|
+
},
|
|
112
|
+
"./logger": {
|
|
113
|
+
"types": "./dist/logger/index.d.ts",
|
|
114
|
+
"import": "./dist/logger/index.js"
|
|
115
|
+
},
|
|
116
|
+
"./metrics": {
|
|
117
|
+
"types": "./dist/metrics/index.d.ts",
|
|
118
|
+
"import": "./dist/metrics/index.js"
|
|
119
|
+
},
|
|
120
|
+
"./rpc": {
|
|
121
|
+
"types": "./dist/rpc/index.d.ts",
|
|
122
|
+
"import": "./dist/rpc/index.js"
|
|
123
|
+
},
|
|
124
|
+
"./context": {
|
|
125
|
+
"types": "./dist/context/index.d.ts",
|
|
126
|
+
"import": "./dist/context/index.js"
|
|
127
|
+
},
|
|
128
|
+
"./container": {
|
|
129
|
+
"types": "./dist/container/index.d.ts",
|
|
130
|
+
"import": "./dist/container/index.js"
|
|
131
|
+
},
|
|
132
|
+
"./testing": {
|
|
133
|
+
"types": "./dist/testing/index.d.ts",
|
|
134
|
+
"import": "./dist/testing/index.js"
|
|
135
|
+
},
|
|
136
|
+
"./types": {
|
|
137
|
+
"types": "./dist/types/index.d.ts",
|
|
138
|
+
"import": "./dist/types/index.js"
|
|
23
139
|
}
|
|
24
140
|
},
|
|
25
141
|
"scripts": {
|
|
@@ -27,8 +143,9 @@
|
|
|
27
143
|
"test": "bun test",
|
|
28
144
|
"test:watch": "bun test --watch",
|
|
29
145
|
"test:coverage": "bun test --coverage",
|
|
30
|
-
"
|
|
31
|
-
"build
|
|
146
|
+
"coverage": "bun test --coverage coverage/lcov.info",
|
|
147
|
+
"build": "rm -rf dist && bun build ./src/index.ts ./src/database/index.ts ./src/schema/index.ts ./src/migrations/index.ts ./src/orm/index.ts ./src/jobs/index.ts ./src/templates/index.ts ./src/template/index.ts ./src/openapi/index.ts ./src/notification/index.ts ./src/i18n/index.ts ./src/cli/bin.ts ./src/frontend/index.ts ./src/router/index.ts ./src/middleware/index.ts ./src/modules/index.ts ./src/telemetry/index.ts ./src/observability/index.ts ./src/lock/index.ts ./src/health/index.ts ./src/logger/index.ts ./src/metrics/index.ts ./src/rpc/index.ts ./src/context/index.ts ./src/container/index.ts ./src/testing/index.ts ./src/types/index.ts --outdir ./dist --target bun && test -d dist/src && (cp -r dist/src/* dist/ && rm -rf dist/src) || true",
|
|
148
|
+
"build:cli": "bun build ./src/cli/bin.ts ./src/frontend/index.ts ./src/router/index.ts ./src/middleware/index.ts ./src/modules/index.ts --outdir ./dist/cli --target bun",
|
|
32
149
|
"typecheck": "tsc --noEmit",
|
|
33
150
|
"lint": "bunx biome check ./src",
|
|
34
151
|
"cli": "bun run src/cli/bin.ts"
|
|
@@ -46,30 +163,7 @@
|
|
|
46
163
|
"devDependencies": {
|
|
47
164
|
"@biomejs/biome": "^1.9.0",
|
|
48
165
|
"@types/bun": "latest",
|
|
49
|
-
"
|
|
50
|
-
"typescript": "^5.3.0",
|
|
51
|
-
"valibot": "^1.0.0",
|
|
52
|
-
"zod": "^3.24.0"
|
|
53
|
-
},
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"zod": "",
|
|
56
|
-
"valibot": "",
|
|
57
|
-
"arktype": "",
|
|
58
|
-
"typia": "^7.0.0"
|
|
59
|
-
},
|
|
60
|
-
"peerDependenciesMeta": {
|
|
61
|
-
"zod": {
|
|
62
|
-
"optional": true
|
|
63
|
-
},
|
|
64
|
-
"valibot": {
|
|
65
|
-
"optional": true
|
|
66
|
-
},
|
|
67
|
-
"arktype": {
|
|
68
|
-
"optional": true
|
|
69
|
-
},
|
|
70
|
-
"typia": {
|
|
71
|
-
"optional": true
|
|
72
|
-
}
|
|
166
|
+
"typescript": "^5.3.0"
|
|
73
167
|
},
|
|
74
168
|
"engines": {
|
|
75
169
|
"bun": ">=1.3.0"
|
package/src/cache/index.ts
CHANGED
|
@@ -385,7 +385,8 @@ export class Cache {
|
|
|
385
385
|
|
|
386
386
|
if (latency !== undefined) {
|
|
387
387
|
this.totalLatency += latency;
|
|
388
|
-
this.metrics.avgLatency =
|
|
388
|
+
this.metrics.avgLatency =
|
|
389
|
+
this.totalLatency / this.metrics.totalOperations;
|
|
389
390
|
}
|
|
390
391
|
|
|
391
392
|
if (error) {
|
package/src/cli/bin.ts
CHANGED