@pcontext/api 0.0.1
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 +151 -0
- package/dist/app.d.mts +44779 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +37 -0
- package/dist/app.mjs.map +1 -0
- package/dist/client.d.mts +22428 -0
- package/dist/client.d.mts.map +1 -0
- package/dist/client.mjs +15 -0
- package/dist/client.mjs.map +1 -0
- package/dist/dev.d.mts +11 -0
- package/dist/dev.d.mts.map +1 -0
- package/dist/dev.mjs +16 -0
- package/dist/dev.mjs.map +1 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -0
- package/dist/modules/doc/chat.route.d.mts +18 -0
- package/dist/modules/doc/chat.route.d.mts.map +1 -0
- package/dist/modules/doc/chat.route.mjs +20 -0
- package/dist/modules/doc/chat.route.mjs.map +1 -0
- package/dist/modules/doc/chat.service.d.mts +10 -0
- package/dist/modules/doc/chat.service.d.mts.map +1 -0
- package/dist/modules/doc/chat.service.mjs +29 -0
- package/dist/modules/doc/chat.service.mjs.map +1 -0
- package/dist/modules/doc/doc.dto.d.mts +67 -0
- package/dist/modules/doc/doc.dto.d.mts.map +1 -0
- package/dist/modules/doc/doc.dto.mjs +43 -0
- package/dist/modules/doc/doc.dto.mjs.map +1 -0
- package/dist/modules/doc/doc.entity.d.mts +19 -0
- package/dist/modules/doc/doc.entity.d.mts.map +1 -0
- package/dist/modules/doc/doc.entity.mjs +1 -0
- package/dist/modules/doc/doc.repo.interface.d.mts +28 -0
- package/dist/modules/doc/doc.repo.interface.d.mts.map +1 -0
- package/dist/modules/doc/doc.repo.interface.mjs +1 -0
- package/dist/modules/doc/doc.route.d.mts +14193 -0
- package/dist/modules/doc/doc.route.d.mts.map +1 -0
- package/dist/modules/doc/doc.route.mjs +100 -0
- package/dist/modules/doc/doc.route.mjs.map +1 -0
- package/dist/modules/doc/doc.service.d.mts +38 -0
- package/dist/modules/doc/doc.service.d.mts.map +1 -0
- package/dist/modules/doc/doc.service.mjs +134 -0
- package/dist/modules/doc/doc.service.mjs.map +1 -0
- package/dist/modules/doc/doc.vo.d.mts +17 -0
- package/dist/modules/doc/doc.vo.d.mts.map +1 -0
- package/dist/modules/doc/doc.vo.mjs +1 -0
- package/dist/modules/doc/infrastructure/agent/engine/chat.d.mts +21 -0
- package/dist/modules/doc/infrastructure/agent/engine/chat.d.mts.map +1 -0
- package/dist/modules/doc/infrastructure/agent/engine/chat.mjs +36 -0
- package/dist/modules/doc/infrastructure/agent/engine/chat.mjs.map +1 -0
- package/dist/modules/doc/infrastructure/agent/engine/generate.d.mts +28 -0
- package/dist/modules/doc/infrastructure/agent/engine/generate.d.mts.map +1 -0
- package/dist/modules/doc/infrastructure/agent/engine/generate.mjs +135 -0
- package/dist/modules/doc/infrastructure/agent/engine/generate.mjs.map +1 -0
- package/dist/modules/doc/infrastructure/agent/engine/query-filter.d.mts +7 -0
- package/dist/modules/doc/infrastructure/agent/engine/query-filter.d.mts.map +1 -0
- package/dist/modules/doc/infrastructure/agent/engine/query-filter.mjs +12 -0
- package/dist/modules/doc/infrastructure/agent/engine/query-filter.mjs.map +1 -0
- package/dist/modules/doc/infrastructure/agent/loaders/git-repository-reader.d.mts +54 -0
- package/dist/modules/doc/infrastructure/agent/loaders/git-repository-reader.d.mts.map +1 -0
- package/dist/modules/doc/infrastructure/agent/loaders/git-repository-reader.mjs +142 -0
- package/dist/modules/doc/infrastructure/agent/loaders/git-repository-reader.mjs.map +1 -0
- package/dist/modules/doc/infrastructure/agent/loaders/index.d.mts +3 -0
- package/dist/modules/doc/infrastructure/agent/loaders/index.mjs +4 -0
- package/dist/modules/doc/infrastructure/agent/loaders/website-crawl-reader.d.mts +42 -0
- package/dist/modules/doc/infrastructure/agent/loaders/website-crawl-reader.d.mts.map +1 -0
- package/dist/modules/doc/infrastructure/agent/loaders/website-crawl-reader.mjs +104 -0
- package/dist/modules/doc/infrastructure/agent/loaders/website-crawl-reader.mjs.map +1 -0
- package/dist/modules/doc/infrastructure/agent/settings.d.mts +5 -0
- package/dist/modules/doc/infrastructure/agent/settings.d.mts.map +1 -0
- package/dist/modules/doc/infrastructure/agent/settings.mjs +72 -0
- package/dist/modules/doc/infrastructure/agent/settings.mjs.map +1 -0
- package/dist/modules/doc/infrastructure/agent/storage/index.d.mts +7 -0
- package/dist/modules/doc/infrastructure/agent/storage/index.d.mts.map +1 -0
- package/dist/modules/doc/infrastructure/agent/storage/index.mjs +12 -0
- package/dist/modules/doc/infrastructure/agent/storage/index.mjs.map +1 -0
- package/dist/modules/doc/infrastructure/agent/storage/vector-store.d.mts +14 -0
- package/dist/modules/doc/infrastructure/agent/storage/vector-store.d.mts.map +1 -0
- package/dist/modules/doc/infrastructure/agent/storage/vector-store.mjs +35 -0
- package/dist/modules/doc/infrastructure/agent/storage/vector-store.mjs.map +1 -0
- package/dist/modules/doc/infrastructure/doc.po.d.mts +570 -0
- package/dist/modules/doc/infrastructure/doc.po.d.mts.map +1 -0
- package/dist/modules/doc/infrastructure/doc.po.mjs +54 -0
- package/dist/modules/doc/infrastructure/doc.po.mjs.map +1 -0
- package/dist/modules/doc/infrastructure/doc.repo.pg.d.mts +32 -0
- package/dist/modules/doc/infrastructure/doc.repo.pg.d.mts.map +1 -0
- package/dist/modules/doc/infrastructure/doc.repo.pg.mjs +157 -0
- package/dist/modules/doc/infrastructure/doc.repo.pg.mjs.map +1 -0
- package/dist/modules/doc/infrastructure/doc.repo.sqlite.d.mts +32 -0
- package/dist/modules/doc/infrastructure/doc.repo.sqlite.d.mts.map +1 -0
- package/dist/modules/doc/infrastructure/doc.repo.sqlite.mjs +153 -0
- package/dist/modules/doc/infrastructure/doc.repo.sqlite.mjs.map +1 -0
- package/dist/modules/doc/mcp.route.d.mts +18 -0
- package/dist/modules/doc/mcp.route.d.mts.map +1 -0
- package/dist/modules/doc/mcp.route.mjs +39 -0
- package/dist/modules/doc/mcp.route.mjs.map +1 -0
- package/dist/modules/doc/mcp.service.d.mts +22 -0
- package/dist/modules/doc/mcp.service.d.mts.map +1 -0
- package/dist/modules/doc/mcp.service.mjs +119 -0
- package/dist/modules/doc/mcp.service.mjs.map +1 -0
- package/dist/modules/rank/rank.dto.d.mts +10 -0
- package/dist/modules/rank/rank.dto.d.mts.map +1 -0
- package/dist/modules/rank/rank.dto.mjs +8 -0
- package/dist/modules/rank/rank.dto.mjs.map +1 -0
- package/dist/modules/rank/rank.route.d.mts +2033 -0
- package/dist/modules/rank/rank.route.d.mts.map +1 -0
- package/dist/modules/rank/rank.route.mjs +20 -0
- package/dist/modules/rank/rank.route.mjs.map +1 -0
- package/dist/modules/rank/rank.service.d.mts +32 -0
- package/dist/modules/rank/rank.service.d.mts.map +1 -0
- package/dist/modules/rank/rank.service.mjs +3 -0
- package/dist/modules/rank/rank.vo.d.mts +9 -0
- package/dist/modules/rank/rank.vo.d.mts.map +1 -0
- package/dist/modules/rank/rank.vo.mjs +1 -0
- package/dist/modules/task/infrastructure/mq/task-context.d.mts +29 -0
- package/dist/modules/task/infrastructure/mq/task-context.d.mts.map +1 -0
- package/dist/modules/task/infrastructure/mq/task-context.mjs +70 -0
- package/dist/modules/task/infrastructure/mq/task-context.mjs.map +1 -0
- package/dist/modules/task/infrastructure/mq/task-queue.d.mts +10 -0
- package/dist/modules/task/infrastructure/mq/task-queue.d.mts.map +1 -0
- package/dist/modules/task/infrastructure/mq/task-queue.mjs +12 -0
- package/dist/modules/task/infrastructure/mq/task-queue.mjs.map +1 -0
- package/dist/modules/task/infrastructure/mq/task-worker.d.mts +13 -0
- package/dist/modules/task/infrastructure/mq/task-worker.d.mts.map +1 -0
- package/dist/modules/task/infrastructure/mq/task-worker.mjs +35 -0
- package/dist/modules/task/infrastructure/mq/task-worker.mjs.map +1 -0
- package/dist/modules/task/infrastructure/task.po.d.mts +1147 -0
- package/dist/modules/task/infrastructure/task.po.d.mts.map +1 -0
- package/dist/modules/task/infrastructure/task.po.mjs +55 -0
- package/dist/modules/task/infrastructure/task.po.mjs.map +1 -0
- package/dist/modules/task/infrastructure/task.repo.pg.d.mts +21 -0
- package/dist/modules/task/infrastructure/task.repo.pg.d.mts.map +1 -0
- package/dist/modules/task/infrastructure/task.repo.pg.mjs +86 -0
- package/dist/modules/task/infrastructure/task.repo.pg.mjs.map +1 -0
- package/dist/modules/task/infrastructure/task.repo.sqlite.d.mts +21 -0
- package/dist/modules/task/infrastructure/task.repo.sqlite.d.mts.map +1 -0
- package/dist/modules/task/infrastructure/task.repo.sqlite.mjs +89 -0
- package/dist/modules/task/infrastructure/task.repo.sqlite.mjs.map +1 -0
- package/dist/modules/task/task.dto.d.mts +26 -0
- package/dist/modules/task/task.dto.d.mts.map +1 -0
- package/dist/modules/task/task.dto.mjs +25 -0
- package/dist/modules/task/task.dto.mjs.map +1 -0
- package/dist/modules/task/task.entity.d.mts +43 -0
- package/dist/modules/task/task.entity.d.mts.map +1 -0
- package/dist/modules/task/task.entity.mjs +1 -0
- package/dist/modules/task/task.repo.interface.d.mts +17 -0
- package/dist/modules/task/task.repo.interface.d.mts.map +1 -0
- package/dist/modules/task/task.repo.interface.mjs +1 -0
- package/dist/modules/task/task.route.d.mts +4087 -0
- package/dist/modules/task/task.route.d.mts.map +1 -0
- package/dist/modules/task/task.route.mjs +63 -0
- package/dist/modules/task/task.route.mjs.map +1 -0
- package/dist/modules/task/task.service.d.mts +28 -0
- package/dist/modules/task/task.service.d.mts.map +1 -0
- package/dist/modules/task/task.service.mjs +202 -0
- package/dist/modules/task/task.service.mjs.map +1 -0
- package/dist/modules/task/task.vo.d.mts +18 -0
- package/dist/modules/task/task.vo.d.mts.map +1 -0
- package/dist/modules/task/task.vo.mjs +1 -0
- package/dist/modules/user/application/user.service.d.mts +24 -0
- package/dist/modules/user/application/user.service.d.mts.map +1 -0
- package/dist/modules/user/application/user.service.mjs +153 -0
- package/dist/modules/user/application/user.service.mjs.map +1 -0
- package/dist/modules/user/domain/user.entity.d.mts +24 -0
- package/dist/modules/user/domain/user.entity.d.mts.map +1 -0
- package/dist/modules/user/domain/user.entity.mjs +35 -0
- package/dist/modules/user/domain/user.entity.mjs.map +1 -0
- package/dist/modules/user/domain/user.repo.interface.d.mts +27 -0
- package/dist/modules/user/domain/user.repo.interface.d.mts.map +1 -0
- package/dist/modules/user/domain/user.repo.interface.mjs +1 -0
- package/dist/modules/user/infrastructure/casbin/adapter.d.mts +7 -0
- package/dist/modules/user/infrastructure/casbin/adapter.d.mts.map +1 -0
- package/dist/modules/user/infrastructure/casbin/adapter.mjs +13 -0
- package/dist/modules/user/infrastructure/casbin/adapter.mjs.map +1 -0
- package/dist/modules/user/infrastructure/casbin/adapter.pg.d.mts +19 -0
- package/dist/modules/user/infrastructure/casbin/adapter.pg.d.mts.map +1 -0
- package/dist/modules/user/infrastructure/casbin/adapter.pg.mjs +129 -0
- package/dist/modules/user/infrastructure/casbin/adapter.pg.mjs.map +1 -0
- package/dist/modules/user/infrastructure/casbin/adapter.sqlite.d.mts +19 -0
- package/dist/modules/user/infrastructure/casbin/adapter.sqlite.d.mts.map +1 -0
- package/dist/modules/user/infrastructure/casbin/adapter.sqlite.mjs +129 -0
- package/dist/modules/user/infrastructure/casbin/adapter.sqlite.mjs.map +1 -0
- package/dist/modules/user/infrastructure/casbin/enforcer.d.mts +9 -0
- package/dist/modules/user/infrastructure/casbin/enforcer.d.mts.map +1 -0
- package/dist/modules/user/infrastructure/casbin/enforcer.mjs +150 -0
- package/dist/modules/user/infrastructure/casbin/enforcer.mjs.map +1 -0
- package/dist/modules/user/infrastructure/casbin-rule.po.d.mts +643 -0
- package/dist/modules/user/infrastructure/casbin-rule.po.d.mts.map +1 -0
- package/dist/modules/user/infrastructure/casbin-rule.po.mjs +30 -0
- package/dist/modules/user/infrastructure/casbin-rule.po.mjs.map +1 -0
- package/dist/modules/user/infrastructure/user.po.d.mts +392 -0
- package/dist/modules/user/infrastructure/user.po.d.mts.map +1 -0
- package/dist/modules/user/infrastructure/user.po.mjs +34 -0
- package/dist/modules/user/infrastructure/user.po.mjs.map +1 -0
- package/dist/modules/user/infrastructure/user.repo.pg.d.mts +24 -0
- package/dist/modules/user/infrastructure/user.repo.pg.d.mts.map +1 -0
- package/dist/modules/user/infrastructure/user.repo.pg.mjs +90 -0
- package/dist/modules/user/infrastructure/user.repo.pg.mjs.map +1 -0
- package/dist/modules/user/infrastructure/user.repo.sqlite.d.mts +24 -0
- package/dist/modules/user/infrastructure/user.repo.sqlite.d.mts.map +1 -0
- package/dist/modules/user/infrastructure/user.repo.sqlite.mjs +88 -0
- package/dist/modules/user/infrastructure/user.repo.sqlite.mjs.map +1 -0
- package/dist/modules/user/interfaces/admin.route.d.mts +8270 -0
- package/dist/modules/user/interfaces/admin.route.d.mts.map +1 -0
- package/dist/modules/user/interfaces/admin.route.mjs +74 -0
- package/dist/modules/user/interfaces/admin.route.mjs.map +1 -0
- package/dist/modules/user/interfaces/role.route.d.mts +102 -0
- package/dist/modules/user/interfaces/role.route.d.mts.map +1 -0
- package/dist/modules/user/interfaces/role.route.mjs +60 -0
- package/dist/modules/user/interfaces/role.route.mjs.map +1 -0
- package/dist/modules/user/interfaces/user.dto.d.mts +106 -0
- package/dist/modules/user/interfaces/user.dto.d.mts.map +1 -0
- package/dist/modules/user/interfaces/user.dto.mjs +32 -0
- package/dist/modules/user/interfaces/user.dto.mjs.map +1 -0
- package/dist/modules/user/interfaces/user.route.d.mts +2093 -0
- package/dist/modules/user/interfaces/user.route.d.mts.map +1 -0
- package/dist/modules/user/interfaces/user.route.mjs +69 -0
- package/dist/modules/user/interfaces/user.route.mjs.map +1 -0
- package/dist/modules/user/interfaces/user.vo.d.mts +28 -0
- package/dist/modules/user/interfaces/user.vo.d.mts.map +1 -0
- package/dist/modules/user/interfaces/user.vo.mjs +18 -0
- package/dist/modules/user/interfaces/user.vo.mjs.map +1 -0
- package/dist/rank.service-D2h-2iJA.mjs +109 -0
- package/dist/rank.service-D2h-2iJA.mjs.map +1 -0
- package/dist/settings.d.mts +12 -0
- package/dist/settings.d.mts.map +1 -0
- package/dist/settings.mjs +27 -0
- package/dist/settings.mjs.map +1 -0
- package/dist/shared/create-app.d.mts +13 -0
- package/dist/shared/create-app.d.mts.map +1 -0
- package/dist/shared/create-app.mjs +45 -0
- package/dist/shared/create-app.mjs.map +1 -0
- package/dist/shared/db/bootstrap.d.mts +5 -0
- package/dist/shared/db/bootstrap.d.mts.map +1 -0
- package/dist/shared/db/bootstrap.mjs +51 -0
- package/dist/shared/db/bootstrap.mjs.map +1 -0
- package/dist/shared/db/connection.d.mts +1567 -0
- package/dist/shared/db/connection.d.mts.map +1 -0
- package/dist/shared/db/connection.mjs +59 -0
- package/dist/shared/db/connection.mjs.map +1 -0
- package/dist/shared/db/migrations/pg/0000_init.sql +74 -0
- package/dist/shared/db/migrations/pg/0001_snippets & tokens.sql +6 -0
- package/dist/shared/db/migrations/pg/0002_change_task_id_to_uuid_v7.sql +3 -0
- package/dist/shared/db/migrations/pg/meta/0000_snapshot.json +498 -0
- package/dist/shared/db/migrations/pg/meta/0001_snapshot.json +513 -0
- package/dist/shared/db/migrations/pg/meta/0002_snapshot.json +514 -0
- package/dist/shared/db/migrations/pg/meta/_journal.json +27 -0
- package/dist/shared/db/migrations/sqlite/0000_init.sql +72 -0
- package/dist/shared/db/migrations/sqlite/0001_snippets & tokens.sql +2 -0
- package/dist/shared/db/migrations/sqlite/0002_change_task_id_to_uuid_v7.sql +35 -0
- package/dist/shared/db/migrations/sqlite/meta/0000_snapshot.json +493 -0
- package/dist/shared/db/migrations/sqlite/meta/0001_snapshot.json +509 -0
- package/dist/shared/db/migrations/sqlite/meta/0002_snapshot.json +509 -0
- package/dist/shared/db/migrations/sqlite/meta/_journal.json +27 -0
- package/dist/shared/db/seed.d.mts +5 -0
- package/dist/shared/db/seed.d.mts.map +1 -0
- package/dist/shared/db/seed.mjs +42 -0
- package/dist/shared/db/seed.mjs.map +1 -0
- package/dist/shared/deps.d.mts +28 -0
- package/dist/shared/deps.d.mts.map +1 -0
- package/dist/shared/deps.mjs +69 -0
- package/dist/shared/deps.mjs.map +1 -0
- package/dist/shared/dto/index.d.mts +11 -0
- package/dist/shared/dto/index.d.mts.map +1 -0
- package/dist/shared/dto/index.mjs +11 -0
- package/dist/shared/dto/index.mjs.map +1 -0
- package/dist/shared/logger.d.mts +14 -0
- package/dist/shared/logger.d.mts.map +1 -0
- package/dist/shared/logger.mjs +37 -0
- package/dist/shared/logger.mjs.map +1 -0
- package/dist/shared/mcp/createTool.d.mts +15 -0
- package/dist/shared/mcp/createTool.d.mts.map +1 -0
- package/dist/shared/mcp/createTool.mjs +8 -0
- package/dist/shared/mcp/createTool.mjs.map +1 -0
- package/dist/shared/middleware/authorization.d.mts +15 -0
- package/dist/shared/middleware/authorization.d.mts.map +1 -0
- package/dist/shared/middleware/authorization.mjs +46 -0
- package/dist/shared/middleware/authorization.mjs.map +1 -0
- package/dist/shared/middleware/http-logger.d.mts +7 -0
- package/dist/shared/middleware/http-logger.d.mts.map +1 -0
- package/dist/shared/middleware/http-logger.mjs +40 -0
- package/dist/shared/middleware/http-logger.mjs.map +1 -0
- package/dist/shared/middleware/jwt.d.mts +7 -0
- package/dist/shared/middleware/jwt.d.mts.map +1 -0
- package/dist/shared/middleware/jwt.mjs +34 -0
- package/dist/shared/middleware/jwt.mjs.map +1 -0
- package/dist/shared/middleware/limiter.d.mts +7 -0
- package/dist/shared/middleware/limiter.d.mts.map +1 -0
- package/dist/shared/middleware/limiter.mjs +10 -0
- package/dist/shared/middleware/limiter.mjs.map +1 -0
- package/dist/shared/middleware/services.d.mts +8 -0
- package/dist/shared/middleware/services.d.mts.map +1 -0
- package/dist/shared/middleware/services.mjs +19 -0
- package/dist/shared/middleware/services.mjs.map +1 -0
- package/dist/shared/redis/decorator.d.mts +113 -0
- package/dist/shared/redis/decorator.d.mts.map +1 -0
- package/dist/shared/redis/decorator.mjs +203 -0
- package/dist/shared/redis/decorator.mjs.map +1 -0
- package/dist/shared/redis/factory.d.mts +18 -0
- package/dist/shared/redis/factory.d.mts.map +1 -0
- package/dist/shared/redis/factory.mjs +41 -0
- package/dist/shared/redis/factory.mjs.map +1 -0
- package/dist/shared/redis/index.d.mts +12 -0
- package/dist/shared/redis/index.d.mts.map +1 -0
- package/dist/shared/redis/index.mjs +14 -0
- package/dist/shared/redis/index.mjs.map +1 -0
- package/dist/shared/types.d.mts +36 -0
- package/dist/shared/types.d.mts.map +1 -0
- package/dist/shared/types.mjs +1 -0
- package/dist/shared/utils/date.d.mts +1 -0
- package/dist/shared/utils/date.mjs +1 -0
- package/dist/shared/utils/error-handler.d.mts +7 -0
- package/dist/shared/utils/error-handler.d.mts.map +1 -0
- package/dist/shared/utils/error-handler.mjs +22 -0
- package/dist/shared/utils/error-handler.mjs.map +1 -0
- package/dist/shared/utils/format.d.mts +8 -0
- package/dist/shared/utils/format.d.mts.map +1 -0
- package/dist/shared/utils/format.mjs +24 -0
- package/dist/shared/utils/format.mjs.map +1 -0
- package/dist/shared/utils/pagination.d.mts +9 -0
- package/dist/shared/utils/pagination.d.mts.map +1 -0
- package/dist/shared/utils/pagination.mjs +12 -0
- package/dist/shared/utils/pagination.mjs.map +1 -0
- package/dist/shared/utils/response-template.d.mts +69 -0
- package/dist/shared/utils/response-template.d.mts.map +1 -0
- package/dist/shared/utils/response-template.mjs +96 -0
- package/dist/shared/utils/response-template.mjs.map +1 -0
- package/dist/shared/utils/url.d.mts +18 -0
- package/dist/shared/utils/url.d.mts.map +1 -0
- package/dist/shared/utils/url.mjs +39 -0
- package/dist/shared/utils/url.mjs.map +1 -0
- package/dist/shared/utils/user.d.mts +8 -0
- package/dist/shared/utils/user.d.mts.map +1 -0
- package/dist/shared/utils/user.mjs +11 -0
- package/dist/shared/utils/user.mjs.map +1 -0
- package/dist/shared/utils/validator.d.mts +5984 -0
- package/dist/shared/utils/validator.d.mts.map +1 -0
- package/dist/shared/utils/validator.mjs +34 -0
- package/dist/shared/utils/validator.mjs.map +1 -0
- package/dist/shared/vo/index.d.mts +11 -0
- package/dist/shared/vo/index.d.mts.map +1 -0
- package/dist/shared/vo/index.mjs +1 -0
- package/package.json +86 -0
package/README.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Hono Backend
|
|
2
|
+
|
|
3
|
+
一个基于 Hono + TypeScript + PostgreSQL 的系统后端。
|
|
4
|
+
|
|
5
|
+
## 技术栈
|
|
6
|
+
|
|
7
|
+
- **框架**: Hono
|
|
8
|
+
- **语言**: TypeScript
|
|
9
|
+
- **数据库**: PostgreSQL + Drizzle ORM
|
|
10
|
+
- **包管理器**: Bun
|
|
11
|
+
- **代码检查**: ESLint (@antfu/eslint-config)
|
|
12
|
+
|
|
13
|
+
## 开发环境设置
|
|
14
|
+
|
|
15
|
+
1. 克隆项目
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
git clone https://github.com/zlmica/hono-backend-starter.git
|
|
19
|
+
cd hono-backend-starter
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
2. 安装依赖
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
bun install
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
3. 配置环境变量
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
cp env.example .env
|
|
32
|
+
# 编辑 .env 文件,配置数据库连接等信息
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
4. 启动 PostgreSQL 数据库
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# 使用 Docker Compose 启动 PostgreSQL
|
|
39
|
+
docker-compose up postgres -d
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
5. 初始化数据库
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# 执行数据库迁移,创建表结构
|
|
46
|
+
bun run db:migrate
|
|
47
|
+
|
|
48
|
+
# 可选:填充测试数据
|
|
49
|
+
bun run db:seed
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
6. 启动开发服务器
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
bun run dev
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Git 提交规范
|
|
59
|
+
|
|
60
|
+
本项目使用 [Conventional Commits](https://www.conventionalcommits.org/) 规范。
|
|
61
|
+
|
|
62
|
+
### 提交类型
|
|
63
|
+
|
|
64
|
+
- `feat`: 新功能
|
|
65
|
+
- `fix`: 修复bug
|
|
66
|
+
- `docs`: 文档更新
|
|
67
|
+
- `style`: 代码格式调整
|
|
68
|
+
- `refactor`: 代码重构
|
|
69
|
+
- `perf`: 性能优化
|
|
70
|
+
- `test`: 测试相关
|
|
71
|
+
- `chore`: 构建过程或辅助工具的变动
|
|
72
|
+
- `ci`: CI/CD相关
|
|
73
|
+
- `build`: 构建系统或外部依赖的变动
|
|
74
|
+
- `revert`: 回滚之前的提交
|
|
75
|
+
|
|
76
|
+
### 使用方式
|
|
77
|
+
|
|
78
|
+
#### 1. 使用 commitizen(推荐)
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
bun run commit
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
这会启动交互式提交界面,引导你填写符合规范的提交信息。
|
|
85
|
+
|
|
86
|
+
#### 2. 手动提交
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
git commit -m "feat: 添加新功能"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 代码检查
|
|
93
|
+
|
|
94
|
+
项目配置了自动代码检查:
|
|
95
|
+
|
|
96
|
+
- **pre-commit**: 提交前自动运行 ESLint 检查
|
|
97
|
+
- **commit-msg**: 验证提交消息格式
|
|
98
|
+
|
|
99
|
+
手动运行代码检查:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# 检查代码
|
|
103
|
+
bun run lint
|
|
104
|
+
|
|
105
|
+
# 自动修复可修复的问题
|
|
106
|
+
bun run lint:fix
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## 数据库操作
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# 生成迁移文件
|
|
113
|
+
bun run db:generate
|
|
114
|
+
|
|
115
|
+
# 执行迁移
|
|
116
|
+
bun run db:migrate
|
|
117
|
+
|
|
118
|
+
# 打开数据库管理界面
|
|
119
|
+
bun run db:studio
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## 部署
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# 本地部署
|
|
126
|
+
bun run deploy
|
|
127
|
+
|
|
128
|
+
# 服务器部署
|
|
129
|
+
bun run deploy:server
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## 项目结构
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
src/
|
|
136
|
+
├── app.ts # 应用主文件
|
|
137
|
+
├── index.ts # 入口文件
|
|
138
|
+
├── env.ts # 环境变量配置
|
|
139
|
+
├── db/ # 数据库相关
|
|
140
|
+
│ ├── index.ts # 数据库连接
|
|
141
|
+
│ ├── schema.ts # 数据库模式
|
|
142
|
+
│ └── schemas/ # 表结构定义
|
|
143
|
+
├── lib/ # 工具库
|
|
144
|
+
├── middlewares/ # 中间件
|
|
145
|
+
├── routes/ # 路由
|
|
146
|
+
└── utils/ # 工具函数
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## 详细文档
|
|
150
|
+
|
|
151
|
+
- [部署指南](./DEPLOYMENT.md)
|