exisjs 0.6.0 → 0.7.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/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +11 -9
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/dev.d.ts.map +1 -1
- package/dist/cli/commands/dev.js +34 -36
- package/dist/cli/commands/dev.js.map +1 -1
- package/dist/cli/commands/exports.d.ts.map +1 -1
- package/dist/cli/commands/exports.js +5 -32
- package/dist/cli/commands/exports.js.map +1 -1
- package/dist/cli/commands/generate.d.ts +2 -13
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +27 -60
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +4 -4
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +2 -6
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/index.js +11 -23
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/routes.d.ts.map +1 -1
- package/dist/cli/routes.js +20 -8
- package/dist/cli/routes.js.map +1 -1
- package/dist/config/config.d.ts +2 -1
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +3 -2
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +7 -2
- package/dist/config/types.d.ts.map +1 -1
- package/dist/decorators/constants.d.ts +2 -2
- package/dist/decorators/constants.d.ts.map +1 -1
- package/dist/decorators/constants.js +2 -2
- package/dist/decorators/constants.js.map +1 -1
- package/dist/decorators/core.d.ts +4 -3
- package/dist/decorators/core.d.ts.map +1 -1
- package/dist/decorators/core.js +7 -4
- package/dist/decorators/core.js.map +1 -1
- package/dist/decorators/middleware.d.ts +0 -10
- package/dist/decorators/middleware.d.ts.map +1 -1
- package/dist/decorators/middleware.js +0 -25
- package/dist/decorators/middleware.js.map +1 -1
- package/dist/decorators/routing.d.ts +0 -2
- package/dist/decorators/routing.d.ts.map +1 -1
- package/dist/decorators/routing.js +1 -3
- package/dist/decorators/routing.js.map +1 -1
- package/dist/di/inject.d.ts +1 -2
- package/dist/di/inject.d.ts.map +1 -1
- package/dist/di/inject.js.map +1 -1
- package/dist/docs/ARCHITECTURE.md +46 -285
- package/dist/docs/BENCHMARKS.md +5 -5
- package/dist/docs/README.md +8 -11
- package/dist/docs/content/boundaries.mdx +151 -0
- package/dist/docs/content/cli/commands.mdx +66 -104
- package/dist/docs/content/cli/overview.mdx +37 -47
- package/dist/docs/content/cli/usage.mdx +29 -15
- package/dist/docs/content/decorators.mdx +107 -80
- package/dist/docs/content/installation.mdx +20 -1
- package/dist/docs/content/middleware.mdx +65 -291
- package/dist/docs/content/security.mdx +44 -246
- package/dist/docs/content/structure.mdx +227 -100
- package/dist/docs/content/validation.mdx +0 -17
- package/dist/docs/reference/decorators.mdx +24 -217
- package/dist/docs/reference/middleware.mdx +41 -217
- package/dist/docs/reference/validator.mdx +2 -5
- package/dist/error/errors.d.ts.map +1 -1
- package/dist/error/errors.js +16 -0
- package/dist/error/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/start-repl.js +2 -4
- package/dist/lib/start-repl.js.map +1 -1
- package/dist/lib/start-server.js +12 -4
- package/dist/lib/start-server.js.map +1 -1
- package/dist/logger/index.d.ts +81 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +142 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/middleware/dedupe.d.ts +1 -1
- package/dist/middleware/dedupe.js +1 -1
- package/dist/middleware/middleware.d.ts +3 -5
- package/dist/middleware/middleware.d.ts.map +1 -1
- package/dist/middleware/middleware.js +2 -6
- package/dist/middleware/middleware.js.map +1 -1
- package/dist/router/{gateway.d.ts → boundary.d.ts} +21 -13
- package/dist/router/boundary.d.ts.map +1 -0
- package/dist/router/boundary.js +11 -0
- package/dist/router/boundary.js.map +1 -0
- package/dist/router/index.d.ts +3 -6
- package/dist/router/index.d.ts.map +1 -1
- package/dist/router/index.js +3 -7
- package/dist/router/index.js.map +1 -1
- package/dist/router/route-builder.d.ts +0 -28
- package/dist/router/route-builder.d.ts.map +1 -1
- package/dist/router/route-builder.js +0 -4
- package/dist/router/route-builder.js.map +1 -1
- package/dist/router/route-scanner.d.ts +1 -2
- package/dist/router/route-scanner.d.ts.map +1 -1
- package/dist/router/route-scanner.js +216 -193
- package/dist/router/route-scanner.js.map +1 -1
- package/dist/router/router.d.ts +4 -6
- package/dist/router/router.d.ts.map +1 -1
- package/dist/router/router.js +36 -72
- package/dist/router/router.js.map +1 -1
- package/dist/router/types.d.ts +2 -6
- package/dist/router/types.d.ts.map +1 -1
- package/dist/server/{bun-adapter.d.ts → adapters/bun-adapter.d.ts} +1 -1
- package/dist/server/adapters/bun-adapter.d.ts.map +1 -0
- package/dist/server/{bun-adapter.js → adapters/bun-adapter.js} +2 -24
- package/dist/server/adapters/bun-adapter.js.map +1 -0
- package/dist/server/{uws-adapter.d.ts → adapters/uws-adapter.d.ts} +1 -1
- package/dist/server/adapters/uws-adapter.d.ts.map +1 -0
- package/dist/server/{uws-adapter.js → adapters/uws-adapter.js} +1 -28
- package/dist/server/adapters/uws-adapter.js.map +1 -0
- package/dist/server/app.d.ts +9 -30
- package/dist/server/app.d.ts.map +1 -1
- package/dist/server/app.js +19 -134
- package/dist/server/app.js.map +1 -1
- package/dist/server/bootstrapper.d.ts +4 -15
- package/dist/server/bootstrapper.d.ts.map +1 -1
- package/dist/server/bootstrapper.js +31 -222
- package/dist/server/bootstrapper.js.map +1 -1
- package/dist/server/define.d.ts +2 -2
- package/dist/server/define.d.ts.map +1 -1
- package/dist/server/define.js +3 -3
- package/dist/server/define.js.map +1 -1
- package/dist/server/engines/bun-engine.d.ts +16 -0
- package/dist/server/engines/bun-engine.d.ts.map +1 -0
- package/dist/server/engines/bun-engine.js +41 -0
- package/dist/server/engines/bun-engine.js.map +1 -0
- package/dist/server/engines/engine.d.ts +16 -0
- package/dist/server/engines/engine.d.ts.map +1 -0
- package/dist/{queue/types.js → server/engines/engine.js} +1 -1
- package/dist/server/engines/engine.js.map +1 -0
- package/dist/server/engines/node-engine.d.ts +22 -0
- package/dist/server/engines/node-engine.d.ts.map +1 -0
- package/dist/server/engines/node-engine.js +130 -0
- package/dist/server/engines/node-engine.js.map +1 -0
- package/dist/server/engines/uws-engine.d.ts +16 -0
- package/dist/server/engines/uws-engine.d.ts.map +1 -0
- package/dist/server/engines/uws-engine.js +48 -0
- package/dist/server/engines/uws-engine.js.map +1 -0
- package/dist/server/request-handler.d.ts +0 -1
- package/dist/server/request-handler.d.ts.map +1 -1
- package/dist/server/request-handler.js +74 -48
- package/dist/server/request-handler.js.map +1 -1
- package/dist/server/request.d.ts +0 -8
- package/dist/server/request.d.ts.map +1 -1
- package/dist/server/request.js +0 -16
- package/dist/server/request.js.map +1 -1
- package/dist/utils/time.d.ts +6 -0
- package/dist/utils/time.d.ts.map +1 -0
- package/dist/utils/time.js +15 -0
- package/dist/utils/time.js.map +1 -0
- package/dist/validator/index.d.ts +1 -7
- package/dist/validator/index.d.ts.map +1 -1
- package/dist/validator/index.js +1 -5
- package/dist/validator/index.js.map +1 -1
- package/dist/validator/tex-types.d.ts +15 -2
- package/dist/validator/tex-types.d.ts.map +1 -1
- package/dist/validator/tex-types.js +8 -0
- package/dist/validator/tex-types.js.map +1 -1
- package/dist/validator/tex.d.ts.map +1 -1
- package/dist/validator/tex.js +21 -2
- package/dist/validator/tex.js.map +1 -1
- package/package.json +9 -151
- package/dist/adapters/aws-lambda.d.ts +0 -21
- package/dist/adapters/aws-lambda.d.ts.map +0 -1
- package/dist/adapters/aws-lambda.js +0 -125
- package/dist/adapters/aws-lambda.js.map +0 -1
- package/dist/adapters/bun.d.ts +0 -9
- package/dist/adapters/bun.d.ts.map +0 -1
- package/dist/adapters/bun.js +0 -23
- package/dist/adapters/bun.js.map +0 -1
- package/dist/adapters/cloudflare.d.ts +0 -10
- package/dist/adapters/cloudflare.d.ts.map +0 -1
- package/dist/adapters/cloudflare.js +0 -22
- package/dist/adapters/cloudflare.js.map +0 -1
- package/dist/adapters/deno.d.ts +0 -7
- package/dist/adapters/deno.d.ts.map +0 -1
- package/dist/adapters/deno.js +0 -21
- package/dist/adapters/deno.js.map +0 -1
- package/dist/adapters/fastly.d.ts +0 -6
- package/dist/adapters/fastly.d.ts.map +0 -1
- package/dist/adapters/fastly.js +0 -20
- package/dist/adapters/fastly.js.map +0 -1
- package/dist/adapters/fetch.d.ts +0 -30
- package/dist/adapters/fetch.d.ts.map +0 -1
- package/dist/adapters/fetch.js +0 -119
- package/dist/adapters/fetch.js.map +0 -1
- package/dist/adapters/index.d.ts +0 -9
- package/dist/adapters/index.d.ts.map +0 -1
- package/dist/adapters/index.js +0 -28
- package/dist/adapters/index.js.map +0 -1
- package/dist/adapters/netlify.d.ts +0 -8
- package/dist/adapters/netlify.d.ts.map +0 -1
- package/dist/adapters/netlify.js +0 -20
- package/dist/adapters/netlify.js.map +0 -1
- package/dist/adapters/vercel.d.ts +0 -17
- package/dist/adapters/vercel.d.ts.map +0 -1
- package/dist/adapters/vercel.js +0 -23
- package/dist/adapters/vercel.js.map +0 -1
- package/dist/auth/index.d.ts +0 -8
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js +0 -49
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/jwt.d.ts +0 -20
- package/dist/auth/jwt.d.ts.map +0 -1
- package/dist/auth/jwt.js +0 -59
- package/dist/auth/jwt.js.map +0 -1
- package/dist/auth/oauth/core.d.ts +0 -96
- package/dist/auth/oauth/core.d.ts.map +0 -1
- package/dist/auth/oauth/core.js +0 -203
- package/dist/auth/oauth/core.js.map +0 -1
- package/dist/auth/oauth/index.d.ts +0 -45
- package/dist/auth/oauth/index.d.ts.map +0 -1
- package/dist/auth/oauth/index.js +0 -64
- package/dist/auth/oauth/index.js.map +0 -1
- package/dist/auth/oauth/middleware.d.ts +0 -63
- package/dist/auth/oauth/middleware.d.ts.map +0 -1
- package/dist/auth/oauth/middleware.js +0 -164
- package/dist/auth/oauth/middleware.js.map +0 -1
- package/dist/auth/oauth/providers/custom.d.ts +0 -41
- package/dist/auth/oauth/providers/custom.d.ts.map +0 -1
- package/dist/auth/oauth/providers/custom.js +0 -204
- package/dist/auth/oauth/providers/custom.js.map +0 -1
- package/dist/auth/oauth/providers/discord.d.ts +0 -23
- package/dist/auth/oauth/providers/discord.d.ts.map +0 -1
- package/dist/auth/oauth/providers/discord.js +0 -130
- package/dist/auth/oauth/providers/discord.js.map +0 -1
- package/dist/auth/oauth/providers/facebook.d.ts +0 -28
- package/dist/auth/oauth/providers/facebook.d.ts.map +0 -1
- package/dist/auth/oauth/providers/facebook.js +0 -124
- package/dist/auth/oauth/providers/facebook.js.map +0 -1
- package/dist/auth/oauth/providers/github.d.ts +0 -25
- package/dist/auth/oauth/providers/github.d.ts.map +0 -1
- package/dist/auth/oauth/providers/github.js +0 -132
- package/dist/auth/oauth/providers/github.js.map +0 -1
- package/dist/auth/oauth/providers/google.d.ts +0 -23
- package/dist/auth/oauth/providers/google.d.ts.map +0 -1
- package/dist/auth/oauth/providers/google.js +0 -134
- package/dist/auth/oauth/providers/google.js.map +0 -1
- package/dist/auth/oauth/providers/microsoft.d.ts +0 -28
- package/dist/auth/oauth/providers/microsoft.d.ts.map +0 -1
- package/dist/auth/oauth/providers/microsoft.js +0 -136
- package/dist/auth/oauth/providers/microsoft.js.map +0 -1
- package/dist/auth/oauth/types.d.ts +0 -158
- package/dist/auth/oauth/types.d.ts.map +0 -1
- package/dist/auth/oauth/types.js +0 -4
- package/dist/auth/oauth/types.js.map +0 -1
- package/dist/auth/password.d.ts +0 -25
- package/dist/auth/password.d.ts.map +0 -1
- package/dist/auth/password.js +0 -93
- package/dist/auth/password.js.map +0 -1
- package/dist/auth/rbac.d.ts +0 -10
- package/dist/auth/rbac.d.ts.map +0 -1
- package/dist/auth/rbac.js +0 -34
- package/dist/auth/rbac.js.map +0 -1
- package/dist/auth/session.d.ts +0 -26
- package/dist/auth/session.d.ts.map +0 -1
- package/dist/auth/session.js +0 -134
- package/dist/auth/session.js.map +0 -1
- package/dist/cache/index.d.ts +0 -4
- package/dist/cache/index.d.ts.map +0 -1
- package/dist/cache/index.js +0 -25
- package/dist/cache/index.js.map +0 -1
- package/dist/cache/store.d.ts +0 -58
- package/dist/cache/store.d.ts.map +0 -1
- package/dist/cache/store.js +0 -298
- package/dist/cache/store.js.map +0 -1
- package/dist/cron/parser.d.ts +0 -2
- package/dist/cron/parser.d.ts.map +0 -1
- package/dist/cron/parser.js +0 -52
- package/dist/cron/parser.js.map +0 -1
- package/dist/cron/scheduler.d.ts +0 -23
- package/dist/cron/scheduler.d.ts.map +0 -1
- package/dist/cron/scheduler.js +0 -114
- package/dist/cron/scheduler.js.map +0 -1
- package/dist/database/adapters/mongodb.d.ts +0 -58
- package/dist/database/adapters/mongodb.d.ts.map +0 -1
- package/dist/database/adapters/mongodb.js +0 -264
- package/dist/database/adapters/mongodb.js.map +0 -1
- package/dist/database/adapters/mysql.d.ts +0 -27
- package/dist/database/adapters/mysql.d.ts.map +0 -1
- package/dist/database/adapters/mysql.js +0 -188
- package/dist/database/adapters/mysql.js.map +0 -1
- package/dist/database/adapters/postgres.d.ts +0 -28
- package/dist/database/adapters/postgres.d.ts.map +0 -1
- package/dist/database/adapters/postgres.js +0 -174
- package/dist/database/adapters/postgres.js.map +0 -1
- package/dist/database/adapters/sqlite.d.ts +0 -27
- package/dist/database/adapters/sqlite.d.ts.map +0 -1
- package/dist/database/adapters/sqlite.js +0 -149
- package/dist/database/adapters/sqlite.js.map +0 -1
- package/dist/database/index.d.ts +0 -42
- package/dist/database/index.d.ts.map +0 -1
- package/dist/database/index.js +0 -58
- package/dist/database/index.js.map +0 -1
- package/dist/database/manager.d.ts +0 -141
- package/dist/database/manager.d.ts.map +0 -1
- package/dist/database/manager.js +0 -337
- package/dist/database/manager.js.map +0 -1
- package/dist/database/migration.d.ts +0 -57
- package/dist/database/migration.d.ts.map +0 -1
- package/dist/database/migration.js +0 -329
- package/dist/database/migration.js.map +0 -1
- package/dist/database/query-builder.d.ts +0 -95
- package/dist/database/query-builder.d.ts.map +0 -1
- package/dist/database/query-builder.js +0 -404
- package/dist/database/query-builder.js.map +0 -1
- package/dist/database/sql/index.d.ts +0 -18
- package/dist/database/sql/index.d.ts.map +0 -1
- package/dist/database/sql/index.js +0 -74
- package/dist/database/sql/index.js.map +0 -1
- package/dist/database/sql/schema.d.ts +0 -38
- package/dist/database/sql/schema.d.ts.map +0 -1
- package/dist/database/sql/schema.js +0 -80
- package/dist/database/sql/schema.js.map +0 -1
- package/dist/database/synchronizer.d.ts +0 -12
- package/dist/database/synchronizer.d.ts.map +0 -1
- package/dist/database/synchronizer.js +0 -82
- package/dist/database/synchronizer.js.map +0 -1
- package/dist/database/types.d.ts +0 -184
- package/dist/database/types.d.ts.map +0 -1
- package/dist/database/types.js +0 -4
- package/dist/database/types.js.map +0 -1
- package/dist/dataloader/dataloader.d.ts +0 -23
- package/dist/dataloader/dataloader.d.ts.map +0 -1
- package/dist/dataloader/dataloader.js +0 -98
- package/dist/dataloader/dataloader.js.map +0 -1
- package/dist/dataloader/index.d.ts +0 -3
- package/dist/dataloader/index.d.ts.map +0 -1
- package/dist/dataloader/index.js +0 -19
- package/dist/dataloader/index.js.map +0 -1
- package/dist/dataloader/registry.d.ts +0 -17
- package/dist/dataloader/registry.d.ts.map +0 -1
- package/dist/dataloader/registry.js +0 -47
- package/dist/dataloader/registry.js.map +0 -1
- package/dist/dev/dep-graph.d.ts +0 -2
- package/dist/dev/dep-graph.d.ts.map +0 -1
- package/dist/dev/dep-graph.js +0 -111
- package/dist/dev/dep-graph.js.map +0 -1
- package/dist/dev/hot-reload.d.ts +0 -30
- package/dist/dev/hot-reload.d.ts.map +0 -1
- package/dist/dev/hot-reload.js +0 -262
- package/dist/dev/hot-reload.js.map +0 -1
- package/dist/docs/content/adapters.mdx +0 -199
- package/dist/docs/content/cache.mdx +0 -239
- package/dist/docs/content/circuit-breaker.mdx +0 -130
- package/dist/docs/content/cron.mdx +0 -109
- package/dist/docs/content/database.mdx +0 -278
- package/dist/docs/content/gateways.mdx +0 -376
- package/dist/docs/content/oauth.mdx +0 -179
- package/dist/docs/content/queues.mdx +0 -177
- package/dist/docs/content/rpc.mdx +0 -146
- package/dist/docs/content/sse.mdx +0 -159
- package/dist/docs/content/websockets.mdx +0 -289
- package/dist/docs/integrations/README.md +0 -23
- package/dist/docs/integrations/jwt.mdx +0 -151
- package/dist/docs/integrations/mongo.mdx +0 -183
- package/dist/docs/integrations/observability.mdx +0 -125
- package/dist/docs/integrations/openai.mdx +0 -108
- package/dist/docs/integrations/postgres.mdx +0 -190
- package/dist/docs/integrations/posthog.mdx +0 -122
- package/dist/docs/integrations/redis.mdx +0 -141
- package/dist/docs/integrations/resend.mdx +0 -117
- package/dist/docs/integrations/s3.mdx +0 -122
- package/dist/docs/integrations/swagger.mdx +0 -113
- package/dist/docs/reference/adapters.mdx +0 -130
- package/dist/docs/reference/auth.mdx +0 -183
- package/dist/docs/reference/cache.mdx +0 -132
- package/dist/docs/reference/circuit-breaker.mdx +0 -71
- package/dist/docs/reference/queue.mdx +0 -155
- package/dist/docs/reference/storage.mdx +0 -116
- package/dist/docs/reference/swagger.mdx +0 -132
- package/dist/integrations/drizzle.d.ts +0 -10
- package/dist/integrations/drizzle.d.ts.map +0 -1
- package/dist/integrations/drizzle.js +0 -34
- package/dist/integrations/drizzle.js.map +0 -1
- package/dist/integrations/jwt.d.ts +0 -12
- package/dist/integrations/jwt.d.ts.map +0 -1
- package/dist/integrations/jwt.js +0 -29
- package/dist/integrations/jwt.js.map +0 -1
- package/dist/integrations/mongodb.d.ts +0 -13
- package/dist/integrations/mongodb.d.ts.map +0 -1
- package/dist/integrations/mongodb.js +0 -48
- package/dist/integrations/mongodb.js.map +0 -1
- package/dist/integrations/mongoose.d.ts +0 -13
- package/dist/integrations/mongoose.d.ts.map +0 -1
- package/dist/integrations/mongoose.js +0 -84
- package/dist/integrations/mongoose.js.map +0 -1
- package/dist/integrations/openai.d.ts +0 -12
- package/dist/integrations/openai.d.ts.map +0 -1
- package/dist/integrations/openai.js +0 -47
- package/dist/integrations/openai.js.map +0 -1
- package/dist/integrations/postgres.d.ts +0 -13
- package/dist/integrations/postgres.d.ts.map +0 -1
- package/dist/integrations/postgres.js +0 -55
- package/dist/integrations/postgres.js.map +0 -1
- package/dist/integrations/posthog.d.ts +0 -13
- package/dist/integrations/posthog.d.ts.map +0 -1
- package/dist/integrations/posthog.js +0 -49
- package/dist/integrations/posthog.js.map +0 -1
- package/dist/integrations/prisma.d.ts +0 -10
- package/dist/integrations/prisma.d.ts.map +0 -1
- package/dist/integrations/prisma.js +0 -39
- package/dist/integrations/prisma.js.map +0 -1
- package/dist/integrations/redis.d.ts +0 -12
- package/dist/integrations/redis.d.ts.map +0 -1
- package/dist/integrations/redis.js +0 -48
- package/dist/integrations/redis.js.map +0 -1
- package/dist/integrations/resend.d.ts +0 -12
- package/dist/integrations/resend.d.ts.map +0 -1
- package/dist/integrations/resend.js +0 -47
- package/dist/integrations/resend.js.map +0 -1
- package/dist/integrations/s3.d.ts +0 -15
- package/dist/integrations/s3.d.ts.map +0 -1
- package/dist/integrations/s3.js +0 -60
- package/dist/integrations/s3.js.map +0 -1
- package/dist/integrations/supabase.d.ts +0 -13
- package/dist/integrations/supabase.d.ts.map +0 -1
- package/dist/integrations/supabase.js +0 -51
- package/dist/integrations/supabase.js.map +0 -1
- package/dist/middleware/cache.d.ts +0 -21
- package/dist/middleware/cache.d.ts.map +0 -1
- package/dist/middleware/cache.js +0 -156
- package/dist/middleware/cache.js.map +0 -1
- package/dist/observability/health.d.ts +0 -23
- package/dist/observability/health.d.ts.map +0 -1
- package/dist/observability/health.js +0 -49
- package/dist/observability/health.js.map +0 -1
- package/dist/observability/index.d.ts +0 -4
- package/dist/observability/index.d.ts.map +0 -1
- package/dist/observability/index.js +0 -10
- package/dist/observability/index.js.map +0 -1
- package/dist/observability/metrics.d.ts +0 -6
- package/dist/observability/metrics.d.ts.map +0 -1
- package/dist/observability/metrics.js +0 -60
- package/dist/observability/metrics.js.map +0 -1
- package/dist/observability/otel.d.ts +0 -27
- package/dist/observability/otel.d.ts.map +0 -1
- package/dist/observability/otel.js +0 -45
- package/dist/observability/otel.js.map +0 -1
- package/dist/observability/prometheus.d.ts +0 -30
- package/dist/observability/prometheus.d.ts.map +0 -1
- package/dist/observability/prometheus.js +0 -31
- package/dist/observability/prometheus.js.map +0 -1
- package/dist/queue/client.d.ts +0 -13
- package/dist/queue/client.d.ts.map +0 -1
- package/dist/queue/client.js +0 -83
- package/dist/queue/client.js.map +0 -1
- package/dist/queue/drivers/MemoryDriver.d.ts +0 -21
- package/dist/queue/drivers/MemoryDriver.d.ts.map +0 -1
- package/dist/queue/drivers/MemoryDriver.js +0 -176
- package/dist/queue/drivers/MemoryDriver.js.map +0 -1
- package/dist/queue/drivers/RedisDriver.d.ts +0 -19
- package/dist/queue/drivers/RedisDriver.d.ts.map +0 -1
- package/dist/queue/drivers/RedisDriver.js +0 -130
- package/dist/queue/drivers/RedisDriver.js.map +0 -1
- package/dist/queue/index.d.ts +0 -18
- package/dist/queue/index.d.ts.map +0 -1
- package/dist/queue/index.js +0 -37
- package/dist/queue/index.js.map +0 -1
- package/dist/queue/manager.d.ts +0 -18
- package/dist/queue/manager.d.ts.map +0 -1
- package/dist/queue/manager.js +0 -59
- package/dist/queue/manager.js.map +0 -1
- package/dist/queue/types.d.ts +0 -55
- package/dist/queue/types.d.ts.map +0 -1
- package/dist/queue/types.js.map +0 -1
- package/dist/queue/worker.d.ts +0 -18
- package/dist/queue/worker.d.ts.map +0 -1
- package/dist/queue/worker.js +0 -176
- package/dist/queue/worker.js.map +0 -1
- package/dist/router/gateway.d.ts.map +0 -1
- package/dist/router/gateway.js +0 -11
- package/dist/router/gateway.js.map +0 -1
- package/dist/server/bun-adapter.d.ts.map +0 -1
- package/dist/server/bun-adapter.js.map +0 -1
- package/dist/server/sse.d.ts +0 -16
- package/dist/server/sse.d.ts.map +0 -1
- package/dist/server/sse.js +0 -51
- package/dist/server/sse.js.map +0 -1
- package/dist/server/uws-adapter.d.ts.map +0 -1
- package/dist/server/uws-adapter.js.map +0 -1
- package/dist/storage/index.d.ts +0 -15
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js +0 -7
- package/dist/storage/index.js.map +0 -1
- package/dist/swagger/index.d.ts +0 -9
- package/dist/swagger/index.d.ts.map +0 -1
- package/dist/swagger/index.js +0 -165
- package/dist/swagger/index.js.map +0 -1
- package/dist/threads/pool.d.ts +0 -14
- package/dist/threads/pool.d.ts.map +0 -1
- package/dist/threads/pool.js +0 -93
- package/dist/threads/pool.js.map +0 -1
- package/dist/threads/worker-runner.d.ts +0 -2
- package/dist/threads/worker-runner.d.ts.map +0 -1
- package/dist/threads/worker-runner.js +0 -71
- package/dist/threads/worker-runner.js.map +0 -1
- package/dist/validator/validator.d.ts +0 -360
- package/dist/validator/validator.d.ts.map +0 -1
- package/dist/validator/validator.js +0 -931
- package/dist/validator/validator.js.map +0 -1
- package/dist/websocket/orchestrator.d.ts +0 -11
- package/dist/websocket/orchestrator.d.ts.map +0 -1
- package/dist/websocket/orchestrator.js +0 -238
- package/dist/websocket/orchestrator.js.map +0 -1
- package/dist/websocket/server.d.ts +0 -66
- package/dist/websocket/server.d.ts.map +0 -1
- package/dist/websocket/server.js +0 -158
- package/dist/websocket/server.js.map +0 -1
- package/dist/websocket/socket.d.ts +0 -119
- package/dist/websocket/socket.d.ts.map +0 -1
- package/dist/websocket/socket.js +0 -242
- package/dist/websocket/socket.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../src/decorators/middleware.ts"],"names":[],"mappings":";;;;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AAC,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAA;YACpE,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,oBAAoB,EAAE,CAAC;gBAC1D,yBAAyB;gBACzB,MAAM,CAAC,SAAS,CAAC,mCAAuB,CAAC;oBACvC,MAAM,CAAC,SAAS,CAAC,mCAAuB,CAAC,IAAI,EAAE,CAAA;gBACjD,MAAM,CAAC,SAAS,CAAC,mCAAuB,CAAC,CAAC,aAAa;oBACrD,MAAM,CAAC,SAAS,CAAC,mCAAuB,CAAC,CAAC,aAAa,IAAI,EAAE,CAAA;gBAC/D,MAAM,CAAC,SAAS,CAAC,mCAAuB,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAA;YAC1E,CAAC;iBAAM,CAAC;gBACN,0BAA0B;gBAC1B,MAAM,EAAE,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAA;gBACvC,EAAE,CAAC,mCAAuB,CAAC,GAAG,EAAE,CAAC,mCAAuB,CAAC,IAAI,EAAE,CAAA;gBAC/D,EAAE,CAAC,mCAAuB,CAAC,CAAC,OAAO;oBACjC,EAAE,CAAC,mCAAuB,CAAC,CAAC,OAAO,IAAI,EAAE,CAAA;gBAC3C,EAAE,CAAC,mCAAuB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAA;YACtD,CAAC;QACH,CAAC;IACH,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -34,6 +34,4 @@ export declare const Head: (path?: string, schema?: RouteSchema<any, any, any, a
|
|
|
34
34
|
export declare const All: (path?: string, schema?: RouteSchema<any, any, any, any>) => any;
|
|
35
35
|
export declare const Connect: (path?: string, schema?: RouteSchema<any, any, any, any>) => any;
|
|
36
36
|
export declare const Trace: (path?: string, schema?: RouteSchema<any, any, any, any>) => any;
|
|
37
|
-
export declare const Ws: (path?: string, schema?: RouteSchema<any, any, any, any>) => any;
|
|
38
|
-
export declare const Sse: (path?: string, schema?: RouteSchema<any, any, any, any>) => any;
|
|
39
37
|
//# sourceMappingURL=routing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/decorators/routing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAIvD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,UAAU,IACrC,aAAS,EAAE,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAAG,CAoC3E;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,GAAG,2BAlDuB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAkD1B,CAAA;AAE/C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,IAAI,2BAhEsB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAgExB,CAAA;AACjD,eAAO,MAAM,GAAG,2BAjEuB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAiE1B,CAAA;AAC/C,eAAO,MAAM,KAAK,2BAlEqB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAkEtB,CAAA;AACnD,eAAO,MAAM,MAAM,2BAnEoB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAmEpB,CAAA;AACrD,eAAO,MAAM,OAAO,2BApEmB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAoElB,CAAA;AACvD,eAAO,MAAM,IAAI,2BArEsB,WAAW,CAAC,GAAG,EAAE,GAAG,EAA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AAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAmEpB,CAAA;AACrD,eAAO,MAAM,OAAO,2BApEmB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAoElB,CAAA;AACvD,eAAO,MAAM,IAAI,2BArEsB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAqExB,CAAA;AACjD,eAAO,MAAM,GAAG,2BAtEuB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAsE1B,CAAA;AAC/C,eAAO,MAAM,OAAO,2BAvEmB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAuElB,CAAA;AACvD,eAAO,MAAM,KAAK,2BAxEqB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,GAwEtB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Trace = exports.Connect = exports.All = exports.Head = exports.Options = exports.Delete = exports.Patch = exports.Put = exports.Post = exports.Get = void 0;
|
|
4
4
|
exports.createMethodDecorator = createMethodDecorator;
|
|
5
5
|
const constants_1 = require("./constants");
|
|
6
6
|
const metadata_1 = require("./core/metadata");
|
|
@@ -68,6 +68,4 @@ exports.Head = createMethodDecorator('HEAD');
|
|
|
68
68
|
exports.All = createMethodDecorator('ALL');
|
|
69
69
|
exports.Connect = createMethodDecorator('CONNECT');
|
|
70
70
|
exports.Trace = createMethodDecorator('TRACE');
|
|
71
|
-
exports.Ws = createMethodDecorator('WS');
|
|
72
|
-
exports.Sse = createMethodDecorator('SSE');
|
|
73
71
|
//# sourceMappingURL=routing.js.map
|
|
@@ -1 +1 @@
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tE,MAAM,IAAI,GAAG,oBAAoB,IAAI,UAAU,EAAE,IAAI,CAAA;gBACrD,yBAAc,CAAC,IAAI,CAAC,KAAK,EAAE,0BAAc,EAAE;oBACzC,MAAM;oBACN,IAAI;oBACJ,MAAM;oBACN,WAAW,EAAE,IAAI;iBAClB,CAAC,CAAA;YACJ,CAAC;QACH,CAAC,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACU,QAAA,GAAG,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAA;AAE/C;;;;;;;;;;;GAWG;AACU,QAAA,IAAI,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAA;AACpC,QAAA,GAAG,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAA;AAClC,QAAA,KAAK,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAA;AACtC,QAAA,MAAM,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAA;AACxC,QAAA,OAAO,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAA;AAC1C,QAAA,IAAI,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAA;AACpC,QAAA,GAAG,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAA;AAClC,QAAA,OAAO,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAA;AAC1C,QAAA,KAAK,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAA"}
|
package/dist/di/inject.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ProviderToken } from './container';
|
|
2
1
|
/**
|
|
3
2
|
* Injects a dependency from the Exis Application container.
|
|
4
3
|
* Must be called inside an active route or middleware context.
|
|
@@ -16,5 +15,5 @@ import type { ProviderToken } from './container';
|
|
|
16
15
|
* @return {T} The resolved dependency
|
|
17
16
|
* @public
|
|
18
17
|
*/
|
|
19
|
-
export declare function inject<T>(token:
|
|
18
|
+
export declare function inject<T>(token: (new (...args: any[]) => T) | string): T;
|
|
20
19
|
//# sourceMappingURL=inject.d.ts.map
|
package/dist/di/inject.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject.d.ts","sourceRoot":"","sources":["../../src/di/inject.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inject.d.ts","sourceRoot":"","sources":["../../src/di/inject.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,CAQxE"}
|
package/dist/di/inject.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject.js","sourceRoot":"","sources":["../../src/di/inject.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"inject.js","sourceRoot":"","sources":["../../src/di/inject.ts"],"names":[],"mappings":";;AAmBA,wBAQC;AA3BD,+CAAoD;AAEpD;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,MAAM,CAAI,KAA2C;IACnE,MAAM,KAAK,GAAG,0BAAgB,CAAC,QAAQ,EAAE,CAAA;IACzC,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAA;IACH,CAAC;IACD,OAAO,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;AAChD,CAAC"}
|
|
@@ -1,48 +1,30 @@
|
|
|
1
1
|
# ExisJS Architecture Reference
|
|
2
2
|
|
|
3
|
-
This document is the single source of truth for how
|
|
3
|
+
This document is the single source of truth for how the ExisJS core engine is built internally.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- 🟢 **Stable** — core path, exercised by real deployments and dense test coverage.
|
|
8
|
-
- 🟡 **Beta** — works as documented, but has known rough edges or thinner test coverage.
|
|
9
|
-
- 🟠 **Experimental** — functional but unproven under real production load; expect edge cases.
|
|
10
|
-
- 🔴 **Known Issue** — currently broken or non-functional; see linked bug reference.
|
|
11
|
-
- ⚪ **Scaffolded / Not Implemented** — API surface or docs exist, but the behavior described does not (yet) exist at runtime.
|
|
5
|
+
ExisJS core is a minimal, ultra-high-performance web framework runtime: file-system routing, dependency injection, validation (`tex`), sanitization, and an HTTP request pipeline. Everything else — databases, external auth providers, cache stores, queues, websockets — is extracted into official `@exisjs/*` packages.
|
|
12
6
|
|
|
13
7
|
---
|
|
14
8
|
|
|
15
9
|
## 1. File-System Routing 🟢
|
|
16
10
|
|
|
17
|
-
**What it is:** Folder-based routing mapping HTTP routes to the file system (`route.ts`, `
|
|
11
|
+
**What it is:** Folder-based routing mapping HTTP routes to the file system (`route.ts`, `boundary.ts`, `server.ts`, `schema.ts`, `service.ts`).
|
|
18
12
|
|
|
19
|
-
**How it's implemented:** At boot, `RouteScanner` walks the configured `src/http` directory (or a custom `apiDir`) and registers discovered routes into the `Router`'s matching engine
|
|
13
|
+
**How it's implemented:** At boot, `RouteScanner` walks the configured `src/http` directory (or a custom `apiDir`) and registers discovered routes into the `Router`'s matching engine powered by the Rust `NativeRadixTree`. Folder-naming conventions are translated during the scan:
|
|
20
14
|
|
|
21
15
|
- `[param]` → `:param` dynamic segment
|
|
22
16
|
- `[...param]` → `*param` catch-all
|
|
23
17
|
- `(group)` → ignored entirely in the resulting URL, but still traversed for nested routes
|
|
24
18
|
|
|
25
|
-
In development, routes are mounted
|
|
26
|
-
|
|
27
|
-
**Example:**
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
// src/http/users/[id]/route.ts
|
|
31
|
-
import { controller, route } from 'exisjs/router'
|
|
32
|
-
export default controller({
|
|
33
|
-
getSingle: route.get('/', {
|
|
34
|
-
handle: ({ params }) => ({ id: params.id }),
|
|
35
|
-
}),
|
|
36
|
-
})
|
|
37
|
-
```
|
|
19
|
+
In development, routes are mounted dynamically and watched by `HotReloader`. In production, `exis build` pre-generates a route manifest (`.exis/routes-manifest.js`) for instant O(1) boot.
|
|
38
20
|
|
|
39
21
|
---
|
|
40
22
|
|
|
41
23
|
## 2. Dual Paradigm: Functional & Class-Based (OOP) 🟢
|
|
42
24
|
|
|
43
|
-
**What it is:** Two ways to define
|
|
25
|
+
**What it is:** Two ways to define routing and handlers — `controller()`/`route.*()` factory functions, or `@Controller()`/`@Get()` class decorators — that compile down to the same internal `Route` representation.
|
|
44
26
|
|
|
45
|
-
**How it's implemented:** Class decorators
|
|
27
|
+
**How it's implemented:** Class decorators attach metadata to the class prototype via symbols (`Symbol.for('exisjs:...')`) without any `reflect-metadata` dependency. The router processes both paradigms through the exact same internal pipeline. Choose one paradigm per project.
|
|
46
28
|
|
|
47
29
|
---
|
|
48
30
|
|
|
@@ -50,300 +32,79 @@ export default controller({
|
|
|
50
32
|
|
|
51
33
|
**What it is:** Access to the current request's `req`/`res`/app-scoped state from anywhere in the call graph without prop-drilling, plus `after()` for deferred post-response work.
|
|
52
34
|
|
|
53
|
-
**How it's implemented:** `
|
|
54
|
-
|
|
55
|
-
**Isolation:** each request gets its own `diCache` (a fresh `Map`) for request-scoped DI resolution, and context state does not leak across concurrent requests — this is tested and confirmed correct.
|
|
35
|
+
**How it's implemented:** `AsyncLocalStorage` maintains an active store per request containing `{ state, afterCallbacks, req, res, app, diCache }`. `inject()`, `getContext()`, and `after()` read from this store, guaranteeing request isolation across concurrent requests.
|
|
56
36
|
|
|
57
37
|
---
|
|
58
38
|
|
|
59
39
|
## 4. Dependency Injection (`Container`) 🟢
|
|
60
40
|
|
|
61
|
-
**What it is:**
|
|
62
|
-
|
|
63
|
-
**How it's implemented:** `di/container.ts`'s `Container` class holds a `providers` map and a `singletonCache`. `resolve(token, requestCache?)` checks the singleton cache, then the passed-in per-request cache, then the registered provider definition, instantiating and caching as appropriate to the provider's declared `scope`. Unregistered class tokens are auto-instantiated on first resolve and cached as singletons by default.
|
|
64
|
-
|
|
65
|
-
**Two access patterns exist and are both supported:**
|
|
66
|
-
|
|
67
|
-
- `inject(token)` (`di/inject.ts`) — the recommended primitive, reads the active `AsyncLocalStorage` context and resolves against `app.resolve(token, store.diCache)`. Works inside any route handler or middleware.
|
|
68
|
-
- `app.provide(token, definition)` / `app.resolve(token)` — direct container access, primarily used at boot time (`server.ts`, module registration) rather than inside request handlers.
|
|
69
|
-
|
|
70
|
-
**Known limitation:** when auto-instantiation of an unregistered class throws (e.g., a constructor-time validation error), the container currently discards the original error and throws a generic "Cannot resolve provider" message. Treat the original error as recoverable debugging information that should not be lost — this is tracked as a fix, not a design decision.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## 5. Modules & Plugins 🟢
|
|
75
|
-
|
|
76
|
-
**What it is:** Two related but distinct extension primitives.
|
|
77
|
-
|
|
78
|
-
- **`defineModule`** (`module/module.ts`) — groups domain-level providers, sub-module imports, and optional manual routes into a single registrable unit, with automatic deduplication of shared imports (`app.hasPlugin(name)` check before re-registering).
|
|
79
|
-
- **`definePlugin`** (`utils/plugin.ts`) — for distributable, configurable third-party packages. Returns a hybrid object: usable directly, or callable as a function to pass options (`MyPlugin({ apiKey })`).
|
|
80
|
-
|
|
81
|
-
**How registration/encapsulation works:** `PluginManager.register()` optionally wraps the target `App` in a `Proxy` (when `plugin.encapsulate !== false`) that intercepts routing methods and scopes them to a plugin-local `Router`, which is then mounted onto the main app under `/`. This prevents a plugin's internal route/middleware registration from silently leaking into the global app surface unless explicitly intended.
|
|
82
|
-
|
|
83
|
-
**Gateways as modules:** `defineGateway` (`router/gateway.ts`) can itself carry `imports`/`providers`, letting a folder-scoped `gateway.ts` file behave as a lightweight module that hydrates the DI container before any `route.ts` inside that folder executes.
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## 6. Cascading Gateways 🟢
|
|
88
|
-
|
|
89
|
-
**What it is:** Folder-level configuration (middleware, CORS, headers, guards, filters, interceptors, providers, plugins, metadata) that applies to a directory and all its subdirectories.
|
|
90
|
-
|
|
91
|
-
**How it's implemented:** During route mounting, the router maintains a stack of active gateway configs as it descends the directory tree, merging arrays (middleware, guards, filters, interceptors) from parent to child rather than overriding them. A gateway can return a response directly, which halts execution before the route handler is reached — the same mechanism regular middleware uses.
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## 7. Native Validation Engine (`v`) 🟢
|
|
96
|
-
|
|
97
|
-
**What it is:** A dependency-free, Zod-like schema validator with strict parsing and structured error aggregation.
|
|
98
|
-
|
|
99
|
-
**How it's implemented:** `utils/validator.ts` defines `ValidatorType` subclasses (`StringValidator`, `NumberValidator`, `ObjectValidator`, `ArrayValidator`, etc.) each implementing `.parse()`/`.validate()`. Validation failures collect into a `ValidatorError` carrying a structured `errors: { path, message }[]` array rather than throwing on the first failure. Supports `.optional()`, `.default()`, `.transform()`, `.refine()`, custom error messages, and `.sanitize()` — which composes with `utils/sanitize.ts`'s pure transformation functions (trim, escape, clamp, etc.) and runs _before_ validation rules are checked, so sanitization can bring otherwise-invalid input into a valid shape (e.g., trimming whitespace before a `.min(3)` check).
|
|
100
|
-
|
|
101
|
-
Test coverage here is dense and correctness-focused (string/number/boolean/object/array/enum/literal/union/date/record validators, nested objects, multi-error collection, async parsing) — this is one of the most solidly verified subsystems in the framework.
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## 8. Production Build Pipeline
|
|
106
|
-
|
|
107
|
-
### 8a. Compilation 🟢
|
|
108
|
-
|
|
109
|
-
`exis build` uses **esbuild** to compile TypeScript to JavaScript (`cli/commands/build.ts`), dropping the slow `tsc` dependency for the actual transpilation step, then rewrites path aliases (`@/*` → relative imports) via a native regex-based resolver (`resolve-aliases.ts`) so the output runs without needing a module-alias runtime.
|
|
110
|
-
|
|
111
|
-
### 8b. Route Manifest Generation 🟢
|
|
41
|
+
**What it is:** An IoC container supporting value, factory, and class providers, with singleton and request scoping.
|
|
112
42
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
### 8c. Production Optimizers (AOT Routing & JIT Serialization) 🟢
|
|
116
|
-
|
|
117
|
-
The framework achieves production optimizations directly within its core engine rather than relying on brittle post-processing build scripts:
|
|
118
|
-
|
|
119
|
-
- **AOT Routing (O(1) Boot Time)** — During `exis build`, `manifest.ts` generates a `.exis/routes-manifest.js` file. In production, `RouteScanner` detects this manifest and uses it to load routes instantly, skipping the expensive `fs.readdir` recursive scan entirely.
|
|
120
|
-
- **JIT Fast JSON Serialization** — During route registration at boot time, the `Router` checks if `fast-json-stringify` is installed. If a route has an ExisJS `v` response schema, the router automatically converts it to JSON Schema via `.toOpenApi()` and compiles an optimized serializer Just-In-Time, attaching it to the route's response handler (`res._serializer`). This eliminates the need to precompile serializers to disk.
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## 9. Native Job Queues 🟢 (core queue & cron integration)
|
|
125
|
-
|
|
126
|
-
**What it is:** A background job queue with pluggable drivers, retry/backoff, visibility timeouts, and a worker-thread execution model.
|
|
127
|
-
|
|
128
|
-
**How enqueue/poll/ack/fail work (both drivers share this contract, `queue/types.ts` `QueueDriver`):**
|
|
129
|
-
|
|
130
|
-
- **Redis driver** (`queue/drivers/RedisDriver.ts`): pending jobs live in a Redis **sorted set** (`{prefix}:{name}:pending`, score = ready-at timestamp) with payloads stored separately in a **hash** (`{prefix}:{name}:payloads`). `enqueue()` uses a Lua script for atomic `ZADD` + `HSET` (with an optional max-queue-size check baked into the same script for backpressure). `poll()` atomically pops the earliest-ready job via `ZRANGEBYSCORE` + moves it to a `processing` zset with a visibility-timeout score, using another Lua script. `sweep()` periodically requeues anything left in `processing` past its visibility timeout (crash recovery for workers that died mid-job).
|
|
131
|
-
- **Memory driver** (`queue/drivers/MemoryDriver.ts`): the same conceptual model (pending list, processing list, sweep-based recovery) implemented with in-process arrays instead of Redis — correctly mirrors the Redis driver's semantics for single-process/dev use.
|
|
132
|
-
- **Job execution:** `ExisWorker` (`queue/worker.ts`) polls continuously (`setImmediate`-chained, with backoff on connection errors), and for jobs with a `filePath` (rather than an inline `handler`), dispatches execution to a `ThreadPool` (`threads/pool.ts`) — a integrated `worker_threads` pool — so CPU-heavy job handlers don't block the main event loop.
|
|
133
|
-
|
|
134
|
-
**Retry behavior:** on failure, `attemptsMade` increments and the job is requeued (with optional exponential/fixed backoff) if under `maxAttempts`; once attempts are exhausted, the job is moved to a dead-letter queue (`{prefix}:{name}:dead` in Redis, or a `deadLetter` list in Memory) and an `onJobFailedPermanently` hook is fired, ensuring no data is lost for permanently failed jobs.
|
|
135
|
-
|
|
136
|
-
**Cron scheduling — 🟢 correctly integrated with the Redis driver:** `CronScheduler` (`cron/scheduler.ts`) uses its own native cron-expression parser (`cron/parser.ts`, supports lists/steps/ranges/wildcards) and ticks every 60 seconds, aligned to the minute boundary. To guarantee exactly-once execution across a multi-instance cluster, it acquires a `SETNX`-style Redis lock (`SET key val EX 55 NX`) per job per minute — this locking mechanism is correctly designed. Once the lock is acquired, the scheduler enqueues the triggered job payload via the exact same `ZADD` + `HSET` sequence the `RedisQueueDriver` expects, ensuring cron jobs are processed identically to manually enqueued jobs.
|
|
43
|
+
**How it's implemented:** `Container` holds provider definitions and a singleton cache. Inside request handlers, `inject(token)` resolves dependencies dynamically using the request's context store.
|
|
137
44
|
|
|
138
45
|
---
|
|
139
46
|
|
|
140
|
-
##
|
|
47
|
+
## 5. Folder-Scoped Boundaries (`boundary.ts`) 🟢
|
|
141
48
|
|
|
142
|
-
**What it is:**
|
|
49
|
+
**What it is:** Folder-level configuration and auto-detected request pipelines that apply to a directory and all its subdirectories recursively.
|
|
143
50
|
|
|
144
51
|
**How it's implemented:**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
- `
|
|
148
|
-
-
|
|
149
|
-
- **Upgrade handling on the uWebSockets.js backend** (`ws-orchestrator.ts`'s `handleUwsUpgrade` + `uws-adapter.ts`'s `open()` callback): functionally equivalent. The request shim correctly captures all synchronously-available request data (including `sec-websocket-*` headers), safely defers the `res.upgrade()` call until after asynchronous middlewares complete (using `onAborted` to catch dropped connections), and passes the required context into the `open()` callback seamlessly.
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## 11. Server-Sent Events (SSE) 🟢
|
|
154
|
-
|
|
155
|
-
**What it is:** One-way server-to-client streaming (`route.sse()` / `@Sse()`), useful for LLM token streaming and other push-style use cases.
|
|
156
|
-
|
|
157
|
-
**How it's implemented:** `ExisSSE` (`server/sse.ts`) sets the standard `text/event-stream` headers plus `X-Accel-Buffering: no` (to prevent reverse-proxy buffering from defeating streaming), tracks connection state via the response's `close` event, and exposes `.send(data, eventName?)` which formats either plain strings or JSON-serialized objects per the SSE wire format. Full middleware support is retained, so auth/rate-limiting apply the same as any other route.
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## 12. Intelligent Hot-Reloading 🟢
|
|
162
|
-
|
|
163
|
-
**What it is:** File-change-triggered reloading that patches only the affected routes rather than restarting the whole process, preserving WebSocket connections and in-memory state.
|
|
164
|
-
|
|
165
|
-
**How it's implemented:** `dep-graph.ts` builds a dependency graph by regex-scanning `import`/`export`/`require` statements in route files (resolving both relative imports and `@/` aliases) so that changing a `service.ts` file can be traced back to the `route.ts` files that depend on it. `hot-reload.ts`'s `HotReloader` watches via `chokidar`, and on a relevant change: removes the stale route(s) from the router, busts the CommonJS `require.cache` entry, re-imports the file, and re-mounts it — all without touching unrelated routes or dropping active connections. `dev-error-overlay.ts` provides a readable terminal error format (parsed stack trace + syntax-highlighted code frame) when a hot-reloaded file fails to import.
|
|
52
|
+
1. **Config:** Export `config = defineBoundary(...)` (functional) or `@Boundary(...)` (OOP) to define CORS, headers, exclusions, and DI providers for that directory tree.
|
|
53
|
+
2. **Auto-Detected Pipeline:**
|
|
54
|
+
- Functions matching `(req, res, next)` are auto-detected as sequential chain steps.
|
|
55
|
+
- The default export `(ctx, next)` (functional) or class method `handle(ctx, next)` (OOP) is auto-detected as an onion wrapper around all inner steps and child routes.
|
|
166
56
|
|
|
167
57
|
---
|
|
168
58
|
|
|
169
|
-
##
|
|
59
|
+
## 6. Native Validation Engine (`tex`) 🟢
|
|
170
60
|
|
|
171
|
-
**What it is:**
|
|
61
|
+
**What it is:** A dependency-free, high-performance schema validator powered by Rust (`@exisjs/rs`) with strict typing, auto-coercion, and structured error responses.
|
|
172
62
|
|
|
173
|
-
**How it's implemented:** `
|
|
63
|
+
**How it's implemented:** `tex` provides primitives (`string`, `number`, `boolean`, `email`, `object`, `array`, `enum`) and integrates directly with `route.*()` configs and `@Body()`. Input sanitization via `exisjs/sanitize` can be chained synchronously via `.sanitize(...)` before validation occurs.
|
|
174
64
|
|
|
175
65
|
---
|
|
176
66
|
|
|
177
|
-
##
|
|
178
|
-
|
|
179
|
-
**What it is:** `ExisRequest`/`ExisResponse` wrapper classes providing a fuller feature set than raw Node `IncomingMessage`/`ServerResponse`.
|
|
180
|
-
|
|
181
|
-
**Request (`server/request.ts`):**
|
|
67
|
+
## 7. Production Build & Manifest Pipeline 🟢
|
|
182
68
|
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
- Per-request `Dataloader` instances (see §16) accessible via `req.dataloader(name)`.
|
|
187
|
-
|
|
188
|
-
**Response (`server/response.ts`):**
|
|
189
|
-
|
|
190
|
-
- Chainable `status()`/`set()`/`header()`/`cookie()` API.
|
|
191
|
-
- Automatic ETag generation (SHA1-based, weak ETags) plus `304 Not Modified` short-circuiting when the request is fresh.
|
|
192
|
-
- `.download()`, `.html()`, `.sendStream()`, `.redirect()` convenience methods.
|
|
193
|
-
- A subtlety worth knowing: **if you inject the raw response object to set custom headers but still return a value from the handler, ExisJS still auto-serializes the returned value to JSON** — unlike frameworks where injecting the raw response disables auto-serialization and silently hangs the request if you forget to call `.send()`.
|
|
69
|
+
- **esbuild Compilation:** `exis build` bundles and transpiles TypeScript rapidly using esbuild, resolving path aliases (`@/*`).
|
|
70
|
+
- **Route Manifest Generation:** Scans routes and writes `.exis/routes-manifest.js` to enable O(1) boot in production without recursive filesystem scanning.
|
|
71
|
+
- **Fast Serialization:** Validated route responses integrate with JIT fast serializers.
|
|
194
72
|
|
|
195
73
|
---
|
|
196
74
|
|
|
197
|
-
##
|
|
198
|
-
|
|
199
|
-
**What it is:** A structured `HttpError` hierarchy plus a global handler that formats operational errors consistently and masks internals in production.
|
|
200
|
-
|
|
201
|
-
**How it's implemented:** `HttpError` (`utils/errors.ts`) carries `statusCode`/`code`/`details`/`isOperational`, with static factories (`badRequest`, `unauthorized`, `notFound`, etc.) and matching subclasses/aliases for both functional and exception-style usage. `createErrorHandler(isDev)` recognizes `HttpError` instances, Zod-shaped and native `ValidatorError` shapes, and JSON `SyntaxError`s, formatting each appropriately; unrecognized errors are logged and returned as a generic message in production, or the full message + stack in development. A dev-mode HTML error overlay is available when the client accepts `text/html`.
|
|
75
|
+
## 8. Request & Response Engine 🟢
|
|
202
76
|
|
|
203
|
-
**
|
|
77
|
+
- **Request:** Native JSON body parsing and cookie parsing delegated to Rust off-heap bindings in `@exisjs/rs`, busboy for multipart form data, and robust proxy trust resolution.
|
|
78
|
+
- **Response:** Chainable status, header, and cookie APIs, automatic ETag generation (weak ETags), and JSON auto-serialization.
|
|
204
79
|
|
|
205
80
|
---
|
|
206
81
|
|
|
207
|
-
##
|
|
208
|
-
|
|
209
|
-
**What it is:** GraphQL-style per-request batching and caching to solve the N+1 query problem.
|
|
210
|
-
|
|
211
|
-
**How it's implemented:** `Dataloader` (`dataloader/dataloader.ts`) collects `.load(key)` calls into a queue and dispatches a single batched call to the developer's `batchFn` on `process.nextTick`, splitting into multiple batches if `maxBatchSize` is exceeded. Supports per-instance caching (default on, keyed by identity or a custom `cacheKeyFn` for object keys — objects are `JSON.stringify`'d by default to avoid reference-equality cache misses), `.prime()` for pre-filling the cache, and per-key error rejection (a batch function can return a mix of values and `Error` instances, with each key resolved/rejected independently). Loaders are correctly isolated per request via the DI/context system — verified by tests asserting two concurrent requests using the same loader name get independent batches and caches.
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## 17. tRPC-style Frontend Type Client 🟢
|
|
216
|
-
|
|
217
|
-
**What it is:** End-to-end type safety between the ExisJS backend and a frontend, without a separate tRPC dependency.
|
|
218
|
-
|
|
219
|
-
**How it's implemented:** The manifest generator (§8b) produces `.exis/types.d.ts` exporting an `AppRouter` type. The `exisjs/client` package's `createClient<AppRouter>()` uses a recursive `Proxy` to translate property access chains (`client.api.users.get(...)`) into the corresponding HTTP request, inferring the payload/response shape from the generated types. This is a type-level feature (compile-time safety) layered on a runtime `fetch` call. The framework CLI's file watcher (`exis dev`) explicitly listens to all file events (`add`, `unlink`, `change`) to instantly regenerate the types manifest, ensuring your frontend types never silently fall out of sync with your backend routes.
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
## 18. Authentication Suite (`exisjs/auth`) 🟢
|
|
224
|
-
|
|
225
|
-
**What it is:** JWT, password hashing, RBAC, and session primitives built on Node's native `crypto`, with no third-party cryptography dependency.
|
|
226
|
-
|
|
227
|
-
- **JWT (`auth/jwt.ts`):** HS256 via `crypto.createHmac`. Verification checks buffer length before calling `timingSafeEqual` (avoiding the common length-mismatch-throws footgun), and distinguishes `TokenExpiredError` from a generic invalid-signature `HttpError` — useful for clients that want to auto-refresh on expiry specifically.
|
|
228
|
-
- **Passwords (`auth/password.ts`):** `crypto.scrypt`, promisified. Hashes are stored with their cost parameters embedded inline (`scrypt:N:r:p:keylen:salt:hash`), so cost factors can be increased later without invalidating existing hashes. Backwards-compatible with a legacy 2-part `salt:hash` format.
|
|
229
|
-
- **RBAC (`auth/rbac.ts`):** `requireRole(roles)` checks array intersection between `req.user.role` (string or array) and the allowed list, throwing `401` if unauthenticated or `403` if authenticated but unauthorized.
|
|
230
|
-
- **Sessions (`auth/session.ts`):** HMAC-signed, HttpOnly cookies (`timingSafeEqual`-verified) with a pluggable `SessionStore` (in-memory provided, Redis/DB left to the developer). Auto-saves session mutations back to the store by hooking `res.raw.end` and uses dirty-checking (`JSON.stringify(sessionData) !== initialState`) to ensure it only writes to the remote store when the session was actually mutated.
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
## 19. Universal Edge & Serverless Adapters 🟢
|
|
235
|
-
|
|
236
|
-
**What it is:** A consistent `fetch`-based adapter pattern letting the same `App` run on Cloudflare Workers, Deno, Bun, Fastly Compute@Edge, Netlify Edge, Vercel, and AWS Lambda.
|
|
237
|
-
|
|
238
|
-
**How it's implemented:** All platform adapters (`adapters/*.ts`) follow the identical init-once-then-handle pattern: lazily call `app.create()`/`app.onStartHook()` on first invocation, then delegate to either `app.fetch(request, env, ctx)` (Web-standard platforms) or `app.handle(req, res)` (Node-stream platforms like Vercel). This consistency across seven adapters is a genuine strength — there's no divergence in behavior between them.
|
|
239
|
-
|
|
240
|
-
`adapters/fetch.ts`'s `FetchIncomingMessage`/`FetchServerResponse` polyfill is the shared foundation for all Web-standard-`Request`-based platforms: it emulates just enough of Node's stream/EventEmitter interface (including correctly flushing pre-buffered body bytes to late-registered `'data'`/`'end'` listeners, and correctly handling `.once()` since it delegates to the same `.on()` override) for the framework's existing middleware to run unmodified on Edge runtimes.
|
|
241
|
-
|
|
242
|
-
**AWS Lambda specifics (`adapters/aws-lambda.ts`):** automatically detects text-based payloads (JSON, HTML, plain text) and sends them as unencoded strings to save wire overhead, falling back to base64 encoding (`isBase64Encoded: true`) only for binary data (images, octet streams).
|
|
243
|
-
|
|
244
|
-
---
|
|
245
|
-
|
|
246
|
-
## 20. Security Middleware Suite
|
|
247
|
-
|
|
248
|
-
Split by actual strength, not lumped together as one "Security Suite":
|
|
249
|
-
|
|
250
|
-
### 20a. Solid, standard-pattern implementations 🟢
|
|
251
|
-
|
|
252
|
-
- **Helmet-equivalent headers** (`middleware/security.ts` `helmet()`) — standard static security headers (HSTS, X-Frame-Options, X-Content-Type-Options, etc.), configurable, well-tested.
|
|
253
|
-
- **CSRF** (`csrf({ secret })`) — Signed Double Submit Cookie pattern using HMAC SHA-256 to prevent Cookie Tossing attacks. Validated via header-vs-cookie match on state-changing methods.
|
|
254
|
-
- **HPP** (`hpp()`) — mitigates HTTP Parameter Pollution by forcing array-like query/body parameters down to their last element.
|
|
255
|
-
- **DB sanitize** (`dbSanitize()` / `mongoSanitize()`) — recursively strips keys starting with `$` or containing `.` from body/query/params to prevent NoSQL injection.
|
|
256
|
-
- **Timeout** (`timeout()`) — kills stalled requests and sends a 503 if response takes too long.
|
|
257
|
-
|
|
258
|
-
### 20b. Removed Features
|
|
259
|
-
|
|
260
|
-
- **`sqlSanitize()` / `dbSanitize({ sql: true })`** — Removed. This regex-based blocklist filtering was trivially bypassable and mangled legitimate content. Real protection comes from parameterized queries / ORM usage. See `REMOVED_FEATURES.md`.
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
## 21. Observability
|
|
265
|
-
|
|
266
|
-
- **Health checks 🟢** (`observability/health.ts`) — runs an array of named async checks in parallel, each wrapped in a `Promise.race()` against a `.unref()`'d timeout so a hanging dependency check can't block the health endpoint itself; aggregates to `200 pass` / `503 fail`.
|
|
267
|
-
- **Metrics 🟢** (`observability/prometheus.ts`) — "bring your own metrics" adapter pattern; the middleware itself only measures duration and delegates recording to a developer-supplied adapter (prom-client, StatsD, custom), using `req.routePath` rather than the raw URL to avoid cardinality explosions on parameterized routes.
|
|
268
|
-
- **Tracing 🟢** (`observability/otel.ts`) — same "bring your own tracer" pattern for OpenTelemetry-shaped spans, correctly redacts sensitive headers (`authorization`, `cookie`, `x-api-key`, etc.) before they'd reach an external tracing backend, and maps 5xx responses to `SpanStatusCode.ERROR`.
|
|
269
|
-
|
|
270
|
-
---
|
|
271
|
-
|
|
272
|
-
## 22. Zero-Config Third-Party Integrations 🟢
|
|
273
|
-
|
|
274
|
-
**What it is:** Lazy-loaded clients for 12 external services (Drizzle, JWT, MongoDB, Mongoose, OpenAI, PostgreSQL, PostHog, Prisma, Redis, Resend, S3, Supabase) that read connection config from conventional environment variables and dynamically `require()` the underlying SDK only when first accessed.
|
|
275
|
-
|
|
276
|
-
**How it's implemented:** Each integration (`integrations/*.ts`) exports a `Proxy`-wrapped singleton (e.g. `redis`, `s3`, `mongo`) whose `get` trap lazily constructs the real client on first property access, plus a `create*Client()` factory for explicit instantiation and a `configure*()` function to set options before first use. This means the framework's core bundle never imports these heavy SDKs directly, and connection setup is deferred until the exact moment it's needed — contributing to fast boot times. The test suite comprehensively validates both the missing-env-var failure modes and the successful client constructions (via mocked module injection) across the integrations.
|
|
277
|
-
|
|
278
|
-
**Important architectural caveat:** these are **process-wide module-level singletons**, not per-`App`-instance. Multiple `App` instances in one process (e.g. multi-tenant setups, or multiple test files each creating an app) will share the same underlying client unless the explicit `create*Client()` factory is used instead of the singleton proxy. Document this clearly for any usage beyond "one app, one process."
|
|
279
|
-
|
|
280
|
-
**Test coverage caveat:** the "throws when required env var is missing" path is tested for all 12 integrations; the "successfully constructs a client with valid config" path is currently only asserted for JWT — the equivalent Redis/S3 tests exist but are marked `.skip()`. Low-effort to complete since the mocking infrastructure is already built.
|
|
281
|
-
|
|
282
|
-
---
|
|
283
|
-
|
|
284
|
-
## 23. CLI & Tooling 🟢
|
|
285
|
-
|
|
286
|
-
`exis dev` (esbuild/tsx-powered HMR via child process + chokidar watch, smart port-conflict messaging), `exis build` (§8), `exis start` (production boot), `exis routes` (colorized routing table), `exis test` (native `node:test` wrapper with a custom Jest-style reporter — see §24), `exis generate <type>` (scaffolding for routes/plugins/middleware/tests, functional or OOP), `exis init` / `create-exis` (interactive project scaffolding), `exis console`/`repl` (interactive REPL with auto-discovered model injection), `exis exports` (prints the subpath export map). This surface is broad but consistently implemented and reasonably well covered by both unit and e2e tests (`cli.test.ts` mocks `spawn`/`exit` for fast unit tests; `cli-e2e.test.ts` runs the compiled CLI as a real child process for a smaller set of true end-to-end checks).
|
|
287
|
-
|
|
288
|
-
**Cluster mode** (`server/cluster.ts`): `workers: 'safe' | 'max' | number` forks Node's native `cluster` module, with crash-loop detection (stops auto-respawning if more than `maxRespawns` crashes occur within `respawnWindow`) and graceful multi-worker shutdown on SIGINT/SIGTERM.
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
## 24. Native Test Runner Integration 🟢
|
|
293
|
-
|
|
294
|
-
**What it is:** A integrated test runner built on `node:test`, with a custom Jest/Vitest-style terminal reporter, a Jest-compatible `expect()` assertion library, and `createTestContext()` for booting a full `App` (DI container, database connections) inside tests without mocking.
|
|
295
|
-
|
|
296
|
-
**How it's implemented:** `testing/reporter.mts` consumes `node:test`'s async iterable of `TestEvent`s and renders grouped, colorized, file-scoped PASS/FAIL output with a Jest-style failure summary — genuinely nicer than raw TAP output. `testing/expect.ts` implements the common Jest matcher surface (`toBe`, `toEqual`, `toMatchObject`, `toHaveBeenCalledWith`, `resolves`/`rejects`, etc.) on top of `node:assert`. `createTestContext()` (`testing/index.ts`) wires `before`/`after` hooks that boot the app, and on teardown, correctly awaits and closes Mongoose, Redis, and Prisma connections if detected in use.
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
**Suite quality note:** the framework's own test suite (used to write this document) is dense and well-constructed across routing, request/response, DI, validator, dataloader, WebSockets (including negative-path auth tests), observability, and both queue drivers. Its main gaps are exactly the two areas this document flags as risk: no test crosses the cron↔queue integration boundary, and the dedupe/cache tests use a single logical client rather than simulating concurrent different users.
|
|
300
|
-
|
|
301
|
-
---
|
|
302
|
-
|
|
303
|
-
## 25. Response Interceptors, Guards, and Pipes 🟢
|
|
304
|
-
|
|
305
|
-
- **`intercept(transform)`** (`middleware/interceptor.ts`) — monkey-patches `res.json` for the request duration to apply a transformation function to the outgoing payload, supporting both sync and async transforms. Deliberately does not intercept `res.send()`, since that's meant for raw string/buffer output.
|
|
306
|
-
- **`guard(canActivate, options?)`** (`middleware/guard.ts`) — evaluates a boolean (or async-boolean) condition and short-circuits with `403` if it returns false; the OOP equivalent (`@UseGuards`-style) resolves guard classes via the DI container if registered, or instantiates them directly otherwise.
|
|
307
|
-
- **`pipe(location, key, transformFn)`** (`middleware/pipe.ts`) — transforms a specific `body`/`query`/`params` key before the handler runs, catching thrown errors and responding `400` automatically.
|
|
308
|
-
|
|
309
|
-
---
|
|
310
|
-
|
|
311
|
-
## 26. Caching, Deduplication, and Backpressure — read this section carefully
|
|
312
|
-
|
|
313
|
-
These three middlewares are implemented correctly for their _intended_ single-client use case, and are dangerous with default settings outside it. Do not present them as safe defaults without qualification.
|
|
314
|
-
|
|
315
|
-
### 26a. Tag-based Cache Stores 🟢
|
|
316
|
-
|
|
317
|
-
`FileSystemCacheStore`, `MemoryCacheStore`, `RedisCacheStore` (`cache/store.ts`) all implement the same `CacheStore` interface: entries carry an array of string `tags`, and a separate tag→`lastRevalidated` timestamp map is checked on every `get()` — if any of an entry's tags were revalidated after the entry was created, it's treated as a miss. `revalidateTag(tag)` instantly invalidates every entry carrying that tag, Next.js-style. **`MemoryCacheStore` automatically synchronizes invalidations across cluster workers** — when running in `workers > 1` mode, it uses IPC to broadcast tag invalidations to all sibling workers so the memory cache remains safely consistent across the cluster (without requiring Redis).
|
|
318
|
-
|
|
319
|
-
### 26b. `cacheMiddleware` 🟢
|
|
320
|
-
|
|
321
|
-
Requires a mandatory `keyGenerator` function (e.g., `(req) => req.user?.id + ':' + req.path`) to ensure cache segregation across users/sessions on authenticated routes. Attempting to use this middleware without providing a `keyGenerator` throws a startup error, preventing accidental cross-user data leaks.
|
|
322
|
-
|
|
323
|
-
### 26c. `dedupeMiddleware` 🟢
|
|
324
|
-
|
|
325
|
-
Also requires a mandatory `keyGenerator` to prevent cross-user broadcasting of in-flight requests. Two different authenticated users requesting the same path within the same in-flight window are correctly segregated if the key includes their identity.
|
|
326
|
-
|
|
327
|
-
### 26d. Backpressure Engine 🟢
|
|
328
|
-
|
|
329
|
-
`backpressureMiddleware` (`middleware/backpressure.ts`) tracks `activeCount` against `maxConcurrent`, queues overflow up to `maxQueue` with a timeout, and returns `503` once the queue itself is full — correctly implemented and tested, no identity-related caveats since it doesn't cache or share response data between requests.
|
|
330
|
-
|
|
331
|
-
### 26e. Circuit Breaker 🟢
|
|
82
|
+
## 9. Global Error Handling 🟢
|
|
332
83
|
|
|
333
|
-
`
|
|
84
|
+
Structured `HttpError` hierarchy (`badRequest`, `unauthorized`, `forbidden`, `notFound`, etc.) with consistent JSON error envelopes and dev-mode formatting.
|
|
334
85
|
|
|
335
86
|
---
|
|
336
87
|
|
|
337
|
-
##
|
|
88
|
+
## 10. Core Middleware Suite 🟢
|
|
338
89
|
|
|
339
|
-
|
|
90
|
+
- **Security:** `helmet()`, `csrf()`, `hpp()`, `dbSanitize()`, `timeout()`.
|
|
91
|
+
- **Traffic & Performance:** In-memory off-heap `rateLimit()`, `idempotent()` (keyed response caching in off-heap memory), `dedupe()`, and `backpressure()`.
|
|
92
|
+
- **Utilities:** `cors()`, `requestId()`, `requestLogger()`, `serveStatic()`.
|
|
340
93
|
|
|
341
94
|
---
|
|
342
95
|
|
|
343
|
-
##
|
|
96
|
+
## 11. Core Boundary Contract
|
|
344
97
|
|
|
345
|
-
|
|
|
346
|
-
|
|
347
|
-
|
|
|
348
|
-
|
|
|
349
|
-
|
|
98
|
+
| Subsystem | Location | Scope |
|
|
99
|
+
|---|---|---|
|
|
100
|
+
| Routing & Boundaries | `exisjs/router` | Core runtime |
|
|
101
|
+
| Schema & Validation | `exisjs/validator` (`tex`) | Core runtime |
|
|
102
|
+
| Data Sanitization | `exisjs/sanitize` | Core runtime |
|
|
103
|
+
| Dependency Injection | `exisjs/di` | Core runtime |
|
|
104
|
+
| Core Middleware | `exisjs/middleware` | Core runtime |
|
|
105
|
+
| CLI & Scaffolding | `exisjs/cli` | Core tooling |
|
|
106
|
+
| Database & ORM | `@exisjs/database` | Extracted package |
|
|
107
|
+
| Cache & Redis | `@exisjs/cache` | Extracted package |
|
|
108
|
+
| Background Queues | `@exisjs/queue` | Extracted package |
|
|
109
|
+
| WebSockets | `@exisjs/websocket` | Extracted package |
|
|
110
|
+
| Auth & OAuth | `@exisjs/auth` | Extracted package |
|
package/dist/docs/BENCHMARKS.md
CHANGED
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
- **Trials:** 3 per framework, order randomized each trial, median reported
|
|
13
13
|
- **Warmup:** 2s untimed warmup run before each timed trial
|
|
14
14
|
- **Cores:** single-core, no clustering, for all four frameworks
|
|
15
|
-
- **Framework versions:** Express ^5.2.1, Fastify ^5.
|
|
15
|
+
- **Framework versions:** Express ^5.2.1, Fastify ^5.12.1, Hono ^4.13.5, ExisJS 0.6.1
|
|
16
16
|
|
|
17
17
|
### Performance Metrics
|
|
18
18
|
|
|
19
19
|
| Framework | Req/Sec (median) | Latency avg (ms) | Latency p50 (ms) | Latency p99 (ms) | Errors | Server backend |
|
|
20
20
|
|---|---|---|---|---|---|---|
|
|
21
|
-
| Express |
|
|
22
|
-
| Fastify |
|
|
23
|
-
| Hono |
|
|
24
|
-
| Exis JS |
|
|
21
|
+
| Express | 16821.82 | 5.40 | 6.00 | 7.00 | 0 | n/a |
|
|
22
|
+
| Fastify | 27625.46 | 3.12 | 3.00 | 5.00 | 0 | n/a |
|
|
23
|
+
| Hono | 30645.82 | 2.79 | 3.00 | 4.00 | 0 | n/a |
|
|
24
|
+
| Exis JS | 38022.55 | 2.14 | 2.00 | 4.00 | 0 | uws |
|
|
25
25
|
|
|
26
26
|
### Handler Parity Note
|
|
27
27
|
|
package/dist/docs/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
</p>
|
|
5
5
|
|
|
6
6
|
<p align="center">
|
|
7
|
-
<b>
|
|
7
|
+
<b>Ultra-high-performance TypeScript web framework with a raw Rust engine under the hood.</b>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
@@ -19,16 +19,13 @@
|
|
|
19
19
|
</a>
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
|
-
Welcome to the
|
|
22
|
+
Welcome to the ExisJS documentation! ExisJS is a minimal, opinionated core framework featuring file-system routing, dependency injection, validation (`tex`), sanitization, and an auto-detected request pipeline (`boundary.ts`).
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
This documentation is split into the following main sections:
|
|
24
|
+
Additional capabilities (databases, auth, queues, websockets, caching) are provided as official `@exisjs/*` packages.
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
- **[Integrations](./integrations/)**: Guides on how to integrate Exis JS with external services and libraries.
|
|
30
|
-
- **[Architecture](./ARCHITECTURE.md)**: Catalog of features supported by Exis JS and their internal implementation details.
|
|
31
|
-
|
|
32
|
-
*(Note: Detailed API Reference will be added at a later time)*
|
|
26
|
+
## Documentation Structure
|
|
33
27
|
|
|
34
|
-
|
|
28
|
+
- **[Content](./content/)**: Core concepts, guides, and deep-dives into building applications with ExisJS. Learn about folder-based routing, setting up your `boundary.ts`, dependency injection, and schema validation with `tex`.
|
|
29
|
+
- **[Reference](./reference/)**: API reference for the core framework modules (`router`, `di`, `validator`, `middleware`, `decorators`, `config`, etc.).
|
|
30
|
+
- **[Architecture](./ARCHITECTURE.md)**: Catalog of core features and internal architectural details.
|
|
31
|
+
- **[Benchmarks](./BENCHMARKS.md)**: Performance benchmarks against other Node.js frameworks.
|