@dangao/bun-server 1.8.3 → 1.10.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 +60 -6
- package/dist/core/application.d.ts +12 -0
- package/dist/core/application.d.ts.map +1 -1
- package/dist/core/server.d.ts +7 -0
- package/dist/core/server.d.ts.map +1 -1
- package/dist/events/event-module.d.ts +4 -0
- package/dist/events/event-module.d.ts.map +1 -1
- package/dist/events/types.d.ts +16 -0
- package/dist/events/types.d.ts.map +1 -1
- package/dist/index.js +4969 -4882
- package/docs/custom-decorators.md +1 -7
- package/docs/extensions.md +0 -2
- package/docs/guide.md +0 -1
- package/docs/zh/custom-decorators.md +1 -7
- package/docs/zh/extensions.md +0 -2
- package/docs/zh/guide.md +0 -1
- package/docs/zh/migration.md +0 -5
- package/package.json +4 -4
- package/src/core/application.ts +38 -0
- package/src/core/server.ts +9 -0
- package/src/events/event-module.ts +108 -0
- package/src/events/types.ts +19 -0
- package/tests/auth/auth-decorators.test.ts +0 -1
- package/tests/auth/oauth2-service.test.ts +0 -1
- package/tests/cache/cache-decorators-extended.test.ts +0 -1
- package/tests/cache/cache-decorators.test.ts +0 -1
- package/tests/cache/cache-interceptors.test.ts +0 -1
- package/tests/cache/cache-module.test.ts +0 -1
- package/tests/cache/cache-service-proxy.test.ts +0 -1
- package/tests/config/config-center-integration.test.ts +0 -1
- package/tests/config/config-module-extended.test.ts +0 -1
- package/tests/config/config-module.test.ts +0 -1
- package/tests/controller/controller.test.ts +0 -1
- package/tests/controller/param-binder.test.ts +0 -1
- package/tests/controller/path-combination.test.ts +0 -1
- package/tests/core/application.test.ts +34 -0
- package/tests/database/database-module.test.ts +0 -1
- package/tests/database/orm.test.ts +0 -1
- package/tests/database/postgres-mysql-integration.test.ts +0 -1
- package/tests/database/transaction.test.ts +0 -1
- package/tests/di/container.test.ts +0 -1
- package/tests/error/error-handler.test.ts +0 -1
- package/tests/events/event-decorators.test.ts +0 -1
- package/tests/events/event-listener-scanner.test.ts +0 -1
- package/tests/events/event-module.test.ts +0 -1
- package/tests/extensions/logger-module.test.ts +0 -1
- package/tests/health/health-module.test.ts +0 -1
- package/tests/integration/oauth2-e2e.test.ts +0 -1
- package/tests/integration/session-e2e.test.ts +0 -1
- package/tests/interceptor/base-interceptor.test.ts +0 -1
- package/tests/interceptor/builtin/cache-interceptor.test.ts +0 -1
- package/tests/interceptor/builtin/log-interceptor.test.ts +0 -1
- package/tests/interceptor/builtin/permission-interceptor.test.ts +0 -1
- package/tests/interceptor/interceptor-advanced-integration.test.ts +0 -1
- package/tests/interceptor/interceptor-chain.test.ts +0 -1
- package/tests/interceptor/interceptor-integration.test.ts +0 -1
- package/tests/interceptor/interceptor-metadata.test.ts +0 -1
- package/tests/interceptor/interceptor-registry.test.ts +0 -1
- package/tests/interceptor/perf/interceptor-performance.test.ts +0 -1
- package/tests/metrics/metrics-module.test.ts +0 -1
- package/tests/microservice/config-center.test.ts +0 -1
- package/tests/microservice/service-client-decorators.test.ts +0 -1
- package/tests/microservice/service-registry-decorators.test.ts +0 -1
- package/tests/microservice/service-registry.test.ts +0 -1
- package/tests/middleware/builtin/middleware-builtin-extended.test.ts +0 -1
- package/tests/middleware/builtin/rate-limit.test.ts +0 -1
- package/tests/middleware/middleware-decorators.test.ts +0 -1
- package/tests/middleware/middleware-pipeline.test.ts +0 -1
- package/tests/middleware/middleware.test.ts +0 -1
- package/tests/perf/optimization.test.ts +0 -1
- package/tests/queue/queue-decorators.test.ts +0 -1
- package/tests/queue/queue-module.test.ts +0 -1
- package/tests/queue/queue-service.test.ts +0 -1
- package/tests/router/router-decorators.test.ts +0 -1
- package/tests/router/router-extended.test.ts +0 -1
- package/tests/security/guards/guards-integration.test.ts +0 -1
- package/tests/security/guards/guards.test.ts +0 -1
- package/tests/security/guards/reflector.test.ts +0 -1
- package/tests/security/security-filter.test.ts +0 -1
- package/tests/security/security-module-extended.test.ts +0 -1
- package/tests/security/security-module.test.ts +0 -1
- package/tests/session/session-decorators.test.ts +0 -1
- package/tests/session/session-module.test.ts +0 -1
- package/tests/swagger/decorators.test.ts +0 -1
- package/tests/swagger/swagger-module.test.ts +0 -1
- package/tests/swagger/ui.test.ts +0 -1
- package/tests/validation/class-validator.test.ts +0 -1
- package/tests/validation/controller-validation.test.ts +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { describe, expect, test, beforeEach } from 'bun:test';
|
|
2
|
-
import 'reflect-metadata';
|
|
3
2
|
|
|
4
3
|
import { Application } from '../../src/core/application';
|
|
5
4
|
import { MetricsModule, MetricsCollector, createHttpMetricsMiddleware, type CustomMetric } from '../../src/metrics';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { describe, expect, test, beforeEach } from 'bun:test';
|
|
2
|
-
import 'reflect-metadata';
|
|
3
2
|
import { ConfigCenterModule, CONFIG_CENTER_TOKEN, type ConfigCenter } from '../../src/microservice/config-center';
|
|
4
3
|
import { Container } from '../../src/di/container';
|
|
5
4
|
import { ModuleRegistry } from '../../src/di/module-registry';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { describe, expect, test, beforeEach } from 'bun:test';
|
|
2
|
-
import 'reflect-metadata';
|
|
3
2
|
import { ServiceRegistryModule, SERVICE_REGISTRY_TOKEN, type ServiceRegistry } from '../../src/microservice/service-registry';
|
|
4
3
|
import { MODULE_METADATA_KEY } from '../../src/di/module';
|
|
5
4
|
import { ControllerRegistry } from '../../src/controller/controller';
|
|
@@ -5,7 +5,6 @@ import { MiddlewarePipeline } from '../../src/middleware/pipeline';
|
|
|
5
5
|
import { Container } from '../../src/di/container';
|
|
6
6
|
import { Injectable, Inject } from '../../src/di/decorators';
|
|
7
7
|
import { PerformanceHarness } from '../../src/testing/harness';
|
|
8
|
-
import 'reflect-metadata';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* 性能优化验证测试
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { describe, expect, test, beforeEach, afterEach } from 'bun:test';
|
|
2
|
-
import 'reflect-metadata';
|
|
3
2
|
import { Application } from '../../../src/core/application';
|
|
4
3
|
import { Controller } from '../../../src/controller';
|
|
5
4
|
import { GET, POST } from '../../../src/router/decorators';
|
|
@@ -3,7 +3,6 @@ import { SecurityModule } from '../../src/security/security-module';
|
|
|
3
3
|
import { MODULE_METADATA_KEY } from '../../src/di/module';
|
|
4
4
|
import { JWT_UTIL_TOKEN, OAUTH2_SERVICE_TOKEN } from '../../src/auth/controller';
|
|
5
5
|
import { AuthenticationManager } from '../../src/security/authentication-manager';
|
|
6
|
-
import 'reflect-metadata';
|
|
7
6
|
|
|
8
7
|
describe('SecurityModule', () => {
|
|
9
8
|
beforeEach(() => {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test, beforeEach } from 'bun:test';
|
|
2
2
|
import { SwaggerModule } from '../../src/swagger/swagger-module';
|
|
3
3
|
import { MODULE_METADATA_KEY } from '../../src/di/module';
|
|
4
|
-
import 'reflect-metadata';
|
|
5
4
|
|
|
6
5
|
describe('SwaggerModule', () => {
|
|
7
6
|
beforeEach(() => {
|
package/tests/swagger/ui.test.ts
CHANGED