sonamu 0.10.11 → 0.10.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/agents/agent.d.ts +1 -1
- package/dist/ai/agents/agent.d.ts.map +1 -1
- package/dist/ai/agents/agent.js +5 -6
- package/dist/ai/agents/types.d.ts +1 -1
- package/dist/ai/agents/types.d.ts.map +1 -1
- package/dist/ai/providers/rtzr/api.js +18 -18
- package/dist/ai/providers/rtzr/error.d.ts.map +1 -1
- package/dist/ai/providers/rtzr/error.js +17 -15
- package/dist/ai/providers/rtzr/model.d.ts.map +1 -1
- package/dist/ai/providers/rtzr/model.js +3 -2
- package/dist/ai/providers/rtzr/options.d.ts.map +1 -1
- package/dist/ai/providers/rtzr/options.js +16 -16
- package/dist/ai/providers/rtzr/provider.d.ts.map +1 -1
- package/dist/ai/providers/rtzr/provider.js +9 -9
- package/dist/ai/providers/rtzr/utils.d.ts.map +1 -1
- package/dist/ai/providers/rtzr/utils.js +1 -1
- package/dist/api/caster.d.ts.map +1 -1
- package/dist/api/caster.js +17 -17
- package/dist/api/code-converters.d.ts +4 -2
- package/dist/api/code-converters.d.ts.map +1 -1
- package/dist/api/code-converters.js +100 -19
- package/dist/api/config.d.ts +16 -1
- package/dist/api/config.d.ts.map +1 -1
- package/dist/api/config.js +28 -21
- package/dist/api/context.d.ts +2 -2
- package/dist/api/context.d.ts.map +1 -1
- package/dist/api/context.js +1 -1
- package/dist/api/decorators.d.ts.map +1 -1
- package/dist/api/decorators.js +18 -11
- package/dist/api/http-validator.d.ts +36 -0
- package/dist/api/http-validator.d.ts.map +1 -0
- package/dist/api/http-validator.js +72 -0
- package/dist/api/index.js +6 -4
- package/dist/api/sonamu.d.ts +59 -20
- package/dist/api/sonamu.d.ts.map +1 -1
- package/dist/api/sonamu.js +250 -106
- package/dist/api/websocket-helpers.d.ts +7 -5
- package/dist/api/websocket-helpers.d.ts.map +1 -1
- package/dist/api/websocket-helpers.js +6 -6
- package/dist/auth/audit-log/builders.d.ts.map +1 -1
- package/dist/auth/audit-log/builders.js +1 -1
- package/dist/auth/audit-log/client-ip.d.ts +1 -1
- package/dist/auth/audit-log/client-ip.d.ts.map +1 -1
- package/dist/auth/audit-log/client-ip.js +4 -2
- package/dist/auth/audit-log/events.d.ts +5 -1
- package/dist/auth/audit-log/events.d.ts.map +1 -1
- package/dist/auth/audit-log/events.js +1 -1
- package/dist/auth/audit-log/plugin.d.ts +0 -8
- package/dist/auth/audit-log/plugin.d.ts.map +1 -1
- package/dist/auth/audit-log/plugin.js +48 -52
- package/dist/auth/audit-log-ingestor.d.ts.map +1 -1
- package/dist/auth/audit-log-ingestor.js +16 -12
- package/dist/auth/auth-generator.d.ts.map +1 -1
- package/dist/auth/auth-generator.js +1 -1
- package/dist/auth/better-auth-request.d.ts.map +1 -1
- package/dist/auth/better-auth-request.js +6 -5
- package/dist/auth/knex-adapter.js +1 -1
- package/dist/auth/plugins/entity-definitions/index.d.ts +13 -1
- package/dist/auth/plugins/entity-definitions/index.d.ts.map +1 -1
- package/dist/auth/plugins/entity-definitions/index.js +1 -1
- package/dist/auth/plugins/wrappers/admin.d.ts +1 -1
- package/dist/bin/build-config.d.ts +25 -0
- package/dist/bin/build-config.d.ts.map +1 -1
- package/dist/bin/build-config.js +105 -2
- package/dist/bin/cli.js +133 -29
- package/dist/bin/compiler-policy.d.ts +3 -0
- package/dist/bin/compiler-policy.d.ts.map +1 -0
- package/dist/bin/compiler-policy.js +24 -0
- package/dist/bin/fixture.d.ts.map +1 -1
- package/dist/bin/fixture.js +5 -3
- package/dist/bin/test-command.d.ts +22 -1
- package/dist/bin/test-command.d.ts.map +1 -1
- package/dist/bin/test-command.js +18 -10
- package/dist/bin/ts-loader-registration.d.ts +7 -1
- package/dist/bin/ts-loader-registration.d.ts.map +1 -1
- package/dist/bin/ts-loader-registration.js +13 -4
- package/dist/cache/decorator.d.ts.map +1 -1
- package/dist/cache/decorator.js +11 -4
- package/dist/compress/compress.d.ts.map +1 -1
- package/dist/compress/compress.js +1 -1
- package/dist/cone/cone-generator.d.ts +14 -1
- package/dist/cone/cone-generator.d.ts.map +1 -1
- package/dist/cone/cone-generator.js +13 -9
- package/dist/database/_batch_update.js +1 -1
- package/dist/database/base-model.d.ts +22 -10
- package/dist/database/base-model.d.ts.map +1 -1
- package/dist/database/base-model.js +26 -16
- package/dist/database/base-model.types.d.ts +15 -3
- package/dist/database/base-model.types.d.ts.map +1 -1
- package/dist/database/db.d.ts +12 -2
- package/dist/database/db.d.ts.map +1 -1
- package/dist/database/db.js +10 -7
- package/dist/database/knex.d.ts.map +1 -1
- package/dist/database/knex.js +17 -14
- package/dist/database/puri.d.ts +11 -9
- package/dist/database/puri.d.ts.map +1 -1
- package/dist/database/puri.js +93 -79
- package/dist/database/puri.types.d.ts +21 -21
- package/dist/database/puri.types.d.ts.map +1 -1
- package/dist/database/puri.types.js +1 -1
- package/dist/database/upsert-builder.d.ts +12 -10
- package/dist/database/upsert-builder.d.ts.map +1 -1
- package/dist/database/upsert-builder.js +20 -12
- package/dist/dict/sd.d.ts.map +1 -1
- package/dist/dict/sd.js +1 -1
- package/dist/dict/sonamu-dictionary.d.ts.map +1 -1
- package/dist/dict/sonamu-dictionary.js +1 -1
- package/dist/dict/utils.d.ts.map +1 -1
- package/dist/dict/utils.js +7 -2
- package/dist/entity/entity-manager.d.ts +13 -4
- package/dist/entity/entity-manager.d.ts.map +1 -1
- package/dist/entity/entity-manager.js +19 -11
- package/dist/entity/entity-template-cone.d.ts +73 -5
- package/dist/entity/entity-template-cone.d.ts.map +1 -1
- package/dist/entity/entity-template-cone.js +4 -2
- package/dist/entity/entity.d.ts +6 -2
- package/dist/entity/entity.d.ts.map +1 -1
- package/dist/entity/entity.js +30 -28
- package/dist/env.d.ts +3 -1
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +1 -1
- package/dist/exceptions/error-handler.d.ts.map +1 -1
- package/dist/exceptions/error-handler.js +7 -2
- package/dist/exceptions/so-exceptions.d.ts +24 -20
- package/dist/exceptions/so-exceptions.d.ts.map +1 -1
- package/dist/exceptions/so-exceptions.js +4 -2
- package/dist/filter/utils.d.ts +7 -2
- package/dist/filter/utils.d.ts.map +1 -1
- package/dist/filter/utils.js +8 -6
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -7
- package/dist/logger/configure.d.ts.map +1 -1
- package/dist/logger/configure.js +10 -10
- package/dist/migration/code-generation.d.ts.map +1 -1
- package/dist/migration/code-generation.js +50 -46
- package/dist/migration/index-where-predicate.d.ts.map +1 -1
- package/dist/migration/index-where-predicate.js +22 -8
- package/dist/migration/migration-set.d.ts.map +1 -1
- package/dist/migration/migration-set.js +1 -1
- package/dist/migration/migrator.d.ts +61 -36
- package/dist/migration/migrator.d.ts.map +1 -1
- package/dist/migration/migrator.js +276 -167
- package/dist/migration/postgresql-schema-reader.d.ts.map +1 -1
- package/dist/migration/postgresql-schema-reader.js +51 -36
- package/dist/migration/slack-confirm.d.ts.map +1 -1
- package/dist/migration/slack-confirm.js +1 -1
- package/dist/migration/types.d.ts +54 -0
- package/dist/migration/types.d.ts.map +1 -1
- package/dist/naite/naite-reporter.js +2 -2
- package/dist/naite/naite.d.ts +74 -15
- package/dist/naite/naite.d.ts.map +1 -1
- package/dist/naite/naite.js +5 -19
- package/dist/runtime-type.d.ts +6 -0
- package/dist/runtime-type.d.ts.map +1 -0
- package/dist/runtime-type.js +26 -0
- package/dist/ssr/hmr-opt-out.d.ts +26 -0
- package/dist/ssr/hmr-opt-out.d.ts.map +1 -0
- package/dist/ssr/hmr-opt-out.js +59 -0
- package/dist/ssr/renderer.d.ts.map +1 -1
- package/dist/ssr/renderer.js +4 -1
- package/dist/storage/base-file.js +14 -14
- 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 +12 -12
- package/dist/storage/s3-driver.d.ts.map +1 -1
- package/dist/storage/s3-driver.js +1 -1
- package/dist/storage/uploaded-file.d.ts +2 -2
- package/dist/storage/uploaded-file.d.ts.map +1 -1
- package/dist/storage/uploaded-file.js +8 -8
- package/dist/stream/sse.js +11 -11
- package/dist/stream/ws-core.d.ts +1 -1
- package/dist/stream/ws-core.d.ts.map +1 -1
- package/dist/stream/ws-delivery.d.ts +1 -1
- package/dist/stream/ws-delivery.d.ts.map +1 -1
- package/dist/stream/ws-delivery.js +6 -4
- package/dist/stream/ws-local-connection-store.d.ts.map +1 -1
- package/dist/stream/ws-local-connection-store.js +4 -2
- package/dist/stream/ws-presence-store.js +1 -1
- package/dist/stream/ws-registry.d.ts +4 -4
- package/dist/stream/ws-registry.d.ts.map +1 -1
- package/dist/stream/ws-registry.js +4 -2
- package/dist/stream/ws-telemetry.d.ts +16 -12
- package/dist/stream/ws-telemetry.d.ts.map +1 -1
- package/dist/stream/ws-telemetry.js +22 -18
- package/dist/stream/ws.d.ts +18 -12
- package/dist/stream/ws.d.ts.map +1 -1
- package/dist/stream/ws.js +26 -22
- package/dist/syncer/api-parser.js +1 -1
- package/dist/syncer/checksum.d.ts.map +1 -1
- package/dist/syncer/checksum.js +7 -8
- package/dist/syncer/code-generator.d.ts.map +1 -1
- package/dist/syncer/code-generator.js +13 -14
- package/dist/syncer/entity-operations.d.ts.map +1 -1
- package/dist/syncer/entity-operations.js +5 -6
- package/dist/syncer/file-copy.d.ts +5 -0
- package/dist/syncer/file-copy.d.ts.map +1 -0
- package/dist/syncer/file-copy.js +36 -0
- package/dist/syncer/file-patterns.d.ts +1 -0
- package/dist/syncer/file-patterns.d.ts.map +1 -1
- package/dist/syncer/file-patterns.js +5 -2
- package/dist/syncer/file-tracking.d.ts.map +1 -1
- package/dist/syncer/file-tracking.js +5 -4
- package/dist/syncer/filesystem-dependencies.d.ts +15 -0
- package/dist/syncer/filesystem-dependencies.d.ts.map +1 -0
- package/dist/syncer/filesystem-dependencies.js +53 -0
- package/dist/syncer/module-loader.d.ts +1 -1
- package/dist/syncer/module-loader.d.ts.map +1 -1
- package/dist/syncer/module-loader.js +6 -4
- package/dist/syncer/syncer-actions.d.ts +4 -0
- package/dist/syncer/syncer-actions.d.ts.map +1 -1
- package/dist/syncer/syncer-actions.js +34 -17
- package/dist/syncer/syncer.d.ts +17 -6
- package/dist/syncer/syncer.d.ts.map +1 -1
- package/dist/syncer/syncer.js +71 -29
- package/dist/syncer/watcher.d.ts.map +1 -1
- package/dist/syncer/watcher.js +3 -3
- package/dist/tasks/decorator.d.ts +6 -6
- package/dist/tasks/decorator.d.ts.map +1 -1
- package/dist/tasks/decorator.js +4 -4
- package/dist/tasks/step-wrapper.d.ts +6 -4
- package/dist/tasks/step-wrapper.d.ts.map +1 -1
- package/dist/tasks/step-wrapper.js +5 -5
- package/dist/tasks/workflow-manager.d.ts.map +1 -1
- package/dist/tasks/workflow-manager.js +13 -7
- 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 +2 -2
- package/dist/template/helpers.d.ts +8 -6
- package/dist/template/helpers.d.ts.map +1 -1
- package/dist/template/helpers.js +1 -1
- package/dist/template/implementations/generated.template.d.ts.map +1 -1
- package/dist/template/implementations/generated.template.js +4 -4
- package/dist/template/implementations/generated_http.template.d.ts +7 -4
- package/dist/template/implementations/generated_http.template.d.ts.map +1 -1
- package/dist/template/implementations/generated_http.template.js +21 -21
- package/dist/template/implementations/generated_sso.template.d.ts.map +1 -1
- package/dist/template/implementations/generated_sso.template.js +6 -3
- package/dist/template/implementations/http_validators.template.d.ts +18 -0
- package/dist/template/implementations/http_validators.template.d.ts.map +1 -0
- package/dist/template/implementations/http_validators.template.js +127 -0
- package/dist/template/implementations/model.template.d.ts.map +1 -1
- package/dist/template/implementations/model.template.js +1 -1
- package/dist/template/implementations/queries.template.js +1 -1
- package/dist/template/implementations/sd.template.d.ts.map +1 -1
- package/dist/template/implementations/sd.template.js +79 -39
- package/dist/template/implementations/services.template.d.ts.map +1 -1
- package/dist/template/implementations/services.template.js +6 -4
- package/dist/template/implementations/view_form.template.d.ts +6 -1
- package/dist/template/implementations/view_form.template.d.ts.map +1 -1
- package/dist/template/implementations/view_form.template.js +23 -15
- package/dist/template/implementations/view_list.template.d.ts.map +1 -1
- package/dist/template/implementations/view_list.template.js +11 -6
- package/dist/template/template-manager.d.ts.map +1 -1
- package/dist/template/template-manager.js +9 -7
- package/dist/template/template-types.d.ts +12 -5
- package/dist/template/template-types.d.ts.map +1 -1
- package/dist/template/template-types.js +1 -1
- package/dist/template/template.d.ts +2 -2
- package/dist/template/template.d.ts.map +1 -1
- package/dist/template/template.js +6 -4
- package/dist/template/zod-converter.d.ts +0 -19
- package/dist/template/zod-converter.d.ts.map +1 -1
- package/dist/template/zod-converter.js +100 -84
- package/dist/testing/_relation-graph.d.ts.map +1 -1
- package/dist/testing/_relation-graph.js +2 -1
- package/dist/testing/bootstrap.d.ts.map +1 -1
- package/dist/testing/bootstrap.js +9 -6
- package/dist/testing/data-explorer.d.ts +32 -7
- package/dist/testing/data-explorer.d.ts.map +1 -1
- package/dist/testing/data-explorer.js +77 -31
- package/dist/testing/dev-test-routes.d.ts +8 -1
- package/dist/testing/dev-test-routes.d.ts.map +1 -1
- package/dist/testing/dev-test-routes.js +125 -108
- package/dist/testing/dev-vitest-manager.d.ts +54 -8
- package/dist/testing/dev-vitest-manager.d.ts.map +1 -1
- package/dist/testing/dev-vitest-manager.js +24 -9
- package/dist/testing/faker-mappings.d.ts +412 -1
- package/dist/testing/faker-mappings.d.ts.map +1 -1
- package/dist/testing/faker-mappings.js +1 -1
- package/dist/testing/filesystem.d.ts +2 -0
- package/dist/testing/filesystem.d.ts.map +1 -0
- package/dist/testing/filesystem.js +7 -0
- package/dist/testing/fixture-generator.d.ts +25 -8
- package/dist/testing/fixture-generator.d.ts.map +1 -1
- package/dist/testing/fixture-generator.js +132 -73
- package/dist/testing/fixture-loader.d.ts +3 -1
- package/dist/testing/fixture-loader.d.ts.map +1 -1
- package/dist/testing/fixture-loader.js +1 -20
- package/dist/testing/fixture-manager.d.ts +8 -7
- package/dist/testing/fixture-manager.d.ts.map +1 -1
- package/dist/testing/fixture-manager.js +91 -59
- package/dist/testing/global-setup.d.ts.map +1 -1
- package/dist/testing/global-setup.js +5 -2
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +6 -3
- package/dist/types/types.d.ts +101 -99
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/types.js +234 -225
- package/dist/ui/ai-api.d.ts.map +1 -1
- package/dist/ui/ai-api.js +1 -1
- package/dist/ui/ai-client.d.ts.map +1 -1
- package/dist/ui/ai-client.js +28 -18
- package/dist/ui/api.d.ts.map +1 -1
- package/dist/ui/api.js +146 -210
- package/dist/ui/async-route.d.ts +3 -0
- package/dist/ui/async-route.d.ts.map +1 -0
- package/dist/ui/async-route.js +12 -0
- package/dist/ui/cdd-service.d.ts +9 -7
- package/dist/ui/cdd-service.d.ts.map +1 -1
- package/dist/ui/cdd-service.js +7 -5
- package/dist/ui/migrations-api.d.ts +3 -0
- package/dist/ui/migrations-api.d.ts.map +1 -0
- package/dist/ui/migrations-api.js +215 -0
- package/dist/ui-web/assets/index-D3QNH-Dv.css +1 -0
- package/dist/ui-web/assets/index-DV1AAq6W.js +178 -0
- package/dist/ui-web/index.html +2 -2
- package/dist/utils/formatter.d.ts.map +1 -1
- package/dist/utils/formatter.js +7 -5
- package/dist/utils/fs-utils.d.ts +3 -3
- package/dist/utils/fs-utils.d.ts.map +1 -1
- package/dist/utils/fs-utils.js +6 -6
- package/dist/utils/model.d.ts +3 -5
- package/dist/utils/model.d.ts.map +1 -1
- package/dist/utils/model.js +1 -1
- package/dist/utils/object-utils.d.ts +1 -1
- package/dist/utils/object-utils.d.ts.map +1 -1
- package/dist/utils/object-utils.js +17 -16
- package/dist/utils/process-utils.d.ts.map +1 -1
- package/dist/utils/process-utils.js +4 -2
- package/dist/utils/runtime-value.d.ts +13 -0
- package/dist/utils/runtime-value.d.ts.map +1 -0
- package/dist/utils/runtime-value.js +40 -0
- package/dist/utils/sql-parser.d.ts +8 -1
- package/dist/utils/sql-parser.d.ts.map +1 -1
- package/dist/utils/sql-parser.js +6 -3
- package/dist/utils/type-utils.d.ts.map +1 -1
- package/dist/utils/type-utils.js +10 -8
- package/dist/utils/utils.d.ts +2 -2
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +11 -8
- package/dist/utils/zod-error.d.ts.map +1 -1
- package/dist/utils/zod-error.js +7 -4
- package/dist/vector/chunking.d.ts.map +1 -1
- package/dist/vector/chunking.js +1 -1
- package/dist/vector/embedding.d.ts.map +1 -1
- package/dist/vector/embedding.js +1 -1
- package/dist/vector/types.d.ts +3 -2
- package/dist/vector/types.d.ts.map +1 -1
- package/package.json +11 -7
- package/src/ai/agents/agent.ts +5 -5
- package/src/ai/agents/types.ts +1 -1
- package/src/ai/providers/rtzr/__tests__/model.test.ts +2 -2
- package/src/ai/providers/rtzr/error.ts +5 -3
- package/src/ai/providers/rtzr/model.ts +3 -2
- package/src/ai/providers/rtzr/options.ts +10 -5
- package/src/ai/providers/rtzr/provider.ts +10 -10
- package/src/ai/providers/rtzr/utils.ts +3 -1
- package/src/api/__tests__/config.test.ts +11 -21
- package/src/api/__tests__/sonamu.http-validator.test.ts +512 -0
- package/src/api/__tests__/sonamu.websocket.test.ts +51 -41
- package/src/api/__tests__/zod-compiler-policy.test.ts +95 -0
- package/src/api/caster.ts +6 -8
- package/src/api/code-converters.ts +136 -36
- package/src/api/config.ts +62 -4
- package/src/api/context.ts +3 -3
- package/src/api/decorators.ts +28 -17
- package/src/api/http-validator.ts +149 -0
- package/src/api/sonamu.ts +459 -152
- package/src/api/websocket-helpers.ts +24 -17
- package/src/auth/audit-log/builders.ts +3 -2
- package/src/auth/audit-log/client-ip.ts +4 -2
- package/src/auth/audit-log/events.ts +15 -1
- package/src/auth/audit-log/plugin.ts +129 -200
- package/src/auth/audit-log-ingestor.ts +19 -15
- package/src/auth/auth-generator.ts +10 -5
- package/src/auth/better-auth-request.ts +4 -3
- package/src/auth/knex-adapter.ts +8 -2
- package/src/auth/plugins/entity-definitions/index.ts +6 -5
- package/src/bin/__tests__/http-validator-benchmark.test.ts +94 -0
- package/src/bin/__tests__/test-command.test.ts +9 -15
- package/src/bin/__tests__/ts-loader-register.test.ts +15 -17
- package/src/bin/__tests__/zod-compiler-build.test.ts +307 -0
- package/src/bin/build-config.ts +167 -0
- package/src/bin/cli.ts +155 -38
- package/src/bin/compiler-policy.ts +35 -0
- package/src/bin/fixture.ts +14 -3
- package/src/bin/test-command.ts +74 -29
- package/src/bin/ts-loader-registration.ts +22 -4
- package/src/cache/decorator.ts +10 -3
- package/src/compress/compress.ts +17 -4
- package/src/cone/cone-generator.ts +34 -6
- package/src/database/__tests__/db.test.ts +1 -0
- package/src/database/__tests__/puri.test.ts +16 -15
- package/src/database/__tests__/transaction-scope.test.ts +5 -0
- package/src/database/_batch_update.ts +1 -0
- package/src/database/base-model.ts +81 -50
- package/src/database/base-model.types.ts +6 -6
- package/src/database/db.ts +29 -19
- package/src/database/knex.ts +30 -17
- package/src/database/puri-subset.test-d.ts +17 -0
- package/src/database/puri.ts +181 -143
- package/src/database/puri.types.test-d.ts +31 -1
- package/src/database/puri.types.ts +23 -21
- package/src/database/upsert-builder.ts +75 -53
- package/src/dict/sd.ts +15 -5
- package/src/dict/sonamu-dictionary.ts +6 -6
- package/src/dict/utils.ts +9 -1
- package/src/entity/entity-manager.ts +26 -9
- package/src/entity/entity-template-cone.ts +5 -10
- package/src/entity/entity.ts +50 -34
- package/src/env.ts +7 -3
- package/src/exceptions/error-handler.ts +17 -2
- package/src/exceptions/so-exceptions.ts +26 -20
- package/src/filter/utils.ts +21 -11
- package/src/index.ts +3 -0
- package/src/logger/configure.ts +26 -18
- package/src/migration/__tests__/migrator.test.ts +50 -57
- package/src/migration/code-generation.ts +132 -104
- package/src/migration/index-where-predicate.ts +51 -24
- package/src/migration/migration-set.ts +11 -5
- package/src/migration/migrator.ts +392 -244
- package/src/migration/postgresql-schema-reader.ts +52 -47
- package/src/migration/slack-confirm.ts +17 -15
- package/src/migration/types.ts +57 -0
- package/src/naite/naite-reporter.ts +1 -1
- package/src/naite/naite.ts +97 -24
- package/src/runtime-type.ts +34 -0
- package/src/ssr/hmr-opt-out.ts +78 -0
- package/src/ssr/renderer.ts +6 -0
- package/src/storage/base-file.ts +13 -13
- package/src/storage/buffered-file.ts +11 -11
- package/src/storage/s3-driver.ts +4 -1
- package/src/storage/uploaded-file.ts +8 -8
- package/src/stream/__tests__/ws-contracts.test.ts +4 -2
- package/src/stream/__tests__/ws-telemetry.test.ts +1 -1
- package/src/stream/__tests__/ws.test.ts +30 -6
- package/src/stream/sse.ts +12 -11
- package/src/stream/ws-core.ts +1 -1
- package/src/stream/ws-delivery.ts +16 -7
- package/src/stream/ws-local-connection-store.ts +2 -3
- package/src/stream/ws-presence-store.ts +6 -1
- package/src/stream/ws-registry.ts +16 -7
- package/src/stream/ws-telemetry.ts +66 -43
- package/src/stream/ws.ts +73 -39
- package/src/syncer/__tests__/api-parser.websocket-type-ref.test.ts +3 -2
- package/src/syncer/__tests__/http-validator-registry.test.ts +137 -0
- package/src/syncer/api-parser.ts +67 -27
- package/src/syncer/checksum.ts +17 -11
- package/src/syncer/code-generator.ts +25 -17
- package/src/syncer/entity-operations.ts +3 -5
- package/src/syncer/file-copy.ts +46 -0
- package/src/syncer/file-patterns.ts +11 -8
- package/src/syncer/file-tracking.ts +3 -4
- package/src/syncer/filesystem-dependencies.ts +73 -0
- package/src/syncer/module-loader.ts +8 -4
- package/src/syncer/syncer-actions.ts +56 -18
- package/src/syncer/syncer.ts +116 -43
- package/src/syncer/watcher.ts +8 -4
- package/src/tasks/decorator.ts +20 -12
- package/src/tasks/step-wrapper.ts +19 -9
- package/src/tasks/workflow-manager.ts +15 -9
- package/src/template/__tests__/http_validators.template.test.ts +160 -0
- package/src/template/__tests__/services.template.mutation.test.ts +24 -23
- package/src/template/__tests__/services.template.websocket.test.ts +21 -25
- package/src/template/entity-converter.ts +5 -2
- package/src/template/helpers.ts +8 -9
- package/src/template/implementations/generated.template.ts +5 -4
- package/src/template/implementations/generated_http.template.ts +61 -15
- package/src/template/implementations/generated_sso.template.ts +15 -4
- package/src/template/implementations/http_validators.template.ts +175 -0
- package/src/template/implementations/model.template.ts +3 -1
- package/src/template/implementations/sd.template.ts +81 -41
- package/src/template/implementations/services.template.ts +2 -2
- package/src/template/implementations/view_form.template.ts +56 -39
- package/src/template/implementations/view_list.template.ts +31 -23
- package/src/template/template-manager.ts +15 -13
- package/src/template/template-types.ts +13 -5
- package/src/template/template.ts +4 -3
- package/src/template/zod-converter.ts +206 -91
- package/src/testing/__tests__/dev-test-routes.test.ts +85 -25
- package/src/testing/__tests__/dev-vitest-manager.test.ts +15 -15
- package/src/testing/_relation-graph.ts +4 -1
- package/src/testing/bootstrap.ts +12 -5
- package/src/testing/data-explorer.ts +102 -53
- package/src/testing/dev-test-routes.ts +87 -50
- package/src/testing/dev-vitest-manager.ts +88 -32
- package/src/testing/faker-mappings.ts +2 -2
- package/src/testing/filesystem.ts +1 -0
- package/src/testing/fixture-generator.ts +191 -131
- package/src/testing/fixture-loader.ts +5 -1
- package/src/testing/fixture-manager.ts +129 -90
- package/src/testing/global-setup.ts +7 -3
- package/src/testing/index.ts +5 -0
- package/src/types/__tests__/entity-json-schema-search-text.test.ts +9 -3
- package/src/types/types.ts +184 -158
- package/src/ui/ai-api.ts +9 -7
- package/src/ui/ai-client.ts +61 -56
- package/src/ui/api.ts +726 -770
- package/src/ui/async-route.ts +4 -0
- package/src/ui/cdd-service.ts +35 -12
- package/src/ui/migrations-api.ts +381 -0
- package/src/utils/formatter.ts +7 -3
- package/src/utils/fs-utils.ts +5 -5
- package/src/utils/model.ts +4 -5
- package/src/utils/object-utils.ts +32 -22
- package/src/utils/process-utils.ts +4 -1
- package/src/utils/runtime-value.ts +43 -0
- package/src/utils/sql-parser.ts +13 -6
- package/src/utils/type-utils.ts +9 -7
- package/src/utils/utils.ts +19 -21
- package/src/utils/zod-error.ts +4 -2
- package/src/vector/chunking.ts +6 -1
- package/src/vector/embedding.ts +2 -1
- package/src/vector/types.ts +4 -2
- package/tsdown.api.config.ts +5 -2
- package/dist/ui-web/assets/index-CJf8uJYf.js +0 -176
- package/dist/ui-web/assets/index-GMMIVGja.css +0 -1
|
@@ -11,6 +11,18 @@ import {
|
|
|
11
11
|
} from "../helpers";
|
|
12
12
|
import { Template } from "../template";
|
|
13
13
|
|
|
14
|
+
type FormDefaultValue =
|
|
15
|
+
| null
|
|
16
|
+
| undefined
|
|
17
|
+
| boolean
|
|
18
|
+
| number
|
|
19
|
+
| string
|
|
20
|
+
| never[]
|
|
21
|
+
| Record<string, never>;
|
|
22
|
+
interface FormDefaults {
|
|
23
|
+
[columnName: string]: FormDefaultValue;
|
|
24
|
+
}
|
|
25
|
+
|
|
14
26
|
export class Template__view_form extends Template {
|
|
15
27
|
constructor() {
|
|
16
28
|
super("view_form");
|
|
@@ -149,41 +161,38 @@ export class Template__view_form extends Template {
|
|
|
149
161
|
}
|
|
150
162
|
}
|
|
151
163
|
|
|
152
|
-
resolveDefaultValue(columns: RenderingNode[]):
|
|
153
|
-
return columns.reduce(
|
|
154
|
-
(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
164
|
+
resolveDefaultValue(columns: RenderingNode[]): FormDefaults {
|
|
165
|
+
return columns.reduce<FormDefaults>((result, col) => {
|
|
166
|
+
if (col.optional) {
|
|
167
|
+
return result;
|
|
168
|
+
}
|
|
158
169
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
} else if (col.zodType instanceof z.ZodArray) {
|
|
177
|
-
value = [];
|
|
178
|
-
} else if (col.zodType instanceof z.ZodObject) {
|
|
179
|
-
value = {};
|
|
170
|
+
let value: FormDefaultValue;
|
|
171
|
+
if (col.nullable === true) {
|
|
172
|
+
value = null;
|
|
173
|
+
} else if (col.zodType instanceof z.ZodNumber) {
|
|
174
|
+
value = 0;
|
|
175
|
+
} else if (col.zodType instanceof z.ZodEnum) {
|
|
176
|
+
value = Object.keys(col.zodType.enum)[0];
|
|
177
|
+
} else if (col.zodType instanceof z.ZodBoolean) {
|
|
178
|
+
value = false;
|
|
179
|
+
} else if (col.zodType instanceof z.core.$ZodString) {
|
|
180
|
+
// NOTE: z.ZodString으로 비교하면 z.url(), z.email() 등의 타입에서 문제가 생기므로 z.core.$ZodString으로 비교함
|
|
181
|
+
// FIXME: email이나 url 타입 등에 대한 처리가 필요함
|
|
182
|
+
if (col.renderType === "string-datetime") {
|
|
183
|
+
value = "now()";
|
|
184
|
+
} else {
|
|
185
|
+
value = "";
|
|
180
186
|
}
|
|
187
|
+
} else if (col.zodType instanceof z.ZodArray) {
|
|
188
|
+
value = [];
|
|
189
|
+
} else if (col.zodType instanceof z.ZodObject) {
|
|
190
|
+
value = {};
|
|
191
|
+
}
|
|
181
192
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
{} as { [key: string]: unknown },
|
|
186
|
-
);
|
|
193
|
+
result[col.name] = value;
|
|
194
|
+
return result;
|
|
195
|
+
}, {});
|
|
187
196
|
}
|
|
188
197
|
|
|
189
198
|
async render({ entityId }: TemplateOptions["view_form"]) {
|
|
@@ -228,12 +237,16 @@ export class Template__view_form extends Template {
|
|
|
228
237
|
try {
|
|
229
238
|
const { id } = getEnumInfoFromColName(entityId, col.name);
|
|
230
239
|
enumImports.add(id);
|
|
231
|
-
} catch {
|
|
240
|
+
} catch {
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
232
243
|
} else if (col.renderType === "number-fk_id" || col.renderType === "string-fk_id") {
|
|
233
244
|
try {
|
|
234
245
|
const relProp = getRelationPropFromColName(entityId, col.name.replace("_id", ""));
|
|
235
246
|
fkConfigImports.add(relProp.with);
|
|
236
|
-
} catch {
|
|
247
|
+
} catch {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
237
250
|
} else if (
|
|
238
251
|
col.renderType === "string-plain" &&
|
|
239
252
|
col.name.endsWith("_id") &&
|
|
@@ -243,14 +256,18 @@ export class Template__view_form extends Template {
|
|
|
243
256
|
try {
|
|
244
257
|
const relProp = getRelationPropFromColName(entityId, col.name.replace("_id", ""));
|
|
245
258
|
fkConfigImports.add(relProp.with);
|
|
246
|
-
} catch {
|
|
259
|
+
} catch {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
247
262
|
} else if (col.renderType === "array" && col.name.endsWith("_ids")) {
|
|
248
263
|
// ManyToMany relation의 FK 배열
|
|
249
264
|
try {
|
|
250
265
|
const baseName = col.name.replace(/_ids$/, "");
|
|
251
266
|
const relProp = getRelationPropFromColName(entityId, baseName);
|
|
252
267
|
fkConfigImports.add(relProp.with);
|
|
253
|
-
} catch {
|
|
268
|
+
} catch {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
254
271
|
}
|
|
255
272
|
});
|
|
256
273
|
|
|
@@ -295,7 +312,7 @@ import { defaultCatch } from "@/services/sonamu.shared";
|
|
|
295
312
|
import { ${names.capital}SaveParams } from "@/services/${names.fs}/${names.fs}.types";${
|
|
296
313
|
fkConfigImports.size > 0
|
|
297
314
|
? `\nimport { ${Array.from(fkConfigImports)
|
|
298
|
-
.map((
|
|
315
|
+
.map((relatedEntityId) => `${relatedEntityId}AsyncIdConfig`)
|
|
299
316
|
.join(", ")} } from "@/services/services.generated";`
|
|
300
317
|
: ""
|
|
301
318
|
}
|
|
@@ -487,8 +504,8 @@ ${columns
|
|
|
487
504
|
const label = (() => {
|
|
488
505
|
if (col.label.endsWith("Id")) {
|
|
489
506
|
try {
|
|
490
|
-
const
|
|
491
|
-
return
|
|
507
|
+
const relatedEntity = EntityManager.get(col.label.replace("Id", ""));
|
|
508
|
+
return relatedEntity.title ?? col.label;
|
|
492
509
|
} catch {
|
|
493
510
|
return col.label;
|
|
494
511
|
}
|
|
@@ -13,6 +13,15 @@ import {
|
|
|
13
13
|
import { type RenderedTemplate } from "../template";
|
|
14
14
|
import { Template } from "../template";
|
|
15
15
|
|
|
16
|
+
function getConfigEnumId(config: RenderingNode["config"]): string | undefined {
|
|
17
|
+
if (!config || !("enumId" in config)) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
return Object.prototype.toString.call(config.enumId) === "[object String]"
|
|
21
|
+
? String(config.enumId)
|
|
22
|
+
: undefined;
|
|
23
|
+
}
|
|
24
|
+
|
|
16
25
|
export class Template__view_list extends Template {
|
|
17
26
|
constructor() {
|
|
18
27
|
super("view_list");
|
|
@@ -225,12 +234,7 @@ export class Template__view_list extends Template {
|
|
|
225
234
|
}
|
|
226
235
|
}
|
|
227
236
|
|
|
228
|
-
getDefault(columns: RenderingNode[])
|
|
229
|
-
orderBy: string;
|
|
230
|
-
search: string;
|
|
231
|
-
hasSearch: boolean;
|
|
232
|
-
hasOrderBy: boolean;
|
|
233
|
-
} {
|
|
237
|
+
getDefault(columns: RenderingNode[]) {
|
|
234
238
|
const def = {
|
|
235
239
|
orderBy: "",
|
|
236
240
|
search: "",
|
|
@@ -266,7 +270,9 @@ export class Template__view_list extends Template {
|
|
|
266
270
|
const idTsType = pkType === "string" || pkType === "uuid" ? "string" : "number";
|
|
267
271
|
|
|
268
272
|
// 실제 리스트 컬럼
|
|
269
|
-
const columns =
|
|
273
|
+
const columns = /* SAFETY: Columns 렌더링 노드의 자식은 모두 컬럼 노드다. */ (
|
|
274
|
+
columnsNode.children as RenderingNode[]
|
|
275
|
+
)
|
|
270
276
|
|
|
271
277
|
.toSorted((a, b) => (a.name === "id" ? -1 : b.name === "id" ? 1 : 0))
|
|
272
278
|
.map((col) => {
|
|
@@ -299,17 +305,20 @@ export class Template__view_list extends Template {
|
|
|
299
305
|
});
|
|
300
306
|
|
|
301
307
|
// 필터 컬럼
|
|
302
|
-
const filterColumns =
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
col.name !== "id" &&
|
|
306
|
-
col.name !== "queryMode" &&
|
|
307
|
-
["enums", "number-id", "number-fk_id", "string-fk_id"].includes(col.renderType),
|
|
308
|
+
const filterColumns =
|
|
309
|
+
/* SAFETY: ListParams 렌더링 노드의 자식은 모두 필터 컬럼 노드다. */ (
|
|
310
|
+
listParamsNode.children as RenderingNode[]
|
|
308
311
|
)
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
312
|
+
.filter(
|
|
313
|
+
(col) =>
|
|
314
|
+
col.name !== "id" &&
|
|
315
|
+
col.name !== "queryMode" &&
|
|
316
|
+
["enums", "number-id", "number-fk_id", "string-fk_id"].includes(col.renderType),
|
|
317
|
+
)
|
|
318
|
+
// orderBy가 가장 뒤로 오게 순서 조정
|
|
319
|
+
.toSorted((a) => {
|
|
320
|
+
return a.name === "orderBy" ? 1 : -1;
|
|
321
|
+
});
|
|
313
322
|
|
|
314
323
|
// 필터 컬럼을 프리 템플릿으로 설정
|
|
315
324
|
const preTemplates: RenderedTemplate["preTemplates"] = [];
|
|
@@ -359,13 +368,15 @@ import { ${(() => {
|
|
|
359
368
|
}
|
|
360
369
|
|
|
361
370
|
// 필터 enum 수집 (config.enumId 우선, 없으면 getEnumInfoFromColName)
|
|
371
|
+
// SAFETY: 마지막 Boolean 필터가 null을 제거해 enum 식별자 문자열만 남긴다.
|
|
362
372
|
const filterEnumIds = filterColumns
|
|
363
373
|
.filter(
|
|
364
374
|
(col) => col.renderType === "enums" && col.name !== "search" && col.name !== "orderBy",
|
|
365
375
|
)
|
|
366
376
|
.map((col) => {
|
|
367
|
-
|
|
368
|
-
|
|
377
|
+
const configEnumId = getConfigEnumId(col.config);
|
|
378
|
+
if (configEnumId) {
|
|
379
|
+
return configEnumId;
|
|
369
380
|
}
|
|
370
381
|
try {
|
|
371
382
|
const { id: enumId } = getEnumInfoFromColName(entityId, col.name);
|
|
@@ -613,10 +624,7 @@ ${filterColumns
|
|
|
613
624
|
if (col.renderType === "enums") {
|
|
614
625
|
try {
|
|
615
626
|
// config.enumId가 있으면 우선 사용, 없으면 getEnumInfoFromColName 시도
|
|
616
|
-
const enumId =
|
|
617
|
-
col.config && "enumId" in col.config
|
|
618
|
-
? (col.config as { enumId: string }).enumId
|
|
619
|
-
: getEnumInfoFromColName(entityId, col.name).id;
|
|
627
|
+
const enumId = getConfigEnumId(col.config) ?? getEnumInfoFromColName(entityId, col.name).id;
|
|
620
628
|
return ` <EnumSelect
|
|
621
629
|
key={\`${col.name}-\${listParams.${col.name}}\`}
|
|
622
630
|
enum={${enumId}}
|
|
@@ -3,8 +3,11 @@ import path from "path";
|
|
|
3
3
|
import { type TemplateKey } from "../types/types";
|
|
4
4
|
import { globAsync } from "../utils/async-utils";
|
|
5
5
|
import { importMembers } from "../utils/esm-utils";
|
|
6
|
+
import { isFunctionValue } from "../utils/runtime-value";
|
|
6
7
|
import { Template } from "./template";
|
|
7
8
|
|
|
9
|
+
type TemplateConstructor = new () => Template;
|
|
10
|
+
|
|
8
11
|
class TemplateManagerClass {
|
|
9
12
|
private templates: Map<TemplateKey | string, Template> = new Map();
|
|
10
13
|
isAutoloaded: boolean = false;
|
|
@@ -26,12 +29,8 @@ class TemplateManagerClass {
|
|
|
26
29
|
|
|
27
30
|
for (const templateFile of templateFiles) {
|
|
28
31
|
const templates = await importMembers<unknown>(templateFile);
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
typeof templates[0].value === "function" &&
|
|
32
|
-
templates[0].value.prototype instanceof Template
|
|
33
|
-
) {
|
|
34
|
-
const instance = new (templates[0].value as new () => Template)();
|
|
32
|
+
if (templates.length === 1 && this.isTemplateClass(templates[0].value)) {
|
|
33
|
+
const instance = new templates[0].value();
|
|
35
34
|
this.templates.set(instance.key, instance);
|
|
36
35
|
} else {
|
|
37
36
|
throw new Error(
|
|
@@ -41,7 +40,10 @@ class TemplateManagerClass {
|
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
for (const [key, template] of this.templates) {
|
|
44
|
-
Template.
|
|
43
|
+
Template.getTemplatesMap().set(
|
|
44
|
+
/* SAFETY: 선행 Zod 종류 분기와 템플릿 입력 계약이 이 값의 타입을 보장한다. */ key as TemplateKey,
|
|
45
|
+
template,
|
|
46
|
+
);
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
this.isAutoloaded = true;
|
|
@@ -52,7 +54,7 @@ class TemplateManagerClass {
|
|
|
52
54
|
*/
|
|
53
55
|
async reload(): Promise<void> {
|
|
54
56
|
this.templates.clear();
|
|
55
|
-
Template.
|
|
57
|
+
Template.clearTemplates();
|
|
56
58
|
this.isAutoloaded = false;
|
|
57
59
|
await this.autoload();
|
|
58
60
|
}
|
|
@@ -68,7 +70,7 @@ class TemplateManagerClass {
|
|
|
68
70
|
const templates = await importMembers<unknown>(file);
|
|
69
71
|
for (const { value } of templates) {
|
|
70
72
|
if (this.isTemplateClass(value)) {
|
|
71
|
-
const instance = new
|
|
73
|
+
const instance = new value();
|
|
72
74
|
this.register(instance);
|
|
73
75
|
count++;
|
|
74
76
|
}
|
|
@@ -78,8 +80,8 @@ class TemplateManagerClass {
|
|
|
78
80
|
return count;
|
|
79
81
|
}
|
|
80
82
|
|
|
81
|
-
private isTemplateClass(value:
|
|
82
|
-
return
|
|
83
|
+
private isTemplateClass<Value>(value: Value): value is Value & TemplateConstructor {
|
|
84
|
+
return isFunctionValue(value) && value.prototype instanceof Template;
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
// ================================
|
|
@@ -92,7 +94,7 @@ class TemplateManagerClass {
|
|
|
92
94
|
register(template: Template): void {
|
|
93
95
|
this.templates.set(template.key, template);
|
|
94
96
|
// 하위 호환
|
|
95
|
-
Template.
|
|
97
|
+
Template.getTemplatesMap().set(template.key, template);
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
/**
|
|
@@ -152,7 +154,7 @@ class TemplateManagerClass {
|
|
|
152
154
|
reset(): void {
|
|
153
155
|
this.templates.clear();
|
|
154
156
|
this.isAutoloaded = false;
|
|
155
|
-
Template.
|
|
157
|
+
Template.clearTemplates();
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
/**
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
+
import { type TemplateKey, type TemplateOptions } from "../types/types";
|
|
2
|
+
|
|
3
|
+
type TemplateGroupEntry = {
|
|
4
|
+
[Key in TemplateKey]: {
|
|
5
|
+
key: Key;
|
|
6
|
+
getOptions: (baseOptions: Partial<TemplateOptions>) => TemplateOptions[Key];
|
|
7
|
+
};
|
|
8
|
+
}[TemplateKey];
|
|
9
|
+
|
|
1
10
|
/**
|
|
2
11
|
* 템플릿 그룹 (관련 템플릿 묶음 실행)
|
|
3
12
|
*/
|
|
4
13
|
export type TemplateGroup = {
|
|
5
14
|
name: string;
|
|
6
15
|
description?: string;
|
|
7
|
-
templates:
|
|
8
|
-
key: string;
|
|
9
|
-
getOptions: (baseOptions: Record<string, unknown>) => Record<string, unknown>;
|
|
10
|
-
}>;
|
|
16
|
+
templates: TemplateGroupEntry[];
|
|
11
17
|
};
|
|
12
18
|
|
|
13
19
|
/**
|
|
14
20
|
* 템플릿 프리셋 (템플릿별 기본 옵션)
|
|
15
21
|
*/
|
|
16
|
-
export type TemplatePreset =
|
|
22
|
+
export type TemplatePreset = Partial<{
|
|
23
|
+
[Key in TemplateKey]: TemplateOptions[Key];
|
|
24
|
+
}>;
|
package/src/template/template.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { type EntityNamesRecord } from "../entity/entity-manager";
|
|
|
4
4
|
import { type TemplateKey, type TemplateOptions } from "../types/types";
|
|
5
5
|
import { globAsync } from "../utils/async-utils";
|
|
6
6
|
import { importMembers } from "../utils/esm-utils";
|
|
7
|
+
import { isFunctionValue } from "../utils/runtime-value";
|
|
7
8
|
|
|
8
9
|
export type RenderedTemplate = {
|
|
9
10
|
target: string;
|
|
@@ -42,7 +43,7 @@ export abstract class Template {
|
|
|
42
43
|
const templates = await importMembers<any>(templateFile);
|
|
43
44
|
if (
|
|
44
45
|
templates.length === 1 &&
|
|
45
|
-
|
|
46
|
+
isFunctionValue(templates[0].value) &&
|
|
46
47
|
templates[0].value.prototype instanceof Template
|
|
47
48
|
) {
|
|
48
49
|
// 클래스의 인스턴스를 생성하여 등록
|
|
@@ -80,14 +81,14 @@ export abstract class Template {
|
|
|
80
81
|
/**
|
|
81
82
|
* 내부용: TemplateManager에서 사용
|
|
82
83
|
*/
|
|
83
|
-
public static
|
|
84
|
+
public static getTemplatesMap(): Map<TemplateKey, Template> {
|
|
84
85
|
return Template.templates;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
/**
|
|
88
89
|
* 내부용: TemplateManager에서 사용
|
|
89
90
|
*/
|
|
90
|
-
public static
|
|
91
|
+
public static clearTemplates(): void {
|
|
91
92
|
Template.templates.clear();
|
|
92
93
|
}
|
|
93
94
|
|