sonamu 0.8.26 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +60 -13
- package/dist/_virtual/rolldown_runtime.js +39 -0
- package/dist/ai/agents/agent.d.ts +3 -3
- package/dist/ai/agents/agent.d.ts.map +1 -1
- package/dist/ai/agents/agent.js +76 -73
- package/dist/ai/agents/index.js +3 -3
- package/dist/ai/agents/types.d.ts +3 -3
- package/dist/ai/agents/types.d.ts.map +1 -1
- package/dist/ai/agents/types.js +1 -3
- package/dist/ai/index.js +3 -2
- package/dist/ai/providers/rtzr/api.js +25 -25
- package/dist/ai/providers/rtzr/error.js +25 -26
- package/dist/ai/providers/rtzr/index.js +5 -5
- package/dist/ai/providers/rtzr/model.d.ts +1 -1
- package/dist/ai/providers/rtzr/model.d.ts.map +1 -1
- package/dist/ai/providers/rtzr/model.js +117 -133
- package/dist/ai/providers/rtzr/options.d.ts.map +1 -1
- package/dist/ai/providers/rtzr/options.js +35 -41
- package/dist/ai/providers/rtzr/provider.d.ts +1 -1
- package/dist/ai/providers/rtzr/provider.d.ts.map +1 -1
- package/dist/ai/providers/rtzr/provider.js +53 -51
- package/dist/ai/providers/rtzr/utils.d.ts.map +1 -1
- package/dist/ai/providers/rtzr/utils.js +84 -84
- package/dist/api/base-frame.d.ts +2 -2
- package/dist/api/base-frame.d.ts.map +1 -1
- package/dist/api/base-frame.js +29 -19
- package/dist/api/caster.d.ts +1 -1
- package/dist/api/caster.d.ts.map +1 -1
- package/dist/api/caster.js +51 -61
- package/dist/api/code-converters.d.ts +4 -3
- package/dist/api/code-converters.d.ts.map +1 -1
- package/dist/api/code-converters.js +226 -249
- package/dist/api/config.d.ts +17 -17
- package/dist/api/config.d.ts.map +1 -1
- package/dist/api/config.js +37 -30
- package/dist/api/context.d.ts +10 -10
- package/dist/api/context.d.ts.map +1 -1
- package/dist/api/context.js +8 -2
- package/dist/api/decorators.d.ts +8 -8
- package/dist/api/decorators.d.ts.map +1 -1
- package/dist/api/decorators.js +245 -268
- package/dist/api/index.js +39 -7
- package/dist/api/secret.js +22 -15
- package/dist/api/sonamu.d.ts +15 -15
- package/dist/api/sonamu.d.ts.map +1 -1
- package/dist/api/sonamu.js +1012 -1131
- package/dist/api/validator.js +88 -79
- package/dist/auth/auth-generator.d.ts.map +1 -1
- package/dist/auth/auth-generator.js +203 -200
- package/dist/auth/better-auth-entities.d.ts +2 -2
- package/dist/auth/better-auth-entities.d.ts.map +1 -1
- package/dist/auth/better-auth-entities.js +369 -429
- package/dist/auth/index.js +21 -6
- package/dist/auth/knex-adapter.d.ts +2 -2
- package/dist/auth/knex-adapter.d.ts.map +1 -1
- package/dist/auth/knex-adapter.js +153 -157
- package/dist/auth/plugins/entity-definitions/admin.d.ts +1 -1
- package/dist/auth/plugins/entity-definitions/admin.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/admin.js +58 -56
- package/dist/auth/plugins/entity-definitions/anonymous.d.ts +1 -1
- package/dist/auth/plugins/entity-definitions/anonymous.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/anonymous.js +20 -20
- package/dist/auth/plugins/entity-definitions/api-key.d.ts +1 -1
- package/dist/auth/plugins/entity-definitions/api-key.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/api-key.js +185 -196
- package/dist/auth/plugins/entity-definitions/index.d.ts +1 -1
- package/dist/auth/plugins/entity-definitions/index.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/index.js +26 -29
- package/dist/auth/plugins/entity-definitions/jwt.d.ts +1 -1
- package/dist/auth/plugins/entity-definitions/jwt.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/jwt.js +62 -64
- package/dist/auth/plugins/entity-definitions/organization.d.ts +1 -1
- package/dist/auth/plugins/entity-definitions/organization.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/organization.js +362 -421
- package/dist/auth/plugins/entity-definitions/passkey.d.ts +1 -1
- package/dist/auth/plugins/entity-definitions/passkey.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/passkey.js +115 -126
- package/dist/auth/plugins/entity-definitions/phone-number.d.ts +1 -1
- package/dist/auth/plugins/entity-definitions/phone-number.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/phone-number.js +31 -40
- package/dist/auth/plugins/entity-definitions/sso.d.ts +1 -1
- package/dist/auth/plugins/entity-definitions/sso.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/sso.js +94 -107
- package/dist/auth/plugins/entity-definitions/two-factor.d.ts +1 -1
- package/dist/auth/plugins/entity-definitions/two-factor.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/two-factor.js +78 -92
- package/dist/auth/plugins/entity-definitions/types.d.ts +1 -1
- package/dist/auth/plugins/entity-definitions/types.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/types.js +1 -10
- package/dist/auth/plugins/entity-definitions/username.d.ts +1 -1
- package/dist/auth/plugins/entity-definitions/username.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/username.js +31 -40
- package/dist/auth/plugins/index.js +12 -3
- package/dist/auth/plugins/wrappers/admin.d.ts +2 -2
- package/dist/auth/plugins/wrappers/admin.d.ts.map +1 -1
- package/dist/auth/plugins/wrappers/admin.js +28 -29
- package/dist/auth/plugins/wrappers/anonymous.d.ts +2 -1
- package/dist/auth/plugins/wrappers/anonymous.d.ts.map +1 -1
- package/dist/auth/plugins/wrappers/anonymous.js +23 -22
- package/dist/auth/plugins/wrappers/api-key.d.ts +2 -1
- package/dist/auth/plugins/wrappers/api-key.d.ts.map +1 -1
- package/dist/auth/plugins/wrappers/api-key.js +39 -34
- package/dist/auth/plugins/wrappers/index.js +11 -11
- package/dist/auth/plugins/wrappers/jwt.d.ts +2 -1
- package/dist/auth/plugins/wrappers/jwt.d.ts.map +1 -1
- package/dist/auth/plugins/wrappers/jwt.js +31 -26
- package/dist/auth/plugins/wrappers/organization.d.ts +2 -1
- package/dist/auth/plugins/wrappers/organization.d.ts.map +1 -1
- package/dist/auth/plugins/wrappers/organization.js +65 -62
- package/dist/auth/plugins/wrappers/passkey.d.ts +2 -1
- package/dist/auth/plugins/wrappers/passkey.d.ts.map +1 -1
- package/dist/auth/plugins/wrappers/passkey.js +33 -28
- package/dist/auth/plugins/wrappers/phone-number.d.ts.map +1 -1
- package/dist/auth/plugins/wrappers/phone-number.js +26 -23
- package/dist/auth/plugins/wrappers/sso.d.ts.map +1 -1
- package/dist/auth/plugins/wrappers/sso.js +37 -31
- package/dist/auth/plugins/wrappers/two-factor.d.ts.map +1 -1
- package/dist/auth/plugins/wrappers/two-factor.js +31 -28
- package/dist/auth/plugins/wrappers/username.d.ts.map +1 -1
- package/dist/auth/plugins/wrappers/username.js +23 -23
- package/dist/bin/build-config.js +31 -31
- package/dist/bin/cli.js +1063 -1204
- package/dist/bin/fixture.d.ts.map +1 -1
- package/dist/bin/fixture.js +266 -259
- package/dist/bin/hmr-hook-register.d.ts.map +1 -1
- package/dist/bin/hmr-hook-register.js +19 -18
- package/dist/bin/test-command.d.ts.map +1 -1
- package/dist/bin/test-command.js +180 -177
- package/dist/bin/ts-loader-register.js +13 -6
- package/dist/bin/ts-loader-registration.d.ts.map +1 -1
- package/dist/bin/ts-loader-registration.js +28 -38
- package/dist/cache/cache-manager.d.ts +1 -1
- package/dist/cache/cache-manager.d.ts.map +1 -1
- package/dist/cache/cache-manager.js +20 -15
- package/dist/cache/decorator.d.ts +1 -1
- package/dist/cache/decorator.d.ts.map +1 -1
- package/dist/cache/decorator.js +84 -76
- package/dist/cache/drivers.js +21 -34
- package/dist/cache/index.js +10 -7
- package/dist/cache/types.d.ts +2 -2
- package/dist/cache/types.d.ts.map +1 -1
- package/dist/cache/types.js +1 -6
- package/dist/cache-control/cache-control.d.ts +2 -2
- package/dist/cache-control/cache-control.d.ts.map +1 -1
- package/dist/cache-control/cache-control.js +106 -122
- package/dist/cache-control/types.d.ts +2 -2
- package/dist/cache-control/types.d.ts.map +1 -1
- package/dist/cache-control/types.js +1 -19
- package/dist/compress/compress.d.ts +1 -1
- package/dist/compress/compress.d.ts.map +1 -1
- package/dist/compress/compress.js +58 -56
- package/dist/compress/index.js +7 -2
- package/dist/compress/types.js +1 -11
- package/dist/cone/cone-generator.d.ts +1 -1
- package/dist/cone/cone-generator.d.ts.map +1 -1
- package/dist/cone/cone-generator.js +216 -219
- package/dist/database/_batch_update.d.ts +1 -1
- package/dist/database/_batch_update.d.ts.map +1 -1
- package/dist/database/_batch_update.js +107 -102
- package/dist/database/base-model.d.ts +8 -9
- package/dist/database/base-model.d.ts.map +1 -1
- package/dist/database/base-model.js +371 -392
- package/dist/database/base-model.types.d.ts +5 -5
- package/dist/database/base-model.types.d.ts.map +1 -1
- package/dist/database/base-model.types.js +1 -20
- package/dist/database/db.d.ts +5 -2
- package/dist/database/db.d.ts.map +1 -1
- package/dist/database/db.js +185 -171
- package/dist/database/knex.d.ts +1 -1
- package/dist/database/knex.d.ts.map +1 -1
- package/dist/database/knex.js +48 -42
- package/dist/database/puri-subset.types.d.ts +6 -7
- package/dist/database/puri-subset.types.d.ts.map +1 -1
- package/dist/database/puri-subset.types.js +1 -16
- package/dist/database/puri-wrapper.d.ts +6 -6
- package/dist/database/puri-wrapper.d.ts.map +1 -1
- package/dist/database/puri-wrapper.js +99 -101
- package/dist/database/puri.d.ts +4 -5
- package/dist/database/puri.d.ts.map +1 -1
- package/dist/database/puri.js +1021 -1227
- package/dist/database/puri.types.d.ts +6 -6
- package/dist/database/puri.types.d.ts.map +1 -1
- package/dist/database/puri.types.js +15 -6
- package/dist/database/transaction-context.d.ts +2 -2
- package/dist/database/transaction-context.d.ts.map +1 -1
- package/dist/database/transaction-context.js +22 -13
- package/dist/database/upsert-builder.d.ts +3 -3
- package/dist/database/upsert-builder.d.ts.map +1 -1
- package/dist/database/upsert-builder.js +405 -465
- package/dist/dict/en.js +72 -74
- package/dist/dict/index.js +13 -13
- package/dist/dict/ko.js +72 -74
- package/dist/dict/rc-keys.js +150 -168
- package/dist/dict/sd.d.ts +3 -1
- package/dist/dict/sd.d.ts.map +1 -1
- package/dist/dict/sd.js +54 -40
- package/dist/dict/sonamu-dictionary.d.ts +1 -1
- package/dist/dict/sonamu-dictionary.d.ts.map +1 -1
- package/dist/dict/sonamu-dictionary.js +887 -955
- package/dist/dict/types.js +1 -7
- package/dist/dict/utils.js +26 -24
- package/dist/entity/entity-manager.d.ts +9 -9
- package/dist/entity/entity-manager.d.ts.map +1 -1
- package/dist/entity/entity-manager.js +226 -223
- package/dist/entity/entity-template-cone.d.ts +1 -1
- package/dist/entity/entity-template-cone.d.ts.map +1 -1
- package/dist/entity/entity-template-cone.js +152 -151
- package/dist/entity/entity.d.ts.map +1 -1
- package/dist/entity/entity.js +952 -1089
- package/dist/exceptions/error-handler.d.ts +1 -1
- package/dist/exceptions/error-handler.d.ts.map +1 -1
- package/dist/exceptions/error-handler.js +32 -27
- package/dist/exceptions/so-exceptions.d.ts +1 -1
- package/dist/exceptions/so-exceptions.d.ts.map +1 -1
- package/dist/exceptions/so-exceptions.js +61 -68
- package/dist/filter/index.js +9 -3
- package/dist/filter/types.js +92 -88
- package/dist/filter/utils.d.ts +1 -1
- package/dist/filter/utils.d.ts.map +1 -1
- package/dist/filter/utils.js +147 -161
- package/dist/index.js +87 -40
- package/dist/logger/category.d.ts.map +1 -1
- package/dist/logger/category.js +30 -29
- package/dist/logger/configure.d.ts.map +1 -1
- package/dist/logger/configure.js +83 -107
- package/dist/migration/code-generation.d.ts +2 -2
- package/dist/migration/code-generation.d.ts.map +1 -1
- package/dist/migration/code-generation.js +1385 -1578
- package/dist/migration/migration-set.d.ts +1 -1
- package/dist/migration/migration-set.d.ts.map +1 -1
- package/dist/migration/migration-set.js +177 -227
- package/dist/migration/migrator.d.ts +4 -3
- package/dist/migration/migrator.d.ts.map +1 -1
- package/dist/migration/migrator.js +340 -345
- package/dist/migration/postgresql-schema-reader.d.ts +2 -2
- package/dist/migration/postgresql-schema-reader.d.ts.map +1 -1
- package/dist/migration/postgresql-schema-reader.js +506 -564
- package/dist/migration/slack-confirm.d.ts +2 -2
- package/dist/migration/slack-confirm.d.ts.map +1 -1
- package/dist/migration/slack-confirm.js +205 -193
- package/dist/migration/types.d.ts +2 -2
- package/dist/migration/types.d.ts.map +1 -1
- package/dist/migration/types.js +1 -3
- package/dist/naite/messaging-types.d.ts +1 -0
- package/dist/naite/messaging-types.d.ts.map +1 -1
- package/dist/naite/messaging-types.js +1 -7
- package/dist/naite/naite-reporter.d.ts +2 -2
- package/dist/naite/naite-reporter.d.ts.map +1 -1
- package/dist/naite/naite-reporter.js +127 -120
- package/dist/naite/naite.d.ts +3 -2
- package/dist/naite/naite.d.ts.map +1 -1
- package/dist/naite/naite.js +266 -300
- package/dist/ssr/index.d.ts +2 -2
- package/dist/ssr/index.d.ts.map +1 -1
- package/dist/ssr/index.js +13 -3
- package/dist/ssr/registry.d.ts +1 -1
- package/dist/ssr/registry.d.ts.map +1 -1
- package/dist/ssr/registry.js +45 -37
- package/dist/ssr/renderer.d.ts +4 -4
- package/dist/ssr/renderer.d.ts.map +1 -1
- package/dist/ssr/renderer.js +84 -91
- package/dist/ssr/types.d.ts +2 -2
- package/dist/ssr/types.d.ts.map +1 -1
- package/dist/ssr/types.js +1 -3
- package/dist/storage/base-file.js +54 -41
- package/dist/storage/buffered-file.d.ts +2 -2
- package/dist/storage/buffered-file.d.ts.map +1 -1
- package/dist/storage/buffered-file.js +51 -44
- package/dist/storage/drivers.d.ts +2 -2
- package/dist/storage/drivers.d.ts.map +1 -1
- package/dist/storage/drivers.js +12 -7
- package/dist/storage/index.js +14 -7
- package/dist/storage/s3-driver.d.ts +2 -2
- package/dist/storage/s3-driver.d.ts.map +1 -1
- package/dist/storage/s3-driver.js +52 -48
- package/dist/storage/storage-manager.d.ts +2 -2
- package/dist/storage/storage-manager.d.ts.map +1 -1
- package/dist/storage/storage-manager.js +33 -25
- package/dist/storage/types.d.ts +2 -2
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/types.js +1 -5
- package/dist/storage/uploaded-file.d.ts +1 -1
- package/dist/storage/uploaded-file.d.ts.map +1 -1
- package/dist/storage/uploaded-file.js +45 -35
- package/dist/stream/index.js +7 -2
- package/dist/stream/sse.d.ts +2 -2
- package/dist/stream/sse.d.ts.map +1 -1
- package/dist/stream/sse.js +72 -67
- package/dist/syncer/api-parser.d.ts +1 -1
- package/dist/syncer/api-parser.d.ts.map +1 -1
- package/dist/syncer/api-parser.js +224 -245
- package/dist/syncer/checksum.d.ts +1 -1
- package/dist/syncer/checksum.d.ts.map +1 -1
- package/dist/syncer/checksum.js +86 -72
- package/dist/syncer/code-generator.d.ts +2 -2
- package/dist/syncer/code-generator.d.ts.map +1 -1
- package/dist/syncer/code-generator.js +154 -160
- package/dist/syncer/entity-operations.d.ts +1 -1
- package/dist/syncer/entity-operations.d.ts.map +1 -1
- package/dist/syncer/entity-operations.js +63 -54
- package/dist/syncer/file-patterns.d.ts +1 -1
- package/dist/syncer/file-patterns.d.ts.map +1 -1
- package/dist/syncer/file-patterns.js +38 -38
- package/dist/syncer/index.js +19 -8
- package/dist/syncer/module-loader.d.ts +5 -5
- package/dist/syncer/module-loader.d.ts.map +1 -1
- package/dist/syncer/module-loader.js +83 -78
- package/dist/syncer/syncer-actions.d.ts +2 -2
- package/dist/syncer/syncer-actions.d.ts.map +1 -1
- package/dist/syncer/syncer-actions.js +76 -91
- package/dist/syncer/syncer.d.ts +7 -6
- package/dist/syncer/syncer.d.ts.map +1 -1
- package/dist/syncer/syncer.js +426 -492
- package/dist/tasks/decorator.d.ts +3 -3
- package/dist/tasks/decorator.d.ts.map +1 -1
- package/dist/tasks/decorator.js +32 -28
- package/dist/tasks/step-wrapper.d.ts +1 -1
- package/dist/tasks/step-wrapper.d.ts.map +1 -1
- package/dist/tasks/step-wrapper.js +42 -41
- package/dist/tasks/workflow-manager.d.ts +2 -2
- package/dist/tasks/workflow-manager.d.ts.map +1 -1
- package/dist/tasks/workflow-manager.js +192 -221
- package/dist/template/entity-converter.d.ts +1 -1
- package/dist/template/entity-converter.d.ts.map +1 -1
- package/dist/template/entity-converter.js +103 -103
- package/dist/template/helpers.d.ts.map +1 -1
- package/dist/template/helpers.js +163 -163
- package/dist/template/implementations/entity.template.d.ts +1 -1
- package/dist/template/implementations/entity.template.d.ts.map +1 -1
- package/dist/template/implementations/entity.template.js +76 -85
- package/dist/template/implementations/entry-server.template.d.ts +1 -1
- package/dist/template/implementations/entry-server.template.d.ts.map +1 -1
- package/dist/template/implementations/entry-server.template.js +32 -27
- package/dist/template/implementations/generated.template.d.ts +1 -1
- package/dist/template/implementations/generated.template.d.ts.map +1 -1
- package/dist/template/implementations/generated.template.js +254 -275
- package/dist/template/implementations/generated_http.template.d.ts +2 -2
- package/dist/template/implementations/generated_http.template.d.ts.map +1 -1
- package/dist/template/implementations/generated_http.template.js +114 -133
- package/dist/template/implementations/generated_sso.template.d.ts.map +1 -1
- package/dist/template/implementations/generated_sso.template.js +249 -275
- package/dist/template/implementations/init_types.template.d.ts +1 -1
- package/dist/template/implementations/init_types.template.d.ts.map +1 -1
- package/dist/template/implementations/init_types.template.js +40 -34
- package/dist/template/implementations/model.template.d.ts +1 -1
- package/dist/template/implementations/model.template.d.ts.map +1 -1
- package/dist/template/implementations/model.template.js +56 -53
- package/dist/template/implementations/model_test.template.d.ts +1 -1
- package/dist/template/implementations/model_test.template.d.ts.map +1 -1
- package/dist/template/implementations/model_test.template.js +32 -24
- package/dist/template/implementations/queries.template.d.ts +1 -1
- package/dist/template/implementations/queries.template.d.ts.map +1 -1
- package/dist/template/implementations/queries.template.js +84 -89
- package/dist/template/implementations/sd.template.d.ts +1 -1
- package/dist/template/implementations/sd.template.d.ts.map +1 -1
- package/dist/template/implementations/sd.template.js +137 -144
- package/dist/template/implementations/services.template.d.ts +1 -1
- package/dist/template/implementations/services.template.d.ts.map +1 -1
- package/dist/template/implementations/services.template.js +164 -189
- package/dist/template/implementations/view_form.template.d.ts +1 -1
- package/dist/template/implementations/view_form.template.d.ts.map +1 -1
- package/dist/template/implementations/view_form.template.js +258 -285
- package/dist/template/implementations/view_id_all_select.template.d.ts +1 -1
- package/dist/template/implementations/view_id_all_select.template.d.ts.map +1 -1
- package/dist/template/implementations/view_id_all_select.template.js +31 -25
- package/dist/template/implementations/view_list.template.d.ts +1 -1
- package/dist/template/implementations/view_list.template.d.ts.map +1 -1
- package/dist/template/implementations/view_list.template.js +304 -355
- package/dist/template/implementations/view_search_input.template.d.ts +1 -1
- package/dist/template/implementations/view_search_input.template.d.ts.map +1 -1
- package/dist/template/implementations/view_search_input.template.js +31 -27
- package/dist/template/index.js +21 -7
- package/dist/template/template-manager.d.ts +1 -1
- package/dist/template/template-manager.d.ts.map +1 -1
- package/dist/template/template-manager.js +132 -123
- package/dist/template/template-types.js +8 -6
- package/dist/template/template.d.ts +2 -2
- package/dist/template/template.d.ts.map +1 -1
- package/dist/template/template.js +73 -68
- package/dist/template/zod-converter.d.ts.map +1 -1
- package/dist/template/zod-converter.js +603 -657
- package/dist/testing/_relation-graph.d.ts +1 -1
- package/dist/testing/_relation-graph.d.ts.map +1 -1
- package/dist/testing/_relation-graph.js +93 -88
- package/dist/testing/bootstrap.d.ts +22 -13
- package/dist/testing/bootstrap.d.ts.map +1 -1
- package/dist/testing/bootstrap.js +114 -114
- package/dist/testing/data-explorer.d.ts +3 -3
- package/dist/testing/data-explorer.d.ts.map +1 -1
- package/dist/testing/data-explorer.js +237 -265
- package/dist/testing/dev-test-routes.d.ts +2 -2
- package/dist/testing/dev-test-routes.d.ts.map +1 -1
- package/dist/testing/dev-test-routes.js +258 -249
- package/dist/testing/dev-vitest-manager.d.ts +1 -1
- package/dist/testing/dev-vitest-manager.d.ts.map +1 -1
- package/dist/testing/dev-vitest-manager.js +514 -539
- package/dist/testing/faker-mappings.js +422 -420
- package/dist/testing/fixture-generator.d.ts +3 -3
- package/dist/testing/fixture-generator.d.ts.map +1 -1
- package/dist/testing/fixture-generator.js +1216 -1346
- package/dist/testing/fixture-loader.js +26 -25
- package/dist/testing/fixture-manager.d.ts +3 -3
- package/dist/testing/fixture-manager.d.ts.map +1 -1
- package/dist/testing/fixture-manager.js +706 -776
- package/dist/testing/global-setup.js +53 -49
- package/dist/testing/index.js +19 -11
- package/dist/testing/naite-vitest-reporter.js +18 -13
- package/dist/testing/parallel-db-manager.d.ts +1 -1
- package/dist/testing/parallel-db-manager.d.ts.map +1 -1
- package/dist/testing/parallel-db-manager.js +63 -78
- package/dist/testing/vitest-helpers.d.ts +1 -1
- package/dist/testing/vitest-helpers.d.ts.map +1 -1
- package/dist/testing/vitest-helpers.js +37 -33
- package/dist/types/types.d.ts +28 -28
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/types.js +764 -890
- package/dist/ui/ai-api.d.ts +1 -1
- package/dist/ui/ai-api.d.ts.map +1 -1
- package/dist/ui/ai-api.js +52 -42
- package/dist/ui/ai-client.d.ts +1 -2
- package/dist/ui/ai-client.d.ts.map +1 -1
- package/dist/ui/ai-client.js +353 -388
- package/dist/ui/api.d.ts +1 -1
- package/dist/ui/api.d.ts.map +1 -1
- package/dist/ui/api.js +903 -1145
- package/dist/ui/cdd-service.d.ts +1 -1
- package/dist/ui/cdd-service.d.ts.map +1 -1
- package/dist/ui/cdd-service.js +406 -407
- package/dist/ui/cdd-types.js +1 -3
- package/dist/ui-web/assets/index-C-Zz-wYg.css +1 -0
- package/dist/ui-web/assets/index-DejDON8K.js +238 -0
- package/dist/ui-web/index.html +3 -3
- package/dist/utils/async-utils.js +57 -45
- package/dist/utils/console-util.d.ts.map +1 -1
- package/dist/utils/console-util.js +104 -87
- package/dist/utils/controller.js +26 -19
- package/dist/utils/esm-utils.js +49 -38
- package/dist/utils/formatter.d.ts +1 -2
- package/dist/utils/formatter.d.ts.map +1 -1
- package/dist/utils/formatter.js +89 -115
- package/dist/utils/fs-utils.d.ts.map +1 -1
- package/dist/utils/fs-utils.js +68 -65
- package/dist/utils/lodash-able.js +11 -4
- package/dist/utils/model.d.ts +1 -1
- package/dist/utils/model.d.ts.map +1 -1
- package/dist/utils/model.js +21 -19
- package/dist/utils/object-utils.js +148 -186
- package/dist/utils/path-utils.js +67 -57
- package/dist/utils/process-utils.d.ts.map +1 -1
- package/dist/utils/process-utils.js +37 -31
- package/dist/utils/sql-parser.d.ts +1 -1
- package/dist/utils/sql-parser.d.ts.map +1 -1
- package/dist/utils/sql-parser.js +40 -40
- package/dist/utils/type-utils.js +44 -43
- package/dist/utils/utils.d.ts +2 -3
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +81 -93
- package/dist/utils/zod-error.d.ts +1 -1
- package/dist/utils/zod-error.d.ts.map +1 -1
- package/dist/utils/zod-error.js +24 -17
- package/dist/vector/chunking.d.ts +1 -1
- package/dist/vector/chunking.d.ts.map +1 -1
- package/dist/vector/chunking.js +100 -94
- package/dist/vector/config.d.ts +1 -1
- package/dist/vector/config.d.ts.map +1 -1
- package/dist/vector/config.js +76 -78
- package/dist/vector/embedding.d.ts +1 -1
- package/dist/vector/embedding.d.ts.map +1 -1
- package/dist/vector/embedding.js +128 -125
- package/dist/vector/index.js +5 -5
- package/dist/vector/types.js +1 -5
- package/package.json +31 -36
- package/src/ai/agents/agent.ts +12 -5
- package/src/ai/agents/types.ts +5 -5
- package/src/ai/providers/rtzr/model.ts +8 -10
- package/src/ai/providers/rtzr/options.ts +2 -1
- package/src/ai/providers/rtzr/provider.ts +5 -3
- package/src/ai/providers/rtzr/utils.ts +2 -7
- package/src/api/__tests__/config.test.ts +15 -8
- package/src/api/base-frame.ts +5 -3
- package/src/api/caster.ts +7 -6
- package/src/api/code-converters.ts +23 -26
- package/src/api/config.ts +23 -17
- package/src/api/context.ts +18 -11
- package/src/api/decorators.ts +17 -18
- package/src/api/sonamu.ts +44 -49
- package/src/auth/auth-generator.ts +4 -6
- package/src/auth/better-auth-entities.ts +3 -2
- package/src/auth/knex-adapter.ts +6 -5
- package/src/auth/plugins/entity-definitions/admin.ts +1 -1
- package/src/auth/plugins/entity-definitions/anonymous.ts +1 -1
- package/src/auth/plugins/entity-definitions/api-key.ts +1 -1
- package/src/auth/plugins/entity-definitions/index.ts +1 -1
- package/src/auth/plugins/entity-definitions/jwt.ts +1 -1
- package/src/auth/plugins/entity-definitions/organization.ts +1 -1
- package/src/auth/plugins/entity-definitions/passkey.ts +1 -1
- package/src/auth/plugins/entity-definitions/phone-number.ts +1 -1
- package/src/auth/plugins/entity-definitions/sso.ts +1 -1
- package/src/auth/plugins/entity-definitions/two-factor.ts +1 -1
- package/src/auth/plugins/entity-definitions/types.ts +1 -1
- package/src/auth/plugins/entity-definitions/username.ts +1 -1
- package/src/auth/plugins/wrappers/admin.ts +3 -1
- package/src/auth/plugins/wrappers/anonymous.ts +3 -1
- package/src/auth/plugins/wrappers/api-key.ts +3 -1
- package/src/auth/plugins/wrappers/jwt.ts +3 -1
- package/src/auth/plugins/wrappers/organization.ts +3 -1
- package/src/auth/plugins/wrappers/passkey.ts +3 -1
- package/src/auth/plugins/wrappers/phone-number.ts +3 -1
- package/src/auth/plugins/wrappers/sso.ts +2 -1
- package/src/auth/plugins/wrappers/two-factor.ts +3 -1
- package/src/auth/plugins/wrappers/username.ts +3 -1
- package/src/bin/__tests__/ts-loader-register.test.ts +7 -12
- package/src/bin/build-config.ts +3 -3
- package/src/bin/cli.ts +27 -25
- package/src/bin/fixture.ts +4 -2
- package/src/bin/hmr-hook-register.ts +1 -0
- package/src/bin/test-command.ts +4 -2
- package/src/bin/ts-loader-registration.ts +6 -22
- package/src/cache/cache-manager.ts +2 -1
- package/src/cache/decorator.ts +2 -2
- package/src/cache/types.ts +3 -3
- package/src/cache-control/cache-control.ts +3 -2
- package/src/cache-control/types.ts +2 -2
- package/src/compress/compress.ts +1 -1
- package/src/cone/cone-generator.ts +5 -3
- package/src/database/_batch_update.ts +1 -1
- package/src/database/base-model.ts +20 -14
- package/src/database/base-model.types.ts +12 -11
- package/src/database/db.ts +56 -21
- package/src/database/knex.ts +2 -2
- package/src/database/puri-subset.test-d.ts +33 -32
- package/src/database/puri-subset.types.ts +6 -7
- package/src/database/puri-wrapper.ts +29 -26
- package/src/database/puri.ts +36 -34
- package/src/database/puri.types.test-d.ts +6 -5
- package/src/database/puri.types.ts +9 -12
- package/src/database/transaction-context.ts +2 -2
- package/src/database/upsert-builder.ts +17 -10
- package/src/dict/sd.ts +17 -4
- package/src/dict/sonamu-dictionary.ts +23 -17
- package/src/entity/entity-manager.ts +9 -7
- package/src/entity/entity-template-cone.ts +10 -3
- package/src/entity/entity.ts +20 -16
- package/src/exceptions/error-handler.ts +2 -1
- package/src/exceptions/so-exceptions.ts +1 -1
- package/src/filter/utils.ts +3 -2
- package/src/logger/category.ts +1 -0
- package/src/logger/configure.ts +5 -5
- package/src/migration/__tests__/code-generation.search-text.test.ts +2 -3
- package/src/migration/code-generation.ts +26 -25
- package/src/migration/migration-set.ts +16 -18
- package/src/migration/migrator.ts +38 -33
- package/src/migration/postgresql-schema-reader.ts +12 -12
- package/src/migration/slack-confirm.ts +5 -4
- package/src/migration/types.ts +2 -2
- package/src/naite/messaging-types.ts +1 -1
- package/src/naite/naite-reporter.ts +5 -3
- package/src/naite/naite.ts +12 -7
- package/src/shared/app.shared.ts.txt +2 -2
- package/src/shared/web.shared.ts.txt +2 -2
- package/src/skills/AGENTS.md +19 -18
- package/src/skills/commands/sonamu-skills.md +9 -9
- package/src/skills/sonamu/SKILL.md +111 -104
- package/src/skills/sonamu/ai-agents.md +27 -26
- package/src/skills/sonamu/api.md +81 -69
- package/src/skills/sonamu/auth-migration.md +13 -27
- package/src/skills/sonamu/auth-plugins.md +41 -31
- package/src/skills/sonamu/auth.md +30 -24
- package/src/skills/sonamu/cdd.md +26 -17
- package/src/skills/sonamu/cone.md +50 -50
- package/src/skills/sonamu/config.md +74 -51
- package/src/skills/sonamu/create-sonamu.md +31 -19
- package/src/skills/sonamu/database.md +43 -26
- package/src/skills/sonamu/entity-basic.md +61 -61
- package/src/skills/sonamu/entity-relations.md +84 -80
- package/src/skills/sonamu/entity-validation-checklist.md +19 -15
- package/src/skills/sonamu/fixture-cli.md +52 -30
- package/src/skills/sonamu/framework-change.md +9 -7
- package/src/skills/sonamu/frontend.md +64 -82
- package/src/skills/sonamu/i18n.md +45 -37
- package/src/skills/sonamu/migration.md +54 -31
- package/src/skills/sonamu/model.md +98 -66
- package/src/skills/sonamu/naite.md +34 -32
- package/src/skills/sonamu/project-init.md +28 -8
- package/src/skills/sonamu/puri.md +82 -91
- package/src/skills/sonamu/scaffolding.md +44 -32
- package/src/skills/sonamu/skill-contribution.md +50 -45
- package/src/skills/sonamu/subset.md +13 -13
- package/src/skills/sonamu/tasks.md +73 -58
- package/src/skills/sonamu/testing-devrunner.md +56 -36
- package/src/skills/sonamu/testing.md +23 -58
- package/src/skills/sonamu/upsert.md +32 -31
- package/src/skills/sonamu/vector.md +37 -36
- package/src/ssr/index.ts +2 -12
- package/src/ssr/registry.ts +1 -1
- package/src/ssr/renderer.ts +7 -5
- package/src/ssr/types.ts +2 -2
- package/src/storage/buffered-file.ts +4 -2
- package/src/storage/drivers.ts +3 -2
- package/src/storage/s3-driver.ts +7 -4
- package/src/storage/storage-manager.ts +3 -2
- package/src/storage/types.ts +3 -2
- package/src/storage/uploaded-file.ts +1 -1
- package/src/stream/sse.ts +2 -2
- package/src/syncer/api-parser.ts +8 -5
- package/src/syncer/checksum.ts +9 -5
- package/src/syncer/code-generator.ts +16 -8
- package/src/syncer/entity-operations.ts +5 -3
- package/src/syncer/file-patterns.ts +2 -1
- package/src/syncer/module-loader.ts +9 -6
- package/src/syncer/syncer-actions.ts +5 -3
- package/src/syncer/syncer.ts +18 -24
- package/src/tasks/decorator.ts +10 -8
- package/src/tasks/step-wrapper.ts +1 -1
- package/src/tasks/workflow-manager.ts +18 -15
- package/src/template/__tests__/generated.template.search-text.test.ts +1 -0
- package/src/template/entity-converter.ts +4 -2
- package/src/template/generated.template.test-d.ts +2 -1
- package/src/template/helpers.ts +5 -2
- package/src/template/implementations/entity.template.ts +9 -8
- package/src/template/implementations/entry-server.template.ts +1 -1
- package/src/template/implementations/generated.template.ts +21 -29
- package/src/template/implementations/generated_http.template.ts +9 -6
- package/src/template/implementations/generated_sso.template.ts +6 -4
- package/src/template/implementations/init_types.template.ts +3 -2
- package/src/template/implementations/model.template.ts +4 -2
- package/src/template/implementations/model_test.template.ts +3 -2
- package/src/template/implementations/queries.template.ts +6 -14
- package/src/template/implementations/sd.template.ts +4 -2
- package/src/template/implementations/services.template.ts +7 -11
- package/src/template/implementations/view_form.template.ts +5 -3
- package/src/template/implementations/view_id_all_select.template.ts +3 -2
- package/src/template/implementations/view_list.template.ts +7 -5
- package/src/template/implementations/view_search_input.template.ts +3 -2
- package/src/template/template-manager.ts +4 -3
- package/src/template/template.ts +4 -3
- package/src/template/zod-converter.ts +10 -7
- package/src/testing/__tests__/dev-test-routes.test.ts +3 -2
- package/src/testing/__tests__/dev-vitest-manager.test.ts +1 -0
- package/src/testing/_relation-graph.ts +2 -2
- package/src/testing/bootstrap.ts +55 -27
- package/src/testing/data-explorer.ts +5 -4
- package/src/testing/dev-test-routes.ts +8 -5
- package/src/testing/dev-vitest-manager.ts +13 -12
- package/src/testing/fixture-generator.ts +11 -17
- package/src/testing/fixture-manager.ts +21 -17
- package/src/testing/parallel-db-manager.ts +2 -1
- package/src/testing/vitest-helpers.ts +2 -1
- package/src/types/__tests__/entity-json-schema-search-text.test.ts +1 -0
- package/src/types/types.ts +8 -8
- package/src/typings/knex.d.ts +4 -4
- package/src/ui/ai-api.ts +5 -3
- package/src/ui/ai-client.ts +6 -5
- package/src/ui/api.ts +25 -23
- package/src/ui/cdd-service.ts +12 -11
- package/src/utils/console-util.ts +3 -1
- package/src/utils/formatter.ts +94 -102
- package/src/utils/fs-utils.ts +2 -1
- package/src/utils/model.ts +2 -2
- package/src/utils/object-utils.ts +3 -3
- package/src/utils/process-utils.ts +2 -1
- package/src/utils/sql-parser.ts +10 -1
- package/src/utils/type-utils.ts +3 -3
- package/src/utils/utils.ts +9 -7
- package/src/utils/zod-error.ts +1 -1
- package/src/vector/chunking.ts +1 -1
- package/src/vector/config.ts +1 -1
- package/src/vector/embedding.ts +11 -9
- package/tsdown.api.config.ts +50 -0
- package/.swcrc.project-default +0 -18
- package/dist/api/__tests__/config.test.js +0 -189
- package/dist/bin/__tests__/test-command.test.js +0 -112
- package/dist/bin/__tests__/ts-loader-register.test.js +0 -45
- package/dist/database/puri-subset.test-d.js +0 -89
- package/dist/database/puri.types.test-d.js +0 -129
- package/dist/migration/__tests__/code-generation.search-text.test.js +0 -435
- package/dist/template/__tests__/generated.template.search-text.test.js +0 -99
- package/dist/template/generated.template.test-d.js +0 -24
- package/dist/testing/__tests__/dev-test-routes.test.js +0 -144
- package/dist/testing/__tests__/dev-vitest-manager.test.js +0 -152
- package/dist/types/__tests__/entity-json-schema-search-text.test.js +0 -256
- package/dist/typings/knex.d.js +0 -3
- package/dist/ui-web/assets/index-CKo0Z2Iu.css +0 -1
- package/dist/ui-web/assets/index-DK-2aacv.js +0 -257
|
@@ -18,16 +18,15 @@
|
|
|
18
18
|
* - resolveRenderType
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import inflection from "inflection";
|
|
22
21
|
import path from "path";
|
|
22
|
+
|
|
23
|
+
import inflection from "inflection";
|
|
23
24
|
import { z } from "zod";
|
|
24
|
-
|
|
25
|
+
|
|
25
26
|
import { Sonamu } from "../api/sonamu";
|
|
26
27
|
import { EntityManager } from "../entity/entity-manager";
|
|
27
28
|
import {
|
|
28
29
|
BUILT_IN_TYPE_IDS,
|
|
29
|
-
type EntityProp,
|
|
30
|
-
type EntityPropNode,
|
|
31
30
|
isBelongsToOneRelationProp,
|
|
32
31
|
isBigIntegerArrayProp,
|
|
33
32
|
isBigIntegerSingleProp,
|
|
@@ -55,9 +54,13 @@ import {
|
|
|
55
54
|
isVectorArrayProp,
|
|
56
55
|
isVectorSingleProp,
|
|
57
56
|
isVirtualProp,
|
|
58
|
-
type RenderingNode,
|
|
59
57
|
SonamuFileArraySchema,
|
|
60
58
|
SonamuFileSchema,
|
|
59
|
+
} from "../types/types";
|
|
60
|
+
import {
|
|
61
|
+
type EntityProp,
|
|
62
|
+
type EntityPropNode,
|
|
63
|
+
type RenderingNode,
|
|
61
64
|
type ZodStringFormat,
|
|
62
65
|
} from "../types/types";
|
|
63
66
|
import { createImportUrl } from "../utils/esm-utils";
|
|
@@ -65,13 +68,13 @@ import { runtimePath } from "../utils/path-utils";
|
|
|
65
68
|
|
|
66
69
|
// <any>를 자제하고, Zod에서 제약하는 기본적인 Generic Type Parameter를 사용함.
|
|
67
70
|
type AnyZodRecord = z.ZodRecord<z.ZodString | z.ZodNumber | z.ZodSymbol, z.ZodType>;
|
|
68
|
-
type AnyZodObject = z.ZodObject
|
|
71
|
+
type AnyZodObject = z.ZodObject;
|
|
69
72
|
type AnyZodNullable = z.ZodNullable<z.ZodType>;
|
|
70
73
|
type AnyZodDefault = z.ZodDefault<z.ZodType>;
|
|
71
74
|
type AnyZodUnion = z.ZodUnion<z.ZodType[]>;
|
|
72
75
|
type AnyZodArray = z.ZodArray<z.ZodType>;
|
|
73
76
|
type AnyZodOptional = z.ZodOptional<z.ZodType>;
|
|
74
|
-
type AnyZodTemplateLiteral = z.ZodTemplateLiteral
|
|
77
|
+
type AnyZodTemplateLiteral = z.ZodTemplateLiteral;
|
|
75
78
|
|
|
76
79
|
/**
|
|
77
80
|
* 내장 타입 정의 (Zod 스키마 + UI 렌더링 타입)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Fastify from "fastify";
|
|
2
2
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
import { type ManagerStatus, type RunResult } from "../dev-vitest-manager";
|
|
4
5
|
|
|
5
6
|
// vi.hoisted를 사용하여 mock 객체를 vi.mock 호이스팅 이전에 초기화
|
|
6
7
|
const mockManager = vi.hoisted(() => ({
|
|
@@ -12,7 +13,7 @@ const mockManager = vi.hoisted(() => ({
|
|
|
12
13
|
|
|
13
14
|
// DevVitestManager를 모킹하여 new DevVitestManager()가 mockManager 인스턴스를 반환하도록 설정
|
|
14
15
|
vi.mock("../dev-vitest-manager", () => {
|
|
15
|
-
//
|
|
16
|
+
// oxlint-disable-next-line prefer-arrow-callback -- vi.fn 생성자 모킹에는 function 키워드가 필요
|
|
16
17
|
const MockDevVitestManager = vi.fn(function () {
|
|
17
18
|
return mockManager;
|
|
18
19
|
});
|
|
@@ -2,6 +2,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
|
2
2
|
|
|
3
3
|
// vitest/node 모킹 - createVitest가 mock Vitest 인스턴스를 반환하도록 설정
|
|
4
4
|
const mockVitest = {
|
|
5
|
+
standalone: vi.fn().mockResolvedValue(undefined),
|
|
5
6
|
onFilterWatchedSpecification: vi.fn(),
|
|
6
7
|
setGlobalTestNamePattern: vi.fn(),
|
|
7
8
|
resetGlobalTestNamePattern: vi.fn(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EntityManager } from "../entity/entity-manager";
|
|
2
|
-
import
|
|
2
|
+
import { type FixtureRecord, type RelationNode } from "../types/types";
|
|
3
3
|
import {
|
|
4
4
|
isBelongsToOneRelationProp,
|
|
5
5
|
isManyToManyRelationProp,
|
|
@@ -31,7 +31,7 @@ export class RelationGraph {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
for (const [, column] of Object.entries(fixture.columns)) {
|
|
34
|
-
const prop = column.prop
|
|
34
|
+
const prop = column.prop;
|
|
35
35
|
|
|
36
36
|
if (isRelationProp(prop)) {
|
|
37
37
|
if (
|
package/src/testing/bootstrap.ts
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
beforeEach,
|
|
6
|
-
type TestFunction,
|
|
7
|
-
type TestOptions,
|
|
8
|
-
type VitestUtils,
|
|
9
|
-
test as vitestTest,
|
|
10
|
-
} from "vitest";
|
|
11
|
-
import type { Context } from "../api/context";
|
|
1
|
+
import { afterAll, afterEach, beforeAll, beforeEach, test as vitestTest } from "vitest";
|
|
2
|
+
import { type TestFunction, type TestOptions, type VitestUtils } from "vitest";
|
|
3
|
+
|
|
4
|
+
import { type Context } from "../api/context";
|
|
12
5
|
import { Sonamu } from "../api/sonamu";
|
|
13
6
|
import { DB } from "../database/db";
|
|
14
|
-
import { Naite
|
|
7
|
+
import { Naite } from "../naite/naite";
|
|
8
|
+
import { type SerializedTrace } from "../naite/naite";
|
|
15
9
|
import { NaiteReporter } from "../naite/naite-reporter";
|
|
16
10
|
|
|
17
11
|
export interface BootstrapOptions {
|
|
@@ -64,14 +58,10 @@ export function bootstrap(vi: VitestUtils, options?: BootstrapOptions) {
|
|
|
64
58
|
|
|
65
59
|
function getMockContext(): Context {
|
|
66
60
|
return {
|
|
67
|
-
|
|
68
|
-
session: {},
|
|
61
|
+
session: null,
|
|
69
62
|
user: null,
|
|
70
|
-
passport: {
|
|
71
|
-
login: async () => {},
|
|
72
|
-
logout: () => {},
|
|
73
|
-
},
|
|
74
63
|
naiteStore: Naite.createStore(),
|
|
64
|
+
locale: "",
|
|
75
65
|
} as unknown as Context;
|
|
76
66
|
}
|
|
77
67
|
|
|
@@ -84,14 +74,52 @@ export async function runWithMockContext(fn: () => Promise<void>) {
|
|
|
84
74
|
await runWithContext(getMockContext(), fn);
|
|
85
75
|
}
|
|
86
76
|
|
|
77
|
+
type TestResult = Promise<ReturnType<typeof vitestTest>>;
|
|
78
|
+
type TestCallbackResult = void | Promise<void>;
|
|
79
|
+
type TestEach = <TArgs extends readonly unknown[]>(
|
|
80
|
+
cases: readonly TArgs[],
|
|
81
|
+
) => (title: string, fn: (...args: TArgs) => TestCallbackResult) => void;
|
|
82
|
+
|
|
83
|
+
type TestWrapper = {
|
|
84
|
+
(title: string, fn: TestFunction, options?: TestOptions): TestResult;
|
|
85
|
+
skip: (title: string, fn: TestFunction, options?: TestOptions) => TestResult;
|
|
86
|
+
only: (title: string, fn: TestFunction, options?: TestOptions) => TestResult;
|
|
87
|
+
todo: (title: string) => void;
|
|
88
|
+
each: TestEach;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
type TestAsWrapper = {
|
|
92
|
+
<User extends Context["user"]>(
|
|
93
|
+
user: User,
|
|
94
|
+
title: string,
|
|
95
|
+
fn: TestFunction,
|
|
96
|
+
options?: TestOptions,
|
|
97
|
+
): TestResult;
|
|
98
|
+
skip: <User extends Context["user"]>(
|
|
99
|
+
user: User,
|
|
100
|
+
title: string,
|
|
101
|
+
fn: TestFunction,
|
|
102
|
+
options?: TestOptions,
|
|
103
|
+
) => TestResult;
|
|
104
|
+
only: <User extends Context["user"]>(
|
|
105
|
+
user: User,
|
|
106
|
+
title: string,
|
|
107
|
+
fn: TestFunction,
|
|
108
|
+
options?: TestOptions,
|
|
109
|
+
) => TestResult;
|
|
110
|
+
todo: (title: string) => void;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const each: TestEach = vitestTest.each.bind(vitestTest);
|
|
114
|
+
|
|
87
115
|
declare module "vitest" {
|
|
88
116
|
interface TaskMeta {
|
|
89
117
|
traces: SerializedTrace[];
|
|
90
118
|
}
|
|
91
119
|
}
|
|
92
120
|
|
|
93
|
-
export const test = Object.assign(
|
|
94
|
-
async (title: string, fn: TestFunction
|
|
121
|
+
export const test: TestWrapper = Object.assign(
|
|
122
|
+
async (title: string, fn: TestFunction, options?: TestOptions) => {
|
|
95
123
|
return vitestTest(title, options, async (context) => {
|
|
96
124
|
await runWithMockContext(async () => {
|
|
97
125
|
try {
|
|
@@ -105,9 +133,9 @@ export const test = Object.assign(
|
|
|
105
133
|
});
|
|
106
134
|
},
|
|
107
135
|
{
|
|
108
|
-
skip: async (title: string, fn: TestFunction
|
|
136
|
+
skip: async (title: string, fn: TestFunction, options?: TestOptions) =>
|
|
109
137
|
vitestTest.skip(title, options, fn),
|
|
110
|
-
only: async (title: string, fn: TestFunction
|
|
138
|
+
only: async (title: string, fn: TestFunction, options?: TestOptions) => {
|
|
111
139
|
return vitestTest.only(title, options, async (context) => {
|
|
112
140
|
await runWithMockContext(async () => {
|
|
113
141
|
try {
|
|
@@ -121,15 +149,15 @@ export const test = Object.assign(
|
|
|
121
149
|
});
|
|
122
150
|
},
|
|
123
151
|
todo: (title: string) => vitestTest.todo(title),
|
|
124
|
-
each
|
|
152
|
+
each,
|
|
125
153
|
},
|
|
126
154
|
);
|
|
127
155
|
|
|
128
|
-
export const testAs = Object.assign(
|
|
156
|
+
export const testAs: TestAsWrapper = Object.assign(
|
|
129
157
|
async <User extends Context["user"]>(
|
|
130
158
|
user: User,
|
|
131
159
|
title: string,
|
|
132
|
-
fn: TestFunction
|
|
160
|
+
fn: TestFunction,
|
|
133
161
|
options?: TestOptions,
|
|
134
162
|
) => {
|
|
135
163
|
return vitestTest(title, options, async (context) => {
|
|
@@ -154,13 +182,13 @@ export const testAs = Object.assign(
|
|
|
154
182
|
skip: async <User extends Context["user"]>(
|
|
155
183
|
_user: User,
|
|
156
184
|
title: string,
|
|
157
|
-
fn: TestFunction
|
|
185
|
+
fn: TestFunction,
|
|
158
186
|
options?: TestOptions,
|
|
159
187
|
) => vitestTest.skip(title, options, fn),
|
|
160
188
|
only: async <User extends Context["user"]>(
|
|
161
189
|
user: User,
|
|
162
190
|
title: string,
|
|
163
|
-
fn: TestFunction
|
|
191
|
+
fn: TestFunction,
|
|
164
192
|
options?: TestOptions,
|
|
165
193
|
) => {
|
|
166
194
|
return vitestTest.only(title, options, async (context) => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
import type
|
|
4
|
-
import type
|
|
1
|
+
import { type Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
import { type CacheManager } from "../cache/types";
|
|
4
|
+
import { type Entity } from "../entity/entity";
|
|
5
|
+
import { type EntityManager } from "../entity/entity-manager";
|
|
5
6
|
import { isBelongsToOneRelationProp, isOneToOneRelationProp, isRelationProp } from "../types/types";
|
|
6
7
|
|
|
7
8
|
export type DataExplorerStrategy = "sample" | "ids" | "query" | "file" | "recent" | "random";
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { randomUUID } from "crypto";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { type FastifyInstance } from "fastify";
|
|
3
4
|
import { z } from "zod";
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
import { type SonamuDevRunnerConfig } from "../api/config";
|
|
5
7
|
import { Sonamu } from "../api/sonamu";
|
|
6
|
-
import type
|
|
7
|
-
import { createSSEFactory
|
|
8
|
-
import
|
|
8
|
+
import { type SerializedTrace } from "../naite/naite";
|
|
9
|
+
import { createSSEFactory } from "../stream/sse";
|
|
10
|
+
import { type SSEConnection } from "../stream/sse";
|
|
11
|
+
import { type ManagerStatus, type RunResult, type TestCaseResult } from "./dev-vitest-manager";
|
|
9
12
|
import { DevVitestManager } from "./dev-vitest-manager";
|
|
10
13
|
|
|
11
14
|
const SCHEMA_VERSION = 1;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import
|
|
3
|
-
CliOptions,
|
|
4
|
-
Reporter,
|
|
5
|
-
TestCase,
|
|
6
|
-
TestModule,
|
|
7
|
-
TestRunResult,
|
|
8
|
-
TestSpecification,
|
|
9
|
-
TestSuite,
|
|
10
|
-
Vitest,
|
|
1
|
+
import { type UserConfig as ViteUserConfig } from "vite";
|
|
2
|
+
import {
|
|
3
|
+
type CliOptions,
|
|
4
|
+
type Reporter,
|
|
5
|
+
type TestCase,
|
|
6
|
+
type TestModule,
|
|
7
|
+
type TestRunResult,
|
|
8
|
+
type TestSpecification,
|
|
9
|
+
type TestSuite,
|
|
10
|
+
type Vitest,
|
|
11
11
|
} from "vitest/node";
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
import { type SerializedTrace } from "../naite/naite";
|
|
13
14
|
|
|
14
15
|
// 테스트 한 건의 trace 모음
|
|
15
16
|
export type TestNodeKind = "file" | "suite" | "test";
|
|
@@ -122,7 +123,7 @@ export class DevVitestManager {
|
|
|
122
123
|
|
|
123
124
|
const vitest = await createVitest("test", cliOptions, viteOverrides);
|
|
124
125
|
try {
|
|
125
|
-
await vitest.
|
|
126
|
+
await vitest.standalone();
|
|
126
127
|
} catch (err) {
|
|
127
128
|
await vitest.close();
|
|
128
129
|
throw err;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
import type
|
|
5
|
-
import
|
|
2
|
+
import { type Knex } from "knex";
|
|
3
|
+
|
|
4
|
+
import { type Entity } from "../entity/entity";
|
|
5
|
+
import { type EntityManager } from "../entity/entity-manager";
|
|
6
|
+
import { type EntityProp, type FixtureImportResult, type FixtureRecord } from "../types/types";
|
|
6
7
|
import { isBelongsToOneRelationProp, isOneToOneRelationProp, isRelationProp } from "../types/types";
|
|
7
8
|
import { isTest } from "../utils/controller";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from "./data-explorer";
|
|
13
|
-
import { type FakerMappings, fakerMappings } from "./faker-mappings";
|
|
9
|
+
import { DataExplorer } from "./data-explorer";
|
|
10
|
+
import { type ExploreWithRelationsOptions, type ExploreWithRelationsResult } from "./data-explorer";
|
|
11
|
+
import { fakerMappings } from "./faker-mappings";
|
|
12
|
+
import { type FakerMappings } from "./faker-mappings";
|
|
14
13
|
import { FixtureManager } from "./fixture-manager";
|
|
15
14
|
|
|
16
15
|
export type Locale = "ko" | "en" | "ja";
|
|
@@ -173,11 +172,7 @@ export class FixtureGenerator {
|
|
|
173
172
|
|
|
174
173
|
// 3. fixtureGenerator 사용
|
|
175
174
|
if (cone?.fixtureGenerator) {
|
|
176
|
-
fixture[prop.name] = await this.executeGenerator(
|
|
177
|
-
cone.fixtureGenerator as string,
|
|
178
|
-
prop,
|
|
179
|
-
entity,
|
|
180
|
-
);
|
|
175
|
+
fixture[prop.name] = await this.executeGenerator(cone.fixtureGenerator, prop, entity);
|
|
181
176
|
continue;
|
|
182
177
|
}
|
|
183
178
|
|
|
@@ -1475,8 +1470,7 @@ Rules:
|
|
|
1475
1470
|
// parentId 엔티티: DB에서 서브타입 행이 없는 부모 id를 조회하여 사용
|
|
1476
1471
|
// (새 부모 생성 대신 기존 데이터 재활용)
|
|
1477
1472
|
const idProp = specEntity.props.find((p) => p.name === "id");
|
|
1478
|
-
const parentOverrides =
|
|
1479
|
-
(idProp?.cone?.fixtureParentOverrides as Record<string, unknown> | undefined) ?? {};
|
|
1473
|
+
const parentOverrides = idProp?.cone?.fixtureParentOverrides ?? {};
|
|
1480
1474
|
const parentEntity = this.entityManager.get(specEntity.parentId);
|
|
1481
1475
|
|
|
1482
1476
|
// 부모 테이블에서 서브타입 테이블에 없는 id를 조회
|
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
import assert from "assert";
|
|
2
|
-
import chalk from "chalk";
|
|
3
2
|
import { execSync } from "child_process";
|
|
4
3
|
import { readFileSync, writeFileSync } from "fs";
|
|
4
|
+
import { inspect } from "util";
|
|
5
|
+
|
|
6
|
+
import chalk from "chalk";
|
|
5
7
|
import inflection from "inflection";
|
|
6
|
-
import type
|
|
8
|
+
import { type Knex } from "knex";
|
|
7
9
|
import { unique } from "radashi";
|
|
8
|
-
|
|
9
|
-
import { Sonamu } from "../api";
|
|
10
|
+
|
|
11
|
+
import { Sonamu } from "../api/sonamu";
|
|
10
12
|
import { BaseModel } from "../database/base-model";
|
|
11
|
-
import type
|
|
13
|
+
import { type SonamuDBConfig } from "../database/db";
|
|
12
14
|
import { createKnexInstance } from "../database/knex";
|
|
13
|
-
import {
|
|
14
|
-
import type
|
|
15
|
+
import { UpsertBuilder } from "../database/upsert-builder";
|
|
16
|
+
import { type UBRef } from "../database/upsert-builder";
|
|
17
|
+
import { type Entity } from "../entity/entity";
|
|
15
18
|
import { EntityManager } from "../entity/entity-manager";
|
|
16
19
|
import {
|
|
17
|
-
type BelongsToOneRelationProp,
|
|
18
|
-
type DatabaseSchemaExtend,
|
|
19
|
-
type EntityProp,
|
|
20
|
-
type FixtureImportResult,
|
|
21
|
-
type FixtureRecord,
|
|
22
|
-
type FixtureSearchOptions,
|
|
23
20
|
isBelongsToOneRelationProp,
|
|
24
21
|
isHasManyRelationProp,
|
|
25
22
|
isManyToManyRelationProp,
|
|
26
23
|
isOneToOneRelationProp,
|
|
27
24
|
isRelationProp,
|
|
28
25
|
isVirtualProp,
|
|
29
|
-
|
|
26
|
+
} from "../types/types";
|
|
27
|
+
import {
|
|
28
|
+
type BelongsToOneRelationProp,
|
|
29
|
+
type DatabaseSchemaExtend,
|
|
30
|
+
type EntityProp,
|
|
31
|
+
type FixtureImportResult,
|
|
32
|
+
type FixtureRecord,
|
|
33
|
+
type FixtureSearchOptions,
|
|
30
34
|
type OneToOneRelationProp,
|
|
31
35
|
} from "../types/types";
|
|
32
36
|
import { isTest } from "../utils/controller";
|
|
@@ -275,7 +279,7 @@ export class FixtureManagerClass {
|
|
|
275
279
|
}),
|
|
276
280
|
);
|
|
277
281
|
|
|
278
|
-
return [...unique(relQueries.
|
|
282
|
+
return [...unique(relQueries.toReversed().flat()), selfQuery];
|
|
279
283
|
}
|
|
280
284
|
|
|
281
285
|
async destroy() {
|
|
@@ -869,12 +873,12 @@ export class FixtureManagerClass {
|
|
|
869
873
|
if (isManyToManyRelationProp(prop) && Array.isArray(column.value)) {
|
|
870
874
|
// 선택되지 않은 ManyToMany 관계는 저장하지 않음
|
|
871
875
|
const targetTable = EntityManager.get(prop.with);
|
|
872
|
-
if (this.builder.hasTable(targetTable.table)
|
|
876
|
+
if (!this.builder.hasTable(targetTable.table)) continue;
|
|
873
877
|
|
|
874
878
|
const relatedIds = column.value as number[];
|
|
875
879
|
if (relatedIds.length === 0) continue;
|
|
876
880
|
|
|
877
|
-
const joinTable =
|
|
881
|
+
const joinTable = prop.joinTable;
|
|
878
882
|
const relatedEntity = EntityManager.get(prop.with);
|
|
879
883
|
|
|
880
884
|
const sourceColumn = `${inflection.singularize(entity.table)}_id`;
|
package/src/types/types.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FastifyReply, type FastifyRequest } from "fastify";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
import type
|
|
5
|
-
import type
|
|
3
|
+
|
|
4
|
+
import { type ApiDecoratorOptions, type Context } from "../api";
|
|
5
|
+
import { type CacheControlHandler } from "../cache-control/types";
|
|
6
|
+
import { type GuardKey } from "./../api/decorators";
|
|
6
7
|
|
|
7
8
|
/*
|
|
8
9
|
Utility Types
|
|
@@ -10,7 +11,7 @@ import type { CacheControlHandler } from "../cache-control/types";
|
|
|
10
11
|
export function zArrayable<T extends z.ZodTypeAny>(shape: T): z.ZodUnion<[T, z.ZodArray<T>]> {
|
|
11
12
|
return z.union([shape, shape.array()]);
|
|
12
13
|
}
|
|
13
|
-
//
|
|
14
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any -- any is used to make the type distributive
|
|
14
15
|
export type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
|
|
15
16
|
|
|
16
17
|
/*
|
|
@@ -296,7 +297,6 @@ export type EntityProp =
|
|
|
296
297
|
| NumberArrayProp
|
|
297
298
|
| NumericProp
|
|
298
299
|
| NumericArrayProp
|
|
299
|
-
| NumericProp
|
|
300
300
|
| BooleanProp
|
|
301
301
|
| BooleanArrayProp
|
|
302
302
|
| DateProp
|
|
@@ -1750,9 +1750,9 @@ export type RelationNode = {
|
|
|
1750
1750
|
related: Set<string>;
|
|
1751
1751
|
};
|
|
1752
1752
|
|
|
1753
|
-
//
|
|
1753
|
+
// oxlint-disable-next-line @typescript-eslint/no-empty-interface -- sonamu.generated.sso 에서 확장을 위해 준비된 빈 인터페이스
|
|
1754
1754
|
export interface DatabaseSchemaExtend {}
|
|
1755
|
-
//
|
|
1755
|
+
// oxlint-disable-next-line @typescript-eslint/no-empty-interface -- sonamu.generated.sso 에서 확장을 위해 준비된 빈 인터페이스
|
|
1756
1756
|
export interface DatabaseForeignKeys {}
|
|
1757
1757
|
export type ManyToManyBaseSchema<
|
|
1758
1758
|
FromIdKey extends string,
|
package/src/typings/knex.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/* oxlint-disable @typescript-eslint/no-unused-vars */ // d.ts
|
|
2
|
+
/* oxlint-disable @typescript-eslint/no-explicit-any */ // d.ts
|
|
3
|
+
/* oxlint-disable @typescript-eslint/no-unused-vars */ // d.ts
|
|
4
4
|
|
|
5
|
-
import type
|
|
5
|
+
import { type Knex } from "knex";
|
|
6
6
|
|
|
7
7
|
declare module "knex" {
|
|
8
8
|
namespace Knex {
|
package/src/ui/ai-api.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { convertToModelMessages
|
|
2
|
-
import type
|
|
1
|
+
import { convertToModelMessages } from "ai";
|
|
2
|
+
import { type UIMessage } from "ai";
|
|
3
|
+
import { type FastifyInstance } from "fastify";
|
|
4
|
+
|
|
3
5
|
import { SD } from "../dict/sd";
|
|
4
6
|
import { BadRequestException } from "../exceptions/so-exceptions";
|
|
5
|
-
import type
|
|
7
|
+
import { type FixtureRecord } from "../types/types";
|
|
6
8
|
import { aiClient } from "./ai-client";
|
|
7
9
|
|
|
8
10
|
export async function setAiApi(server: FastifyInstance) {
|
package/src/ui/ai-client.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
/** biome-ignore-all lint/suspicious/noExplicitAny: AI SDK의 타입이 명확하지 않아 any를 허용함 */
|
|
2
|
-
import type { LanguageModel, ModelMessage, StreamTextResult } from "ai";
|
|
3
1
|
import assert from "assert";
|
|
4
2
|
import fs from "fs";
|
|
5
3
|
import path from "path";
|
|
4
|
+
|
|
5
|
+
/* oxlint-disable @typescript-eslint/no-explicit-any */ // AI SDK의 타입이 명확하지 않아 any를 허용함
|
|
6
|
+
import { type LanguageModel, type ModelMessage, type StreamTextResult } from "ai";
|
|
6
7
|
import { z } from "zod";
|
|
7
|
-
|
|
8
|
+
|
|
9
|
+
import { Sonamu } from "../api/sonamu";
|
|
8
10
|
import { EntityManager } from "../entity/entity-manager";
|
|
9
11
|
import {
|
|
10
|
-
type EntityProp,
|
|
11
|
-
type FixtureRecord,
|
|
12
12
|
getEnumDefValues,
|
|
13
13
|
isInternalSubsetField,
|
|
14
14
|
normalizeSubsetField,
|
|
15
15
|
TemplateOptions,
|
|
16
16
|
} from "../types/types";
|
|
17
|
+
import { type EntityProp, type FixtureRecord } from "../types/types";
|
|
17
18
|
import { nonNullable } from "../utils/utils";
|
|
18
19
|
|
|
19
20
|
type ValidationError = {
|
package/src/ui/api.ts
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
import { execSync } from "child_process";
|
|
2
|
-
import type { FastifyInstance } from "fastify";
|
|
3
2
|
import fs from "fs";
|
|
4
|
-
import inflection from "inflection";
|
|
5
|
-
import type { AddressInfo } from "net";
|
|
6
3
|
import path from "path";
|
|
4
|
+
|
|
5
|
+
import { type FastifyInstance } from "fastify";
|
|
6
|
+
import inflection from "inflection";
|
|
7
7
|
import { range } from "radashi";
|
|
8
|
+
|
|
8
9
|
import { Sonamu } from "../api/sonamu";
|
|
9
|
-
import { DB
|
|
10
|
+
import { DB } from "../database/db";
|
|
11
|
+
import { type SonamuDBConfig } from "../database/db";
|
|
10
12
|
import { createKnexInstance } from "../database/knex";
|
|
11
13
|
import { SD } from "../dict/sd";
|
|
12
14
|
import { sonamuDictionary } from "../dict/sonamu-dictionary";
|
|
13
|
-
import type
|
|
15
|
+
import { type Entity } from "../entity/entity";
|
|
14
16
|
import { EntityManager } from "../entity/entity-manager";
|
|
15
17
|
import {
|
|
16
18
|
BadRequestException,
|
|
17
19
|
isSoException,
|
|
18
20
|
ServiceUnavailableException,
|
|
19
21
|
} from "../exceptions/so-exceptions";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
+
import { Migrator } from "../migration/migrator";
|
|
23
|
+
import { type MigrationResult } from "../migration/migrator";
|
|
24
|
+
import { SlackConfirm } from "../migration/slack-confirm";
|
|
25
|
+
import { type SlackConfirmPendingResult } from "../migration/slack-confirm";
|
|
22
26
|
import { TemplateManager } from "../template/template-manager";
|
|
23
27
|
import { DataExplorer } from "../testing/data-explorer";
|
|
24
28
|
import { FixtureGenerator } from "../testing/fixture-generator";
|
|
25
|
-
import {
|
|
29
|
+
import { FixtureManager } from "../testing/fixture-manager";
|
|
30
|
+
import { type DuplicateCheckOptions } from "../testing/fixture-manager";
|
|
31
|
+
import { BUILT_IN_TYPE_IDS, TemplateKey } from "../types/types";
|
|
26
32
|
import {
|
|
27
|
-
BUILT_IN_TYPE_IDS,
|
|
28
33
|
type Cone,
|
|
29
34
|
type EntityIndex,
|
|
30
35
|
type EntityProp,
|
|
@@ -33,11 +38,10 @@ import {
|
|
|
33
38
|
type FixtureSearchOptions,
|
|
34
39
|
type FlattenSubsetRow,
|
|
35
40
|
type PathAndCode,
|
|
36
|
-
TemplateKey,
|
|
37
41
|
} from "../types/types";
|
|
38
42
|
import { nonNullable } from "../utils/utils";
|
|
39
43
|
import { setAiApi } from "./ai-api";
|
|
40
|
-
import type
|
|
44
|
+
import { type CddAddRuleRequest } from "./cdd-service";
|
|
41
45
|
import {
|
|
42
46
|
addRule,
|
|
43
47
|
editContent,
|
|
@@ -522,16 +526,14 @@ export async function sonamuUIApiPlugin(fastify: FastifyInstance) {
|
|
|
522
526
|
throw new Error(`이미 존재하는 enumId입니다: ${newEnumId}`);
|
|
523
527
|
}
|
|
524
528
|
|
|
525
|
-
entity.enumLabels[newEnumId] =
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
}),
|
|
534
|
-
};
|
|
529
|
+
entity.enumLabels[newEnumId] = newEnumId.endsWith("Status")
|
|
530
|
+
? {
|
|
531
|
+
active: "노출",
|
|
532
|
+
hidden: "숨김",
|
|
533
|
+
}
|
|
534
|
+
: {
|
|
535
|
+
"": "",
|
|
536
|
+
};
|
|
535
537
|
await entity.save();
|
|
536
538
|
|
|
537
539
|
return 1;
|
|
@@ -752,7 +754,7 @@ export async function sonamuUIApiPlugin(fastify: FastifyInstance) {
|
|
|
752
754
|
const pendingMigrations = [
|
|
753
755
|
...new Set(
|
|
754
756
|
conns
|
|
755
|
-
.filter((conn) => targets.includes(conn.connKey
|
|
757
|
+
.filter((conn) => targets.includes(conn.connKey))
|
|
756
758
|
.flatMap((conn) => conn.pending),
|
|
757
759
|
),
|
|
758
760
|
];
|
|
@@ -1192,7 +1194,7 @@ export async function sonamuUIApiPlugin(fastify: FastifyInstance) {
|
|
|
1192
1194
|
*/
|
|
1193
1195
|
server.get("/api/sonamu/health", async (request) => {
|
|
1194
1196
|
const address = request.server.server.address();
|
|
1195
|
-
const port = address && typeof address === "object" ?
|
|
1197
|
+
const port = address && typeof address === "object" ? address.port : 0;
|
|
1196
1198
|
|
|
1197
1199
|
return {
|
|
1198
1200
|
ok: true,
|