create-entity-app-server 0.0.3 → 0.1.13
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/.gitignore +1 -0
- package/README.md +11 -0
- package/bin/create.js +52 -13
- package/dist-create/template/.env +71 -0
- package/{.env.example → dist-create/template/.env.example} +3 -0
- package/dist-create/template/.gateway-version +1 -0
- package/{src/app/plugins/2fa/config.example.json → dist-create/template/app/plugins/2fa/config.json} +1 -2
- package/{src → dist-create/template}/app/plugins/alimtalk/entity-adapter.ts +1 -1
- package/{src → dist-create/template}/app/plugins/example/config.json +1 -3
- package/{src → dist-create/template}/app/plugins/friendtalk/entity-adapter.ts +1 -1
- package/{src → dist-create/template}/app/plugins/llm/chatbot-store.ts +2 -2
- package/{src/app/plugins/oauth/config.example.json → dist-create/template/app/plugins/oauth/config.json} +0 -2
- package/dist-create/template/app/plugins/ocr/cache.ts +1 -0
- package/dist-create/template/app/plugins/ocr/config.ts +1 -0
- package/dist-create/template/app/plugins/ocr/direction.ts +1 -0
- package/dist-create/template/app/plugins/ocr/dispatch.ts +1 -0
- package/dist-create/template/app/plugins/ocr/entity-adapter.ts +1 -0
- package/dist-create/template/app/plugins/ocr/errors.ts +1 -0
- package/dist-create/template/app/plugins/ocr/handlers.ts +1 -0
- package/dist-create/template/app/plugins/ocr/index.ts +1 -0
- package/dist-create/template/app/plugins/ocr/llm-parser.ts +1 -0
- package/dist-create/template/app/plugins/ocr/parsing-pipeline.ts +1 -0
- package/dist-create/template/app/plugins/ocr/pdf-converter.ts +1 -0
- package/dist-create/template/app/plugins/ocr/preprocessor.ts +1 -0
- package/dist-create/template/app/plugins/ocr/providers/aws.ts +1 -0
- package/dist-create/template/app/plugins/ocr/providers/azure.ts +1 -0
- package/dist-create/template/app/plugins/ocr/providers/google.ts +1 -0
- package/dist-create/template/app/plugins/ocr/providers/index.ts +1 -0
- package/dist-create/template/app/plugins/ocr/providers/naver.ts +1 -0
- package/dist-create/template/app/plugins/ocr/providers/tesseract.ts +1 -0
- package/dist-create/template/app/plugins/ocr/providers/upstage.ts +1 -0
- package/dist-create/template/app/plugins/ocr/quota.ts +1 -0
- package/dist-create/template/app/plugins/ocr/refiner.ts +1 -0
- package/dist-create/template/app/plugins/ocr/routes.ts +1 -0
- package/dist-create/template/app/plugins/ocr/service.ts +1 -0
- package/dist-create/template/app/plugins/ocr/template-loader.ts +1 -0
- package/dist-create/template/app/plugins/ocr/template-matcher.ts +1 -0
- package/dist-create/template/app/plugins/ocr/types/config.ts +1 -0
- package/dist-create/template/app/plugins/ocr/types/driver.ts +1 -0
- package/dist-create/template/app/plugins/ocr/types/index.ts +1 -0
- package/dist-create/template/app/plugins/ocr/types/parsed.ts +1 -0
- package/dist-create/template/app/plugins/ocr/types/store.ts +1 -0
- package/dist-create/template/app/plugins/ocr/types/template.ts +1 -0
- package/dist-create/template/app/plugins/ocr/utils.ts +1 -0
- package/dist-create/template/app/plugins/smtp/config.ts +1 -0
- package/dist-create/template/app/plugins/smtp/handlers.ts +1 -0
- package/dist-create/template/app/plugins/smtp/index.ts +1 -0
- package/dist-create/template/app/plugins/smtp/routes.ts +1 -0
- package/dist-create/template/app/plugins/smtp/types/config.ts +1 -0
- package/dist-create/template/app/plugins/smtp/types/index.ts +1 -0
- package/{src → dist-create/template}/app/plugins/vessel_kr/config.json +1 -3
- package/dist-create/template/app/routes/account/change-password/config.json +3 -0
- package/dist-create/template/app/routes/account/config.json +3 -0
- package/dist-create/template/app/routes/account/reactivate/config.json +3 -0
- package/{src → dist-create/template}/app/routes/account/register/config.json +1 -3
- package/dist-create/template/app/routes/approval/config.json +3 -0
- package/dist-create/template/app/routes/auth/config.json +3 -0
- package/dist-create/template/app/routes/board/config.json +3 -0
- package/dist-create/template/app/routes/example-db/config.json +3 -0
- package/dist-create/template/app/routes/example-es/config.json +3 -0
- package/dist-create/template/app/routes/health/config.json +3 -0
- package/dist-create/template/app/routes/privilege/config.json +3 -0
- package/dist-create/template/app/routes/user/config.json +3 -0
- package/{src → dist-create/template}/app/schedules/data-retention/config.json +1 -3
- package/{src → dist-create/template}/app/schedules/dormancy/config.json +1 -3
- package/{docs → dist-create/template/docs}/scripts-guide.md +101 -30
- package/dist-create/template/scripts/update-server.sh +391 -0
- package/dist-create/template/system-api.js +1 -0
- package/dist-create/template/system.js +1 -0
- package/package.json +105 -109
- package/docs/design/board-api-design.md +0 -2342
- package/scripts/_gen-table-type.ts +0 -605
- package/scripts/build-minify-plugins.mjs +0 -124
- package/scripts/build-obfuscate-system.mjs +0 -38
- package/scripts/build.sh +0 -140
- package/scripts/gen-table-type.sh +0 -169
- package/scripts/push.sh +0 -102
- package/scripts/release.sh +0 -51
- package/src/app/plugins/2fa/config.json +0 -17
- package/src/app/plugins/ais/config.json +0 -7
- package/src/app/plugins/ais/config.ts +0 -32
- package/src/app/plugins/ais/docs/README.md +0 -142
- package/src/app/plugins/ais/docs/api.md +0 -138
- package/src/app/plugins/ais/entities/ais_vessel.json +0 -64
- package/src/app/plugins/ais/handlers.ts +0 -88
- package/src/app/plugins/ais/index.ts +0 -21
- package/src/app/plugins/ais/routes.ts +0 -13
- package/src/app/plugins/ais/service.ts +0 -242
- package/src/app/plugins/ais/types/index.ts +0 -78
- package/src/app/plugins/alimtalk/config.json +0 -26
- package/src/app/plugins/distance-server/config.json +0 -6
- package/src/app/plugins/distance-server/config.ts +0 -50
- package/src/app/plugins/distance-server/docs/README.md +0 -114
- package/src/app/plugins/distance-server/handlers.ts +0 -104
- package/src/app/plugins/distance-server/index.ts +0 -23
- package/src/app/plugins/distance-server/routes.ts +0 -36
- package/src/app/plugins/distance-server/service.ts +0 -187
- package/src/app/plugins/distance-server/types/index.ts +0 -8
- package/src/app/plugins/friendtalk/config.json +0 -11
- package/src/app/plugins/holidays/config.json +0 -10
- package/src/app/plugins/identity/config.json +0 -30
- package/src/app/plugins/kobc_freight/config.json +0 -6
- package/src/app/plugins/kobc_freight/config.ts +0 -28
- package/src/app/plugins/kobc_freight/docs/README.md +0 -316
- package/src/app/plugins/kobc_freight/entities/kobc_freight_entry.json +0 -31
- package/src/app/plugins/kobc_freight/entities/kobc_kcci_entry.json +0 -67
- package/src/app/plugins/kobc_freight/entities/kobc_kpli_entry.json +0 -27
- package/src/app/plugins/kobc_freight/entities/kobc_ncfi_entry.json +0 -99
- package/src/app/plugins/kobc_freight/handlers.ts +0 -283
- package/src/app/plugins/kobc_freight/index.ts +0 -21
- package/src/app/plugins/kobc_freight/routes.ts +0 -39
- package/src/app/plugins/kobc_freight/service.ts +0 -604
- package/src/app/plugins/kobc_freight/types/index.ts +0 -99
- package/src/app/plugins/llm/config.json +0 -71
- package/src/app/plugins/oauth/config.json +0 -72
- package/src/app/plugins/ocr/cache.ts +0 -50
- package/src/app/plugins/ocr/config.json +0 -110
- package/src/app/plugins/ocr/config.ts +0 -126
- package/src/app/plugins/ocr/direction.ts +0 -48
- package/src/app/plugins/ocr/dispatch.ts +0 -130
- package/src/app/plugins/ocr/entity-adapter.ts +0 -198
- package/src/app/plugins/ocr/errors.ts +0 -42
- package/src/app/plugins/ocr/handlers.ts +0 -250
- package/src/app/plugins/ocr/index.ts +0 -68
- package/src/app/plugins/ocr/llm-parser.ts +0 -164
- package/src/app/plugins/ocr/parsing-pipeline.ts +0 -87
- package/src/app/plugins/ocr/pdf-converter.ts +0 -136
- package/src/app/plugins/ocr/preprocessor.ts +0 -313
- package/src/app/plugins/ocr/providers/aws.ts +0 -200
- package/src/app/plugins/ocr/providers/azure.ts +0 -183
- package/src/app/plugins/ocr/providers/google.ts +0 -155
- package/src/app/plugins/ocr/providers/index.ts +0 -80
- package/src/app/plugins/ocr/providers/naver.ts +0 -186
- package/src/app/plugins/ocr/providers/tesseract.ts +0 -198
- package/src/app/plugins/ocr/providers/upstage.ts +0 -156
- package/src/app/plugins/ocr/quota.ts +0 -108
- package/src/app/plugins/ocr/refiner.ts +0 -112
- package/src/app/plugins/ocr/routes.ts +0 -19
- package/src/app/plugins/ocr/service.ts +0 -333
- package/src/app/plugins/ocr/template-loader.ts +0 -72
- package/src/app/plugins/ocr/template-matcher.ts +0 -422
- package/src/app/plugins/ocr/types/config.ts +0 -60
- package/src/app/plugins/ocr/types/driver.ts +0 -71
- package/src/app/plugins/ocr/types/index.ts +0 -5
- package/src/app/plugins/ocr/types/parsed.ts +0 -101
- package/src/app/plugins/ocr/types/store.ts +0 -70
- package/src/app/plugins/ocr/types/template.ts +0 -89
- package/src/app/plugins/ocr/utils.ts +0 -18
- package/src/app/plugins/pg/config.json +0 -35
- package/src/app/plugins/push/config.json +0 -18
- package/src/app/plugins/sms/config.json +0 -33
- package/src/app/plugins/smtp/config.json +0 -5
- package/src/app/plugins/smtp/config.ts +0 -41
- package/src/app/plugins/smtp/handlers.ts +0 -52
- package/src/app/plugins/smtp/index.ts +0 -33
- package/src/app/plugins/smtp/routes.ts +0 -19
- package/src/app/plugins/smtp/types/config.ts +0 -8
- package/src/app/plugins/smtp/types/index.ts +0 -1
- package/src/app/plugins/taxinvoice/config.json +0 -35
- package/src/app/routes/account/change-password/config.json +0 -5
- package/src/app/routes/account/config.json +0 -5
- package/src/app/routes/account/reactivate/config.json +0 -5
- package/src/app/routes/approval/config.json +0 -5
- package/src/app/routes/auth/config.json +0 -5
- package/src/app/routes/board/config.json +0 -5
- package/src/app/routes/calendar/config.json +0 -5
- package/src/app/routes/calendar/entities/calendar_attendees.json +0 -23
- package/src/app/routes/calendar/entities/calendar_comments.json +0 -17
- package/src/app/routes/calendar/entities/calendar_events.json +0 -48
- package/src/app/routes/calendar/entities/calendar_kind.json +0 -11
- package/src/app/routes/calendar/entities/calendar_method.json +0 -11
- package/src/app/routes/calendar/routes.ts +0 -32
- package/src/app/routes/email-verify/config.json +0 -16
- package/src/app/routes/example-db/config.json +0 -5
- package/src/app/routes/example-es/config.json +0 -5
- package/src/app/routes/funeral/config.json +0 -5
- package/src/app/routes/funeral/entities/funeral.json +0 -77
- package/src/app/routes/funeral/entities/funeral_docs.json +0 -36
- package/src/app/routes/funeral/entities/funeral_mourner.json +0 -31
- package/src/app/routes/funeral/entities/funeral_order.json +0 -48
- package/src/app/routes/funeral/entities/funeral_room.json +0 -61
- package/src/app/routes/funeral/entities/funeral_schedule.json +0 -39
- package/src/app/routes/funeral/routes.ts +0 -32
- package/src/app/routes/health/config.json +0 -5
- package/src/app/routes/hr/career/config.json +0 -5
- package/src/app/routes/hr/career/entities/employee_career.json +0 -15
- package/src/app/routes/hr/career/routes.ts +0 -25
- package/src/app/routes/hr/config.json +0 -5
- package/src/app/routes/hr/education/config.json +0 -5
- package/src/app/routes/hr/education/entities/employee_education.json +0 -29
- package/src/app/routes/hr/education/entities/employee_education_mans.json +0 -25
- package/src/app/routes/hr/education/entities/employee_school.json +0 -19
- package/src/app/routes/hr/education/routes.ts +0 -28
- package/src/app/routes/hr/employee/config.json +0 -5
- package/src/app/routes/hr/employee/entities/employee.json +0 -59
- package/src/app/routes/hr/employee/entities/employee_cert.json +0 -19
- package/src/app/routes/hr/employee/entities/employee_reward.json +0 -21
- package/src/app/routes/hr/employee/routes.ts +0 -27
- package/src/app/routes/hr/entities/hr_group.json +0 -47
- package/src/app/routes/hr/entities/hr_group_pv.json +0 -20
- package/src/app/routes/hr/entities/hr_role.json +0 -43
- package/src/app/routes/hr/entities/hr_role_pv.json +0 -20
- package/src/app/routes/hr/routes.ts +0 -29
- package/src/app/routes/messages/chat/config.json +0 -5
- package/src/app/routes/messages/chat/entities/user_chat.json +0 -47
- package/src/app/routes/messages/chat/entities/user_chat_room.json +0 -38
- package/src/app/routes/messages/chat/entities/user_chat_room_member.json +0 -49
- package/src/app/routes/messages/chat/routes.ts +0 -28
- package/src/app/routes/messages/msgbox/config.json +0 -5
- package/src/app/routes/messages/msgbox/entities/user_msgbox.json +0 -73
- package/src/app/routes/messages/msgbox/routes.ts +0 -28
- package/src/app/routes/password-reset/config.json +0 -15
- package/src/app/routes/privilege/config.json +0 -5
- package/src/app/routes/user/config.json +0 -5
- package/src/app/routes/vessel-tracking/entities/tracked_vessel.json +0 -261
- package/src/app/routes/vessel-tracking/handlers.ts +0 -134
- package/src/app/routes/vessel-tracking/routes.ts +0 -25
- package/src/app/routes/vessel-tracking/types/index.ts +0 -5
- package/src/app/routes/vessel-tracking/types/vessel.ts +0 -59
- package/src/app/schedules/ais_sync/config.json +0 -4
- package/src/app/schedules/ais_sync/index.ts +0 -69
- package/src/app/schedules/kobc_freight_sync/config.json +0 -4
- package/src/app/schedules/kobc_freight_sync/index.ts +0 -94
- package/src/app/schedules/vessel_kr_sync/config.json +0 -4
- package/src/app/schedules/vessel_kr_sync/index.ts +0 -72
- package/src/system/app.ts +0 -129
- package/src/system/cache/_store-ref.ts +0 -15
- package/src/system/cache/config.ts +0 -61
- package/src/system/cache/drivers/memcached.ts +0 -135
- package/src/system/cache/drivers/memory.ts +0 -92
- package/src/system/cache/drivers/redis.ts +0 -109
- package/src/system/cache/index.ts +0 -43
- package/src/system/cache/namespaced.ts +0 -79
- package/src/system/cache/plugin.ts +0 -59
- package/src/system/cache/types.ts +0 -81
- package/src/system/config/config-path.ts +0 -20
- package/src/system/config/cors.ts +0 -49
- package/src/system/config/database.ts +0 -190
- package/src/system/config/entity-server.ts +0 -8
- package/src/system/config/env-substitution.ts +0 -4
- package/src/system/config/env.ts +0 -30
- package/src/system/config/json-config.ts +0 -13
- package/src/system/config/module-path.ts +0 -16
- package/src/system/config/packet-encrypt.ts +0 -80
- package/src/system/config/rate-limit.ts +0 -4
- package/src/system/config/security-loader.ts +0 -25
- package/src/system/config/security.ts +0 -16
- package/src/system/config/server.ts +0 -81
- package/src/system/crypto/cipher.ts +0 -117
- package/src/system/crypto/data-encrypt.ts +0 -174
- package/src/system/crypto/hash.ts +0 -24
- package/src/system/crypto/packet.test.ts +0 -23
- package/src/system/crypto/packet.ts +0 -97
- package/src/system/crypto/random.ts +0 -19
- package/src/system/email/sender.ts +0 -85
- package/src/system/email/template-engine.ts +0 -147
- package/src/system/entity-server/bootstrap.ts +0 -270
- package/src/system/entity-server/client.ts +0 -64
- package/src/system/hooks/loader.ts +0 -32
- package/src/system/hooks/runner.ts +0 -159
- package/src/system/hooks/types.ts +0 -75
- package/src/system/hooks/withdraw-hooks.ts +0 -42
- package/src/system/http/cookie.ts +0 -62
- package/src/system/http/response.ts +0 -16
- package/src/system/index.ts +0 -48
- package/src/system/logging/log-format.ts +0 -50
- package/src/system/logging/logger.ts +0 -104
- package/src/system/middleware/_db-ref.ts +0 -26
- package/src/system/middleware/_push-ref.ts +0 -28
- package/src/system/middleware/access-log.ts +0 -34
- package/src/system/middleware/auth.ts +0 -67
- package/src/system/middleware/csrf.ts +0 -172
- package/src/system/middleware/database.ts +0 -44
- package/src/system/middleware/error-handler.ts +0 -51
- package/src/system/middleware/extension-loader.ts +0 -111
- package/src/system/middleware/packet-encrypt.ts +0 -281
- package/src/system/middleware/request-id.ts +0 -18
- package/src/system/plugins/access-log.ts +0 -34
- package/src/system/plugins/packet-encrypt.ts +0 -281
- package/src/system/proxy/register.ts +0 -37
- package/src/system/public-api.ts +0 -140
- package/src/system/push/sender.ts +0 -131
- package/src/system/routes/entity-interceptor.ts +0 -327
- package/src/system/routes/loader.ts +0 -215
- package/src/system/scheduler/cron-utils.ts +0 -150
- package/src/system/scheduler/distributed-lock.ts +0 -141
- package/src/system/scheduler/schedule-loader.ts +0 -105
- package/src/system/security/anonymous-device-id.ts +0 -41
- package/src/system/security/anonymous-device.ts +0 -98
- package/src/system/security/anonymous-packet-token.ts +0 -23
- package/src/system/security/packet-bootstrap.ts +0 -16
- package/src/system/security/password-policy.ts +0 -191
- package/src/system/startup-banner.ts +0 -191
- package/src/system/types/fastify.d.ts +0 -53
- package/src/system/utils/app-path.ts +0 -31
- package/src/system/utils/coerce.ts +0 -28
- package/src/system/utils/date-prefixed-log-stream.ts +0 -176
- package/src/system/utils/errors.ts +0 -66
- package/src/system/utils/format.ts +0 -45
- package/src/system/utils/http-client.ts +0 -79
- package/src/system/utils/user-agent.ts +0 -82
- package/tsconfig.app.json +0 -17
- package/tsconfig.json +0 -39
- /package/{src → dist-create/template}/app/hooks/README.md +0 -0
- /package/{src → dist-create/template}/app/hooks/account.ts +0 -0
- /package/{src → dist-create/template}/app/hooks/index.ts +0 -0
- /package/{src → dist-create/template}/app/hooks/order.ts +0 -0
- /package/{src → dist-create/template}/app/hooks/post.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/entities/account.json +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/handlers/disable.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/handlers/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/handlers/recovery.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/handlers/regenerate.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/handlers/setup-verify.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/handlers/setup.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/handlers/status.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/handlers/utils.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/handlers/verify.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/templates/auth/2fa_disabled.html +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/templates/auth/2fa_recovery_regenerated.html +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/templates/auth/2fa_setup_complete.html +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/totp-utils.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/2fa/types.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/README.md +0 -0
- /package/{src/app/plugins/alimtalk/config.example.json → dist-create/template/app/plugins/alimtalk/config.json} +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/entities/alimtalk_log.json +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/entities/alimtalk_msg.json +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/providers/aligo.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/providers/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/providers/nhn.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/providers/ppurio.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/providers/solapi.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/service.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/template-cache.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/templates/alimtalk.json +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/types/client.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/types/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/types/friendtalk.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/types/job.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/alimtalk/webhook.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/example/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/example/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/example/entity-adapter.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/example/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/example/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/example/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/example/service.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/example/types/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/example/types/index.ts +0 -0
- /package/{src/app/plugins/friendtalk/config.example.json → dist-create/template/app/plugins/friendtalk/config.json} +0 -0
- /package/{src → dist-create/template}/app/plugins/friendtalk/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/friendtalk/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/friendtalk/entities/friendtalk_log.json +0 -0
- /package/{src → dist-create/template}/app/plugins/friendtalk/entities/friendtalk_msg.json +0 -0
- /package/{src → dist-create/template}/app/plugins/friendtalk/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/friendtalk/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/friendtalk/templates/friendtalk.json +0 -0
- /package/{src/app/plugins/holidays/config.example.json → dist-create/template/app/plugins/holidays/config.json} +0 -0
- /package/{src → dist-create/template}/app/plugins/holidays/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/holidays/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/holidays/entities/holiday.json +0 -0
- /package/{src → dist-create/template}/app/plugins/holidays/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/holidays/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/holidays/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/holidays/service.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/holidays/types/api.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/holidays/types/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/holidays/types/index.ts +0 -0
- /package/{src/app/plugins/identity/config.example.json → dist-create/template/app/plugins/identity/config.json} +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/crypto.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/entities/account.json +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/entities/identity_verification.json +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/entity-adapter.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/providers/danal.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/providers/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/providers/kmc.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/providers/nice.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/service.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/types/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/identity/types/verification.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/cache.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/chunker.ts +0 -0
- /package/{src/app/plugins/llm/config.example.json → dist-create/template/app/plugins/llm/config.json} +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/conversation-store.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/docs/api.md +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/document-store.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/entities/llm_chatbot.json +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/entities/llm_conversation.json +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/entities/llm_document.json +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/entities/llm_usage.json +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/entities/llm_user_profile.json +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/profile-store.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/providers/anthropic.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/providers/azure.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/providers/gemini.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/providers/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/providers/ollama.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/providers/openai.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/service.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/template-loader.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/templates/prompts/extract_json.json +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/templates/prompts/summarize.json +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/templates/prompts/translate.json +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/types/chat.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/types/chatbot.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/types/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/types/conversation.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/types/profile.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/types/store.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/types/usage.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/llm/usage-store.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/account/handlers/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/account/handlers/link.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/account/handlers/providers-list.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/account/handlers/refresh.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/account/handlers/unlink.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/entities/account_oauth.json +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/handlers/callback.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/handlers/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/handlers/redirect.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/providers/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/service.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/state.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/oauth/upsert.ts +0 -0
- /package/{src/app/plugins/ocr/config.example.json → dist-create/template/app/plugins/ocr/config.json} +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/docs/api.md +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/entities/ocr_result.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/entities/ocr_usage.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/business_reg.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/career_cert.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/driver_license.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/facility_card.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/id_card.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/invoice.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/namecard.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/prompts/business_reg.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/prompts/career_cert.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/prompts/driver_license.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/prompts/facility_card.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/prompts/general.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/prompts/id_card.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/prompts/invoice.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/prompts/namecard.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/prompts/receipt.json +0 -0
- /package/{src → dist-create/template}/app/plugins/ocr/templates/receipt.json +0 -0
- /package/{src/app/plugins/pg/config.example.json → dist-create/template/app/plugins/pg/config.json} +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/entities/pg_cancel.json +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/entities/pg_order.json +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/entities/pg_webhook_log.json +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/entity-adapter.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/providers/danal.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/providers/hecto.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/providers/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/providers/inicis.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/providers/kakaopay.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/providers/kcp.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/providers/naverpay.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/providers/payco.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/providers/payletter.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/providers/paypal.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/providers/toss.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/providers/wanna.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/service.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/types/client.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/types/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/types/error.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/pg/types/payment.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/providers/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/providers/solapi-auth.ts +0 -0
- /package/{src/app/plugins/push/config.example.json → dist-create/template/app/plugins/push/config.json} +0 -0
- /package/{src → dist-create/template}/app/plugins/push/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/push/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/push/entities/push_log.json +0 -0
- /package/{src → dist-create/template}/app/plugins/push/entities/push_msg.json +0 -0
- /package/{src → dist-create/template}/app/plugins/push/entity-adapter.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/push/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/push/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/push/providers/apns.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/push/providers/fcm.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/push/providers/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/push/providers/utils.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/push/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/push/service.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/push/types/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/push/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/push/types/job.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/shared/docs/README.md +0 -0
- /package/{src/app/plugins/sms/config.example.json → dist-create/template/app/plugins/sms/config.json} +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/entities/sms_log.json +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/entities/sms_msg.json +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/entities/sms_verification.json +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/entity-adapter.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/providers/aligo.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/providers/aws-sns.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/providers/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/providers/nhn.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/providers/ppurio.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/providers/solapi.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/service.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/types/client.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/types/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/types/job.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/sms/verification.ts +0 -0
- /package/{src/app/routes/vessel-tracking → dist-create/template/app/plugins/smtp}/config.json +0 -0
- /package/{src → dist-create/template}/app/plugins/smtp/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/smtp/templates/layout.html +0 -0
- /package/{src/app/plugins/taxinvoice/config.example.json → dist-create/template/app/plugins/taxinvoice/config.json} +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/entities/tax_invoice.json +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/entities/tax_invoice_item.json +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/entities/tax_invoice_log.json +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/entities/tax_invoice_party.json +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/entity-adapter.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/providers/barobill.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/providers/bolta.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/providers/esero.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/providers/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/providers/popbill.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/providers/sendbill.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/providers/smartbill.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/service.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/types/client.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/types/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/types/invoice.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/taxinvoice/types/queue.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/vessel_kr/config.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/vessel_kr/docs/README.md +0 -0
- /package/{src → dist-create/template}/app/plugins/vessel_kr/entities/vessel_kr_entry.json +0 -0
- /package/{src → dist-create/template}/app/plugins/vessel_kr/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/vessel_kr/index.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/vessel_kr/routes.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/vessel_kr/service.ts +0 -0
- /package/{src → dist-create/template}/app/plugins/vessel_kr/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/routes/README.md +0 -0
- /package/{src → dist-create/template}/app/routes/account/change-password/entities/password_history.json +0 -0
- /package/{src → dist-create/template}/app/routes/account/change-password/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/routes/account/change-password/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/account/reactivate/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/routes/account/reactivate/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/account/register/config-loader.ts +0 -0
- /package/{src → dist-create/template}/app/routes/account/register/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/routes/account/register/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/account/register/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/routes/account/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/account/templates/force_reset.html +0 -0
- /package/{src → dist-create/template}/app/routes/account/templates/welcome.html +0 -0
- /package/{src → dist-create/template}/app/routes/account/withdraw/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/routes/account/withdraw/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/approval/entities/approval.json +0 -0
- /package/{src → dist-create/template}/app/routes/approval/entities/comments.json +0 -0
- /package/{src → dist-create/template}/app/routes/approval/entities/reference.json +0 -0
- /package/{src → dist-create/template}/app/routes/approval/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/auth/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/routes/auth/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/board/entities/board_category.json +0 -0
- /package/{src → dist-create/template}/app/routes/board/entities/board_comment.json +0 -0
- /package/{src → dist-create/template}/app/routes/board/entities/board_like.json +0 -0
- /package/{src → dist-create/template}/app/routes/board/entities/board_mention.json +0 -0
- /package/{src → dist-create/template}/app/routes/board/entities/board_post.json +0 -0
- /package/{src → dist-create/template}/app/routes/board/entities/board_post_tag.json +0 -0
- /package/{src → dist-create/template}/app/routes/board/entities/board_rating.json +0 -0
- /package/{src → dist-create/template}/app/routes/board/entities/board_read_log.json +0 -0
- /package/{src → dist-create/template}/app/routes/board/entities/board_report.json +0 -0
- /package/{src → dist-create/template}/app/routes/board/entities/board_tag.json +0 -0
- /package/{src → dist-create/template}/app/routes/board/handlers/categories.ts +0 -0
- /package/{src → dist-create/template}/app/routes/board/handlers/comments.ts +0 -0
- /package/{src → dist-create/template}/app/routes/board/handlers/files.ts +0 -0
- /package/{src → dist-create/template}/app/routes/board/handlers/likes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/board/handlers/mentions.ts +0 -0
- /package/{src → dist-create/template}/app/routes/board/handlers/posts.ts +0 -0
- /package/{src → dist-create/template}/app/routes/board/handlers/ratings.ts +0 -0
- /package/{src → dist-create/template}/app/routes/board/handlers/reports.ts +0 -0
- /package/{src → dist-create/template}/app/routes/board/handlers/tags.ts +0 -0
- /package/{src → dist-create/template}/app/routes/board/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/config-loader.ts +0 -0
- /package/{src/app/routes/email-verify/config.example.json → dist-create/template/app/routes/email-verify/config.json} +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/entities/account.json +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/handlers/activate.ts +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/handlers/change.ts +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/handlers/confirm.ts +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/handlers/index.ts +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/handlers/send.ts +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/handlers/status.ts +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/handlers/utils.ts +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/templates/verification.html +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/templates/verification_link.html +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/routes/email-verify/verification-utils.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-db/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-db/models/account-ext.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-db/models/users.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-db/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-db/types/defaults.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-db/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-db/types/params.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-db/types/query.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-db/types/user.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-es/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-es/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-es/types/defaults.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-es/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-es/types/params.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-es/types/post.ts +0 -0
- /package/{src → dist-create/template}/app/routes/example-es/types/query.ts +0 -0
- /package/{src → dist-create/template}/app/routes/health/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/routes/health/routes.ts +0 -0
- /package/{src/app/routes/password-reset/config.example.json → dist-create/template/app/routes/password-reset/config.json} +0 -0
- /package/{src → dist-create/template}/app/routes/password-reset/entities/account.json +0 -0
- /package/{src → dist-create/template}/app/routes/password-reset/handlers.ts +0 -0
- /package/{src → dist-create/template}/app/routes/password-reset/password-utils.ts +0 -0
- /package/{src → dist-create/template}/app/routes/password-reset/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/password-reset/templates/password_reset.html +0 -0
- /package/{src → dist-create/template}/app/routes/password-reset/templates/password_reset_link.html +0 -0
- /package/{src → dist-create/template}/app/routes/password-reset/types/index.ts +0 -0
- /package/{src → dist-create/template}/app/routes/privilege/entities/pv_group.json +0 -0
- /package/{src → dist-create/template}/app/routes/privilege/entities/pv_group_item.json +0 -0
- /package/{src → dist-create/template}/app/routes/privilege/entities/pv_item.json +0 -0
- /package/{src → dist-create/template}/app/routes/privilege/entities/user_pv_group.json +0 -0
- /package/{src → dist-create/template}/app/routes/privilege/entities/user_pv_item.json +0 -0
- /package/{src → dist-create/template}/app/routes/privilege/routes.ts +0 -0
- /package/{src → dist-create/template}/app/routes/user/entities/user.json +0 -0
- /package/{src → dist-create/template}/app/routes/user/entities/user_biometric.json +0 -0
- /package/{src → dist-create/template}/app/routes/user/routes.ts +0 -0
- /package/{src → dist-create/template}/app/schedules/README.md +0 -0
- /package/{src → dist-create/template}/app/schedules/data-retention/index.ts +0 -0
- /package/{src → dist-create/template}/app/schedules/dormancy/entities/account.json +0 -0
- /package/{src → dist-create/template}/app/schedules/dormancy/entities/privacy_cron_lock.json +0 -0
- /package/{src → dist-create/template}/app/schedules/dormancy/index.ts +0 -0
- /package/{src → dist-create/template}/app/schedules/dormancy/templates/dormancy_completed.html +0 -0
- /package/{src → dist-create/template}/app/schedules/dormancy/templates/dormancy_warning.html +0 -0
- /package/{configs → dist-create/template/configs}/cache.json +0 -0
- /package/{configs → dist-create/template/configs}/cors.json +0 -0
- /package/{configs → dist-create/template/configs}/database.json +0 -0
- /package/{configs → dist-create/template/configs}/security.json +0 -0
- /package/{configs → dist-create/template/configs}/server.json +0 -0
- /package/{docs → dist-create/template/docs}/README.md +0 -0
- /package/{docs → dist-create/template/docs}/architecture.md +0 -0
- /package/{docs → dist-create/template/docs}/cache.md +0 -0
- /package/{docs → dist-create/template/docs}/configs.md +0 -0
- /package/{docs → dist-create/template/docs}/database.md +0 -0
- /package/{docs → dist-create/template/docs}/flows.md +0 -0
- /package/{docs → dist-create/template/docs}/getting-started.md +0 -0
- /package/{docs → dist-create/template/docs}/hooks.md +0 -0
- /package/{docs → dist-create/template/docs}/internals.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/2fa.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/alimtalk.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/friendtalk.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/holidays.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/how-to-create.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/identity.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/llm.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/oauth.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/ocr.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/pg.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/push.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/sms.md +0 -0
- /package/{docs → dist-create/template/docs}/plugins/taxinvoice.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/README.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/account-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/alimtalk-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/board-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/email-verification.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/friendtalk-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/holidays-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/how-to-create.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/identity-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/llm-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/ocr-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/password-reset.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/pg-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/push-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/sms-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/smtp-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/routes/tax-invoice-routes.md +0 -0
- /package/{docs → dist-create/template/docs}/schedules/dormancy-and-retention.md +0 -0
- /package/{docs → dist-create/template/docs}/schedules/how-to-create.md +0 -0
- /package/{docs → dist-create/template/docs}/security.md +0 -0
- /package/{docs → dist-create/template/docs}/system.md +0 -0
- /package/{scripts → dist-create/template/scripts}/entity.sh +0 -0
- /package/{scripts → dist-create/template/scripts}/reset-all.sh +0 -0
- /package/{scripts → dist-create/template/scripts}/run.sh +0 -0
- /package/{scripts/dist-tsconfig.json → dist-create/template/tsconfig.json} +0 -0
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { env, isDev } from "./config/env.ts";
|
|
2
|
-
import { serverConfig } from "./config/server.ts";
|
|
3
|
-
import { loadCorsConfig } from "./config/cors.ts";
|
|
4
|
-
import { loadSecurityJson } from "./config/security-loader.ts";
|
|
5
|
-
import { loadDatabaseConfig } from "./config/database.ts";
|
|
6
|
-
import { loadCacheConfig } from "./cache/config.ts";
|
|
7
|
-
import { loadPasswordPolicy } from "./security/password-policy.ts";
|
|
8
|
-
|
|
9
|
-
const ANSI = {
|
|
10
|
-
reset: "\u001b[0m",
|
|
11
|
-
cyan: "\u001b[96m",
|
|
12
|
-
green: "\u001b[92m",
|
|
13
|
-
pink: "\u001b[95m",
|
|
14
|
-
yellow: "\u001b[93m",
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
const BANNER_WIDTH = 74;
|
|
18
|
-
const BANNER_INNER_WIDTH = BANNER_WIDTH - 2;
|
|
19
|
-
const BANNER_CONTENT_WIDTH = BANNER_INNER_WIDTH - 2;
|
|
20
|
-
const ANSI_ESCAPE = /\u001b\[[0-9;]*m/g;
|
|
21
|
-
|
|
22
|
-
export interface StartupSummary {
|
|
23
|
-
hookCount: number;
|
|
24
|
-
pluginCount: number;
|
|
25
|
-
routeCount: number;
|
|
26
|
-
scheduleCount: number;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function stripProtocol(text: string): string {
|
|
30
|
-
return text.replace(/^https?:\/\//, "");
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function statusText(enabled: boolean): string {
|
|
34
|
-
return enabled ? color("enabled", ANSI.green) : "disabled";
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function valueText(text: string): string {
|
|
38
|
-
return color(text, ANSI.pink);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function color(text: string, code: string): string {
|
|
42
|
-
return isDev ? `${code}${text}${ANSI.reset}` : text;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function visibleLength(text: string): number {
|
|
46
|
-
return text.replace(ANSI_ESCAPE, "").length;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function padRight(text: string, width: number): string {
|
|
50
|
-
const padding = Math.max(0, width - visibleLength(text));
|
|
51
|
-
return `${text}${" ".repeat(padding)}`;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function center(text: string, width: number): string {
|
|
55
|
-
const space = Math.max(0, width - visibleLength(text));
|
|
56
|
-
const left = Math.floor(space / 2);
|
|
57
|
-
const right = space - left;
|
|
58
|
-
return `${" ".repeat(left)}${text}${" ".repeat(right)}`;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function line(content = ""): string {
|
|
62
|
-
return `${color("│", ANSI.cyan)} ${padRight(content, BANNER_CONTENT_WIDTH)} ${color("│", ANSI.cyan)}`;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function kvPart(label: string, value: string, width: number): string {
|
|
66
|
-
if (!label && !value) {
|
|
67
|
-
return " ".repeat(width);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (!label) {
|
|
71
|
-
return padRight(value, width);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const base = `${label} ${value}`;
|
|
75
|
-
const baseLength = visibleLength(base);
|
|
76
|
-
if (baseLength >= width) {
|
|
77
|
-
return padRight(base, width);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const dotCount = Math.max(
|
|
81
|
-
1,
|
|
82
|
-
width - visibleLength(label) - visibleLength(value) - 2,
|
|
83
|
-
);
|
|
84
|
-
return `${label} ${".".repeat(dotCount)} ${value}`;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function kv(
|
|
88
|
-
leftLabel: string,
|
|
89
|
-
leftValue: string,
|
|
90
|
-
rightLabel: string,
|
|
91
|
-
rightValue: string,
|
|
92
|
-
): string {
|
|
93
|
-
const separator = " ";
|
|
94
|
-
const leftWidth = Math.floor((BANNER_CONTENT_WIDTH - separator.length) / 2);
|
|
95
|
-
const rightWidth = BANNER_CONTENT_WIDTH - separator.length - leftWidth;
|
|
96
|
-
return `${kvPart(leftLabel, leftValue, leftWidth)}${separator}${kvPart(rightLabel, rightValue, rightWidth)}`;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export function printStartupBanner(
|
|
100
|
-
listenUrl: string,
|
|
101
|
-
summary: StartupSummary,
|
|
102
|
-
): void {
|
|
103
|
-
const publicUrl = serverConfig.baseUrl?.trim() || "-";
|
|
104
|
-
const cacheConfig = loadCacheConfig();
|
|
105
|
-
const corsConfig = loadCorsConfig();
|
|
106
|
-
const databaseConfig = loadDatabaseConfig();
|
|
107
|
-
const securityConfig = loadSecurityJson();
|
|
108
|
-
const passwordPolicy = loadPasswordPolicy();
|
|
109
|
-
const name = `${color("Entity App Server", ANSI.green)} ${color("ready", ANSI.yellow)}`;
|
|
110
|
-
const listenText = stripProtocol(listenUrl);
|
|
111
|
-
const entityText = stripProtocol(env.ENTITY_SERVER_URL);
|
|
112
|
-
const publicText = publicUrl === "-" ? publicUrl : stripProtocol(publicUrl);
|
|
113
|
-
const showPublicUrl =
|
|
114
|
-
publicText !== "-" &&
|
|
115
|
-
publicText !== listenText &&
|
|
116
|
-
publicText !== `${serverConfig.host}:${serverConfig.port}`;
|
|
117
|
-
const csrfEnabled = securityConfig.csrf?.enabled === true;
|
|
118
|
-
const packetEncryptEnabled =
|
|
119
|
-
securityConfig.packet_encrypt?.enabled === true;
|
|
120
|
-
const defaultDbGroup = databaseConfig?.groups[databaseConfig.default];
|
|
121
|
-
const databaseText = defaultDbGroup ? databaseConfig.default : "disabled";
|
|
122
|
-
const lines = [
|
|
123
|
-
color(`┌${"─".repeat(BANNER_INNER_WIDTH)}┐`, ANSI.cyan),
|
|
124
|
-
line(center(name, BANNER_CONTENT_WIDTH)),
|
|
125
|
-
line(),
|
|
126
|
-
line(center(color(listenText, ANSI.yellow), BANNER_CONTENT_WIDTH)),
|
|
127
|
-
line(
|
|
128
|
-
center(
|
|
129
|
-
color(`Entity Server: ${entityText}`, ANSI.yellow),
|
|
130
|
-
BANNER_CONTENT_WIDTH,
|
|
131
|
-
),
|
|
132
|
-
),
|
|
133
|
-
line(center(color(env.NODE_ENV, ANSI.yellow), BANNER_CONTENT_WIDTH)),
|
|
134
|
-
line(),
|
|
135
|
-
line(
|
|
136
|
-
kv(
|
|
137
|
-
"Namespace",
|
|
138
|
-
valueText(serverConfig.namespace),
|
|
139
|
-
"Log Level",
|
|
140
|
-
valueText(serverConfig.logging.level),
|
|
141
|
-
),
|
|
142
|
-
),
|
|
143
|
-
...(showPublicUrl
|
|
144
|
-
? [line(kv("", "", "Public URL", valueText(publicText)))]
|
|
145
|
-
: []),
|
|
146
|
-
line(
|
|
147
|
-
kv(
|
|
148
|
-
"CORS",
|
|
149
|
-
statusText(corsConfig.enabled),
|
|
150
|
-
"CSRF",
|
|
151
|
-
statusText(csrfEnabled),
|
|
152
|
-
),
|
|
153
|
-
),
|
|
154
|
-
line(
|
|
155
|
-
kv(
|
|
156
|
-
"Packet Encrypt",
|
|
157
|
-
statusText(packetEncryptEnabled),
|
|
158
|
-
"Password Policy",
|
|
159
|
-
statusText(passwordPolicy.enabled),
|
|
160
|
-
),
|
|
161
|
-
),
|
|
162
|
-
line(
|
|
163
|
-
kv(
|
|
164
|
-
"Cache",
|
|
165
|
-
valueText(cacheConfig.driver),
|
|
166
|
-
"Database",
|
|
167
|
-
valueText(databaseText),
|
|
168
|
-
),
|
|
169
|
-
),
|
|
170
|
-
line(),
|
|
171
|
-
line(
|
|
172
|
-
kv(
|
|
173
|
-
"Hooks",
|
|
174
|
-
valueText(String(summary.hookCount)),
|
|
175
|
-
"Plugins",
|
|
176
|
-
valueText(String(summary.pluginCount)),
|
|
177
|
-
),
|
|
178
|
-
),
|
|
179
|
-
line(
|
|
180
|
-
kv(
|
|
181
|
-
"Routes",
|
|
182
|
-
valueText(String(summary.routeCount)),
|
|
183
|
-
"Schedules",
|
|
184
|
-
valueText(String(summary.scheduleCount)),
|
|
185
|
-
),
|
|
186
|
-
),
|
|
187
|
-
color(`└${"─".repeat(BANNER_INNER_WIDTH)}┘`, ANSI.cyan),
|
|
188
|
-
];
|
|
189
|
-
|
|
190
|
-
process.stdout.write(`${lines.join("\n")}\n`);
|
|
191
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fastify 타입 확장 — req.user, app.db, app.authRequired 등
|
|
3
|
-
*
|
|
4
|
-
* system → app 역참조 제거: app 레이어 타입은 generic/unknown 으로 선언하고
|
|
5
|
-
* 실제 사용처에서 타입 단언(as)을 통해 구체 타입으로 변환한다.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { Kysely } from "kysely";
|
|
9
|
-
import type { UserInfo } from "../hooks/types.ts";
|
|
10
|
-
import type { CacheStore } from "../cache/types.ts";
|
|
11
|
-
|
|
12
|
-
declare module "fastify" {
|
|
13
|
-
interface FastifyRequest {
|
|
14
|
-
/** JWT 디코드된 사용자 정보 (프록시: decode만, 비즈니스: verify 후) */
|
|
15
|
-
user: UserInfo | null;
|
|
16
|
-
/** 패킷 복호화된 raw body (packet-encrypt 플러그인이 주입) */
|
|
17
|
-
rawBody?: Buffer;
|
|
18
|
-
/** 패킷 암호화 키 — 요청이 암호화된 경우 응답 암호화에 사용 */
|
|
19
|
-
_packetKey?: Buffer;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
interface FastifyInstance {
|
|
23
|
-
/** Kysely DB 인스턴스 — default 그룹 (database.json 미설정 시 null) */
|
|
24
|
-
db: Kysely<any> | null;
|
|
25
|
-
|
|
26
|
-
/** 모든 DB 그룹 커넥션 맵 (database.json groups 키 → Kysely 인스턴스) */
|
|
27
|
-
dbGroups: Record<string, Kysely<any>>;
|
|
28
|
-
|
|
29
|
-
/** 비즈니스 라우트 preHandler: JWT verify + 만료 확인 */
|
|
30
|
-
authRequired: (
|
|
31
|
-
req: import("fastify").FastifyRequest,
|
|
32
|
-
reply: import("fastify").FastifyReply,
|
|
33
|
-
) => Promise<void>;
|
|
34
|
-
|
|
35
|
-
/** OCR 서비스 인스턴스 (disabled 시 null) — app.plugins.ocr 에서 등록 */
|
|
36
|
-
ocrService: unknown;
|
|
37
|
-
|
|
38
|
-
/** 본인인증 서비스 인스턴스 (disabled 시 null) — app.plugins.identity 에서 등록 */
|
|
39
|
-
identityService: unknown;
|
|
40
|
-
|
|
41
|
-
/** 공통 캐시 스토어 (driver: memory | redis, configs/cache.json 참고) */
|
|
42
|
-
cache: CacheStore;
|
|
43
|
-
|
|
44
|
-
/** 한국 선박 입항 서비스 인스턴스 (disabled 시 null) — app.plugins.vessel_kr 에서 등록 */
|
|
45
|
-
vesselKrService: unknown;
|
|
46
|
-
|
|
47
|
-
/** 코베코 운임지수 서비스 인스턴스 (disabled 시 null) — app.plugins.kobc_freight 에서 등록 */
|
|
48
|
-
kobcFreightService: unknown;
|
|
49
|
-
|
|
50
|
-
/** AIS 선박 위치 서비스 인스턴스 (disabled 시 null) — app.plugins.ais 에서 등록 */
|
|
51
|
-
aisService: unknown;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* app 디렉토리 경로 헬퍼
|
|
3
|
-
*
|
|
4
|
-
* system.js가 번들된 환경(prod)과 tsx로 직접 실행하는 환경(dev) 양쪽에서
|
|
5
|
-
* app/ 디렉토리를 올바르게 찾아준다.
|
|
6
|
-
*
|
|
7
|
-
* 경로 기준:
|
|
8
|
-
* prod: dist/system.js → import.meta.url 기준 base = dist/ → dist/app/ 존재
|
|
9
|
-
* dev: src/system/** → import.meta.url 기준 base = src/system/[subdir]/
|
|
10
|
-
* → 2단계 상위(src/) + app = src/app/
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import path from "path";
|
|
14
|
-
import { existsSync } from "fs";
|
|
15
|
-
import { fileURLToPath } from "url";
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* 호출 측의 import.meta.url을 전달하면 app/ 루트 절대경로를 반환한다.
|
|
19
|
-
*
|
|
20
|
-
* @param callerMetaUrl - 호출 파일의 import.meta.url
|
|
21
|
-
*/
|
|
22
|
-
export function resolveAppRoot(callerMetaUrl: string): string {
|
|
23
|
-
const base = path.dirname(fileURLToPath(callerMetaUrl));
|
|
24
|
-
|
|
25
|
-
// prod: system.js (dist/) 기준 → dist/app 이 존재
|
|
26
|
-
const prodApp = path.join(base, "app");
|
|
27
|
-
if (existsSync(prodApp)) return prodApp;
|
|
28
|
-
|
|
29
|
-
// dev: src/system/[plugins|routes|hooks]/ 기준 → ../../app = src/app
|
|
30
|
-
return path.resolve(base, "..", "..", "app");
|
|
31
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 안전한 타입 변환 헬퍼
|
|
3
|
-
*
|
|
4
|
-
* unknown 값을 number, string 등으로 안전하게 변환한다.
|
|
5
|
-
* pg, taxinvoice 등 여러 플러그인의 entity-adapter 에서 공통으로 사용.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/** unknown → number (null/NaN → 0) */
|
|
9
|
-
export function toNumber(v: unknown): number {
|
|
10
|
-
if (v == null) return 0;
|
|
11
|
-
const n = Number(v);
|
|
12
|
-
return Number.isNaN(n) ? 0 : n;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/** unknown → string (null → "") */
|
|
16
|
-
export function toString(v: unknown): string {
|
|
17
|
-
if (v == null) return "";
|
|
18
|
-
return String(v);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** unknown → boolean (truthy 변환) */
|
|
22
|
-
export function toBool(v: unknown): boolean {
|
|
23
|
-
if (v == null) return false;
|
|
24
|
-
if (typeof v === "string") {
|
|
25
|
-
return v === "true" || v === "1" || v === "yes";
|
|
26
|
-
}
|
|
27
|
-
return Boolean(v);
|
|
28
|
-
}
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createWriteStream,
|
|
3
|
-
mkdirSync,
|
|
4
|
-
readdirSync,
|
|
5
|
-
rmSync,
|
|
6
|
-
type WriteStream,
|
|
7
|
-
} from "fs";
|
|
8
|
-
import path from "path";
|
|
9
|
-
import { Writable } from "stream";
|
|
10
|
-
|
|
11
|
-
type RotationFrequency = "daily" | "hourly";
|
|
12
|
-
|
|
13
|
-
type DatePrefixedLogStreamOptions = {
|
|
14
|
-
logDir: string;
|
|
15
|
-
filename: string;
|
|
16
|
-
frequency: RotationFrequency;
|
|
17
|
-
maxFiles: number;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** 로그 파일명을 `.log` 확장자를 포함한 표준 형식으로 정규화합니다. */
|
|
21
|
-
function normalizeFilename(filename: string): string {
|
|
22
|
-
const trimmed = filename.trim();
|
|
23
|
-
if (!trimmed) {
|
|
24
|
-
return "app.log";
|
|
25
|
-
}
|
|
26
|
-
return trimmed.endsWith(".log") ? trimmed : `${trimmed}.log`;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/** 현재 시각과 회전 주기에 맞는 파일 접두 키를 생성합니다. */
|
|
30
|
-
function makePeriodKey(date: Date, frequency: RotationFrequency): string {
|
|
31
|
-
const year = String(date.getFullYear());
|
|
32
|
-
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
33
|
-
const day = String(date.getDate()).padStart(2, "0");
|
|
34
|
-
if (frequency === "hourly") {
|
|
35
|
-
const hour = String(date.getHours()).padStart(2, "0");
|
|
36
|
-
return `${year}-${month}-${day}-${hour}`;
|
|
37
|
-
}
|
|
38
|
-
return `${year}-${month}-${day}`;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/** 접두 날짜 키와 원본 파일명으로 실제 로그 파일명을 구성합니다. */
|
|
42
|
-
function buildLogFilename(periodKey: string, filename: string): string {
|
|
43
|
-
return `${periodKey}.${normalizeFilename(filename)}`;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/** 로그 파일명에서 회전 주기에 해당하는 날짜 키를 추출합니다. */
|
|
47
|
-
function extractPeriodKey(
|
|
48
|
-
name: string,
|
|
49
|
-
frequency: RotationFrequency,
|
|
50
|
-
): string | null {
|
|
51
|
-
const match =
|
|
52
|
-
frequency === "hourly"
|
|
53
|
-
? name.match(/^(\d{4}-\d{2}-\d{2}-\d{2})\./)
|
|
54
|
-
: name.match(/^(\d{4}-\d{2}-\d{2})\./);
|
|
55
|
-
return match?.[1] ?? null;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/** 날짜 접두 기반 로그 로테이션과 보관 개수 정리를 담당하는 Writable 스트림입니다. */
|
|
59
|
-
export class DatePrefixedLogStream extends Writable {
|
|
60
|
-
private readonly logDir: string;
|
|
61
|
-
private readonly filename: string;
|
|
62
|
-
private readonly frequency: RotationFrequency;
|
|
63
|
-
private readonly maxFiles: number;
|
|
64
|
-
private currentKey = "";
|
|
65
|
-
private currentStream: WriteStream | null = null;
|
|
66
|
-
|
|
67
|
-
constructor(options: DatePrefixedLogStreamOptions) {
|
|
68
|
-
super();
|
|
69
|
-
this.logDir = path.resolve(options.logDir);
|
|
70
|
-
this.filename = normalizeFilename(options.filename);
|
|
71
|
-
this.frequency = options.frequency;
|
|
72
|
-
this.maxFiles = Math.max(1, options.maxFiles);
|
|
73
|
-
mkdirSync(this.logDir, { recursive: true });
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/** 현재 회전 파일 스트림에 로그 청크를 기록합니다. */
|
|
77
|
-
override _write(
|
|
78
|
-
chunk: Buffer | string,
|
|
79
|
-
encoding: BufferEncoding,
|
|
80
|
-
callback: (error?: Error | null) => void,
|
|
81
|
-
): void {
|
|
82
|
-
try {
|
|
83
|
-
this.ensureStream();
|
|
84
|
-
if (!this.currentStream) {
|
|
85
|
-
callback();
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
this.currentStream.write(chunk, encoding, callback);
|
|
90
|
-
} catch (error) {
|
|
91
|
-
callback(error as Error);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/** 스트림 종료 시 현재 열려 있는 로그 파일을 안전하게 닫습니다. */
|
|
96
|
-
override _final(callback: (error?: Error | null) => void): void {
|
|
97
|
-
if (!this.currentStream) {
|
|
98
|
-
callback();
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const stream = this.currentStream;
|
|
103
|
-
this.currentStream = null;
|
|
104
|
-
this.currentKey = "";
|
|
105
|
-
stream.end(() => callback());
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/** 스트림 파기 시 현재 로그 파일 핸들을 정리합니다. */
|
|
109
|
-
override _destroy(
|
|
110
|
-
error: Error | null,
|
|
111
|
-
callback: (error?: Error | null) => void,
|
|
112
|
-
): void {
|
|
113
|
-
if (!this.currentStream) {
|
|
114
|
-
callback(error);
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const stream = this.currentStream;
|
|
119
|
-
this.currentStream = null;
|
|
120
|
-
this.currentKey = "";
|
|
121
|
-
stream.end(() => callback(error));
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/** 현재 시점에 맞는 로그 파일이 열려 있는지 확인하고 필요하면 교체합니다. */
|
|
125
|
-
private ensureStream(): void {
|
|
126
|
-
const nextKey = makePeriodKey(new Date(), this.frequency);
|
|
127
|
-
if (this.currentStream && this.currentKey === nextKey) {
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (this.currentStream) {
|
|
132
|
-
this.currentStream.end();
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const filePath = path.join(
|
|
136
|
-
this.logDir,
|
|
137
|
-
buildLogFilename(nextKey, this.filename),
|
|
138
|
-
);
|
|
139
|
-
|
|
140
|
-
this.currentStream = createWriteStream(filePath, { flags: "a" });
|
|
141
|
-
this.currentKey = nextKey;
|
|
142
|
-
this.pruneOldFiles();
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/** 보관 개수를 초과한 오래된 로그 파일을 삭제합니다. */
|
|
146
|
-
private pruneOldFiles(): void {
|
|
147
|
-
const matched = readdirSync(this.logDir)
|
|
148
|
-
.filter((name) => name.endsWith(`.${this.filename}`))
|
|
149
|
-
.map((name) => ({
|
|
150
|
-
name,
|
|
151
|
-
key: extractPeriodKey(name, this.frequency),
|
|
152
|
-
}))
|
|
153
|
-
.filter(
|
|
154
|
-
(entry): entry is { name: string; key: string } =>
|
|
155
|
-
entry.key !== null,
|
|
156
|
-
)
|
|
157
|
-
.sort((left, right) => right.key.localeCompare(left.key));
|
|
158
|
-
|
|
159
|
-
const stale = matched.slice(this.maxFiles);
|
|
160
|
-
for (const entry of stale) {
|
|
161
|
-
try {
|
|
162
|
-
const filePath = path.join(this.logDir, entry.name);
|
|
163
|
-
rmSync(filePath, { force: true });
|
|
164
|
-
} catch {
|
|
165
|
-
// ignore prune failures
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/** 날짜 접두 기반 로그 스트림 인스턴스를 생성합니다. */
|
|
172
|
-
export function createDatePrefixedLogStream(
|
|
173
|
-
options: DatePrefixedLogStreamOptions,
|
|
174
|
-
): DatePrefixedLogStream {
|
|
175
|
-
return new DatePrefixedLogStream(options);
|
|
176
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 커스텀 에러 클래스
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/** 애플리케이션 공통 베이스 에러입니다. */
|
|
6
|
-
export class AppError extends Error {
|
|
7
|
-
constructor(
|
|
8
|
-
message: string,
|
|
9
|
-
public readonly statusCode: number = 500,
|
|
10
|
-
public readonly code?: string,
|
|
11
|
-
) {
|
|
12
|
-
super(message);
|
|
13
|
-
this.name = "AppError";
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/** 잘못된 요청 입력을 나타내는 400 에러입니다. */
|
|
18
|
-
export class BadRequestError extends AppError {
|
|
19
|
-
constructor(message = "Bad Request") {
|
|
20
|
-
super(message, 400, "BAD_REQUEST");
|
|
21
|
-
this.name = "BadRequestError";
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/** 인증 실패를 나타내는 401 에러입니다. */
|
|
26
|
-
export class UnauthorizedError extends AppError {
|
|
27
|
-
constructor(message = "Unauthorized") {
|
|
28
|
-
super(message, 401, "UNAUTHORIZED");
|
|
29
|
-
this.name = "UnauthorizedError";
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/** 권한 부족을 나타내는 403 에러입니다. */
|
|
34
|
-
export class ForbiddenError extends AppError {
|
|
35
|
-
constructor(message = "Forbidden") {
|
|
36
|
-
super(message, 403, "FORBIDDEN");
|
|
37
|
-
this.name = "ForbiddenError";
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/** 리소스를 찾지 못했음을 나타내는 404 에러입니다. */
|
|
42
|
-
export class NotFoundError extends AppError {
|
|
43
|
-
constructor(message = "Not Found") {
|
|
44
|
-
super(message, 404, "NOT_FOUND");
|
|
45
|
-
this.name = "NotFoundError";
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/** 리소스 충돌을 나타내는 409 에러입니다. */
|
|
50
|
-
export class ConflictError extends AppError {
|
|
51
|
-
constructor(message = "Conflict") {
|
|
52
|
-
super(message, 409, "CONFLICT");
|
|
53
|
-
this.name = "ConflictError";
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** 유효성 검증 실패 상세를 담는 422 에러입니다. */
|
|
58
|
-
export class ValidationError extends AppError {
|
|
59
|
-
constructor(
|
|
60
|
-
message = "Validation Error",
|
|
61
|
-
public readonly details?: unknown,
|
|
62
|
-
) {
|
|
63
|
-
super(message, 422, "VALIDATION_ERROR");
|
|
64
|
-
this.name = "ValidationError";
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 문자열 포맷팅 유틸리티
|
|
3
|
-
*
|
|
4
|
-
* 전화번호, 사업자번호, 날짜 등 반복되는 포맷 변환을
|
|
5
|
-
* 플러그인(SMS, OCR, Identity, TaxInvoice)에서 공유한다.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/** 문자열에서 숫자만 추출한다 */
|
|
9
|
-
export function extractDigits(s: string): string {
|
|
10
|
-
return s.replace(/[^0-9]/g, "");
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/** Date 값을 SQL datetime 문자열(YYYY-MM-DD HH:mm:ss)로 변환한다. */
|
|
14
|
-
export function formatSqlDateTime(date: Date = new Date()): string {
|
|
15
|
-
return date.toISOString().replace("T", " ").replace("Z", "").slice(0, 19);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* 한국 전화번호를 E.164 형식으로 변환한다.
|
|
20
|
-
*
|
|
21
|
-
* - "01012345678" → "+821012345678" (0 제거 + 82 추가)
|
|
22
|
-
* - "+821012345678" → 그대로
|
|
23
|
-
*
|
|
24
|
-
* @param phone 전화번호 문자열
|
|
25
|
-
* @param country 국가 코드 (기본 "82")
|
|
26
|
-
*/
|
|
27
|
-
export function normalizePhoneE164(phone: string, country = "82"): string {
|
|
28
|
-
if (phone.startsWith("+")) return phone;
|
|
29
|
-
const cleaned = extractDigits(phone);
|
|
30
|
-
if (cleaned.startsWith("0")) {
|
|
31
|
-
return `+${country}${cleaned.slice(1)}`;
|
|
32
|
-
}
|
|
33
|
-
return `+${cleaned}`;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* 사업자번호를 NNN-NN-NNNNN 형식으로 정규화한다.
|
|
38
|
-
*
|
|
39
|
-
* "1234567890" → "123-45-67890"
|
|
40
|
-
*/
|
|
41
|
-
export function formatBizNum(raw: string): string {
|
|
42
|
-
const digits = extractDigits(raw);
|
|
43
|
-
if (digits.length !== 10) return raw;
|
|
44
|
-
return `${digits.slice(0, 3)}-${digits.slice(3, 5)}-${digits.slice(5)}`;
|
|
45
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HTTP 클라이언트 헬퍼 — fetch + 타임아웃 + 에러 처리
|
|
3
|
-
*
|
|
4
|
-
* 모든 외부 API provider (SMS, PG, TaxInvoice, Identity, Holidays 등)에서
|
|
5
|
-
* 반복되는 fetch + AbortController + setTimeout 패턴을 통합한다.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export interface FetchOptions extends Omit<RequestInit, "signal"> {
|
|
9
|
-
/** 요청 타임아웃 (ms). 기본: 30000 */
|
|
10
|
-
timeoutMs?: number;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface FetchResult<T = unknown> {
|
|
14
|
-
ok: boolean;
|
|
15
|
-
status: number;
|
|
16
|
-
data: T;
|
|
17
|
-
headers: Headers;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* 타임아웃 지원 fetch 래퍼.
|
|
22
|
-
* 지정된 시간 내 응답이 없으면 AbortError 를 throw 한다.
|
|
23
|
-
*
|
|
24
|
-
* @param url 요청 URL
|
|
25
|
-
* @param options fetch 옵션 + timeoutMs
|
|
26
|
-
* @returns FetchResult (JSON 파싱 시도, 실패 시 text)
|
|
27
|
-
*/
|
|
28
|
-
export async function fetchWithTimeout<T = unknown>(
|
|
29
|
-
url: string,
|
|
30
|
-
options: FetchOptions = {},
|
|
31
|
-
): Promise<FetchResult<T>> {
|
|
32
|
-
const { timeoutMs = 30_000, ...fetchOpts } = options;
|
|
33
|
-
|
|
34
|
-
const controller = new AbortController();
|
|
35
|
-
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
36
|
-
|
|
37
|
-
try {
|
|
38
|
-
const response = await fetch(url, {
|
|
39
|
-
...fetchOpts,
|
|
40
|
-
signal: controller.signal,
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
let data: T;
|
|
44
|
-
const contentType = response.headers.get("content-type") ?? "";
|
|
45
|
-
if (contentType.includes("application/json")) {
|
|
46
|
-
data = (await response.json()) as T;
|
|
47
|
-
} else {
|
|
48
|
-
data = (await response.text()) as unknown as T;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
ok: response.ok,
|
|
53
|
-
status: response.status,
|
|
54
|
-
data,
|
|
55
|
-
headers: response.headers,
|
|
56
|
-
};
|
|
57
|
-
} finally {
|
|
58
|
-
clearTimeout(timer);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* JSON POST 요청을 공통 헤더와 함께 전송합니다.
|
|
64
|
-
*/
|
|
65
|
-
export function fetchJson<T = unknown>(
|
|
66
|
-
url: string,
|
|
67
|
-
body: unknown,
|
|
68
|
-
options: FetchOptions = {},
|
|
69
|
-
): Promise<FetchResult<T>> {
|
|
70
|
-
return fetchWithTimeout<T>(url, {
|
|
71
|
-
method: "POST",
|
|
72
|
-
headers: {
|
|
73
|
-
"Content-Type": "application/json",
|
|
74
|
-
...((options.headers as Record<string, string>) ?? {}),
|
|
75
|
-
},
|
|
76
|
-
body: JSON.stringify(body),
|
|
77
|
-
...options,
|
|
78
|
-
});
|
|
79
|
-
}
|