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
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import equal from "fast-deep-equal";
|
|
2
|
-
import type
|
|
2
|
+
import { type Knex } from "knex";
|
|
3
3
|
import { alphabetical, diff } from "radashi";
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
|
|
5
|
+
import { EntityManager } from "../entity/entity-manager";
|
|
6
|
+
import { Naite } from "../naite/naite";
|
|
7
|
+
import {
|
|
8
|
+
type EntityProp,
|
|
9
|
+
type GenMigrationCode,
|
|
10
|
+
type MigrationColumn,
|
|
11
|
+
type MigrationForeign,
|
|
12
|
+
type MigrationIndex,
|
|
13
|
+
type MigrationSet,
|
|
12
14
|
} from "../types/types";
|
|
13
15
|
import { isSearchTextProp } from "../types/types";
|
|
14
16
|
import { formatCode } from "../utils/formatter";
|
|
@@ -468,7 +470,7 @@ function normalizeSearchTextExpressionNode(
|
|
|
468
470
|
(name === "sonamu_text_array_agg" || name === "sonamu_jsonb_array_agg") &&
|
|
469
471
|
args.length === 2 &&
|
|
470
472
|
args[1]?.type === "boolean" &&
|
|
471
|
-
args[1].value
|
|
473
|
+
args[1].value
|
|
472
474
|
) {
|
|
473
475
|
args = [args[0]];
|
|
474
476
|
}
|
|
@@ -772,7 +774,7 @@ async function generateCreateCode_ColumnAndIndexes(
|
|
|
772
774
|
table,
|
|
773
775
|
type: "normal",
|
|
774
776
|
title: `create__${table}`,
|
|
775
|
-
formatted: formatCode(lines.join("\n"), "typescript", `src/migration/${table}.ts`),
|
|
777
|
+
formatted: await formatCode(lines.join("\n"), "typescript", `src/migration/${table}.ts`),
|
|
776
778
|
};
|
|
777
779
|
}
|
|
778
780
|
|
|
@@ -1097,7 +1099,7 @@ async function generateCreateCode_Foreign(
|
|
|
1097
1099
|
table,
|
|
1098
1100
|
type: "foreign",
|
|
1099
1101
|
title: `foreign__${table}__${foreignKeysString}`,
|
|
1100
|
-
formatted: formatCode(lines.join("\n"), "typescript", `src/migration/${table}.ts`),
|
|
1102
|
+
formatted: await formatCode(lines.join("\n"), "typescript", `src/migration/${table}.ts`),
|
|
1101
1103
|
},
|
|
1102
1104
|
];
|
|
1103
1105
|
}
|
|
@@ -1207,12 +1209,12 @@ async function generateAlterCode_ColumnAndIndexes(
|
|
|
1207
1209
|
const recreatedSearchTextDbIndexes = dbIndexes.filter(
|
|
1208
1210
|
(index) =>
|
|
1209
1211
|
index.columns.some(({ name }) => recreatedSearchTextColumnNames.has(name)) &&
|
|
1210
|
-
alterIndexesTo.drop.some((dropIndex) => dropIndex.name === index.name)
|
|
1212
|
+
!alterIndexesTo.drop.some((dropIndex) => dropIndex.name === index.name),
|
|
1211
1213
|
);
|
|
1212
1214
|
const recreatedSearchTextEntityIndexes = entityIndexes.filter(
|
|
1213
1215
|
(index) =>
|
|
1214
1216
|
index.columns.some(({ name }) => recreatedSearchTextColumnNames.has(name)) &&
|
|
1215
|
-
alterIndexesTo.add.some((addIndex) => addIndex.name === index.name)
|
|
1217
|
+
!alterIndexesTo.add.some((addIndex) => addIndex.name === index.name),
|
|
1216
1218
|
);
|
|
1217
1219
|
const implicitlyDroppedDbIndexes = alterIndexesTo.drop.filter((index) =>
|
|
1218
1220
|
index.columns.every(({ name }) => alterColumnsTo.drop.some((column) => column.name === name)),
|
|
@@ -1220,8 +1222,7 @@ async function generateAlterCode_ColumnAndIndexes(
|
|
|
1220
1222
|
|
|
1221
1223
|
// 인덱스가 삭제되는 경우, 컬럼과 같이 삭제된 케이스에는 drop에서 제외해야함!
|
|
1222
1224
|
const indexNeedsToDrop = alterIndexesTo.drop.filter(
|
|
1223
|
-
(index) =>
|
|
1224
|
-
implicitlyDroppedDbIndexes.some((droppedIndex) => droppedIndex.name === index.name) === false,
|
|
1225
|
+
(index) => !implicitlyDroppedDbIndexes.some((droppedIndex) => droppedIndex.name === index.name),
|
|
1225
1226
|
);
|
|
1226
1227
|
|
|
1227
1228
|
// 빈 코드 생성 방지
|
|
@@ -1280,9 +1281,9 @@ async function generateAlterCode_ColumnAndIndexes(
|
|
|
1280
1281
|
...alterIndexesTo.add
|
|
1281
1282
|
.filter(
|
|
1282
1283
|
(index) =>
|
|
1283
|
-
index.columns.every((indexCol) =>
|
|
1284
|
+
!index.columns.every((indexCol) =>
|
|
1284
1285
|
alterColumnsTo.add.map((col) => col.name).includes(indexCol.name),
|
|
1285
|
-
)
|
|
1286
|
+
),
|
|
1286
1287
|
)
|
|
1287
1288
|
.map(genIndexDropDefinition),
|
|
1288
1289
|
];
|
|
@@ -1313,7 +1314,7 @@ async function generateAlterCode_ColumnAndIndexes(
|
|
|
1313
1314
|
"}",
|
|
1314
1315
|
];
|
|
1315
1316
|
|
|
1316
|
-
const formatted = formatCode(lines.join("\n"), "typescript", `src/migration/${table}.ts`);
|
|
1317
|
+
const formatted = await formatCode(lines.join("\n"), "typescript", `src/migration/${table}.ts`);
|
|
1317
1318
|
const title = [
|
|
1318
1319
|
"alter",
|
|
1319
1320
|
table,
|
|
@@ -1586,7 +1587,7 @@ export function getAlterIndexesTo(entityIndexes: MigrationIndex[], dbIndexes: Mi
|
|
|
1586
1587
|
const identity = <T extends Record<string, unknown>>(index: T): string => {
|
|
1587
1588
|
const keys = Object.keys(index)
|
|
1588
1589
|
.filter((key) => key !== "name")
|
|
1589
|
-
.
|
|
1590
|
+
.toSorted();
|
|
1590
1591
|
|
|
1591
1592
|
return keys
|
|
1592
1593
|
.map((key) => {
|
|
@@ -1596,7 +1597,7 @@ export function getAlterIndexesTo(entityIndexes: MigrationIndex[], dbIndexes: Mi
|
|
|
1596
1597
|
if (key === "columns") {
|
|
1597
1598
|
return (index[key] as MigrationIndex["columns"]).map((col) => {
|
|
1598
1599
|
return Object.keys(col)
|
|
1599
|
-
.
|
|
1600
|
+
.toSorted()
|
|
1600
1601
|
.map((k) => `${k}=${col[k as keyof typeof col]}`)
|
|
1601
1602
|
.join("//");
|
|
1602
1603
|
});
|
|
@@ -1680,7 +1681,7 @@ async function generateAlterCode_Foreigns(
|
|
|
1680
1681
|
return result;
|
|
1681
1682
|
}
|
|
1682
1683
|
|
|
1683
|
-
if (equal(entityF, matchingDbF)
|
|
1684
|
+
if (!equal(entityF, matchingDbF)) {
|
|
1684
1685
|
result.alterSrc.push(matchingDbF);
|
|
1685
1686
|
result.alterDst.push(entityF);
|
|
1686
1687
|
return result;
|
|
@@ -1758,7 +1759,7 @@ async function generateAlterCode_Foreigns(
|
|
|
1758
1759
|
"}",
|
|
1759
1760
|
];
|
|
1760
1761
|
|
|
1761
|
-
const formatted = formatCode(lines.join("\n"), "typescript", `src/migration/${table}.ts`);
|
|
1762
|
+
const formatted = await formatCode(lines.join("\n"), "typescript", `src/migration/${table}.ts`);
|
|
1762
1763
|
const title = ["alter", table, "foreigns"].join("_");
|
|
1763
1764
|
|
|
1764
1765
|
return [
|
|
@@ -1888,7 +1889,7 @@ export async function generateAlterCode(
|
|
|
1888
1889
|
}
|
|
1889
1890
|
|
|
1890
1891
|
// 2. foreigns 처리 (삭제될 컬럼 정보 전달)
|
|
1891
|
-
if (equal(entityForeigns, dbForeigns)
|
|
1892
|
+
if (!equal(entityForeigns, dbForeigns)) {
|
|
1892
1893
|
alterCodes.push(
|
|
1893
1894
|
await generateAlterCode_Foreigns(
|
|
1894
1895
|
entitySet.table,
|
|
@@ -2076,7 +2077,7 @@ async function generatePkTypeChangeMigration(
|
|
|
2076
2077
|
"}",
|
|
2077
2078
|
];
|
|
2078
2079
|
|
|
2079
|
-
const formatted = formatCode(lines.join("\n"), "typescript", `src/migration/${table}.ts`);
|
|
2080
|
+
const formatted = await formatCode(lines.join("\n"), "typescript", `src/migration/${table}.ts`);
|
|
2080
2081
|
|
|
2081
2082
|
return [
|
|
2082
2083
|
{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import inflection from "inflection";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { type Entity } from "../entity/entity";
|
|
3
4
|
import { EntityManager } from "../entity/entity-manager";
|
|
4
5
|
import {
|
|
5
|
-
type EntityProp,
|
|
6
6
|
isBelongsToOneRelationProp,
|
|
7
7
|
isHasManyRelationProp,
|
|
8
8
|
isManyToManyRelationProp,
|
|
@@ -13,6 +13,9 @@ import {
|
|
|
13
13
|
isStringProp,
|
|
14
14
|
isVectorProp,
|
|
15
15
|
isVirtualProp,
|
|
16
|
+
} from "../types/types";
|
|
17
|
+
import {
|
|
18
|
+
type EntityProp,
|
|
16
19
|
type MigrationColumn,
|
|
17
20
|
type MigrationColumnType,
|
|
18
21
|
type MigrationForeign,
|
|
@@ -103,21 +106,16 @@ export function getMigrationSetFromEntity(entity: Entity): MigrationSetAndJoinTa
|
|
|
103
106
|
const fields = [through.from, through.to];
|
|
104
107
|
r.joinTables.push({
|
|
105
108
|
table: through.from.split(".")[0],
|
|
106
|
-
indexes:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
columns: index.columns.map((col) => ({
|
|
115
|
-
name: col.name.replace(`${prop.joinTable}.`, ""),
|
|
116
|
-
nullsFirst: col.nullsFirst,
|
|
117
|
-
sortOrder: col.sortOrder,
|
|
118
|
-
})),
|
|
109
|
+
indexes: entity.indexes
|
|
110
|
+
.filter((index) => index.columns.find((col) => col.name.includes(`${prop.joinTable}.`)))
|
|
111
|
+
.map((index) => ({
|
|
112
|
+
...index,
|
|
113
|
+
columns: index.columns.map((col) => ({
|
|
114
|
+
name: col.name.replace(`${prop.joinTable}.`, ""),
|
|
115
|
+
nullsFirst: col.nullsFirst,
|
|
116
|
+
sortOrder: col.sortOrder,
|
|
119
117
|
})),
|
|
120
|
-
|
|
118
|
+
})),
|
|
121
119
|
columns: [
|
|
122
120
|
{
|
|
123
121
|
name: "id",
|
|
@@ -187,7 +185,7 @@ export function getMigrationSetFromEntity(entity: Entity): MigrationSetAndJoinTa
|
|
|
187
185
|
length: pkProp.length,
|
|
188
186
|
}),
|
|
189
187
|
});
|
|
190
|
-
if (
|
|
188
|
+
if (prop.useConstraint ?? true) {
|
|
191
189
|
r.foreigns.push({
|
|
192
190
|
columns: [idColumnName],
|
|
193
191
|
to: `${inflection.underscore(inflection.pluralize(prop.with)).toLowerCase()}.id`,
|
|
@@ -210,7 +208,7 @@ export function getMigrationSetFromEntity(entity: Entity): MigrationSetAndJoinTa
|
|
|
210
208
|
|
|
211
209
|
// indexes
|
|
212
210
|
migrationSet.indexes = entity.indexes.filter((index) =>
|
|
213
|
-
index.columns.find((col) => col.name.includes(".")
|
|
211
|
+
index.columns.find((col) => !col.name.includes(".")),
|
|
214
212
|
);
|
|
215
213
|
|
|
216
214
|
return migrationSet;
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import assert from "assert";
|
|
2
|
-
import chalk from "chalk";
|
|
3
2
|
import { mkdir, readdir, unlink, writeFile } from "fs/promises";
|
|
4
|
-
import type { Knex } from "knex";
|
|
5
3
|
import path from "path";
|
|
4
|
+
|
|
5
|
+
import chalk from "chalk";
|
|
6
|
+
import { type Knex } from "knex";
|
|
6
7
|
import { group, sum, unique } from "radashi";
|
|
7
|
-
|
|
8
|
-
import {
|
|
8
|
+
|
|
9
|
+
import { Sonamu } from "../api/sonamu";
|
|
10
|
+
import { DB } from "../database/db";
|
|
11
|
+
import { type SonamuDBConfig } from "../database/db";
|
|
9
12
|
import { createKnexInstance } from "../database/knex";
|
|
10
13
|
import { SD } from "../dict/sd";
|
|
11
14
|
import { EntityManager } from "../entity/entity-manager";
|
|
12
15
|
import { ServiceUnavailableException } from "../exceptions/so-exceptions";
|
|
13
16
|
import { Naite } from "../naite/naite";
|
|
14
|
-
import type
|
|
17
|
+
import { type GenMigrationCode, type MigrationSet } from "../types/types";
|
|
15
18
|
import { isTest } from "../utils/controller";
|
|
16
19
|
import { exists } from "../utils/fs-utils";
|
|
17
20
|
import { generateAlterCode, generateCreateCode } from "./code-generation";
|
|
18
21
|
import { getMigrationSetFromEntity } from "./migration-set";
|
|
19
22
|
import { PostgreSQLSchemaReader } from "./postgresql-schema-reader";
|
|
20
|
-
import type
|
|
23
|
+
import { type ConnString, type MigrationCode, type MigrationStatus } from "./types";
|
|
21
24
|
|
|
22
25
|
export type MigrationResult = {
|
|
23
26
|
connKey: string;
|
|
@@ -26,6 +29,26 @@ export type MigrationResult = {
|
|
|
26
29
|
}[];
|
|
27
30
|
|
|
28
31
|
export class Migrator {
|
|
32
|
+
private async runMigrationsSequentially(
|
|
33
|
+
conns: { connKey: keyof SonamuDBConfig; knex: Knex }[],
|
|
34
|
+
action: "apply" | "rollback",
|
|
35
|
+
): Promise<MigrationResult> {
|
|
36
|
+
const results: MigrationResult = [];
|
|
37
|
+
|
|
38
|
+
for (const { connKey, knex } of conns) {
|
|
39
|
+
const [batchNo, applied] =
|
|
40
|
+
action === "apply" ? await knex.migrate.latest() : await knex.migrate.rollback();
|
|
41
|
+
|
|
42
|
+
results.push({
|
|
43
|
+
connKey,
|
|
44
|
+
batchNo,
|
|
45
|
+
applied,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return results;
|
|
50
|
+
}
|
|
51
|
+
|
|
29
52
|
private async getMigrationCodes(): Promise<MigrationCode[]> {
|
|
30
53
|
const srcMigrationsDir = path.join(Sonamu.apiRootPath, "src", "migrations"); // 이건 환경에 관계없이 항상 src에서 찾아야 해요.
|
|
31
54
|
|
|
@@ -41,7 +64,7 @@ export class Migrator {
|
|
|
41
64
|
name: f.replace(".ts", ""),
|
|
42
65
|
path: path.join(srcMigrationsDir, f),
|
|
43
66
|
}))
|
|
44
|
-
.
|
|
67
|
+
.toSorted((a, b) => (a.name < b.name ? 1 : -1)); // 이름 내림차순 정렬(최신순)
|
|
45
68
|
|
|
46
69
|
Naite.t("migrator:getMigrationCodes:results", codes);
|
|
47
70
|
return codes;
|
|
@@ -61,7 +84,7 @@ export class Migrator {
|
|
|
61
84
|
Naite.t("migrator:getStatus:codes", codes);
|
|
62
85
|
|
|
63
86
|
const connKeys = Object.keys(Sonamu.dbConfig).filter(
|
|
64
|
-
(key) => key.endsWith("_slave")
|
|
87
|
+
(key) => !key.endsWith("_slave"),
|
|
65
88
|
) as (keyof typeof Sonamu.dbConfig)[];
|
|
66
89
|
|
|
67
90
|
let migrationStatusError: string | undefined;
|
|
@@ -72,7 +95,7 @@ export class Migrator {
|
|
|
72
95
|
const tConn = createKnexInstance(knexOptions);
|
|
73
96
|
|
|
74
97
|
try {
|
|
75
|
-
const status = await (async () => {
|
|
98
|
+
const status: number | "error" = await (async () => {
|
|
76
99
|
try {
|
|
77
100
|
return await tConn.migrate.status();
|
|
78
101
|
} catch (err) {
|
|
@@ -94,7 +117,7 @@ export class Migrator {
|
|
|
94
117
|
return [];
|
|
95
118
|
}
|
|
96
119
|
})();
|
|
97
|
-
const currentVersion = await (async () => {
|
|
120
|
+
const currentVersion: string | "error" = await (async () => {
|
|
98
121
|
try {
|
|
99
122
|
return await tConn.migrate.currentVersion();
|
|
100
123
|
} catch (_err) {
|
|
@@ -113,7 +136,7 @@ export class Migrator {
|
|
|
113
136
|
connection.port
|
|
114
137
|
}/${connection.database}` as ConnString,
|
|
115
138
|
currentVersion,
|
|
116
|
-
status: status
|
|
139
|
+
status: status,
|
|
117
140
|
pending,
|
|
118
141
|
};
|
|
119
142
|
} finally {
|
|
@@ -175,7 +198,7 @@ export class Migrator {
|
|
|
175
198
|
targets
|
|
176
199
|
.map((target) => ({
|
|
177
200
|
connKey: target,
|
|
178
|
-
options: Sonamu.dbConfig[target
|
|
201
|
+
options: Sonamu.dbConfig[target],
|
|
179
202
|
}))
|
|
180
203
|
.filter((c) => c.options !== undefined),
|
|
181
204
|
({ options }) =>
|
|
@@ -197,27 +220,9 @@ export class Migrator {
|
|
|
197
220
|
const result = await (async () => {
|
|
198
221
|
switch (action) {
|
|
199
222
|
case "apply":
|
|
200
|
-
return
|
|
201
|
-
conns.map(async ({ connKey, knex }) => {
|
|
202
|
-
const [batchNo, applied] = await knex.migrate.latest();
|
|
203
|
-
return {
|
|
204
|
-
connKey,
|
|
205
|
-
batchNo,
|
|
206
|
-
applied, // 이번 latest 호출로 인해 "up"이 적용된 마이그레이션 이름(e.g. "20251124233557_create__companies.ts")들의 배열입니다. 참고: https://github.com/knex/knex/blob/01b177c485d696f1b72858dee728ba143c4fad76/lib/migrations/migrate/Migrator.js#L560
|
|
207
|
-
};
|
|
208
|
-
}),
|
|
209
|
-
);
|
|
223
|
+
return this.runMigrationsSequentially(conns, "apply");
|
|
210
224
|
case "rollback":
|
|
211
|
-
return
|
|
212
|
-
conns.map(async ({ connKey, knex }) => {
|
|
213
|
-
const [batchNo, applied] = await knex.migrate.rollback();
|
|
214
|
-
return {
|
|
215
|
-
connKey,
|
|
216
|
-
batchNo,
|
|
217
|
-
applied, // 이번 rollback 호출로 인해 "down"이 적용된(=롤백된) 마이그레이션 이름(e.g. "20251124233557_create__companies.ts")들의 배열입니다. 참고: https://github.com/knex/knex/blob/01b177c485d696f1b72858dee728ba143c4fad76/lib/migrations/migrate/Migrator.js#L611
|
|
218
|
-
};
|
|
219
|
-
}),
|
|
220
|
-
);
|
|
225
|
+
return this.runMigrationsSequentially(conns, "rollback");
|
|
221
226
|
}
|
|
222
227
|
})();
|
|
223
228
|
|
|
@@ -242,7 +247,7 @@ export class Migrator {
|
|
|
242
247
|
*/
|
|
243
248
|
validateDeletable(conns: MigrationStatus["conns"], codeNames: string[]) {
|
|
244
249
|
const appliedCodes = codeNames.filter((codeName) =>
|
|
245
|
-
conns.some((conn) => conn.pending.includes(codeName)
|
|
250
|
+
conns.some((conn) => !conn.pending.includes(codeName)),
|
|
246
251
|
);
|
|
247
252
|
|
|
248
253
|
return {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import assert from "assert";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { type Knex } from "knex";
|
|
3
4
|
import { group } from "radashi";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
type MigrationColumn,
|
|
8
|
+
type MigrationForeign,
|
|
9
|
+
type MigrationIndex,
|
|
10
|
+
type MigrationSet,
|
|
11
|
+
type RelationOn,
|
|
10
12
|
} from "../types/types";
|
|
11
13
|
|
|
12
14
|
/**
|
|
@@ -413,11 +415,9 @@ class PostgreSQLSchemaReaderClass {
|
|
|
413
415
|
}
|
|
414
416
|
|
|
415
417
|
if (type === "ivfflat") {
|
|
416
|
-
return
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
: {}),
|
|
420
|
-
};
|
|
418
|
+
return this.parseIntegerOption(withOptions.lists) !== undefined
|
|
419
|
+
? { lists: this.parseIntegerOption(withOptions.lists) }
|
|
420
|
+
: {};
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
return {};
|
|
@@ -3,10 +3,11 @@ import crypto from "crypto";
|
|
|
3
3
|
import fs from "fs/promises";
|
|
4
4
|
import os from "os";
|
|
5
5
|
import path from "path";
|
|
6
|
-
|
|
7
|
-
import
|
|
6
|
+
|
|
7
|
+
import { Sonamu } from "../api/sonamu";
|
|
8
|
+
import { type SonamuDBConfig } from "../database/db";
|
|
8
9
|
import { SD } from "../dict/sd";
|
|
9
|
-
import type
|
|
10
|
+
import { type MigrationResult } from "./migrator";
|
|
10
11
|
|
|
11
12
|
export type SlackConfirmResult = {
|
|
12
13
|
status: "approved" | "rejected" | "pending" | "not_configured" | "error";
|
|
@@ -42,7 +43,7 @@ export class SlackConfirm {
|
|
|
42
43
|
* 마이그레이션 목록의 해시를 생성합니다.
|
|
43
44
|
*/
|
|
44
45
|
getMigrationsHash(migrations: string[]): string {
|
|
45
|
-
const sorted = [...migrations].
|
|
46
|
+
const sorted = [...migrations].toSorted();
|
|
46
47
|
return crypto.createHash("md5").update(sorted.join(",")).digest("hex").slice(0, 12);
|
|
47
48
|
}
|
|
48
49
|
|
package/src/migration/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
1
|
+
import { type SonamuDBConfig } from "../database/db";
|
|
2
|
+
import { type GenMigrationCode } from "../types/types";
|
|
3
3
|
|
|
4
4
|
export type MigrationCode = {
|
|
5
5
|
name: string;
|
|
@@ -8,14 +8,16 @@
|
|
|
8
8
|
*
|
|
9
9
|
* fs mock 충돌을 피하기 위해 net 모듈만 사용합니다.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
/* oxlint-disable @typescript-eslint/no-explicit-any */ // Naite는 expect와 호응하도록 any를 허용함
|
|
12
12
|
|
|
13
13
|
import { createHash } from "crypto";
|
|
14
|
-
import { connect
|
|
14
|
+
import { connect } from "net";
|
|
15
|
+
import { type Socket } from "net";
|
|
15
16
|
import { homedir } from "os";
|
|
16
17
|
import { join } from "path";
|
|
18
|
+
|
|
17
19
|
import { findApiRootPath } from "../utils/utils";
|
|
18
|
-
import type
|
|
20
|
+
import { type NaiteMessagingTypes } from "./messaging-types";
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* sonamu.config.ts 경로를 받아서 프로젝트별 고유 해시를 생성합니다.
|
package/src/naite/naite.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/* oxlint-disable @typescript-eslint/no-explicit-any */ // Naite는 expect와 호응하도록 any를 허용함
|
|
2
2
|
|
|
3
3
|
import { getLogger } from "@logtape/logtape";
|
|
4
4
|
import { get } from "radashi";
|
|
5
|
+
|
|
5
6
|
import { Sonamu } from "../api/sonamu";
|
|
6
|
-
import type
|
|
7
|
+
import { type ComparisonOperator } from "../database/puri.types";
|
|
7
8
|
import { convertNaiteKeyToCategory } from "../logger/category";
|
|
8
9
|
import { isSerializable } from "../utils/object-utils";
|
|
9
10
|
|
|
@@ -142,6 +143,10 @@ function matchesPattern(key: string, pattern: string): boolean {
|
|
|
142
143
|
export class NaiteQuery {
|
|
143
144
|
constructor(private traces: NaiteTrace[]) {}
|
|
144
145
|
|
|
146
|
+
private isComparableValue(value: unknown): value is number | string {
|
|
147
|
+
return typeof value === "number" || typeof value === "string";
|
|
148
|
+
}
|
|
149
|
+
|
|
145
150
|
/**
|
|
146
151
|
* 파일명으로 필터링
|
|
147
152
|
* @param fileName 파일명 (예: "syncer.test.ts")
|
|
@@ -185,17 +190,17 @@ export class NaiteQuery {
|
|
|
185
190
|
*/
|
|
186
191
|
where(path: string, operator: ComparisonOperator | "includes", value: any): NaiteQuery {
|
|
187
192
|
const filtered = this.traces.filter((trace) => {
|
|
188
|
-
const actual = get(trace, path)
|
|
193
|
+
const actual = get(trace, path);
|
|
189
194
|
|
|
190
195
|
switch (operator) {
|
|
191
196
|
case ">":
|
|
192
|
-
return actual > value;
|
|
197
|
+
return this.isComparableValue(actual) && this.isComparableValue(value) && actual > value;
|
|
193
198
|
case "<":
|
|
194
|
-
return actual < value;
|
|
199
|
+
return this.isComparableValue(actual) && this.isComparableValue(value) && actual < value;
|
|
195
200
|
case ">=":
|
|
196
|
-
return actual >= value;
|
|
201
|
+
return this.isComparableValue(actual) && this.isComparableValue(value) && actual >= value;
|
|
197
202
|
case "<=":
|
|
198
|
-
return actual <= value;
|
|
203
|
+
return this.isComparableValue(actual) && this.isComparableValue(value) && actual <= value;
|
|
199
204
|
case "=":
|
|
200
205
|
return actual === value;
|
|
201
206
|
case "!=":
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* 최초 1회 생성되며, 이후에는 덮어쓰지 않습니다.
|
|
4
4
|
* 필요시 직접 수정할 수 있습니다.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
/* oxlint-disable react-hooks/exhaustive-deps */ // shared
|
|
7
|
+
/* oxlint-disable @typescript-eslint/no-explicit-any */ // shared
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
fetch
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* 최초 1회 생성되며, 이후에는 덮어쓰지 않습니다.
|
|
4
4
|
* 필요시 직접 수정할 수 있습니다.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
/* oxlint-disable react-hooks/exhaustive-deps */ // shared
|
|
7
|
+
/* oxlint-disable @typescript-eslint/no-explicit-any */ // shared
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
fetch
|
package/src/skills/AGENTS.md
CHANGED
|
@@ -23,6 +23,7 @@ When working in a user Sonamu project, always read skill files directly using th
|
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Examples:
|
|
26
|
+
|
|
26
27
|
- Migration → Read `.claude/skills/sonamu/migration.md`
|
|
27
28
|
- Entity creation → Read `.claude/skills/sonamu/entity-basic.md`
|
|
28
29
|
- Full workflow → Read `.claude/skills/sonamu/workflow.md`
|
|
@@ -61,21 +62,21 @@ Do not skip biome check even when tsc passes. Biome catches `noNonNullAssertion`
|
|
|
61
62
|
|
|
62
63
|
Read the listed skill file before attempting any workaround or fix in these situations:
|
|
63
64
|
|
|
64
|
-
| Situation
|
|
65
|
-
|
|
66
|
-
| TypeScript error in Model code (type inference, "excessively deep", etc.)
|
|
67
|
-
| Writing or modifying a `findMany()` / `executeSubsetQuery()` call
|
|
68
|
-
| Writing or modifying a `@upload` method
|
|
69
|
-
| Database query returning unexpected results
|
|
70
|
-
| Migration error or schema change
|
|
71
|
-
| Starting AC+Claim-based development or writing a Claim
|
|
72
|
-
| Applying Auth Guards or handling session/permission logic
|
|
73
|
-
| Implementing polymorphic relations with `entity_type` + `entity_id` pattern | `entity-relations.md`
|
|
74
|
-
| Writing Puri SELECT / WHERE / JOIN / FTS / pgvector queries
|
|
75
|
-
| Implementing `@upload` file upload or deciding parameter pattern
|
|
76
|
-
| Reading or writing files under `contract/rules/`
|
|
77
|
-
| Implementing `BaseAgentClass` or `@tools` decorator
|
|
78
|
-
| Implementing background jobs or cron scheduling
|
|
79
|
-
| Batch-saving relation data (upsert)
|
|
80
|
-
| Adding a new entity or enum and registering i18n keys
|
|
81
|
-
| Implementing pgvector embeddings or vector search
|
|
65
|
+
| Situation | Read before acting |
|
|
66
|
+
| --------------------------------------------------------------------------- | ------------------------------- |
|
|
67
|
+
| TypeScript error in Model code (type inference, "excessively deep", etc.) | `puri.md`, `model.md` |
|
|
68
|
+
| Writing or modifying a `findMany()` / `executeSubsetQuery()` call | `model.md` |
|
|
69
|
+
| Writing or modifying a `@upload` method | `api.md` |
|
|
70
|
+
| Database query returning unexpected results | `puri.md` |
|
|
71
|
+
| Migration error or schema change | `migration.md` |
|
|
72
|
+
| Starting AC+Claim-based development or writing a Claim | `cdd.md` |
|
|
73
|
+
| Applying Auth Guards or handling session/permission logic | `auth.md` |
|
|
74
|
+
| Implementing polymorphic relations with `entity_type` + `entity_id` pattern | `entity-relations.md` |
|
|
75
|
+
| Writing Puri SELECT / WHERE / JOIN / FTS / pgvector queries | `puri.md` |
|
|
76
|
+
| Implementing `@upload` file upload or deciding parameter pattern | `api.md`, `framework-change.md` |
|
|
77
|
+
| Reading or writing files under `contract/rules/` | `cdd.md` |
|
|
78
|
+
| Implementing `BaseAgentClass` or `@tools` decorator | `ai-agents.md` |
|
|
79
|
+
| Implementing background jobs or cron scheduling | `tasks.md` |
|
|
80
|
+
| Batch-saving relation data (upsert) | `upsert.md` |
|
|
81
|
+
| Adding a new entity or enum and registering i18n keys | `i18n.md` |
|
|
82
|
+
| Implementing pgvector embeddings or vector search | `vector.md` |
|
|
@@ -3,18 +3,18 @@ Read ~/.claude/skills/sonamu/SKILL.md and follow its instructions.
|
|
|
3
3
|
Then greet the user with the following format (exactly):
|
|
4
4
|
|
|
5
5
|
---
|
|
6
|
+
|
|
6
7
|
Sonamu 스킬 가이드가 로드됐습니다. 어떤 작업을 하실 건가요?
|
|
7
8
|
|
|
8
|
-
**Workflow**
|
|
9
|
+
**Workflow** · CDD · project-init · config
|
|
9
10
|
**Entity/DB** · entity-basic · entity-relations · subset · migration · database
|
|
10
|
-
**API**
|
|
11
|
-
**Testing**
|
|
12
|
-
**Auth**
|
|
13
|
-
**Frontend**
|
|
14
|
-
**Advanced**
|
|
15
|
-
**Meta**
|
|
11
|
+
**API** · model · api · puri · upsert
|
|
12
|
+
**Testing** · testing · devrunner · naite · cone · fixture-cli
|
|
13
|
+
**Auth** · auth · auth-migration · auth-plugins
|
|
14
|
+
**Frontend** · frontend · scaffolding · i18n
|
|
15
|
+
**Advanced** · vector · ai-agents · tasks
|
|
16
|
+
**Meta** · skill-contribution · framework-change
|
|
16
17
|
|
|
17
|
-
어떤 스킬이나 작업을 도와드릴까요? (하고 싶은 작업을 자유롭게 설명해도 됩니다.)
|
|
18
|
-
---
|
|
18
|
+
## 어떤 스킬이나 작업을 도와드릴까요? (하고 싶은 작업을 자유롭게 설명해도 됩니다.)
|
|
19
19
|
|
|
20
20
|
If the user provides $ARGUMENTS, skip the greeting and directly help with: $ARGUMENTS
|