@autobe/compiler 0.29.2 → 0.30.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.
Files changed (74) hide show
  1. package/lib/AutoBeCompiler.d.ts +2 -2
  2. package/lib/AutoBeCompiler.js +3 -3
  3. package/lib/AutoBeCompiler.js.map +1 -1
  4. package/lib/AutoBeTypeScriptCompiler.d.ts +1 -0
  5. package/lib/AutoBeTypeScriptCompiler.js +27 -0
  6. package/lib/AutoBeTypeScriptCompiler.js.map +1 -1
  7. package/lib/database/AutoBeDatabaseCompiler.d.ts +6 -0
  8. package/lib/{prisma/AutoBePrismaCompiler.js → database/AutoBeDatabaseCompiler.js} +19 -13
  9. package/lib/database/AutoBeDatabaseCompiler.js.map +1 -0
  10. package/lib/database/validateDatabaseApplication.d.ts +2 -0
  11. package/lib/{prisma/validatePrismaApplication.js → database/validateDatabaseApplication.js} +178 -4
  12. package/lib/database/validateDatabaseApplication.js.map +1 -0
  13. package/lib/index.d.ts +1 -1
  14. package/lib/index.js +1 -1
  15. package/lib/index.js.map +1 -1
  16. package/lib/interface/AutoBeInterfaceCompiler.d.ts +1 -1
  17. package/lib/raw/AutoBeCompilerCommonTemplate.js +2 -2
  18. package/lib/raw/AutoBeCompilerCommonTemplate.js.map +1 -1
  19. package/lib/raw/AutoBeCompilerInterfaceTemplate.js +4 -2
  20. package/lib/raw/AutoBeCompilerInterfaceTemplate.js.map +1 -1
  21. package/lib/raw/AutoBeCompilerRealizeTemplate.js +16 -3
  22. package/lib/raw/AutoBeCompilerRealizeTemplate.js.map +1 -1
  23. package/lib/raw/AutoBeCompilerRealizeTemplateOfPostgres.js +3 -2
  24. package/lib/raw/AutoBeCompilerRealizeTemplateOfPostgres.js.map +1 -1
  25. package/lib/raw/AutoBeCompilerRealizeTemplateOfSQLite.js +2 -1
  26. package/lib/raw/AutoBeCompilerRealizeTemplateOfSQLite.js.map +1 -1
  27. package/lib/raw/AutoBeCompilerTestTemplate.js +1 -1
  28. package/lib/raw/AutoBeCompilerTestTemplate.js.map +1 -1
  29. package/lib/raw/nestjs.json +1777 -656
  30. package/lib/raw/test.json +748 -520
  31. package/lib/realize/writeRealizeControllers.js +16 -10
  32. package/lib/realize/writeRealizeControllers.js.map +1 -1
  33. package/lib/test/AutoBeTestCompiler.d.ts +1 -0
  34. package/lib/test/AutoBeTestCompiler.js +6 -0
  35. package/lib/test/AutoBeTestCompiler.js.map +1 -1
  36. package/lib/test/programmers/AutoBeTestLiteralProgrammer.js +2 -2
  37. package/lib/test/programmers/AutoBeTestLiteralProgrammer.js.map +1 -1
  38. package/lib/test/programmers/IAutoBeTestProgrammerContext.d.ts +1 -1
  39. package/lib/test/programmers/writeTestExpression.js +3 -1
  40. package/lib/test/programmers/writeTestExpression.js.map +1 -1
  41. package/lib/test/programmers/writeTestFunction.js +4 -4
  42. package/lib/test/programmers/writeTestFunction.js.map +1 -1
  43. package/lib/test/programmers/writeTestStatement.js +3 -1
  44. package/lib/test/programmers/writeTestStatement.js.map +1 -1
  45. package/lib/utils/FilePrinter.js +1 -1
  46. package/lib/utils/FilePrinter.js.map +1 -1
  47. package/package.json +13 -12
  48. package/src/AutoBeCompiler.ts +5 -5
  49. package/src/AutoBeTypeScriptCompiler.ts +36 -0
  50. package/src/database/AutoBeDatabaseCompiler.ts +48 -0
  51. package/src/{prisma/validatePrismaApplication.ts → database/validateDatabaseApplication.ts} +228 -28
  52. package/src/index.ts +1 -1
  53. package/src/interface/AutoBeInterfaceCompiler.ts +1 -1
  54. package/src/raw/AutoBeCompilerCommonTemplate.ts +2 -2
  55. package/src/raw/AutoBeCompilerInterfaceTemplate.ts +4 -2
  56. package/src/raw/AutoBeCompilerRealizeTemplate.ts +16 -3
  57. package/src/raw/AutoBeCompilerRealizeTemplateOfPostgres.ts +3 -2
  58. package/src/raw/AutoBeCompilerRealizeTemplateOfSQLite.ts +2 -1
  59. package/src/raw/AutoBeCompilerTestTemplate.ts +1 -1
  60. package/src/raw/nestjs.json +1777 -656
  61. package/src/raw/test.json +748 -520
  62. package/src/realize/writeRealizeControllers.ts +26 -16
  63. package/src/test/AutoBeTestCompiler.ts +9 -0
  64. package/src/test/programmers/AutoBeTestLiteralProgrammer.ts +2 -2
  65. package/src/test/programmers/IAutoBeTestProgrammerContext.ts +1 -1
  66. package/src/test/programmers/writeTestExpression.ts +6 -1
  67. package/src/test/programmers/writeTestFunction.ts +3 -2
  68. package/src/test/programmers/writeTestStatement.ts +5 -1
  69. package/src/utils/FilePrinter.ts +1 -1
  70. package/lib/prisma/AutoBePrismaCompiler.d.ts +0 -6
  71. package/lib/prisma/AutoBePrismaCompiler.js.map +0 -1
  72. package/lib/prisma/validatePrismaApplication.d.ts +0 -2
  73. package/lib/prisma/validatePrismaApplication.js.map +0 -1
  74. package/src/prisma/AutoBePrismaCompiler.ts +0 -36
@@ -2,15 +2,28 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AutoBeCompilerRealizeTemplate = void 0;
4
4
  exports.AutoBeCompilerRealizeTemplate = {
5
+ ".claude/skills/add-feature/SKILL.md": "---\nname: add-feature\ndescription: Implement new feature with self-testing loop until 100% pass\nargument-hint: \"[feature-description]\"\nallowed-tools: Read, Edit, Write, Bash, Grep, Glob\n---\n\n# Add Feature\n\nImplement a new feature and iterate until all tests pass (100% success rate).\n\n## FORBIDDEN\n\n**NEVER use:**\n- `as` keyword (type assertion)\n- `any` type\n\n---\n\n## Feature Description\n\n$ARGUMENTS\n\n---\n\n## Workflow Overview\n\n```\n┌─────────────────────────────────────┐\n│ Phase 1: Implementation │\n│ - Controller │\n│ - Provider │\n│ - Collector/Transformer │\n│ - Interface │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Phase 2: Test Design │\n│ - Happy path tests │\n│ - Error case tests │\n│ - Edge case tests │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Phase 3: Test Loop │\n│ while (pass_rate < 100%) { │\n│ run tests │\n│ analyze failures │\n│ fix code │\n│ } │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Complete │\n│ All tests pass! │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Phase 1: Implementation\n\nSee: `flow-implement.md`\n\n1. **Analyze Requirements**\n - Understand the feature from `$ARGUMENTS`\n - Identify affected entities\n - Determine API endpoints needed\n\n2. **Create/Update Interface**\n - Define DTOs (ICreate, IUpdate, ISummary, IRequest)\n - Add typia tags for validation\n\n3. **Create/Update Collector**\n - Transform ICreate → Prisma.CreateInput\n\n4. **Create/Update Transformer**\n - Transform Prisma record → Interface\n\n5. **Create/Update Provider**\n - Implement business logic\n - Use Collector for create operations\n - Use Transformer for responses\n\n6. **Create/Update Controller**\n - Define routes with TypedRoute\n - Add authentication decorators\n - Connect to Provider\n\n7. **Verify Build**\n ```bash\n npm run build:main\n ```\n\n---\n\n## Phase 2: Test Design\n\nSee: `flow-test-design.md`\n\nDesign comprehensive test scenarios including:\n\n### Happy Path (Normal Cases)\n- ✅ Create entity successfully\n- ✅ Read entity successfully\n- ✅ Update entity successfully\n- ✅ Delete entity successfully\n- ✅ List entities with pagination\n\n### Error Cases\n- ❌ Create with missing required fields\n- ❌ Create with invalid field format\n- ❌ Read non-existent entity (404)\n- ❌ Update non-existent entity (404)\n- ❌ Delete non-existent entity (404)\n- ❌ Unauthorized access (401)\n- ❌ Forbidden action (403)\n\n### Edge Cases\n- ⚠️ Empty string input\n- ⚠️ Null values for optional fields\n- ⚠️ Maximum length strings\n- ⚠️ Minimum/maximum numeric values\n- ⚠️ Special characters in strings\n- ⚠️ Duplicate creation attempt\n- ⚠️ Concurrent modification\n- ⚠️ Parent entity doesn't exist\n- ⚠️ Circular reference attempt\n- ⚠️ Soft-deleted entity access\n\n---\n\n## Phase 3: Test Loop\n\nSee: `flow-test-loop.md`\n\n```\nREPEAT:\n 1. Build tests\n npm run build:test\n\n 2. Run tests\n npm run test -- --include \"{feature}\"\n\n 3. If all pass → DONE\n\n 4. If failures:\n a. Analyze failure reason\n b. Determine if test code issue or business logic issue\n c. Fix the appropriate code\n d. Go to step 1\n\nUNTIL: 100% pass rate\n```\n\n---\n\n## Exit Conditions\n\n✅ **Success Criteria:**\n- `npm run build:main` passes\n- `npm run build:test` passes\n- `npm run test` passes with 100% success rate\n- All happy path tests pass\n- All error case tests pass\n- All edge case tests pass\n\n❌ **Failure (requires manual intervention):**\n- Circular dependency detected\n- External service unavailable\n- Database schema change required\n- Requirements ambiguity\n\n---\n\n## Output\n\nWhen complete, provide:\n\n```markdown\n## Feature Implementation Complete\n\n### Summary\n- Feature: {description}\n- Files created/modified: X\n- Test scenarios: Y\n- Pass rate: 100%\n\n### Files Changed\n- src/api/structures/I{Entity}.ts\n- src/controllers/{path}/{Controller}.ts\n- src/providers/{provider}.ts\n- src/collectors/{Collector}.ts\n- src/transformers/{Transformer}.ts\n- test/prepare/prepare_random_{entity}.ts\n- test/generate/generate_random_{entity}.ts\n- test/features/api/{entity}/*.ts\n\n### Test Results\n- Total: X tests\n- Passed: X\n- Failed: 0\n```\n",
6
+ ".claude/skills/add-feature/flow-implement.md": "# Phase 1: Implementation Flow\n\nDetailed steps for implementing the feature.\n\n---\n\n## Step 1.1: Analyze Requirements\n\nFrom `$ARGUMENTS`, extract:\n- **Entity name**: What is being created/managed?\n- **Operations**: CRUD? Special actions?\n- **Relationships**: Parent entities? Child entities?\n- **Constraints**: Validation rules? Business rules?\n\n---\n\n## Step 1.2: Update Prisma Schema (if needed)\n\nIf new entity or fields required:\n\n```prisma\nmodel {prefix}_{entities} {\n id String @id @db.Uuid\n\n // Fields\n name String\n status String // \"active\" | \"inactive\"\n\n // Foreign keys\n {parent}_id String @db.Uuid\n\n // Timestamps\n created_at DateTime @db.Timestamptz\n updated_at DateTime @db.Timestamptz\n deleted_at DateTime? @db.Timestamptz\n\n // Relations\n {parent} {prefix}_{parents} @relation(fields: [{parent}_id], references: [id], onDelete: Cascade)\n\n // Indexes\n @@index([{parent}_id, status])\n}\n```\n\nThen run:\n```bash\nnpm run build:prisma\n```\n\n---\n\n## Step 1.3: Create/Update Interface\n\nLocation: `/src/api/structures/I{Prefix}{Entity}.ts`\n\n```typescript\nimport { tags } from \"typia\";\n\nexport type I{Prefix}{Entity} = {\n id: string & tags.Format<\"uuid\">;\n name: string;\n status: \"active\" | \"inactive\";\n created_at: string & tags.Format<\"date-time\">;\n updated_at: string & tags.Format<\"date-time\">;\n deleted_at: (string & tags.Format<\"date-time\">) | null;\n};\n\nexport namespace I{Prefix}{Entity} {\n export type ICreate = {\n name: string;\n status?: \"active\" | \"inactive\";\n };\n\n export type IUpdate = {\n name?: string;\n status?: \"active\" | \"inactive\";\n };\n\n export type ISummary = {\n id: string & tags.Format<\"uuid\">;\n name: string;\n status: \"active\" | \"inactive\";\n };\n\n export type IRequest = {\n page?: number & tags.Minimum<1>;\n limit?: number & tags.Minimum<1> & tags.Maximum<100>;\n search?: string;\n status?: \"active\" | \"inactive\";\n };\n}\n```\n\n---\n\n## Step 1.4: Create Collector\n\nLocation: `/src/collectors/{Prefix}{Entity}Collector.ts`\n\n```typescript\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { Prisma } from \"@prisma/sdk\";\nimport { v4 } from \"uuid\";\n\nexport namespace {Prefix}{Entity}Collector {\n export function collect(props: {\n body: I{Prefix}{Entity}.ICreate;\n }): Prisma.{table_name}CreateInput {\n const id = v4();\n const now = new Date();\n\n return {\n id,\n name: props.body.name,\n status: props.body.status ?? \"active\",\n created_at: now,\n updated_at: now,\n deleted_at: null,\n };\n }\n}\n```\n\n---\n\n## Step 1.5: Create Transformer\n\nLocation: `/src/transformers/{Prefix}{Entity}Transformer.ts`\n\n```typescript\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { {table_name} } from \"@prisma/sdk\";\n\nimport { toISOStringSafe } from \"../utils/toISOStringSafe\";\n\nexport namespace {Prefix}{Entity}Transformer {\n export function transform(record: {table_name}): I{Prefix}{Entity} {\n return {\n id: record.id,\n name: record.name,\n status: record.status,\n created_at: toISOStringSafe(record.created_at),\n updated_at: toISOStringSafe(record.updated_at),\n deleted_at: record.deleted_at\n ? toISOStringSafe(record.deleted_at)\n : null,\n };\n }\n\n export function toSummary(record: {table_name}): I{Prefix}{Entity}.ISummary {\n return {\n id: record.id,\n name: record.name,\n status: record.status,\n };\n }\n\n export function transformMany(records: {table_name}[]): I{Prefix}{Entity}[] {\n return records.map(transform);\n }\n\n export function toSummaryList(records: {table_name}[]): I{Prefix}{Entity}.ISummary[] {\n return records.map(toSummary);\n }\n}\n```\n\n---\n\n## Step 1.6: Create Provider\n\nLocation: `/src/providers/post{Prefix}{Entity}.ts` (and get, patch, delete)\n\n```typescript\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { HttpException } from \"@nestjs/common\";\n\nimport { MyGlobal } from \"../MyGlobal\";\nimport { {Prefix}{Entity}Collector } from \"../collectors/{Prefix}{Entity}Collector\";\nimport { {Prefix}{Entity}Transformer } from \"../transformers/{Prefix}{Entity}Transformer\";\nimport { AdminPayload } from \"../decorators/payload/AdminPayload\";\n\nexport async function post{Prefix}{Entity}(props: {\n admin: AdminPayload;\n body: I{Prefix}{Entity}.ICreate;\n}): Promise<I{Prefix}{Entity}> {\n const data = {Prefix}{Entity}Collector.collect({ body: props.body });\n\n const created = await MyGlobal.prisma.{table_name}.create({\n data,\n });\n\n return {Prefix}{Entity}Transformer.transform(created);\n}\n```\n\n---\n\n## Step 1.7: Create Controller\n\nLocation: `/src/controllers/{prefix}/admin/{entities}/{Prefix}Admin{Entities}Controller.ts`\n\n```typescript\nimport { TypedBody, TypedParam, TypedRoute } from \"@nestia/core\";\nimport { Controller } from \"@nestjs/common\";\nimport { tags } from \"typia\";\n\nimport { I{Prefix}{Entity} } from \"../../../../api/structures/I{Prefix}{Entity}\";\nimport { AdminAuth } from \"../../../../decorators/AdminAuth\";\nimport { AdminPayload } from \"../../../../decorators/payload/AdminPayload\";\nimport { post{Prefix}{Entity} } from \"../../../../providers/post{Prefix}{Entity}\";\nimport { get{Prefix}{Entity} } from \"../../../../providers/get{Prefix}{Entity}\";\n\n@Controller(\"{prefix}/admin/{entities}\")\nexport class {Prefix}Admin{Entities}Controller {\n @TypedRoute.Post()\n @AdminAuth()\n async create(\n @AdminPayload() admin: AdminPayload,\n @TypedBody() body: I{Prefix}{Entity}.ICreate,\n ): Promise<I{Prefix}{Entity}> {\n return await post{Prefix}{Entity}({ admin, body });\n }\n\n @TypedRoute.Get(\":entityId\")\n @AdminAuth()\n async at(\n @AdminPayload() admin: AdminPayload,\n @TypedParam(\"entityId\") entityId: string & tags.Format<\"uuid\">,\n ): Promise<I{Prefix}{Entity}> {\n return await get{Prefix}{Entity}({ admin, entityId });\n }\n\n // ... other methods\n}\n```\n\n---\n\n## Step 1.8: Verify Build\n\n```bash\nnpm run build:main\n```\n\nIf errors, fix them before proceeding to Phase 2.\n",
7
+ ".claude/skills/add-feature/flow-test-design.md": "# Phase 2: Test Design Flow\n\nDesign comprehensive test scenarios for the feature.\n\n---\n\n## Step 2.1: Create prepare_random Function\n\nLocation: `/test/prepare/prepare_random_{prefix}_{entity}.ts`\n\n```typescript\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { DeepPartial } from \"@ORGANIZATION/PROJECT-api/lib/typings/DeepPartial\";\nimport { RandomGenerator } from \"@nestia/e2e\";\nimport { randint } from \"tstl\";\nimport { v4 } from \"uuid\";\n\nexport function prepare_random_{prefix}_{entity}(\n input?: DeepPartial<I{Prefix}{Entity}.ICreate> | undefined,\n): I{Prefix}{Entity}.ICreate {\n return {\n name: input?.name ?? RandomGenerator.name(2),\n status: input?.status ?? \"active\",\n // Add all required fields with random generators\n };\n}\n```\n\n---\n\n## Step 2.2: Create generate_random Function\n\nLocation: `/test/generate/generate_random_{prefix}_{entity}.ts`\n\n```typescript\nimport api from \"@ORGANIZATION/PROJECT-api\";\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { DeepPartial } from \"@ORGANIZATION/PROJECT-api/lib/typings/DeepPartial\";\n\nimport { prepare_random_{prefix}_{entity} } from \"../prepare/prepare_random_{prefix}_{entity}\";\n\nexport async function generate_random_{prefix}_{entity}(\n connection: api.IConnection,\n input?: DeepPartial<I{Prefix}{Entity}.ICreate> | undefined,\n): Promise<I{Prefix}{Entity}> {\n const body = prepare_random_{prefix}_{entity}(input);\n return api.functional.{prefix}.admin.{entities}.create(connection, body);\n}\n```\n\n---\n\n## Step 2.3: Design Test Scenarios\n\n### Category 1: Happy Path Tests\n\n```typescript\n// test_api_{entity}_create_success.ts\nexport async function test_api_{entity}_create_success(\n connection: api.IConnection,\n): Promise<void> {\n // 1. Prepare admin connection\n const admin = await authorize_admin(connection);\n\n // 2. Create entity\n const input = prepare_random_{prefix}_{entity}();\n const created = await api.functional.{prefix}.admin.{entities}.create(\n admin.connection,\n input,\n );\n\n // 3. Validate\n typia.assert(created);\n TestValidator.equals(\"name\", created.name, input.name);\n TestValidator.equals(\"status\", created.status, input.status ?? \"active\");\n}\n\n// test_api_{entity}_read_success.ts\nexport async function test_api_{entity}_read_success(\n connection: api.IConnection,\n): Promise<void> {\n const admin = await authorize_admin(connection);\n const created = await generate_random_{prefix}_{entity}(admin.connection);\n\n const read = await api.functional.{prefix}.admin.{entities}.at(\n admin.connection,\n created.id,\n );\n\n typia.assert(read);\n TestValidator.equals(\"id\", read.id, created.id);\n}\n\n// test_api_{entity}_update_success.ts\n// test_api_{entity}_delete_success.ts\n// test_api_{entity}_list_success.ts\n```\n\n### Category 2: Error Case Tests\n\n```typescript\n// test_api_{entity}_create_missing_required.ts\nexport async function test_api_{entity}_create_missing_required(\n connection: api.IConnection,\n): Promise<void> {\n const admin = await authorize_admin(connection);\n\n await TestValidator.httpError(\"missing name\", 400, async () => {\n await api.functional.{prefix}.admin.{entities}.create(\n admin.connection,\n // @ts-expect-error Testing missing required field\n { },\n );\n });\n}\n\n// test_api_{entity}_read_not_found.ts\nexport async function test_api_{entity}_read_not_found(\n connection: api.IConnection,\n): Promise<void> {\n const admin = await authorize_admin(connection);\n const nonExistentId = v4();\n\n await TestValidator.httpError(\"not found\", 404, async () => {\n await api.functional.{prefix}.admin.{entities}.at(\n admin.connection,\n nonExistentId,\n );\n });\n}\n\n// test_api_{entity}_unauthorized.ts\nexport async function test_api_{entity}_unauthorized(\n connection: api.IConnection,\n): Promise<void> {\n const input = prepare_random_{prefix}_{entity}();\n\n await TestValidator.httpError(\"unauthorized\", 401, async () => {\n await api.functional.{prefix}.admin.{entities}.create(\n connection, // No auth token\n input,\n );\n });\n}\n```\n\n### Category 3: Edge Case Tests\n\n```typescript\n// test_api_{entity}_create_empty_string.ts\nexport async function test_api_{entity}_create_empty_string(\n connection: api.IConnection,\n): Promise<void> {\n const admin = await authorize_admin(connection);\n\n await TestValidator.httpError(\"empty name\", 400, async () => {\n await api.functional.{prefix}.admin.{entities}.create(\n admin.connection,\n { name: \"\" },\n );\n });\n}\n\n// test_api_{entity}_create_max_length.ts\nexport async function test_api_{entity}_create_max_length(\n connection: api.IConnection,\n): Promise<void> {\n const admin = await authorize_admin(connection);\n const longName = \"a\".repeat(256); // Assuming 255 max\n\n await TestValidator.httpError(\"too long name\", 400, async () => {\n await api.functional.{prefix}.admin.{entities}.create(\n admin.connection,\n { name: longName },\n );\n });\n}\n\n// test_api_{entity}_create_duplicate.ts\nexport async function test_api_{entity}_create_duplicate(\n connection: api.IConnection,\n): Promise<void> {\n const admin = await authorize_admin(connection);\n const created = await generate_random_{prefix}_{entity}(admin.connection);\n\n // If name should be unique\n await TestValidator.httpError(\"duplicate\", 409, async () => {\n await api.functional.{prefix}.admin.{entities}.create(\n admin.connection,\n { name: created.name },\n );\n });\n}\n\n// test_api_{entity}_create_invalid_parent.ts\nexport async function test_api_{entity}_create_invalid_parent(\n connection: api.IConnection,\n): Promise<void> {\n const admin = await authorize_admin(connection);\n const nonExistentParentId = v4();\n\n await TestValidator.httpError(\"parent not found\", 404, async () => {\n await api.functional.{prefix}.admin.{entities}.create(\n admin.connection,\n {\n name: RandomGenerator.name(2),\n parent_id: nonExistentParentId,\n },\n );\n });\n}\n\n// test_api_{entity}_access_deleted.ts\nexport async function test_api_{entity}_access_deleted(\n connection: api.IConnection,\n): Promise<void> {\n const admin = await authorize_admin(connection);\n const created = await generate_random_{prefix}_{entity}(admin.connection);\n\n // Delete entity\n await api.functional.{prefix}.admin.{entities}.erase(\n admin.connection,\n created.id,\n );\n\n // Try to access deleted entity\n await TestValidator.httpError(\"deleted entity\", 404, async () => {\n await api.functional.{prefix}.admin.{entities}.at(\n admin.connection,\n created.id,\n );\n });\n}\n```\n\n---\n\n## Step 2.4: Test File Organization\n\n```\ntest/features/api/{entity}/\n├── test_api_{entity}_create_success.ts\n├── test_api_{entity}_read_success.ts\n├── test_api_{entity}_update_success.ts\n├── test_api_{entity}_delete_success.ts\n├── test_api_{entity}_list_success.ts\n├── test_api_{entity}_create_missing_required.ts\n├── test_api_{entity}_read_not_found.ts\n├── test_api_{entity}_unauthorized.ts\n├── test_api_{entity}_create_empty_string.ts\n├── test_api_{entity}_create_max_length.ts\n├── test_api_{entity}_create_duplicate.ts\n├── test_api_{entity}_create_invalid_parent.ts\n└── test_api_{entity}_access_deleted.ts\n```\n\n---\n\n## Step 2.5: Verify Test Build\n\n```bash\nnpm run build:test\n```\n\nIf errors, fix them before proceeding to Phase 3.\n",
8
+ ".claude/skills/add-feature/flow-test-loop.md": "# Phase 3: Test Loop Flow\n\nIterate until all tests pass (100% success rate).\n\n---\n\n## Loop Algorithm\n\n```\niteration = 0\nmax_iterations = 10\n\nWHILE iteration < max_iterations:\n iteration += 1\n\n # Step 1: Build\n result = run(\"npm run build:test\")\n IF result.failed:\n analyze_build_error(result)\n fix_build_error()\n CONTINUE\n\n # Step 2: Run Tests\n result = run(\"npm run test -- --include '{feature}'\")\n\n IF result.all_passed:\n PRINT \"✅ All tests passed!\"\n BREAK\n\n # Step 3: Analyze Failures\n failures = parse_failures(result)\n\n FOR each failure in failures:\n cause = diagnose(failure)\n\n IF cause.is_test_code_issue:\n fix_test_code(failure)\n ELSE IF cause.is_business_logic_issue:\n fix_business_logic(failure)\n ELSE:\n PRINT \"⚠️ Manual intervention required\"\n BREAK\n\nIF iteration >= max_iterations:\n PRINT \"❌ Max iterations reached. Manual intervention required.\"\n```\n\n---\n\n## Step 3.1: Run Build\n\n```bash\nnpm run build:test 2>&1\n```\n\nIf build fails:\n- Parse error message\n- Identify affected file\n- Fix syntax/type errors\n- Re-run build\n\n---\n\n## Step 3.2: Run Tests\n\n```bash\nnpm run test 2>&1\n```\n\nOr for specific feature:\n```bash\nnpm run test -- --include \"{feature_name}\"\n```\n\n---\n\n## Step 3.3: Analyze Failures\n\n### Failure Types\n\n| Symptom | Likely Cause | Fix Location |\n|---------|--------------|--------------|\n| `Expected 200, got 400` | Invalid test input | Test code |\n| `Expected 200, got 404` | Entity not created | Test setup |\n| `Expected 200, got 500` | Provider bug | Provider code |\n| `Property mismatch` | Transformer bug | Transformer code |\n| `Unauthorized` | Missing auth | Test setup |\n| `Type error` | Interface mismatch | Interface/Provider |\n\n### Diagnosis Process\n\n1. **Read error message carefully**\n - What was expected?\n - What was received?\n - Which assertion failed?\n\n2. **Check test code**\n - Is the test setup correct?\n - Are inputs valid?\n - Is the auth token present?\n\n3. **Check business logic**\n - Is the provider logic correct?\n - Is the transformer mapping correct?\n - Is the collector generating correct data?\n\n4. **Check interface**\n - Do types match?\n - Are required fields present?\n - Are typia tags correct?\n\n---\n\n## Step 3.4: Fix Strategies\n\n### Test Code Issues\n\n```typescript\n// Issue: Test expects wrong status code\n// Before\nawait TestValidator.httpError(\"not found\", 400, async () => { ... });\n// After\nawait TestValidator.httpError(\"not found\", 404, async () => { ... });\n\n// Issue: Missing auth setup\n// Before\nconst result = await api.functional.{prefix}.admin.{entities}.create(\n connection, // No auth!\n input,\n);\n// After\nconst admin = await authorize_admin(connection);\nconst result = await api.functional.{prefix}.admin.{entities}.create(\n admin.connection, // With auth\n input,\n);\n\n// Issue: Wrong assertion\n// Before\nTestValidator.equals(\"name\", result.name, \"hardcoded\");\n// After\nTestValidator.equals(\"name\", result.name, input.name);\n```\n\n### Business Logic Issues\n\n```typescript\n// Issue: Missing null check\n// Before\nreturn {Prefix}{Entity}Transformer.transform(record);\n// After\nif (!record) throw new HttpException(\"Not found\", 404);\nreturn {Prefix}{Entity}Transformer.transform(record);\n\n// Issue: Wrong status code\n// Before\nthrow new HttpException(\"Not found\", 400);\n// After\nthrow new HttpException(\"Not found\", 404);\n\n// Issue: Missing validation\n// Before\nconst data = Collector.collect({ body: props.body });\n// After\nif (!props.body.name) {\n throw new HttpException(\"Name is required\", 400);\n}\nconst data = Collector.collect({ body: props.body });\n```\n\n### Interface Issues\n\n```typescript\n// Issue: Missing nullable annotation\n// Before\ndescription: string;\n// After\ndescription: string | null;\n\n// Issue: Missing typia tag\n// Before\nid: string;\n// After\nid: string & tags.Format<\"uuid\">;\n```\n\n---\n\n## Step 3.5: Verify Fix\n\nAfter each fix:\n\n```bash\n# Quick check - just the failing test\nnpm run test -- --include \"{specific_test_name}\"\n\n# Full check - all feature tests\nnpm run test -- --include \"{feature_name}\"\n```\n\n---\n\n## Step 3.6: Exit Conditions\n\n### Success ✅\n```\nAll tests passed!\n- Total: X tests\n- Passed: X\n- Failed: 0\n- Pass rate: 100%\n```\n\n### Failure ❌ (Requires Manual Intervention)\n- Max iterations (10) reached\n- Circular dependency detected\n- External service required\n- Database migration needed\n- Requirements unclear\n\n---\n\n## Troubleshooting\n\n### Common Issues\n\n| Issue | Solution |\n|-------|----------|\n| Tests timing out | Increase timeout or optimize queries |\n| Flaky tests | Add retry logic or fix race condition |\n| Database state | Ensure test isolation, clean up after tests |\n| Auth token expired | Refresh token in test setup |\n| Port conflict | Use unique ports or wait for cleanup |\n\n### Debug Commands\n\n```bash\n# Run single test with verbose output\nnpm run test -- --include \"test_name\" --verbose\n\n# Check test logs\ncat test/logs/*.log\n```\n",
9
+ ".claude/skills/fix-db/SKILL.md": "---\nname: fix-db\ndescription: Fix Prisma schema compilation errors\nallowed-tools: Read, Edit, Write, Bash, Grep, Glob\n---\n\n# Fix Database Schema Errors\n\nFix Prisma schema compilation errors according to code conventions.\n\n## FORBIDDEN\n\n**NEVER use:**\n- Prisma `enum` types (use String with TypeScript union types instead)\n\n---\n\n## Purpose\n\nFix compilation errors in Prisma schema files to ensure `npm run build:prisma` passes.\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Run Build │\n│ npm run build:prisma │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Parse Errors │\n│ - Syntax errors │\n│ - Relation errors │\n│ - Type errors │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Fix by Convention │\n│ Apply code conventions │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 4: Re-run Build │\n│ Loop until 0 errors │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Run Build\n\n```bash\nnpm run build:prisma 2>&1\n```\n\nCapture all error output.\n\n---\n\n## Step 2: Parse Errors\n\nCommon error types:\n- `Error parsing attribute`: Syntax error in decorator\n- `Error validating field`: Invalid field type\n- `Error validating relation`: Missing or invalid relation\n\n---\n\n## Step 3: Fix by Convention\n\n### Primary Key Convention\n```prisma\n// Standard\nid String @id @db.Uuid\n```\n\n### Timestamp Convention\n```prisma\ncreated_at DateTime @db.Timestamptz\nupdated_at DateTime @db.Timestamptz\ndeleted_at DateTime? @db.Timestamptz\n```\n\n### Foreign Key Convention\n```prisma\n{parent}_id String @db.Uuid\n{parent} {prefix}_{parents} @relation(fields: [{parent}_id], references: [id], onDelete: Cascade)\n```\n\n### Union Type Fields (NOT enum)\n```prisma\n// DO NOT use Prisma enum\nstatus String // \"active\" | \"inactive\" defined in TypeScript\n\n// WRONG - Never do this\n// enum Status { ACTIVE INACTIVE }\n```\n\n### Self-referential Relation\n```prisma\nparent_id String? @db.Uuid\nparent {Model}? @relation(\"recursive\", fields: [parent_id], references: [id], onDelete: Cascade)\nchildren {Model}[] @relation(\"recursive\")\n```\n\n### Index Convention\n```prisma\n@@index([{parent}_id, status])\n@@index([name(ops: raw(\"gin_trgm_ops\"))], type: Gin)\n```\n\n---\n\n## Step 4: Verify\n\n```bash\nnpm run build:prisma\n```\n\nRepeat Steps 2-4 until no errors.\n\n---\n\n## Common Fixes\n\n| Error Pattern | Fix |\n|---------------|-----|\n| Missing relation | Add `@relation` with fields and references |\n| Invalid type | Use correct Prisma types (String, Int, DateTime, etc.) |\n| Duplicate model | Remove duplicate or rename |\n| Missing @@map | Add table name mapping |\n| Enum error | Replace with String type |\n\n---\n\n## Exit Condition\n\n- `npm run build:prisma` completes with no errors\n- All models properly defined\n- All relations valid\n",
10
+ ".claude/skills/fix-interface/SKILL.md": "---\nname: fix-interface\ndescription: Fix Interface and Controller compilation errors\nallowed-tools: Read, Edit, Write, Bash, Grep, Glob\n---\n\n# Fix Interface Errors\n\nFix interface and controller compilation errors according to code conventions.\n\n## FORBIDDEN\n\n**NEVER use:**\n- `as` keyword (type assertion)\n- `any` type\n\nFix type issues by properly defining interfaces.\n\n## DO NOT MODIFY\n\n**Leave as-is:**\n- `console.log` in Controller catch blocks\n- `console.error` in Controller catch blocks\n\nThese are intentional and should not be changed to NestJS Logger.\n\n---\n\n## Purpose\n\nFix compilation errors in interface and controller files to ensure `npm run build:main` passes.\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Run Build │\n│ npm run build:main │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Parse Interface Errors │\n│ - Empty interfaces {} │\n│ - Type mismatches │\n│ - Missing properties │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Fix by Convention │\n│ - Fill empty interfaces │\n│ - Add typia tags │\n│ - Fix nullable types │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 4: Re-run Build │\n│ Loop until 0 errors │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Run Build\n\n```bash\nnpm run build:main 2>&1 | head -100\n```\n\nCapture interface-related errors.\n\n---\n\n## Step 2: Parse Errors\n\nCommon error patterns:\n- `Type '{}' is not assignable` → Empty interface\n- `Property 'X' does not exist on type '{}'` → Empty interface\n- `Type 'string' is not assignable to type 'string & Format<\"uuid\">'` → Missing typia tag\n\n---\n\n## Step 3: Fix by Convention\n\n### Empty Interface Fix\nRead Prisma schema and fill interface:\n\n```typescript\n// Before\nexport type IEntity = {};\n\n// After\nimport { tags } from \"typia\";\n\nexport type IEntity = {\n id: string & tags.Format<\"uuid\">;\n name: string;\n status: \"active\" | \"inactive\";\n created_at: string & tags.Format<\"date-time\">;\n updated_at: string & tags.Format<\"date-time\">;\n deleted_at: (string & tags.Format<\"date-time\">) | null;\n};\n```\n\n### ICreate Convention\n```typescript\nexport namespace IEntity {\n export type ICreate = {\n name: string;\n status?: \"active\" | \"inactive\"; // optional with default\n };\n}\n```\n\n### IUpdate Convention\n```typescript\nexport namespace IEntity {\n export type IUpdate = {\n name?: string;\n status?: \"active\" | \"inactive\";\n };\n}\n```\n\n### ISummary Convention\n```typescript\nexport namespace IEntity {\n export type ISummary = {\n id: string & tags.Format<\"uuid\">;\n name: string;\n status: \"active\" | \"inactive\";\n created_at: string & tags.Format<\"date-time\">;\n };\n}\n```\n\n### IRequest Convention\n```typescript\nexport namespace IEntity {\n export type IRequest = {\n page?: number & tags.Minimum<1>;\n limit?: number & tags.Minimum<1> & tags.Maximum<100>;\n search?: string;\n status?: \"active\" | \"inactive\";\n };\n}\n```\n\n### Typia Tags\n```typescript\n// UUID\nid: string & tags.Format<\"uuid\">;\n\n// Email\nemail: string & tags.Format<\"email\">;\n\n// URL\nurl: string & tags.Format<\"uri\">;\n\n// DateTime\ncreated_at: string & tags.Format<\"date-time\">;\n\n// Numeric constraints\npage: number & tags.Minimum<1>;\nlimit: number & tags.Minimum<1> & tags.Maximum<100>;\n```\n\n### Nullable Types\n```typescript\n// Nullable field\ndeleted_at: (string & tags.Format<\"date-time\">) | null;\n\n// Optional nullable field\ndescription?: string | null;\n```\n\n### Path Naming Fix\nFix redundant path segments where the same word repeats:\n\n```typescript\n// Before - redundant word in path: /{word}/{word}s\n@Controller(\"{prefix}/{word}/{word}s\")\nexport class {Word}{Word}sController { ... }\n\n// After - remove redundant segment\n@Controller(\"{prefix}/{word}s\")\nexport class {Word}sController { ... }\n```\n\nPattern to fix:\n- `/{word}/{word}s` → `/{word}s`\n- `/{word}/{word}-*` → `/{word}-*` or `/{word}/*`\n\nWhen fixing paths, also update:\n1. Controller `@Controller()` decorator\n2. Controller class name\n3. Controller file name and directory\n4. Related provider function names\n5. Test file paths and API calls\n\n---\n\n## Step 4: Verify\n\n```bash\nnpm run build:main\n```\n\nRepeat Steps 2-4 until no interface errors.\n\n---\n\n## Common Fixes\n\n| Error Pattern | Fix |\n|---------------|-----|\n| Empty interface `{}` | Read Prisma schema, define all fields |\n| Missing typia tag | Add appropriate `tags.Format<>` |\n| Nullable mismatch | Add `\\| null` for nullable fields |\n| Missing namespace | Add namespace with ICreate, IUpdate, etc. |\n| Redundant path `/{word}/{word}s` | Remove duplication: `/{word}s` |\n\n---\n\n## Exit Condition\n\n- `npm run build:main` completes with no interface errors\n- All interfaces properly defined\n- All typia tags applied\n- No redundant path segments (`/{word}/{word}s` pattern)\n",
11
+ ".claude/skills/fix-provider/SKILL.md": "---\nname: fix-provider\ndescription: Fix Provider, Collector, Transformer compilation errors\nallowed-tools: Read, Edit, Write, Bash, Grep, Glob\n---\n\n# Fix Provider Errors\n\nFix provider, collector, and transformer compilation errors according to code conventions.\n\n## FORBIDDEN\n\n**NEVER use:**\n- `as` keyword (type assertion)\n- `any` type\n\nFix type issues by properly defining Collectors and Transformers.\n\n---\n\n## Purpose\n\nFix compilation errors in provider files to ensure `npm run build:main` passes.\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Run Build │\n│ npm run build:main │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Parse Provider Errors │\n│ - as any usage │\n│ - Type mismatches │\n│ - Missing imports │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Fix by Convention │\n│ - Create Collectors │\n│ - Create Transformers │\n│ - Remove type assertions │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 4: Re-run Build │\n│ Loop until 0 errors │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Run Build\n\n```bash\nnpm run build:main 2>&1 | head -100\n```\n\nCapture provider-related errors.\n\n---\n\n## Step 2: Find Issues\n\n```bash\n# Find as any usage\ngrep -rn \"as any\" src/providers/ --include=\"*.ts\"\n\n# Find any type\ngrep -rn \": any\" src/providers/ --include=\"*.ts\"\n\n# Find type assertions\ngrep -rn \" as \" src/providers/ --include=\"*.ts\" | grep -v \"import\"\n```\n\n---\n\n## Step 3: Fix by Convention\n\n### Create Collector (if missing)\n\n```typescript\n// src/collectors/{Prefix}{Entity}Collector.ts\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { Prisma } from \"@prisma/sdk\";\nimport { v4 } from \"uuid\";\n\nexport namespace {Prefix}{Entity}Collector {\n export function collect(props: {\n body: I{Prefix}{Entity}.ICreate;\n }): Prisma.{table_name}CreateInput {\n const id = v4();\n const now = new Date();\n\n return {\n id,\n field_name: props.body.field_name,\n optional_field: props.body.optional_field ?? null,\n parent: props.body.parent_id\n ? { connect: { id: props.body.parent_id } }\n : undefined,\n created_at: now,\n updated_at: now,\n deleted_at: null,\n };\n }\n}\n```\n\n### Create Transformer (if missing)\n\n```typescript\n// src/transformers/{Prefix}{Entity}Transformer.ts\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { {table_name} } from \"@prisma/sdk\";\n\nexport namespace {Prefix}{Entity}Transformer {\n export function transform(record: {table_name}): I{Prefix}{Entity} {\n return {\n id: record.id,\n name: record.name,\n status: record.status,\n created_at: record.created_at.toISOString(),\n updated_at: record.updated_at.toISOString(),\n deleted_at: record.deleted_at\n ? record.deleted_at.toISOString()\n : null,\n };\n }\n\n export function toSummary(record: {table_name}): I{Prefix}{Entity}.ISummary {\n return {\n id: record.id,\n name: record.name,\n status: record.status,\n created_at: record.created_at.toISOString(),\n };\n }\n\n export function transformMany(records: {table_name}[]): I{Prefix}{Entity}[] {\n return records.map(transform);\n }\n\n export function toSummaryList(records: {table_name}[]): I{Prefix}{Entity}.ISummary[] {\n return records.map(toSummary);\n }\n}\n```\n\n### Fix POST Provider\n\n```typescript\n// Before\nconst createData: any = { ... };\nreturn { id: created.id as string & tags.Format<\"uuid\">, ... };\n\n// After\nimport { {Prefix}{Entity}Collector } from \"../collectors/{Prefix}{Entity}Collector\";\nimport { {Prefix}{Entity}Transformer } from \"../transformers/{Prefix}{Entity}Transformer\";\n\nexport async function post{Prefix}{Entity}(props: {\n body: I{Prefix}{Entity}.ICreate;\n}): Promise<I{Prefix}{Entity}> {\n const data = {Prefix}{Entity}Collector.collect({ body: props.body });\n const created = await MyGlobal.prisma.{table}.create({ data });\n return {Prefix}{Entity}Transformer.transform(created);\n}\n```\n\n### Fix GET Provider\n\n```typescript\n// Before\nreturn {\n id: record.id as string & tags.Format<\"uuid\">,\n ...\n};\n\n// After\nimport { {Prefix}{Entity}Transformer } from \"../transformers/{Prefix}{Entity}Transformer\";\n\nexport async function get{Prefix}{Entity}(props: { id: string }): Promise<I{Prefix}{Entity}> {\n const record = await MyGlobal.prisma.{table}.findUnique({ where: { id: props.id } });\n if (!record) throw new HttpException(\"Not found\", 404);\n return {Prefix}{Entity}Transformer.transform(record);\n}\n```\n\n---\n\n## Step 4: Verify\n\n```bash\nnpm run build:main\n```\n\nRepeat Steps 2-4 until no provider errors.\n\n---\n\n## Common Fixes\n\n| Error Pattern | Fix |\n|---------------|-----|\n| `as any` | Create proper Collector/Transformer |\n| Type assertion | Use Transformer for conversion |\n| Missing import | Add import statement |\n| Null reference | Add null check before transform |\n\n---\n\n## Exit Condition\n\n- `npm run build:main` completes with no errors\n- No `as any` in providers\n- No type assertions in providers\n- All providers use Collector + Transformer\n",
12
+ ".claude/skills/fix-test/SKILL.md": "---\nname: fix-test\ndescription: Fix Test compilation errors\nallowed-tools: Read, Edit, Write, Bash, Grep, Glob\n---\n\n# Fix Test Errors\n\nFix test file compilation errors according to code conventions.\n\n## FORBIDDEN\n\n**NEVER use:**\n- `as` keyword (type assertion)\n- `any` type\n- `typia.random<EmptyType>()` - generates invalid data\n\n---\n\n## Purpose\n\nFix compilation errors in test files to ensure `npm run build:test` passes.\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Run Build │\n│ npm run build:test │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Parse Test Errors │\n│ - Empty prepare functions │\n│ - Type mismatches │\n│ - Missing imports │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Fix by Convention │\n│ - Fill prepare functions │\n│ - Create generate functions │\n│ - Fix import paths │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 4: Re-run Build │\n│ Loop until 0 errors │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Run Build\n\n```bash\nnpm run build:test 2>&1 | head -100\n```\n\nCapture test-related errors.\n\n---\n\n## Step 2: Find Issues\n\n```bash\n# Find empty returns\ngrep -rn \"return {}\" test/prepare/ --include=\"*.ts\"\n\n# Find typia.random with potentially empty types\ngrep -rn \"typia.random<\" test/ --include=\"*.ts\"\n```\n\n---\n\n## Step 3: Fix by Convention\n\n### Fix Empty prepare_random Function\n\n```typescript\n// Before\nexport function prepare_random_{prefix}_{entity}(\n input?: DeepPartial<I{Prefix}{Entity}.ICreate> | undefined,\n): I{Prefix}{Entity}.ICreate {\n return {}; // WRONG\n}\n\n// After\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { DeepPartial } from \"@ORGANIZATION/PROJECT-api/lib/typings/DeepPartial\";\nimport { RandomGenerator } from \"@nestia/e2e\";\nimport { randint } from \"tstl\";\nimport { v4 } from \"uuid\";\n\nexport function prepare_random_{prefix}_{entity}(\n input?: DeepPartial<I{Prefix}{Entity}.ICreate> | undefined,\n): I{Prefix}{Entity}.ICreate {\n return {\n parent_id: input?.parent_id ?? v4(),\n name: input?.name ?? RandomGenerator.name(2),\n title: input?.title ?? RandomGenerator.paragraph(1),\n content: input?.content ?? RandomGenerator.paragraph(3),\n is_public: input?.is_public ?? true,\n status: input?.status ?? \"active\",\n };\n}\n```\n\n### Create Missing generate_random Function\n\n```typescript\nimport { I{Prefix}{Entity} } from \"@ORGANIZATION/PROJECT-api/lib/structures/I{Prefix}{Entity}\";\nimport { DeepPartial } from \"@ORGANIZATION/PROJECT-api/lib/typings/DeepPartial\";\nimport api from \"@ORGANIZATION/PROJECT-api\";\n\nimport { prepare_random_{prefix}_{entity} } from \"../prepare/prepare_random_{prefix}_{entity}\";\n\nexport async function generate_random_{prefix}_{entity}(\n connection: api.IConnection,\n input?: DeepPartial<I{Prefix}{Entity}.ICreate> | undefined,\n): Promise<I{Prefix}{Entity}> {\n const body = prepare_random_{prefix}_{entity}(input);\n return api.functional.{prefix}.{path}.create(connection, body);\n}\n```\n\n### Field Generation Patterns\n\n| Field Type | Generation Pattern |\n|------------|-------------------|\n| UUID | `v4()` |\n| Name/Title | `RandomGenerator.name(2)` |\n| Paragraph | `RandomGenerator.paragraph(1)` |\n| Email | `` `${RandomGenerator.string(8)}@example.com` `` |\n| URL | `` `https://example.com/${RandomGenerator.string(10)}` `` |\n| Integer | `randint(min, max)` |\n| Boolean | `Math.random() > 0.5` |\n| Date (ISO) | `new Date().toISOString()` |\n| Union Type | `([\"val1\", \"val2\"] as const)[randint(0, 1)]` |\n\n### Replace typia.random with prepare function\n\n```typescript\n// Before\nconst data = typia.random<I{Prefix}{Entity}.ICreate>();\n\n// After\nimport { prepare_random_{prefix}_{entity} } from \"../prepare/prepare_random_{prefix}_{entity}\";\n\nconst data = prepare_random_{prefix}_{entity}({\n status: \"active\", // Can override specific values\n});\n```\n\n---\n\n## Step 4: Verify\n\n```bash\nnpm run build:test\n```\n\nRepeat Steps 2-4 until no test build errors.\n\n---\n\n## Common Fixes\n\n| Error Pattern | Fix |\n|---------------|-----|\n| Empty `return {}` | Fill with proper random generators |\n| `typia.random<EmptyType>` | Use prepare_random function |\n| Missing generate function | Create matching generate_random |\n| Import error | Fix import path |\n\n---\n\n## Exit Condition\n\n- `npm run build:test` completes with no errors\n- All prepare functions return complete objects\n- All generate functions exist for prepare functions\n- No `typia.random` with empty types\n",
13
+ ".claude/skills/validate-db/SKILL.md": "---\nname: validate-db\ndescription: Validate Prisma schema against requirements specification (read-only)\nallowed-tools: Read, Grep, Glob\n---\n\n# Validate Database Schema\n\nValidate that Prisma schema matches the requirements specification. This skill only checks for discrepancies - it does NOT modify any files.\n\n## Purpose\n\nCompare requirements documents with Prisma schema and report:\n- ✅ Matching items\n- ❌ Mismatching items (needs fix)\n- ⚠️ Items requiring review\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Read Requirements │\n│ /docs/analysis/*.md │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Read Prisma Schema │\n│ /prisma/schema/*.prisma │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Compare & Report │\n│ - Missing tables │\n│ - Missing columns │\n│ - Type mismatches │\n│ - Relationship issues │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Read Requirements\n\n```bash\nfind docs/analysis -name \"*.md\" -type f\n```\n\nExtract from each document:\n- Entity definitions\n- Field requirements (name, type, nullable, constraints)\n- Relationship descriptions\n- Business rules\n\n---\n\n## Step 2: Read Prisma Schema\n\n```bash\nfind prisma/schema -name \"*.prisma\" -type f\n```\n\nExtract from schema:\n- Model definitions\n- Field types and attributes\n- Relations and foreign keys\n- Indexes\n\n---\n\n## Step 3: Validation Checks\n\n### 3.1 Entity Coverage\nFor each entity in requirements:\n- ✅ Model exists in schema\n- ❌ Model missing from schema\n\n### 3.2 Field Coverage\nFor each required field:\n- ✅ Field exists with correct type\n- ❌ Field missing\n- ❌ Field has wrong type\n- ⚠️ Nullable mismatch\n\n### 3.3 Relationship Coverage\nFor each relationship:\n- ✅ Relation properly defined\n- ❌ Relation missing\n- ❌ Wrong cardinality (1:1, 1:N, N:M)\n- ⚠️ Missing onDelete cascade\n\n### 3.4 Naming Convention\n- ✅ Table names follow `{prefix}_{entities}` pattern\n- ❌ Inconsistent naming\n- ⚠️ Non-standard field names\n\n**Boolean fields:**\n- ✅ Boolean fields have `is_` prefix (e.g., `is_active`, `is_public`)\n- ❌ Boolean field missing `is_` prefix (e.g., `active` → `is_active`)\n\n**Field name consistency:**\n- ✅ Same-purpose fields have consistent names across tables\n- ❌ Inconsistent naming (e.g., `expires_at` in one table, `expired_at` in another)\n- Common fields to check: `*_at` timestamps, `*_id` foreign keys, status fields\n\n### 3.5 Table Necessity\nCompare with requirements to identify unnecessary tables:\n\n**Duplicate tables:**\n- ❌ Multiple tables serving same purpose\n- ⚠️ Tables with overlapping responsibilities\n\n**Unnecessary snapshot/history tables:**\n- ❌ Snapshot table exists but requirements say data should be directly editable\n- ❌ History table without audit/versioning requirement\n- ✅ Snapshot table exists and requirements specify versioning/history\n\n---\n\n## Output Format\n\n```markdown\n# Validation Report: Database Schema\n\n## Summary\n- Total entities in requirements: X\n- Entities found in schema: Y\n- Missing entities: Z\n\n## ✅ Valid Items\n- [Entity] `users` - All fields match\n- [Entity] `posts` - All fields match\n\n## ❌ Issues Found\n- [Missing Entity] `comments` - Defined in requirements but not in schema\n- [Missing Field] `users.phone` - Required but not defined\n- [Type Mismatch] `posts.view_count` - Expected Int, found String\n- [Naming] `users.active` - Boolean field should be `is_active`\n- [Naming] `sessions.expired_at` - Inconsistent with `tokens.expires_at`\n- [Unnecessary Table] `post_snapshots` - Requirements say posts are directly editable\n\n## ⚠️ Warnings\n- [Nullable] `users.bio` - Requirements say required, schema allows null\n- [Index] `posts` - Consider adding index on `created_at`\n- [Duplicate] `user_profiles` and `users` - May have overlapping responsibilities\n\n## Recommendation\nRun `/fix-db` to fix the issues above.\n```\n\n---\n\n## Important\n\n**This skill is READ-ONLY.**\n\n- Does NOT modify any files\n- Does NOT run any build commands\n- Only reports discrepancies\n\nTo fix issues, use `/fix-db` skill.\n",
14
+ ".claude/skills/validate-interface/SKILL.md": "---\nname: validate-interface\ndescription: Validate Controllers and DTOs against requirements (read-only)\nallowed-tools: Read, Grep, Glob\n---\n\n# Validate Interface (Controllers, DTOs)\n\nValidate that Controllers and DTO interfaces match the requirements specification. This skill only checks for discrepancies - it does NOT modify any files.\n\n## Purpose\n\nCompare requirements documents with interface definitions and report:\n- ✅ Matching items\n- ❌ Mismatching items (needs fix)\n- ⚠️ Items requiring review\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Read Requirements │\n│ /docs/analysis/*.md │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Read Prisma Schema │\n│ /prisma/schema/*.prisma │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Read Interfaces & Controllers│\n│ /src/api/structures/ │\n│ /src/controllers/ │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 4: Compare & Report │\n│ - Missing APIs │\n│ - Empty interfaces │\n│ - Type mismatches │\n│ - Missing DTOs │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Read Requirements\n\n```bash\nfind docs/analysis -name \"*.md\" -type f\n```\n\nExtract required APIs:\n- HTTP methods (GET, POST, PATCH, PUT, DELETE)\n- URL paths\n- Request/response structures\n- Authentication requirements\n\n---\n\n## Step 2: Read Prisma Schema\n\n```bash\nfind prisma/schema -name \"*.prisma\" -type f\n```\n\nUnderstand data model for DTO validation.\n\n---\n\n## Step 3: Read Current Implementation\n\n```bash\n# Controllers\nfind src/controllers -name \"*Controller.ts\" -type f\n\n# Interfaces\nfind src/api/structures -name \"I*.ts\" -type f\n```\n\n---\n\n## Step 4: Validation Checks\n\n### 4.1 API Coverage\nFor each required API:\n- ✅ Controller method exists\n- ❌ API missing\n\n### 4.2 Interface Completeness\nFor each interface file:\n- ✅ All properties defined\n- ❌ Empty interface `{}`\n- ❌ Missing ICreate/IUpdate/ISummary\n\n### 4.3 Type Alignment with Prisma\nFor each DTO property:\n- ✅ Type matches Prisma field\n- ❌ Type mismatch\n- ❌ Missing nullable annotation\n- ⚠️ Missing typia tags\n\n### 4.4 Controller Structure\n- ✅ Proper decorators (@TypedRoute, @TypedBody)\n- ❌ Missing authentication decorator\n- ⚠️ Inconsistent naming\n\n### 4.5 Path Naming\nCheck for redundant path segments where the same word repeats:\n- ❌ `/{word}/{word}s` - e.g., `/admin/admins`, `/user/users`\n- ❌ `/{word}/{word}-*` - e.g., `/item/item-details`\n- ❌ `/{prefix}/{prefix}-*` - prefix repeated in resource path\n\nFix by removing redundant segment:\n- ✅ `/{word}s` - e.g., `/admins`, `/users`\n- ✅ `/{prefix}/{resources}` - no repetition\n\n---\n\n## Output Format\n\n```markdown\n# Validation Report: Interfaces\n\n## Summary\n- Required APIs: X\n- Implemented APIs: Y\n- Missing APIs: Z\n- Empty interfaces: W\n\n## ✅ Valid Items\n- [Controller] `AdminEntitiesController` - All methods present\n- [Interface] `IEntity` - Properly defined\n\n## ❌ Issues Found\n- [Missing API] `DELETE /admin/entities/:id` - Not implemented\n- [Empty Interface] `IEntity.ICreate` - No properties defined\n- [Type Mismatch] `IEntity.status` - Expected union type, found string\n\n## ⚠️ Warnings\n- [Missing Tag] `IEntity.id` - Should have `tags.Format<\"uuid\">`\n- [Nullable] `IEntity.deleted_at` - Should be `(string & tags.Format<\"date-time\">) | null`\n- [Path Naming] `/{word}/{word}s` pattern detected - Redundant path segment, remove duplication\n\n## Recommendation\nRun `/fix-interface` to fix the issues above.\n```\n\n---\n\n## Important\n\n**This skill is READ-ONLY.**\n\n- Does NOT modify any files\n- Does NOT run any build commands\n- Only reports discrepancies\n\nTo fix issues, use `/fix-interface` skill.\n",
15
+ ".claude/skills/validate-provider/SKILL.md": "---\nname: validate-provider\ndescription: Validate Providers against interfaces (read-only)\nallowed-tools: Read, Grep, Glob\n---\n\n# Validate Providers\n\nValidate that Providers, Collectors, and Transformers properly implement the interfaces. This skill only checks for discrepancies - it does NOT modify any files.\n\n## Purpose\n\nCompare interface definitions with provider implementations and report:\n- ✅ Matching items\n- ❌ Mismatching items (needs fix)\n- ⚠️ Items requiring review\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Read Interfaces │\n│ /src/api/structures/ │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Read Providers │\n│ /src/providers/ │\n│ /src/collectors/ │\n│ /src/transformers/ │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Compare & Report │\n│ - Missing providers │\n│ - Missing collectors │\n│ - Missing transformers │\n│ - Type safety issues │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Read Interfaces\n\n```bash\nfind src/api/structures -name \"I*.ts\" -type f\n```\n\nFor each interface, identify:\n- Main entity type\n- ICreate subtype\n- IUpdate subtype\n- ISummary subtype\n\n---\n\n## Step 2: Read Implementation Files\n\n```bash\n# Providers\nfind src/providers -name \"*.ts\" -type f\n\n# Collectors\nfind src/collectors -name \"*Collector.ts\" -type f\n\n# Transformers\nfind src/transformers -name \"*Transformer.ts\" -type f\n```\n\n---\n\n## Step 3: Validation Checks\n\n### 3.1 Provider Coverage\nFor each interface:\n- ✅ POST provider exists (uses ICreate)\n- ✅ GET provider exists (returns Interface)\n- ✅ PATCH/PUT provider exists (uses IUpdate)\n- ✅ DELETE provider exists\n- ❌ Provider missing\n\n### 3.2 Collector Coverage\nFor each interface with ICreate:\n- ✅ Collector exists\n- ✅ Collector returns Prisma.CreateInput\n- ❌ Collector missing\n- ❌ Wrong return type\n\n### 3.3 Transformer Coverage\nFor each interface:\n- ✅ Transformer exists\n- ✅ transform() method defined\n- ✅ toSummary() method defined\n- ❌ Transformer missing\n- ❌ Methods missing\n\n### 3.4 Type Safety\nSearch for anti-patterns:\n- ❌ `as any` usage\n- ❌ `any` type annotations\n- ❌ Type assertions (`as Type`)\n- ⚠️ Inline transformations (should use Transformer)\n\n---\n\n## Output Format\n\n```markdown\n# Validation Report: Providers\n\n## Summary\n- Interfaces: X\n- Providers found: Y\n- Collectors found: Z\n- Transformers found: W\n\n## ✅ Valid Items\n- [Provider] `postEntity` - Uses Collector, returns via Transformer\n- [Collector] `EntityCollector` - Properly typed\n- [Transformer] `EntityTransformer` - All methods present\n\n## ❌ Issues Found\n- [Missing Collector] `AnotherEntity` - No collector for ICreate\n- [Missing Transformer] `AnotherEntity` - No transformer defined\n- [Type Safety] `postEntity.ts:27` - Uses `as any`\n- [Type Safety] `getEntity.ts:15` - Inline transformation instead of Transformer\n\n## ⚠️ Warnings\n- [Unused Import] `postEntity.ts` - Imports unused module\n- [Missing Null Check] `getEntity.ts:20` - Should check for null before transform\n\n## Recommendation\nRun `/fix-provider` to fix the issues above.\n```\n\n---\n\n## Important\n\n**This skill is READ-ONLY.**\n\n- Does NOT modify any files\n- Does NOT run any build commands\n- Only reports discrepancies\n\nTo fix issues, use `/fix-provider` skill.\n",
16
+ ".claude/skills/validate-test/SKILL.md": "---\nname: validate-test\ndescription: Validate test coverage against providers (read-only)\nallowed-tools: Read, Grep, Glob\n---\n\n# Validate Test Infrastructure\n\nValidate that test infrastructure properly covers providers and interfaces. This skill only checks for discrepancies - it does NOT modify any files.\n\n## Purpose\n\nCompare interface/provider implementations with test coverage and report:\n- ✅ Matching items\n- ❌ Mismatching items (needs fix)\n- ⚠️ Items requiring review\n\n## Workflow\n\n```\n┌─────────────────────────────────────┐\n│ Step 1: Read Interfaces │\n│ /src/api/structures/ (ICreate) │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 2: Read Test Files │\n│ /test/prepare/ │\n│ /test/generate/ │\n│ /test/features/api/ │\n└───────────────┬─────────────────────┘\n │\n ▼\n┌─────────────────────────────────────┐\n│ Step 3: Compare & Report │\n│ - Missing prepare functions │\n│ - Missing generate functions │\n│ - Missing test scenarios │\n│ - Empty implementations │\n└─────────────────────────────────────┘\n```\n\n---\n\n## Step 1: Extract ICreate Interfaces\n\n```bash\ngrep -r \"export type ICreate\\|\\.ICreate\" src/api/structures/ --include=\"*.ts\"\n```\n\nList all interfaces that need test data generators.\n\n---\n\n## Step 2: Read Test Files\n\n```bash\n# Prepare functions\nfind test/prepare -name \"prepare_random_*.ts\" -type f\n\n# Generate functions\nfind test/generate -name \"generate_random_*.ts\" -type f\n\n# Feature tests\nfind test/features/api -name \"*.ts\" -type f\n```\n\n---\n\n## Step 3: Validation Checks\n\n### 3.1 prepare_random Coverage\nFor each ICreate interface:\n- ✅ prepare_random_* function exists\n- ❌ Function missing\n- ❌ Function returns empty `{}`\n\n### 3.2 generate_random Coverage\nFor each prepare_random function:\n- ✅ generate_random_* function exists (1:1 mapping)\n- ❌ Function missing\n- ❌ Orphan generate without prepare\n\n### 3.3 Test Scenario Coverage\nFor each entity:\n- ✅ Create test exists\n- ✅ Read test exists\n- ✅ Update test exists\n- ✅ Delete test exists\n- ❌ Missing CRUD tests\n- ⚠️ Missing edge case tests\n\n### 3.4 Test Quality\n- ✅ Uses prepare_random (not hardcoded data)\n- ✅ Uses generate_random (not direct API calls)\n- ❌ Uses typia.random with empty type\n- ❌ Hardcoded UUIDs\n- ⚠️ Missing assertions\n\n---\n\n## Output Format\n\n```markdown\n# Validation Report: Test Infrastructure\n\n## Summary\n- ICreate interfaces: X\n- prepare_random functions: Y\n- generate_random functions: Z\n- Test files: W\n\n## ✅ Valid Items\n- [Prepare] `prepare_random_entity` - All fields generated\n- [Generate] `generate_random_entity` - Properly calls API\n- [Test] `test_entity_create` - Complete assertions\n\n## ❌ Issues Found\n- [Missing Prepare] `another_entity` - No prepare function for ICreate\n- [Missing Generate] `another_entity` - No generate function\n- [Empty Prepare] `prepare_random_thing.ts` - Returns `{}`\n- [Orphan Generate] `generate_random_old.ts` - No matching prepare function\n\n## ⚠️ Warnings\n- [Missing Test] `entity` - No delete test scenario\n- [Edge Case] `entity` - No validation error test\n- [Edge Case] `entity` - No unauthorized access test\n\n## Recommendation\nRun `/fix-test` to fix the issues above.\n```\n\n---\n\n## Important\n\n**This skill is READ-ONLY.**\n\n- Does NOT modify any files\n- Does NOT run any build commands\n- Only reports discrepancies\n\nTo fix issues, use `/fix-test` skill.\n",
5
17
  ".env.local": "API_PORT=37001\nJWT_SECRET_KEY=your_jwt_secret_key",
6
18
  ".github/workflows/build.yml": "name: build\non:\n pull_request:\n paths:\n - 'src/**'\n - 'test/**'\n - 'package.json'\njobs:\n Ubuntu:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - uses: actions/setup-node@v4\n with:\n node-version: 20.x\n - uses: pnpm/action-setup@v4\n with:\n version: 8\n \n - name: Install Backend-Server\n run: pnpm install\n\n - name: Build Swagger\n run: pnpm run build:swagger\n\n - name: Build SDK\n run: pnpm run build:sdk\n\n - name: Compile Backend-Server\n run: pnpm run build\n\n - name: Run Test Program\n run: pnpm run test -- --reset true --simultaneous 16\n\n - name: EsLint\n run: pnpm run eslint\n",
7
- "src/MyConfiguration.ts": "import { ExceptionManager } from \"@nestia/core\";\nimport {\n ConflictException,\n InternalServerErrorException,\n NotFoundException,\n} from \"@nestjs/common\";\nimport { Prisma } from \"@prisma/client\";\nimport fs from \"fs\";\nimport path from \"path\";\n\nimport { MyGlobal } from \"./MyGlobal\";\n\nexport namespace MyConfiguration {\n export const API_PORT = () => Number(MyGlobal.env.API_PORT);\n export const ROOT = (() => {\n const split: string[] = __dirname.split(path.sep);\n return split.at(-1) === \"src\" && split.at(-2) === \"bin\"\n ? path.resolve(__dirname + \"/../..\")\n : fs.existsSync(__dirname + \"/.env\")\n ? __dirname\n : path.resolve(__dirname + \"/..\");\n })().replaceAll(\"\\\\\", \"/\");\n}\n\nExceptionManager.insert(Prisma.PrismaClientKnownRequestError, (exp) => {\n switch (exp.code) {\n case \"P2025\":\n return new NotFoundException(exp.message);\n case \"P2002\": // UNIQUE CONSTRAINT\n return new ConflictException(exp.message);\n default:\n return new InternalServerErrorException(exp.message);\n }\n});\n",
19
+ "CLAUDE.md": "# AutoBE Generated Project\n\n## Overview\n\nThis is an **AutoBE-generated** NestJS backend API. The codebase was automatically generated by AutoBE (AI vibe coding agent) and may contain incomplete implementations that require manual fixes.\n\n## Tech Stack\n\n| Technology | Purpose |\n|------------|---------|\n| **NestJS** | Backend framework |\n| **Nestia** | SDK generation, type-safe API |\n| **Prisma** | ORM with PostgreSQL |\n| **Typia** | Runtime type validation |\n| **TypeScript** | Language |\n\n## Directory Structure\n\n```\n/prisma/schema/ # Prisma schema files (split by domain)\n├── main.prisma # Generator config, datasource\n├── schema-*.prisma # Domain-specific schemas\n\n/src/\n├── api/structures/ # TypeScript interfaces (DTOs)\n├── controllers/ # NestJS controllers (nested by route)\n├── providers/ # Business logic implementations\n├── collectors/ # ICreate → Prisma.CreateInput\n├── transformers/ # Prisma record → Interface\n├── decorators/ # Custom decorators (AdminAuth, etc.)\n├── prisma/ # Generated Prisma client\n├── utils/ # Utility functions\n└── MyModule.ts # Root NestJS module\n\n/test/\n├── prepare/ # Random data generators for tests\n├── generate/ # Entity creation helpers\n├── features/api/ # Feature tests by domain\n└── authorize/ # Auth test utilities\n```\n\n## Build Commands\n\nExecute in this order:\n\n```bash\nnpm run build:prisma # 1. Generate Prisma client\nnpm run build:main # 2. Compile TypeScript (src → lib)\nnpm run build:test # 3. Compile tests\nnpm run test # 4. Run tests\n```\n\nOther useful commands:\n```bash\nnpm run build:sdk # Generate Nestia SDK to packages/api\nnpm run dev # Watch mode for development\nnpm start # Run compiled server\n```\n\n## Known Issues (AutoBE Generated)\n\n### Critical Issues\n\n| Issue | Location | Impact |\n|-------|----------|--------|\n| Empty interface definitions `{}` | `/src/api/structures/` | Type safety broken |\n| Empty test prepare functions | `/test/prepare/` | Tests fail with empty data |\n| `as any` casting in providers | `/src/providers/` | Type safety bypassed |\n| console statements in business logic | `/src/providers/`, `/src/collectors/`, `/src/transformers/` | Should be removed |\n| Dual-parent FKs without constraints | attachments, reference_links | Data integrity risk |\n\n### How to Fix\n\nUse the provided Claude Skills (slash commands):\n\n#### [1] Validate Skills (Read-Only)\n\n| Command | Purpose |\n|---------|---------|\n| `/validate-db` | Validate Prisma schema against requirements |\n| `/validate-interface` | Validate Controllers, APIs, DTOs against requirements |\n| `/validate-provider` | Validate Collectors, Transformers, Providers |\n| `/validate-test` | Validate test infrastructure against interfaces |\n\n#### [2] Fix Skills (Compilation Errors)\n\n| Command | Purpose |\n|---------|---------|\n| `/fix-db` | Fix Prisma schema compilation errors |\n| `/fix-interface` | Fix interface/DTO compilation errors |\n| `/fix-provider` | Fix Collector/Transformer/Provider errors |\n| `/fix-test` | Fix test compilation errors |\n\n#### [3] Add Feature Skill\n\n| Command | Purpose |\n|---------|---------|\n| `/add-feature [description]` | Implement new feature with self-testing loop until 100% pass |\n\n## User Request Patterns\n\n| User Request | Action |\n|--------------|--------|\n| \"Review this project\", \"Validate everything\" | `/validate-db` → `/validate-interface` → `/validate-provider` → `/validate-test` (sequential) |\n| \"Validate DB schema\" | `/validate-db` |\n| \"Validate interfaces\", \"Check APIs\" | `/validate-interface` |\n| \"Validate providers\", \"Check collectors\" | `/validate-provider` |\n| \"Validate tests\" | `/validate-test` |\n| \"Fix build errors\", \"Fix compilation errors\" | `/fix-db` → `/fix-interface` → `/fix-provider` → `/fix-test` (sequential) |\n| \"Add new feature [description]\" | `/add-feature [description]` |\n\n## Naming Conventions\n\n| Category | Pattern | Example |\n|----------|---------|---------|\n| Interfaces | `I{Prefix}{Entity}` | `I{Prefix}User` |\n| Controllers | `{Prefix}{Entity}Controller` | `{Prefix}AdminUsersController` |\n| Providers | `verb{Prefix}{Entity}` | `post{Prefix}AdminUsers` |\n| DB Tables | `{prefix}_{entities}` | `{prefix}_users` |\n| Test Prepare | `prepare_random_{prefix}_{entity}` | `prepare_random_{prefix}_user` |\n\n## Type Usage\n\n### Typia Tags\n\nAlways use typia tags for validation:\n\n```typescript\nimport { tags } from \"typia\";\n\nexport type IExample = {\n id: string & tags.Format<\"uuid\">;\n email: string & tags.Format<\"email\">;\n url: string & tags.Format<\"uri\">;\n created_at: string & tags.Format<\"date-time\">;\n deleted_at: (string & tags.Format<\"date-time\">) | null;\n};\n```\n\n### Enum Types\n\nUse union types for enums:\n\n```typescript\nstatus: \"active\" | \"inactive\";\nrole: \"master\" | \"moderator\";\ntype: \"create\" | \"update\" | \"delete\";\n```\n\n## Utility Functions\n\n| Function | Location | Purpose |\n|----------|----------|---------|\n| `v4()` | `uuid` package | Generate UUIDs |\n| `PasswordUtil.hash()` | `/src/utils/PasswordUtil` | Hash passwords |\n| `PasswordUtil.compare()` | `/src/utils/PasswordUtil` | Compare passwords |\n\n## Key Files Reference\n\n| Purpose | File Path |\n|---------|-----------|\n| Main module | `/src/MyModule.ts` |\n| Global config | `/src/MyGlobal.ts` |\n| Auth decorator | `/src/decorators/AdminAuth.ts` |\n| Prisma entry | `/prisma/schema/main.prisma` |\n| Test entry | `/test/index.ts` |\n\n## Modification Guidelines\n\n### DO\n\n- Read the corresponding Prisma schema before modifying interfaces\n- Run `npm run build:main` after changes to verify\n- Use typia tags for all validation\n- Follow existing naming conventions\n- Update related tests when modifying interfaces\n\n### DON'T\n\n- Use `as any` type casting\n- Use `console` in providers, collectors, transformers (remove them)\n- Create orphaned attachments/reference_links (must have exactly one parent)\n- Skip interface definitions (empty `{}` types)\n- Use `typia.random<EmptyType>()` in tests\n\n## Database Schema Patterns\n\n### Common Entity Structure\n\n```prisma\nmodel {prefix}_{entities} {\n id String @id @db.Uuid\n\n // Fields\n name String\n status String // \"active\" | \"inactive\"\n\n // Foreign keys\n {parent}_id String @db.Uuid\n\n // Timestamps\n created_at DateTime @db.Timestamptz\n updated_at DateTime @db.Timestamptz\n deleted_at DateTime? @db.Timestamptz\n\n // Relations\n {parent} {prefix}_{parents} @relation(fields: [{parent}_id], references: [id], onDelete: Cascade)\n\n // Indexes\n @@index([{parent}_id, status])\n @@map(\"{prefix}_{entities}\")\n}\n```\n\n### Relationship Pattern\n\n```\nParent (1) ──> (*) Child\nEntity (1) ──> (*) History\nEntity (1) ──> (*) Attachment\n```\n\n## API Endpoint Patterns\n\n| Domain | Base Path | Auth |\n|--------|-----------|------|\n| Auth | `/{prefix}/auth/admin` | Public |\n| Admin Profile | `/{prefix}/admin/profile` | Required |\n| Admin Resources | `/{prefix}/admin/{resources}` | Required |\n| Public Resources | `/{prefix}/{resources}` | Optional |\n",
20
+ "src/MyConfiguration.ts": "import { ExceptionManager } from \"@nestia/core\";\nimport {\n ConflictException,\n InternalServerErrorException,\n NotFoundException,\n} from \"@nestjs/common\";\nimport { Prisma } from \"@prisma/sdk\";\nimport fs from \"fs\";\nimport path from \"path\";\n\nimport { MyGlobal } from \"./MyGlobal\";\n\nexport namespace MyConfiguration {\n export const API_PORT = () => Number(MyGlobal.env.API_PORT);\n export const ROOT = (() => {\n const split: string[] = __dirname.split(path.sep);\n return split.at(-1) === \"src\" && split.at(-2) === \"bin\"\n ? path.resolve(__dirname + \"/../..\")\n : fs.existsSync(__dirname + \"/.env\")\n ? __dirname\n : path.resolve(__dirname + \"/..\");\n })().replaceAll(\"\\\\\", \"/\");\n}\n\nExceptionManager.insert(Prisma.PrismaClientKnownRequestError, (exp) => {\n switch (exp.code) {\n case \"P2025\":\n return new NotFoundException(exp.message);\n case \"P2002\": // UNIQUE CONSTRAINT\n return new ConflictException(exp.message);\n default:\n return new InternalServerErrorException(exp.message);\n }\n});\n",
8
21
  "src/providers/authorize/jwtAuthorize.ts": "import { ForbiddenException, UnauthorizedException } from \"@nestjs/common\";\nimport jwt from \"jsonwebtoken\";\n\nimport { MyGlobal } from \"../../MyGlobal\";\n\nexport function jwtAuthorize(props: {\n request: {\n headers: { authorization?: string };\n };\n}) {\n if (!props.request.headers.authorization)\n throw new ForbiddenException(\"No token value exists\");\n\n // PARSE TOKEN\n try {\n if (\n props.request.headers.authorization.startsWith(BEARER_PREFIX) === true\n ) {\n const token: string = props.request.headers.authorization.substring(\n BEARER_PREFIX.length,\n );\n\n const verified = jwt.verify(token, MyGlobal.env.JWT_SECRET_KEY);\n\n return verified;\n } else {\n const token = props.request.headers.authorization;\n\n const verified = jwt.verify(token, MyGlobal.env.JWT_SECRET_KEY);\n\n return verified;\n }\n } catch {\n throw new UnauthorizedException(\"Invalid token\");\n }\n}\n\nconst BEARER_PREFIX = \"Bearer \";\n",
9
22
  "src/setup/MySetupWizard.ts": "import cp from \"child_process\";\n\nimport { MyConfiguration } from \"../MyConfiguration\";\nimport { MyGlobal } from \"../MyGlobal\";\n\nexport namespace MySetupWizard {\n export async function schema(): Promise<void> {\n if (MyGlobal.testing === false)\n throw new Error(\n \"Error on MySetupWizard.schema(): unable to reset database in non-test mode.\",\n );\n const execute = (type: string) => (argv: string) =>\n cp.execSync(`npx prisma migrate ${type} --schema=prisma/schema ${argv}`, {\n stdio: \"ignore\",\n cwd: MyConfiguration.ROOT,\n });\n execute(\"reset\")(\"--force\");\n execute(\"dev\")(\"--name init\");\n }\n\n export async function seed(): Promise<void> {}\n}\n",
10
- "src/utils/PasswordUtil.ts": "import crypto from \"crypto\";\n\nexport namespace PasswordUtil {\n /**\n * Common password utilities for consistent authentication Uses native crypto\n * module for password hashing\n */\n // Fixed salt for password hashing (consistent across all operations)\n export const FIXED_SALT: \"autobe-fixed-salt-2024\" = \"autobe-fixed-salt-2024\";\n\n /**\n * Hash a plain password using crypto.pbkdf2 All authentication operations\n * (join, login) MUST use this method\n *\n * @param plainPassword - The plain text password to hash\n * @returns The hashed password as hex string\n */\n export async function hash(plainPassword: string): Promise<string> {\n return new Promise((resolve, reject) => {\n crypto.pbkdf2(\n plainPassword,\n PasswordUtil.FIXED_SALT,\n 10000,\n 64,\n \"sha512\",\n (err: Error | null, derivedKey: Buffer) => {\n if (err) reject(err);\n else resolve(derivedKey.toString(\"hex\"));\n },\n );\n });\n }\n\n /**\n * Verify a plain password against a hashed password Login operations MUST use\n * this method for password verification\n *\n * @param plainPassword - The plain text password to verify\n * @param hashedPassword - The hashed password from database\n * @returns True if passwords match, false otherwise\n */\n export async function verify(\n plainPassword: string,\n hashedPassword: string,\n ): Promise<boolean> {\n const hash = await PasswordUtil.hash(plainPassword);\n return hash === hashedPassword;\n }\n}\n",
23
+ "src/utils/PasswordUtil.ts": "import crypto from \"crypto\";\n\nexport namespace PasswordUtil {\n /**\n * Common password utilities for consistent authentication Uses native crypto\n * module for password hashing\n */\n // Fixed salt for password hashing (consistent across all operations)\n export const FIXED_SALT: string = \"autobe-fixed-salt-2024\";\n\n /**\n * Hash a plain password using crypto.pbkdf2 All authentication operations\n * (join, login) MUST use this method\n *\n * @param plainPassword - The plain text password to hash\n * @returns The hashed password as hex string\n */\n export async function hash(plainPassword: string): Promise<string> {\n return new Promise((resolve, reject) => {\n crypto.pbkdf2(\n plainPassword,\n PasswordUtil.FIXED_SALT,\n 10000,\n 64,\n \"sha512\",\n (err: Error | null, derivedKey: Buffer) => {\n if (err) reject(err);\n else resolve(derivedKey.toString(\"hex\"));\n },\n );\n });\n }\n\n /**\n * Verify a plain password against a hashed password Login operations MUST use\n * this method for password verification\n *\n * @param plainPassword - The plain text password to verify\n * @param hashedPassword - The hashed password from database\n * @returns True if passwords match, false otherwise\n */\n export async function verify(\n plainPassword: string,\n hashedPassword: string,\n ): Promise<boolean> {\n const hash = await PasswordUtil.hash(plainPassword);\n return hash === hashedPassword;\n }\n}\n",
11
24
  "src/utils/toISOStringSafe.ts": "import { tags } from \"typia\";\n\n/**\n * Transforms a value that is either a Date or a string into an ISO 8601\n * formatted string. If it's already a string, it assumes it's already in ISO\n * format.\n */\nexport function toISOStringSafe(\n value: Date | (string & tags.Format<\"date-time\">),\n): string & tags.Format<\"date-time\"> {\n if (value instanceof Date) {\n return value.toISOString() as string & tags.Format<\"date-time\">;\n }\n return value;\n}\n",
12
25
  "test/servant.ts": "import { DynamicExecutor } from \"@nestia/e2e\";\nimport { Driver, WorkerServer } from \"tgrid\";\n\nimport { MyBackend } from \"../src/MyBackend\";\nimport { MyGlobal } from \"../src/MyGlobal\";\nimport { IAutoBeRealizeTestConfig } from \"./autobe/compiler/IAutoBeRealizeTestConfig\";\nimport { IAutoBeRealizeTestListener } from \"./autobe/compiler/IAutoBeRealizeTestListener\";\nimport { IAutoBeRealizeTestOperation } from \"./autobe/compiler/IAutoBeRealizeTestOperation\";\nimport { IAutoBeRealizeTestResult } from \"./autobe/compiler/IAutoBeRealizeTestResult\";\nimport { IAutoBeRealizeTestService } from \"./autobe/compiler/IAutoBeRealizeTestService\";\nimport { TestAutomation } from \"./helpers/TestAutomation\";\n\nclass AutoBeRealizeTestService implements IAutoBeRealizeTestService {\n public constructor(\n private readonly listener: Driver<IAutoBeRealizeTestListener>,\n ) {}\n\n public async execute(\n config: IAutoBeRealizeTestConfig,\n ): Promise<IAutoBeRealizeTestResult> {\n const start: Date = new Date();\n const operations: IAutoBeRealizeTestOperation[] = [];\n await TestAutomation.execute({\n open: async (): Promise<MyBackend> => {\n const backend: MyBackend = new MyBackend();\n await backend.open();\n return backend;\n },\n close: (backend: MyBackend): Promise<void> => backend.close(),\n options: {\n reset: config.reset ?? true,\n simultaneous: config.simultaneous ?? 1,\n },\n onComplete: (exec: DynamicExecutor.IExecution): void => {\n const op: IAutoBeRealizeTestOperation = {\n name: exec.name,\n location: exec.location,\n value: exec.value,\n error: exec.error,\n started_at: exec.started_at,\n completed_at: exec.completed_at,\n };\n this.listener.onOperation(op).catch(() => {});\n operations.push(op);\n },\n onReset: (): void => {\n this.listener.onReset().catch(() => {});\n },\n });\n return {\n reset: config.reset ?? true,\n simultaneous: config.simultaneous ?? 1,\n operations,\n started_at: start.toISOString(),\n completed_at: new Date().toISOString(),\n };\n }\n}\n\nconst main = async (): Promise<void> => {\n const worker: WorkerServer<\n null,\n IAutoBeRealizeTestService,\n IAutoBeRealizeTestListener\n > = new WorkerServer();\n const listener: Driver<IAutoBeRealizeTestListener> = worker.getDriver();\n const service: AutoBeRealizeTestService = new AutoBeRealizeTestService(\n listener,\n );\n\n MyGlobal.testing = true;\n await worker.open(service);\n};\nmain().catch((error) => {\n console.log(error);\n process.exit(-1);\n});\n",
13
- "tsconfig.json": "{\n \"compilerOptions\": {\n /* Visit https://aka.ms/tsconfig to read more about this file */\n\n /* Projects */\n // \"incremental\": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */\n // \"composite\": true, /* Enable constraints that allow a TypeScript project to be used with project references. */\n // \"tsBuildInfoFile\": \"./.tsbuildinfo\", /* Specify the path to .tsbuildinfo incremental compilation file. */\n // \"disableSourceOfProjectReferenceRedirect\": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */\n // \"disableSolutionSearching\": true, /* Opt a project out of multi-project reference checking when editing. */\n // \"disableReferencedProjectLoad\": true, /* Reduce the number of projects loaded automatically by TypeScript. */\n\n /* Language and Environment */\n \"target\": \"ES2015\", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */\n \"lib\": [\n \"DOM\",\n \"ESNext\",\n ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */\n // \"jsx\": \"preserve\", /* Specify what JSX code is generated. */\n \"experimentalDecorators\": true, /* Enable experimental support for TC39 stage 2 draft decorators. */\n \"emitDecoratorMetadata\": true, /* Emit design-type metadata for decorated declarations in source files. */\n // \"jsxFactory\": \"\", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */\n // \"jsxFragmentFactory\": \"\", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */\n // \"jsxImportSource\": \"\", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */\n // \"reactNamespace\": \"\", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */\n // \"noLib\": true, /* Disable including any library files, including the default lib.d.ts. */\n // \"useDefineForClassFields\": true, /* Emit ECMAScript-standard-compliant class fields. */\n // \"moduleDetection\": \"auto\", /* Control what method is used to detect module-format JS files. */\n\n /* Modules */\n \"module\": \"commonjs\", /* Specify what module code is generated. */\n // \"rootDir\": \"./\", /* Specify the root folder within your source files. */\n // \"moduleResolution\": \"node\", /* Specify how TypeScript looks up a file from a given module specifier. */\n // \"baseUrl\": \"./\", /* Specify the base directory to resolve non-relative module names. */\n \"paths\": {\n \"@ORGANIZATION/PROJECT-api/lib/*\": [\"./src/api/*\"],\n \"@ORGANIZATION/PROJECT-api\": [\"./src/api\"],\n }, /* Specify a set of entries that re-map imports to additional lookup locations. */\n // \"rootDirs\": [], /* Allow multiple folders to be treated as one when resolving modules. */\n // \"typeRoots\": [], /* Specify multiple folders that act like './node_modules/@types'. */\n // \"types\": [], /* Specify type package names to be included without being referenced in a source file. */\n // \"allowUmdGlobalAccess\": true, /* Allow accessing UMD globals from modules. */\n // \"moduleSuffixes\": [], /* List of file name suffixes to search when resolving a module. */\n // \"resolveJsonModule\": true, /* Enable importing .json files. */\n // \"noResolve\": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */\n\n /* JavaScript Support */\n // \"allowJs\": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */\n // \"checkJs\": true, /* Enable error reporting in type-checked JavaScript files. */\n // \"maxNodeModuleJsDepth\": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */\n\n /* Emit */\n // \"declaration\": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */\n // \"declarationMap\": true, /* Create sourcemaps for d.ts files. */\n // \"emitDeclarationOnly\": true, /* Only output d.ts files and not JavaScript files. */\n \"sourceMap\": true, /* Create source map files for emitted JavaScript files. */\n // \"outFile\": \"./\", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */\n \"outDir\": \"./lib\", /* Specify an output folder for all emitted files. */\n // \"removeComments\": true, /* Disable emitting comments. */\n // \"noEmit\": true, /* Disable emitting files from a compilation. */\n // \"importHelpers\": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */\n // \"importsNotUsedAsValues\": \"remove\", /* Specify emit/checking behavior for imports that are only used for types. */\n // \"downlevelIteration\": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */\n // \"sourceRoot\": \"\", /* Specify the root path for debuggers to find the reference source code. */\n // \"mapRoot\": \"\", /* Specify the location where debugger should locate map files instead of generated locations. */\n // \"inlineSourceMap\": true, /* Include sourcemap files inside the emitted JavaScript. */\n // \"inlineSources\": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */\n // \"emitBOM\": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */\n \"newLine\": \"lf\", /* Set the newline character for emitting files. */\n \"stripInternal\": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */\n // \"noEmitHelpers\": true, /* Disable generating custom helper functions like '__extends' in compiled output. */\n // \"noEmitOnError\": true, /* Disable emitting files if any type checking errors are reported. */\n // \"preserveConstEnums\": true, /* Disable erasing 'const enum' declarations in generated code. */\n // \"declarationDir\": \"./\", /* Specify the output directory for generated declaration files. */\n // \"preserveValueImports\": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */\n\n /* Interop Constraints */\n // \"isolatedModules\": true, /* Ensure that each file can be safely transpiled without relying on other imports. */\n // \"allowSyntheticDefaultImports\": true, /* Allow 'import x from y' when a module doesn't have a default export. */\n \"esModuleInterop\": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */\n // \"preserveSymlinks\": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */\n \"forceConsistentCasingInFileNames\": true, /* Ensure that casing is correct in imports. */\n\n /* Type Checking */\n \"strict\": true, /* Enable all strict type-checking options. */\n // \"noImplicitAny\": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */\n // \"strictNullChecks\": true, /* When type checking, take into account 'null' and 'undefined'. */\n // \"strictFunctionTypes\": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */\n // \"strictBindCallApply\": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */\n // \"strictPropertyInitialization\": true, /* Check for class properties that are declared but not set in the constructor. */\n // \"noImplicitThis\": true, /* Enable error reporting when 'this' is given the type 'any'. */\n // \"useUnknownInCatchVariables\": true, /* Default catch clause variables as 'unknown' instead of 'any'. */\n // \"alwaysStrict\": true, /* Ensure 'use strict' is always emitted. */\n \"noUnusedLocals\": false, /* Enable error reporting when local variables aren't read. */\n \"noUnusedParameters\": false, /* Raise an error when a function parameter isn't read. */\n // \"exactOptionalPropertyTypes\": true, /* Interpret optional property types as written, rather than adding 'undefined'. */\n \"noImplicitReturns\": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */\n \"noFallthroughCasesInSwitch\": true, /* Enable error reporting for fallthrough cases in switch statements. */\n // \"noUncheckedIndexedAccess\": true, /* Add 'undefined' to a type when accessed using an index. */\n // \"noImplicitOverride\": true, /* Ensure overriding members in derived classes are marked with an override modifier. */\n // \"noPropertyAccessFromIndexSignature\": true, /* Enforces using indexed accessors for keys declared using an indexed type. */\n // \"allowUnusedLabels\": true, /* Disable error reporting for unused labels. */\n // \"allowUnreachableCode\": true, /* Disable error reporting for unreachable code. */\n\n /* Completeness */\n // \"skipDefaultLibCheck\": true, /* Skip type checking .d.ts files that are included with TypeScript. */\n \"skipLibCheck\": true, /* Skip type checking all .d.ts files. */\n \"plugins\": [\n { \"transform\": \"typescript-transform-paths\" },\n { \"transform\": \"typia/lib/transform\" },\n { \n \"transform\": \"@nestia/core/lib/transform\",\n /**\n * Validate request body.\n * \n * - \"assert\": Use typia.assert() function\n * - \"is\": Use typia.is() function\n * - \"validate\": Use typia.validate() function\n * - \"assertEquals\": Use typia.assertEquals() function\n * - \"equals\": Use typia.equals() function\n * - \"validateEquals\": Use typia.validateEquals() function\n */\n \"validate\": \"validate\",\n /**\n * Validate JSON typed response body.\n * \n * - \"assert\": Use typia.assertStringify() function\n * - \"is\": Use typia.isStringify() function\n * - \"validate\": Use typia.validateStringify() function\n * - \"validate.log\": typia.validateStringify(), but do not throw and just log it\n * - \"stringify\": Use typia.stringify() function, but dangerous\n * - null: Just use JSON.stringify() function, without boosting\n */\n \"stringify\": \"assert\",\n },\n ]\n },\n \"include\": [\n \"src\"\n ],\n \"exclude\": [\n \"node_modules\",\n \"packages\",\n ]\n}\n",
26
+ "tsconfig.json": "{\n \"compilerOptions\": {\n /* Visit https://aka.ms/tsconfig to read more about this file */\n\n /* Projects */\n // \"incremental\": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */\n // \"composite\": true, /* Enable constraints that allow a TypeScript project to be used with project references. */\n // \"tsBuildInfoFile\": \"./.tsbuildinfo\", /* Specify the path to .tsbuildinfo incremental compilation file. */\n // \"disableSourceOfProjectReferenceRedirect\": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */\n // \"disableSolutionSearching\": true, /* Opt a project out of multi-project reference checking when editing. */\n // \"disableReferencedProjectLoad\": true, /* Reduce the number of projects loaded automatically by TypeScript. */\n\n /* Language and Environment */\n \"target\": \"ES2015\", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */\n \"lib\": [\n \"DOM\",\n \"ESNext\",\n ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */\n // \"jsx\": \"preserve\", /* Specify what JSX code is generated. */\n \"experimentalDecorators\": true, /* Enable experimental support for TC39 stage 2 draft decorators. */\n \"emitDecoratorMetadata\": true, /* Emit design-type metadata for decorated declarations in source files. */\n // \"jsxFactory\": \"\", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */\n // \"jsxFragmentFactory\": \"\", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */\n // \"jsxImportSource\": \"\", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */\n // \"reactNamespace\": \"\", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */\n // \"noLib\": true, /* Disable including any library files, including the default lib.d.ts. */\n // \"useDefineForClassFields\": true, /* Emit ECMAScript-standard-compliant class fields. */\n // \"moduleDetection\": \"auto\", /* Control what method is used to detect module-format JS files. */\n\n /* Modules */\n \"module\": \"commonjs\", /* Specify what module code is generated. */\n // \"rootDir\": \"./\", /* Specify the root folder within your source files. */\n // \"moduleResolution\": \"node\", /* Specify how TypeScript looks up a file from a given module specifier. */\n // \"baseUrl\": \"./\", /* Specify the base directory to resolve non-relative module names. */\n \"paths\": {\n \"@ORGANIZATION/PROJECT-api/lib/*\": [\"./src/api/*\"],\n \"@ORGANIZATION/PROJECT-api\": [\"./src/api\"],\n \"@prisma/sdk\": [\"./src/prisma/client.ts\"],\n }, /* Specify a set of entries that re-map imports to additional lookup locations. */\n // \"rootDirs\": [], /* Allow multiple folders to be treated as one when resolving modules. */\n // \"typeRoots\": [], /* Specify multiple folders that act like './node_modules/@types'. */\n // \"types\": [], /* Specify type package names to be included without being referenced in a source file. */\n // \"allowUmdGlobalAccess\": true, /* Allow accessing UMD globals from modules. */\n // \"moduleSuffixes\": [], /* List of file name suffixes to search when resolving a module. */\n // \"resolveJsonModule\": true, /* Enable importing .json files. */\n // \"noResolve\": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */\n\n /* JavaScript Support */\n // \"allowJs\": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */\n // \"checkJs\": true, /* Enable error reporting in type-checked JavaScript files. */\n // \"maxNodeModuleJsDepth\": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */\n\n /* Emit */\n // \"declaration\": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */\n // \"declarationMap\": true, /* Create sourcemaps for d.ts files. */\n // \"emitDeclarationOnly\": true, /* Only output d.ts files and not JavaScript files. */\n \"sourceMap\": true, /* Create source map files for emitted JavaScript files. */\n // \"outFile\": \"./\", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */\n \"outDir\": \"./lib\", /* Specify an output folder for all emitted files. */\n // \"removeComments\": true, /* Disable emitting comments. */\n // \"noEmit\": true, /* Disable emitting files from a compilation. */\n // \"importHelpers\": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */\n // \"importsNotUsedAsValues\": \"remove\", /* Specify emit/checking behavior for imports that are only used for types. */\n // \"downlevelIteration\": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */\n // \"sourceRoot\": \"\", /* Specify the root path for debuggers to find the reference source code. */\n // \"mapRoot\": \"\", /* Specify the location where debugger should locate map files instead of generated locations. */\n // \"inlineSourceMap\": true, /* Include sourcemap files inside the emitted JavaScript. */\n // \"inlineSources\": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */\n // \"emitBOM\": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */\n \"newLine\": \"lf\", /* Set the newline character for emitting files. */\n \"stripInternal\": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */\n // \"noEmitHelpers\": true, /* Disable generating custom helper functions like '__extends' in compiled output. */\n // \"noEmitOnError\": true, /* Disable emitting files if any type checking errors are reported. */\n // \"preserveConstEnums\": true, /* Disable erasing 'const enum' declarations in generated code. */\n // \"declarationDir\": \"./\", /* Specify the output directory for generated declaration files. */\n // \"preserveValueImports\": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */\n\n /* Interop Constraints */\n // \"isolatedModules\": true, /* Ensure that each file can be safely transpiled without relying on other imports. */\n // \"allowSyntheticDefaultImports\": true, /* Allow 'import x from y' when a module doesn't have a default export. */\n \"esModuleInterop\": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */\n // \"preserveSymlinks\": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */\n \"forceConsistentCasingInFileNames\": true, /* Ensure that casing is correct in imports. */\n\n /* Type Checking */\n \"strict\": true, /* Enable all strict type-checking options. */\n // \"noImplicitAny\": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */\n // \"strictNullChecks\": true, /* When type checking, take into account 'null' and 'undefined'. */\n // \"strictFunctionTypes\": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */\n // \"strictBindCallApply\": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */\n // \"strictPropertyInitialization\": true, /* Check for class properties that are declared but not set in the constructor. */\n // \"noImplicitThis\": true, /* Enable error reporting when 'this' is given the type 'any'. */\n // \"useUnknownInCatchVariables\": true, /* Default catch clause variables as 'unknown' instead of 'any'. */\n // \"alwaysStrict\": true, /* Ensure 'use strict' is always emitted. */\n \"noUnusedLocals\": false, /* Enable error reporting when local variables aren't read. */\n \"noUnusedParameters\": false, /* Raise an error when a function parameter isn't read. */\n // \"exactOptionalPropertyTypes\": true, /* Interpret optional property types as written, rather than adding 'undefined'. */\n \"noImplicitReturns\": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */\n \"noFallthroughCasesInSwitch\": true, /* Enable error reporting for fallthrough cases in switch statements. */\n // \"noUncheckedIndexedAccess\": true, /* Add 'undefined' to a type when accessed using an index. */\n // \"noImplicitOverride\": true, /* Ensure overriding members in derived classes are marked with an override modifier. */\n // \"noPropertyAccessFromIndexSignature\": true, /* Enforces using indexed accessors for keys declared using an indexed type. */\n // \"allowUnusedLabels\": true, /* Disable error reporting for unused labels. */\n // \"allowUnreachableCode\": true, /* Disable error reporting for unreachable code. */\n\n /* Completeness */\n // \"skipDefaultLibCheck\": true, /* Skip type checking .d.ts files that are included with TypeScript. */\n \"skipLibCheck\": true, /* Skip type checking all .d.ts files. */\n \"plugins\": [\n { \"transform\": \"typescript-transform-paths\" },\n { \"transform\": \"typia/lib/transform\" },\n { \n \"transform\": \"@nestia/core/lib/transform\",\n /**\n * Validate request body.\n * \n * - \"assert\": Use typia.assert() function\n * - \"is\": Use typia.is() function\n * - \"validate\": Use typia.validate() function\n * - \"assertEquals\": Use typia.assertEquals() function\n * - \"equals\": Use typia.equals() function\n * - \"validateEquals\": Use typia.validateEquals() function\n */\n \"validate\": \"validate\",\n /**\n * Validate JSON typed response body.\n * \n * - \"assert\": Use typia.assertStringify() function\n * - \"is\": Use typia.isStringify() function\n * - \"validate\": Use typia.validateStringify() function\n * - \"validate.log\": typia.validateStringify(), but do not throw and just log it\n * - \"stringify\": Use typia.stringify() function, but dangerous\n * - null: Just use JSON.stringify() function, without boosting\n */\n \"stringify\": \"assert\",\n },\n ]\n },\n \"include\": [\n \"src\"\n ],\n \"exclude\": [\n \"node_modules\",\n \"packages\",\n ]\n}\n",
14
27
  "test/autobe/compiler/IAutoBeRealizeTestOperation.ts": "//---------------------------------------------------\n// Cloned from @autobe/interface\n//---------------------------------------------------\nimport { tags } from \"typia\";\n\n/**\n * Detailed result interface representing the execution outcome of an individual\n * E2E test function during comprehensive backend implementation validation.\n *\n * This interface captures comprehensive information about a single test\n * operation execution, including identification details, execution results,\n * error conditions, and precise timing data. Each operation represents the\n * validation of a specific API endpoint or business scenario through Test\n * agent-generated E2E test functions executed against the fully implemented\n * backend application.\n *\n * The operation result provides granular visibility into test execution\n * outcomes, enabling detailed analysis of implementation quality, business\n * logic compliance, and performance characteristics at the individual test\n * level. This detailed tracking supports comprehensive validation reporting and\n * precise identification of implementation issues when they occur.\n *\n * @author Samchon\n */\nexport interface IAutoBeRealizeTestOperation {\n /**\n * Unique identifier name of the executed E2E test function.\n *\n * Specifies the function name that was executed during this test operation,\n * typically corresponding to the Test agent-generated test function\n * identifier. This name provides direct traceability between test results and\n * the specific business scenarios, API endpoints, or validation logic being\n * tested.\n *\n * The test function name serves as the primary identifier for correlating\n * execution results with the original test scenarios, enabling stakeholders\n * to understand which specific functionality was validated and whether the\n * implementation correctly fulfills the intended business requirements and\n * API contracts.\n */\n name: string;\n\n /**\n * File system path location of the executed test function source code.\n *\n * Specifies the relative or absolute path to the test file that contains the\n * executed function within the project structure. This location information\n * enables direct navigation to the test source code for detailed analysis,\n * debugging, result interpretation, or modification purposes.\n *\n * The file location provides essential context for understanding test\n * organization, enables developers to quickly locate and examine the specific\n * test implementation, and supports comprehensive test suite maintenance and\n * documentation activities.\n */\n location: string;\n\n /**\n * Return value or result data produced by the test function execution.\n *\n * Contains the actual value returned by the test function upon completion,\n * regardless of whether execution succeeded or failed. This could include API\n * response objects, validation results, test data, computed values, or any\n * other output that the test function produces as part of its business logic\n * validation or endpoint testing.\n *\n * For successful test executions, this value represents the expected result\n * that demonstrates correct implementation behavior. The return value\n * provides insight into the test execution flow and can be analyzed to verify\n * that API responses match expected formats, business logic produces correct\n * outcomes, and data transformations operate as intended.\n */\n value: unknown;\n\n /**\n * Error information captured during test function execution, if any occurred.\n *\n * Contains detailed error information when the test function encounters\n * exceptions, assertion failures, timeout conditions, or other error states\n * during execution. When null, it indicates that the test completed\n * successfully without encountering any error conditions. When present, the\n * error provides comprehensive diagnostic information for understanding\n * implementation issues or test failures.\n *\n * Error information is crucial for identifying implementation defects, API\n * contract violations, business logic errors, integration failures, or\n * performance issues that prevent the backend application from meeting its\n * requirements. The error details enable developers to pinpoint specific\n * problems and implement necessary corrections to achieve full compliance\n * with validation scenarios.\n */\n error: null | unknown;\n\n /**\n * Precise timestamp when this specific test operation began execution.\n *\n * Records the exact moment when this individual test function started\n * execution, providing the reference point for measuring test duration and\n * understanding the temporal sequence of test operations within the overall\n * validation process. This timestamp enables detailed performance analysis\n * and execution timeline reconstruction.\n *\n * The start timestamp is essential for identifying execution patterns,\n * analyzing test concurrency behavior, measuring individual test performance,\n * and understanding the temporal distribution of test execution within the\n * comprehensive validation suite.\n */\n started_at: string & tags.Format<\"date-time\">;\n\n /**\n * Precise timestamp when this specific test operation finished execution.\n *\n * Records the exact moment when this individual test function completed\n * execution, regardless of whether it succeeded or failed. Combined with the\n * start timestamp, this enables precise calculation of test execution\n * duration and provides completion reference for the overall test timeline.\n *\n * The completion timestamp is valuable for performance analysis of individual\n * test operations, identifying slow-performing test scenarios, understanding\n * test execution efficiency, and maintaining comprehensive audit trails of\n * the validation process. It supports optimization efforts and helps identify\n * potential bottlenecks in either the test implementation or the backend\n * application being validated.\n */\n completed_at: string & tags.Format<\"date-time\">;\n}\n",
15
28
  "test/autobe/compiler/IAutoBeRealizeTestConfig.ts": "//---------------------------------------------------\n// Cloned from @autobe/interface\n//---------------------------------------------------\n/**\n * Configuration interface defining the essential execution parameters required\n * for comprehensive E2E test suite validation against fully implemented backend\n * applications.\n *\n * This interface encapsulates the core execution settings and control\n * parameters necessary to orchestrate the final validation phase of the AutoBE\n * development pipeline. It provides streamlined configuration options that\n * control test execution behavior, database management, and performance\n * characteristics without requiring direct access to implementation files or\n * database schemas.\n *\n * The configuration assumes that the test execution environment has been\n * pre-configured with all necessary resources including generated\n * implementation files, database schemas, and package dependencies. This\n * interface focuses solely on runtime execution parameters that control how the\n * test suite operates within the prepared environment.\n *\n * This lightweight configuration approach enables flexible test execution\n * across different environments while maintaining clear separation between\n * resource provisioning and execution control, supporting both development and\n * production validation scenarios.\n *\n * @author Samchon\n */\nexport interface IAutoBeRealizeTestConfig {\n /**\n * Optional flag indicating whether to perform a complete database reset\n * before test execution.\n *\n * When true, specifies that the test execution should begin with a\n * comprehensive database reset, purging all existing data and reconstructing\n * tables to their initial schema-defined state. When false, test execution\n * proceeds with the current database state, which may contain residual data\n * from previous operations.\n *\n * Database reset is crucial for ensuring test isolation, reproducibility, and\n * deterministic results. Clean state testing eliminates interference from\n * residual data and guarantees that each test execution cycle operates under\n * identical baseline conditions, enabling accurate validation of backend\n * implementation behavior.\n *\n * @default true\n */\n reset?: boolean;\n\n /**\n * Optional specification of the maximum number of test functions to execute\n * concurrently during the test suite run.\n *\n * Defines the concurrent execution limit for E2E test functions to optimize\n * testing performance while maintaining system stability and resource\n * management. This value balances test execution speed with resource\n * consumption and helps prevent system overload during comprehensive\n * validation.\n *\n * Concurrent execution significantly reduces total testing time for large\n * test suites while validating the backend application's ability to handle\n * parallel requests correctly. The simultaneous limit ensures controlled load\n * conditions that provide meaningful performance insights while maintaining\n * test reliability and result accuracy.\n *\n * @default 1\n */\n simultaneous?: number;\n}\n",
16
29
  "test/autobe/compiler/IAutoBeRealizeTestResult.ts": "//---------------------------------------------------\n// Cloned from @autobe/interface\n//---------------------------------------------------\nimport { tags } from \"typia\";\n\nimport { IAutoBeRealizeTestOperation } from \"./IAutoBeRealizeTestOperation\";\n\n/**\n * Comprehensive result interface containing complete information about E2E test\n * suite execution for backend implementation validation.\n *\n * This interface represents the final consolidated results of executing the\n * entire Test agent-generated E2E test suite against the fully implemented\n * backend application. It encapsulates all aspects of the test execution\n * process including configuration parameters, individual operation results, and\n * timing information that collectively determine the validation outcome of the\n * generated backend implementation.\n *\n * The result structure provides stakeholders with comprehensive visibility into\n * the validation process, enabling detailed analysis of backend implementation\n * quality, compliance with requirements, and production readiness assessment\n * based on exhaustive functional testing.\n *\n * @author Samchon\n */\nexport interface IAutoBeRealizeTestResult {\n /**\n * Whether the test execution included a clean database reset before testing.\n *\n * Indicates if the test suite execution began with a complete database reset\n * to ensure clean testing conditions. When true, all existing data was purged\n * and database tables were reconstructed to their initial state before test\n * execution commenced, guaranteeing test isolation and reproducibility.\n *\n * Database reset is essential for ensuring that test results are\n * deterministic and accurately reflect the application's behavior under\n * controlled conditions, free from interference by residual data from\n * previous executions or development activities. This flag helps stakeholders\n * understand the testing conditions and trust the reliability of results.\n */\n reset: boolean;\n\n /**\n * Number of test functions that were executed simultaneously during the test\n * suite run.\n *\n * Specifies the concurrent execution limit that was applied during E2E test\n * function execution to optimize testing performance while maintaining system\n * stability. This value represents the balance between test execution speed\n * and resource consumption that was used to validate the backend\n * implementation's ability to handle concurrent requests.\n *\n * The simultaneous execution count provides insight into the load conditions\n * under which the backend application was validated, helping stakeholders\n * understand the concurrency testing coverage and the application's\n * performance characteristics under parallel request scenarios.\n */\n simultaneous: number;\n\n /**\n * Complete collection of individual test operation results with detailed\n * execution information.\n *\n * Contains the comprehensive array of {@link IAutoBeRealizeTestOperation}\n * results representing every E2E test function that was executed during the\n * validation process. Each operation result includes detailed information\n * about test execution outcomes, return values, error conditions, timing\n * data, and validation status for specific API endpoints or business\n * scenarios.\n *\n * This complete result set enables stakeholders to perform detailed analysis\n * of which functionality passed validation, which tests failed, what specific\n * issues were encountered, and how the backend implementation performs under\n * various test scenarios. The operation results serve as the authoritative\n * record of implementation quality and compliance with established\n * requirements.\n */\n operations: IAutoBeRealizeTestOperation[];\n\n /**\n * Timestamp when the comprehensive test suite execution was initiated.\n *\n * Records the exact moment when the E2E test suite execution began, marking\n * the start of the final validation phase in the AutoBE development pipeline.\n * This timestamp provides the reference point for understanding the complete\n * test execution timeline and measuring the duration of comprehensive backend\n * validation.\n *\n * The start timestamp is essential for performance analysis of the entire\n * validation process, enabling stakeholders to understand test execution\n * efficiency and identify potential optimization opportunities in the testing\n * infrastructure or backend implementation.\n */\n started_at: string & tags.Format<\"date-time\">;\n\n /**\n * Timestamp when the entire test suite execution was finalized.\n *\n * Records the exact moment when all planned E2E test operations finished\n * execution, marking the completion of the comprehensive validation process.\n * This timestamp represents the definitive end point of the AutoBE\n * development pipeline validation phase and provides the completion reference\n * for calculating total validation duration.\n *\n * The completion timestamp serves as the official validation completion\n * marker for stakeholders tracking project delivery milestones and provides\n * essential audit trail information for the complete development and\n * validation cycle. Combined with the start timestamp, it enables precise\n * measurement of the total time required for comprehensive backend\n * validation.\n */\n completed_at: string & tags.Format<\"date-time\">;\n}\n",
@@ -1 +1 @@
1
- {"version":3,"file":"AutoBeCompilerRealizeTemplate.js","sourceRoot":"","sources":["../../src/raw/AutoBeCompilerRealizeTemplate.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAA2B;IACnE,YAAY,EAAE,oDAAoD;IAClE,6BAA6B,EAAE,0wBAA0wB;IACzyB,wBAAwB,EAAE,slCAAslC;IAChnC,yCAAyC,EAAE,0/BAA0/B;IACriC,4BAA4B,EAAE,muBAAmuB;IACjwB,2BAA2B,EAAE,+iDAA+iD;IAC5kD,8BAA8B,EAAE,ydAAyd;IACzf,iBAAiB,EAAE,uqFAAuqF;IAC1rF,eAAe,EAAE,6xZAA6xZ;IAC9yZ,qDAAqD,EAAE,wlMAAwlM;IAC/oM,kDAAkD,EAAE,uoGAAuoG;IAC3rG,kDAAkD,EAAE,w6KAAw6K;IAC59K,oDAAoD,EAAE,wgKAAwgK;IAC9jK,mDAAmD,EAAE,gpKAAgpK;CACtsK,CAAC"}
1
+ {"version":3,"file":"AutoBeCompilerRealizeTemplate.js","sourceRoot":"","sources":["../../src/raw/AutoBeCompilerRealizeTemplate.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAA2B;IACnE,qCAAqC,EAAE,qsJAAqsJ;IAC5uJ,8CAA8C,EAAE,4vMAA4vM;IAC5yM,gDAAgD,EAAE,khPAAkhP;IACpkP,8CAA8C,EAAE,mrKAAmrK;IACnuK,gCAAgC,EAAE,2rGAA2rG;IAC7tG,uCAAuC,EAAE,oxKAAoxK;IAC7zK,sCAAsC,EAAE,qnLAAqnL;IAC7pL,kCAAkC,EAAE,w8JAAw8J;IAC5+J,qCAAqC,EAAE,yzIAAyzI;IACh2I,4CAA4C,EAAE,8iIAA8iI;IAC5lI,2CAA2C,EAAE,6lHAA6lH;IAC1oH,uCAAuC,EAAE,qmHAAqmH;IAC9oH,YAAY,EAAE,oDAAoD;IAClE,6BAA6B,EAAE,0wBAA0wB;IACzyB,WAAW,EAAE,uvOAAuvO;IACpwO,wBAAwB,EAAE,mlCAAmlC;IAC7mC,yCAAyC,EAAE,0/BAA0/B;IACriC,4BAA4B,EAAE,muBAAmuB;IACjwB,2BAA2B,EAAE,2hDAA2hD;IACxjD,8BAA8B,EAAE,ydAAyd;IACzf,iBAAiB,EAAE,uqFAAuqF;IAC1rF,eAAe,EAAE,m1ZAAm1Z;IACp2Z,qDAAqD,EAAE,wlMAAwlM;IAC/oM,kDAAkD,EAAE,uoGAAuoG;IAC3rG,kDAAkD,EAAE,w6KAAw6K;IAC59K,oDAAoD,EAAE,wgKAAwgK;IAC9jK,mDAAmD,EAAE,gpKAAgpK;CACtsK,CAAC"}
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AutoBeCompilerRealizeTemplateOfPostgres = void 0;
4
4
  exports.AutoBeCompilerRealizeTemplateOfPostgres = {
5
5
  ".env.local": "API_PORT=37001\nJWT_SECRET_KEY=your_jwt_secret_key\n\nPOSTGRES_HOST=127.0.0.1\nPOSTGRES_PORT=5432\nPOSTGRES_DATABASE=wrtnlabs\nPOSTGRES_SCHEMA=autobe\nPOSTGRES_USERNAME=autobe\nPOSTGRES_PASSWORD=1234\nPOSTGRES_URL=postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}?schema=${POSTGRES_SCHEMA}",
6
- "src/MyGlobal.ts": "import { PrismaPg } from \"@prisma/adapter-pg\";\nimport { PrismaClient } from \"@prisma/client\";\nimport dotenv from \"dotenv\";\nimport dotenvExpand from \"dotenv-expand\";\nimport { Singleton } from \"tstl\";\nimport typia from \"typia\";\n\n/* eslint-disable */\nexport class MyGlobal {\n public static testing: boolean = false;\n\n public static get env(): MyGlobal.IEnvironments {\n return environments.get();\n }\n\n public static get prisma(): PrismaClient {\n return prisma.get();\n }\n}\n\nexport namespace MyGlobal {\n export interface IEnvironments {\n API_PORT: `${number}`;\n JWT_SECRET_KEY: string;\n\n POSTGRES_HOST: string;\n POSTGRES_PORT: `${number}`;\n POSTGRES_DATABASE: string;\n POSTGRES_SCHEMA: string;\n POSTGRES_USERNAME: string;\n POSTGRES_PASSWORD: string;\n POSTGRES_URL: string;\n }\n}\nconst environments = new Singleton(() => {\n const env = dotenv.config();\n dotenvExpand.expand(env);\n return typia.assert<MyGlobal.IEnvironments>(process.env);\n});\nconst prisma = new Singleton(\n () =>\n new PrismaClient({\n adapter: new PrismaPg(\n { connectionString: environments.get().POSTGRES_URL },\n { schema: environments.get().POSTGRES_SCHEMA },\n ),\n }),\n);\n",
7
- "src/executable/schema.ts": "import { PrismaPg } from \"@prisma/adapter-pg\";\nimport { PrismaClient } from \"@prisma/client\";\n\nimport { MyGlobal } from \"../MyGlobal\";\nimport { MySetupWizard } from \"../setup/MySetupWizard\";\n\nasync function execute(\n database: string,\n username: string,\n password: string,\n script: string,\n): Promise<void> {\n try {\n const prisma = new PrismaClient({\n adapter: new PrismaPg(\n {\n connectionString: `postgresql://${username}:${password}@${MyGlobal.env.POSTGRES_HOST}:${MyGlobal.env.POSTGRES_PORT}/${database}?schema=${MyGlobal.env.POSTGRES_SCHEMA}`,\n },\n { schema: MyGlobal.env.POSTGRES_SCHEMA },\n ),\n });\n const queries: string[] = script\n .split(\"\\n\")\n .map((str) => str.trim())\n .filter((str) => !!str);\n for (const query of queries)\n try {\n await prisma.$queryRawUnsafe(query);\n } catch (e) {\n console.log(e);\n }\n await prisma.$disconnect();\n } catch (err) {\n console.log(err);\n }\n}\n\nasync function main(): Promise<void> {\n const config = {\n database: MyGlobal.env.POSTGRES_DATABASE,\n schema: MyGlobal.env.POSTGRES_SCHEMA,\n username: MyGlobal.env.POSTGRES_USERNAME,\n password: MyGlobal.env.POSTGRES_PASSWORD,\n };\n const root = {\n account: process.argv[2] ?? \"postgres\",\n password: process.argv[3] ?? \"root\",\n };\n\n await execute(\n \"postgres\",\n root.account,\n root.password,\n `\n CREATE USER ${config.username} WITH ENCRYPTED PASSWORD '${config.password}';\n ALTER ROLE ${config.username} WITH CREATEDB\n CREATE DATABASE ${config.database} OWNER ${config.username};\n `,\n );\n\n await execute(\n config.database,\n root.account,\n root.password,\n `\n CREATE SCHEMA ${config.schema} AUTHORIZATION ${config.username};\n `,\n );\n\n console.log(\"------------------------------------------\");\n console.log(\"CREATE TABLES\");\n console.log(\"------------------------------------------\");\n MyGlobal.testing = true;\n await MySetupWizard.schema();\n\n console.log(\"------------------------------------------\");\n console.log(\"INITIAL DATA\");\n console.log(\"------------------------------------------\");\n await MySetupWizard.seed();\n}\nmain().catch((exp) => {\n console.log(exp);\n process.exit(-1);\n});\n"
6
+ "prisma.config.ts": "import dotenv from \"dotenv\";\nimport dotenvExpand from \"dotenv-expand\";\nimport { defineConfig, env } from \"prisma/config\";\n\ndotenvExpand.expand(dotenv.config());\n\nexport default defineConfig({\n schema: \"prisma/schema\",\n datasource: {\n url: env(\"POSTGRES_URL\"),\n },\n});\n",
7
+ "src/MyGlobal.ts": "import { PrismaPg } from \"@prisma/adapter-pg\";\nimport { PrismaClient } from \"@prisma/sdk\";\nimport dotenv from \"dotenv\";\nimport dotenvExpand from \"dotenv-expand\";\nimport { Singleton } from \"tstl\";\nimport typia from \"typia\";\n\n/* eslint-disable */\nexport class MyGlobal {\n public static testing: boolean = false;\n\n public static get env(): MyGlobal.IEnvironments {\n return environments.get();\n }\n\n public static get prisma(): PrismaClient {\n return prisma.get();\n }\n}\n\nexport namespace MyGlobal {\n export interface IEnvironments {\n API_PORT: `${number}`;\n JWT_SECRET_KEY: string;\n\n POSTGRES_HOST: string;\n POSTGRES_PORT: `${number}`;\n POSTGRES_DATABASE: string;\n POSTGRES_SCHEMA: string;\n POSTGRES_USERNAME: string;\n POSTGRES_PASSWORD: string;\n POSTGRES_URL: string;\n }\n}\nconst environments = new Singleton(() => {\n const env = dotenv.config();\n dotenvExpand.expand(env);\n return typia.assert<MyGlobal.IEnvironments>(process.env);\n});\nconst prisma = new Singleton(\n () =>\n new PrismaClient({\n adapter: new PrismaPg(\n { connectionString: environments.get().POSTGRES_URL },\n { schema: environments.get().POSTGRES_SCHEMA },\n ),\n }),\n);\n",
8
+ "src/executable/schema.ts": "import { PrismaPg } from \"@prisma/adapter-pg\";\nimport { PrismaClient } from \"@prisma/sdk\";\n\nimport { MyGlobal } from \"../MyGlobal\";\nimport { MySetupWizard } from \"../setup/MySetupWizard\";\n\nasync function execute(\n database: string,\n username: string,\n password: string,\n script: string,\n): Promise<void> {\n try {\n const prisma = new PrismaClient({\n adapter: new PrismaPg(\n {\n connectionString: `postgresql://${username}:${password}@${MyGlobal.env.POSTGRES_HOST}:${MyGlobal.env.POSTGRES_PORT}/${database}?schema=${MyGlobal.env.POSTGRES_SCHEMA}`,\n },\n { schema: MyGlobal.env.POSTGRES_SCHEMA },\n ),\n });\n const queries: string[] = script\n .split(\"\\n\")\n .map((str) => str.trim())\n .filter((str) => !!str);\n for (const query of queries)\n try {\n await prisma.$queryRawUnsafe(query);\n } catch (e) {\n console.log(e);\n }\n await prisma.$disconnect();\n } catch (err) {\n console.log(err);\n }\n}\n\nasync function main(): Promise<void> {\n const config = {\n database: MyGlobal.env.POSTGRES_DATABASE,\n schema: MyGlobal.env.POSTGRES_SCHEMA,\n username: MyGlobal.env.POSTGRES_USERNAME,\n password: MyGlobal.env.POSTGRES_PASSWORD,\n };\n const root = {\n account: process.argv[2] ?? \"postgres\",\n password: process.argv[3] ?? \"root\",\n };\n\n await execute(\n \"postgres\",\n root.account,\n root.password,\n `\n CREATE USER ${config.username} WITH ENCRYPTED PASSWORD '${config.password}';\n ALTER ROLE ${config.username} WITH CREATEDB\n CREATE DATABASE ${config.database} OWNER ${config.username};\n `,\n );\n\n await execute(\n config.database,\n root.account,\n root.password,\n `\n CREATE SCHEMA ${config.schema} AUTHORIZATION ${config.username};\n `,\n );\n\n console.log(\"------------------------------------------\");\n console.log(\"CREATE TABLES\");\n console.log(\"------------------------------------------\");\n MyGlobal.testing = true;\n await MySetupWizard.schema();\n\n console.log(\"------------------------------------------\");\n console.log(\"INITIAL DATA\");\n console.log(\"------------------------------------------\");\n await MySetupWizard.seed();\n}\nmain().catch((exp) => {\n console.log(exp);\n process.exit(-1);\n});\n"
8
9
  };
9
10
  //# sourceMappingURL=AutoBeCompilerRealizeTemplateOfPostgres.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AutoBeCompilerRealizeTemplateOfPostgres.js","sourceRoot":"","sources":["../../src/raw/AutoBeCompilerRealizeTemplateOfPostgres.ts"],"names":[],"mappings":";;;AAAa,QAAA,uCAAuC,GAA2B;IAC7E,YAAY,EAAE,+VAA+V;IAC7W,iBAAiB,EAAE,qvCAAqvC;IACxwC,0BAA0B,EAAE,80EAA80E;CAC32E,CAAC"}
1
+ {"version":3,"file":"AutoBeCompilerRealizeTemplateOfPostgres.js","sourceRoot":"","sources":["../../src/raw/AutoBeCompilerRealizeTemplateOfPostgres.ts"],"names":[],"mappings":";;;AAAa,QAAA,uCAAuC,GAA2B;IAC7E,YAAY,EAAE,+VAA+V;IAC7W,kBAAkB,EAAE,0SAA0S;IAC9T,iBAAiB,EAAE,kvCAAkvC;IACrwC,0BAA0B,EAAE,20EAA20E;CACx2E,CAAC"}
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AutoBeCompilerRealizeTemplateOfSQLite = void 0;
4
4
  exports.AutoBeCompilerRealizeTemplateOfSQLite = {
5
5
  ".env.local": "API_PORT=37001\nJWT_SECRET_KEY=your_jwt_secret_key",
6
- "src/MyGlobal.ts": "import { PrismaBetterSQLite3 } from \"@prisma/adapter-better-sqlite3\";\nimport { PrismaClient } from \"@prisma/client\";\nimport dotenv from \"dotenv\";\nimport dotenvExpand from \"dotenv-expand\";\nimport { Singleton } from \"tstl\";\nimport typia from \"typia\";\n\nimport { MyConfiguration } from \"./MyConfiguration\";\n\n/* eslint-disable */\nexport class MyGlobal {\n public static testing: boolean = false;\n\n public static get env(): MyGlobal.IEnvironments {\n return environments.get();\n }\n\n public static get prisma(): PrismaClient {\n return prisma.get();\n }\n}\nexport namespace MyGlobal {\n export interface IEnvironments {\n API_PORT: `${number}`;\n JWT_SECRET_KEY: string;\n }\n}\nconst environments = new Singleton(() => {\n const env = dotenv.config();\n dotenvExpand.expand(env);\n return typia.assert<MyGlobal.IEnvironments>(process.env);\n});\n\nconst prisma = new Singleton(\n () =>\n new PrismaClient({\n adapter: new PrismaBetterSQLite3({\n url: `${MyConfiguration.ROOT}/prisma/db.sqlite`,\n }),\n }),\n);\n",
6
+ "prisma.config.ts": "import dotenv from \"dotenv\";\nimport dotenvExpand from \"dotenv-expand\";\nimport { defineConfig } from \"prisma/config\";\n\ndotenvExpand.expand(dotenv.config());\n\nexport default defineConfig({\n schema: \"prisma/schema\",\n datasource: {\n url: \"file:prisma/db.sqlite\",\n },\n});\n",
7
+ "src/MyGlobal.ts": "import { PrismaBetterSqlite3 } from \"@prisma/adapter-better-sqlite3\";\nimport { PrismaClient } from \"@prisma/sdk\";\nimport dotenv from \"dotenv\";\nimport dotenvExpand from \"dotenv-expand\";\nimport { Singleton } from \"tstl\";\nimport typia from \"typia\";\n\nimport { MyConfiguration } from \"./MyConfiguration\";\n\n/* eslint-disable */\nexport class MyGlobal {\n public static testing: boolean = false;\n\n public static get env(): MyGlobal.IEnvironments {\n return environments.get();\n }\n\n public static get prisma(): PrismaClient {\n return prisma.get();\n }\n}\nexport namespace MyGlobal {\n export interface IEnvironments {\n API_PORT: `${number}`;\n JWT_SECRET_KEY: string;\n }\n}\nconst environments = new Singleton(() => {\n const env = dotenv.config();\n dotenvExpand.expand(env);\n return typia.assert<MyGlobal.IEnvironments>(process.env);\n});\n\nconst prisma = new Singleton(\n () =>\n new PrismaClient({\n adapter: new PrismaBetterSqlite3({\n url: `${MyConfiguration.ROOT}/prisma/db.sqlite`,\n }),\n }),\n);\n",
7
8
  "src/executable/schema.ts": "import { MyGlobal } from \"../MyGlobal\";\nimport { MySetupWizard } from \"../setup/MySetupWizard\";\n\nconst main = async (): Promise<void> => {\n MyGlobal.testing = true;\n await MySetupWizard.schema();\n await MySetupWizard.seed();\n};\nmain().catch((error) => {\n console.error(error);\n process.exit(-1);\n});\n"
8
9
  };
9
10
  //# sourceMappingURL=AutoBeCompilerRealizeTemplateOfSQLite.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AutoBeCompilerRealizeTemplateOfSQLite.js","sourceRoot":"","sources":["../../src/raw/AutoBeCompilerRealizeTemplateOfSQLite.ts"],"names":[],"mappings":";;;AAAa,QAAA,qCAAqC,GAA2B;IAC3E,YAAY,EAAE,oDAAoD;IAClE,iBAAiB,EAAE,4jCAA4jC;IAC/kC,0BAA0B,EAAE,mUAAmU;CAChW,CAAC"}
1
+ {"version":3,"file":"AutoBeCompilerRealizeTemplateOfSQLite.js","sourceRoot":"","sources":["../../src/raw/AutoBeCompilerRealizeTemplateOfSQLite.ts"],"names":[],"mappings":";;;AAAa,QAAA,qCAAqC,GAA2B;IAC3E,YAAY,EAAE,oDAAoD;IAClE,kBAAkB,EAAE,ySAAyS;IAC7T,iBAAiB,EAAE,yjCAAyjC;IAC5kC,0BAA0B,EAAE,mUAAmU;CAChW,CAAC"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AutoBeCompilerTestTemplate = void 0;
4
4
  exports.AutoBeCompilerTestTemplate = {
5
- "package.json": "{\n \"private\": true,\n \"name\": \"@ORGANIZATION/PROJECT\",\n \"version\": \"0.1.0\",\n \"description\": \"Starter kit of Nestia\",\n \"main\": \"lib/index.js\",\n \"scripts\": {\n \"benchmark\": \"node bin/test/benchmark\",\n \"test\": \"node bin/test\",\n \"test:webpack\": \"npm run webpack && node bin/test/webpack.js\",\n \"------------------------BUILDS------------------------\": \"\",\n \"build\": \"npm run build:prisma && npm run build:sdk && npm run build:main && npm run build:test\",\n \"build:api\": \"rimraf packages/api/lib && nestia all && rimraf packages/api/lib && tsc -p packages/api/tsconfig.json && rollup -c packages/api/rollup.config.js\",\n \"build:env\": \"ts-node build/env.ts\",\n \"build:main\": \"rimraf lib && tsc\",\n \"build:sdk\": \"rimraf src/api/functional && nestia sdk\",\n \"build:prisma\": \"prisma generate --schema prisma/schema\",\n \"build:swagger\": \"nestia swagger\",\n \"build:test\": \"rimraf bin && tsc -p test/tsconfig.json\",\n \"dev\": \"npm run build:test -- --watch\",\n \"eslint\": \"eslint src && eslint test\",\n \"eslint:fix\": \"eslint --fix src && eslint --fix test\",\n \"prepare\": \"ts-patch install && npm run build:env && npm run build:prisma\",\n \"prettier\": \"prettier src --write && prettier test --write\",\n \"------------------------WEBPACK------------------------\": \"\",\n \"webpack\": \"rimraf dist && webpack\",\n \"webpack:start\": \"cd dist && node dist/server\",\n \"webpack:test\": \"npm run webpack && node bin/test/webpack.js\",\n \"------------------------DEPLOYS------------------------\": \"\",\n \"package:api\": \"npm run build:api && cd packages/api && npm publish\",\n \"schema\": \"ts-node src/executable/schema\",\n \"start\": \"node lib/executable/server\",\n \"start:dev\": \"nest start --watch\",\n \"start:swagger\": \"ts-node src/executable/swagger.ts\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia-start\"\n },\n \"keywords\": [\n \"nestia\",\n \"template\",\n \"boilerplate\"\n ],\n \"author\": \"AUTHOR\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\n },\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\n \"devDependencies\": {\n \"@nestia/benchmark\": \"^9.0.1\",\n \"@nestia/e2e\": \"^9.0.1\",\n \"@nestia/sdk\": \"^9.0.1\",\n \"@nestjs/cli\": \"^11.0.7\",\n \"@rollup/plugin-terser\": \"^0.4.4\",\n \"@rollup/plugin-typescript\": \"^11.1.6\",\n \"@trivago/prettier-plugin-sort-imports\": \"^4.3.0\",\n \"@types/bcryptjs\": \"^3.0.0\",\n \"@types/cli\": \"^0.11.21\",\n \"@types/cli-progress\": \"^3.11.5\",\n \"@types/express\": \"^4.17.21\",\n \"@types/inquirer\": \"^8.2.5\",\n \"@types/jsonwebtoken\": \"^9.0.5\",\n \"@types/node\": \"^18.11.0\",\n \"@types/uuid\": \"^8.3.4\",\n \"@typescript-eslint/eslint-plugin\": \"^8.1.0\",\n \"@typescript-eslint/parser\": \"^8.1.0\",\n \"chalk\": \"^4.1.2\",\n \"cli\": \"^1.0.1\",\n \"cli-progress\": \"^3.12.0\",\n \"copy-webpack-plugin\": \"^11.0.0\",\n \"eslint-plugin-deprecation\": \"^3.0.0\",\n \"express\": \"^4.18.2\",\n \"fastify\": \"^5.4.0\",\n \"nestia\": \"^9.0.1\",\n \"prettier\": \"^3.2.4\",\n \"prettier-plugin-prisma\": \"^5.0.0\",\n \"prisma-markdown\": \"^3.0.1\",\n \"rimraf\": \"^3.0.2\",\n \"rollup\": \"^4.18.0\",\n \"source-map-support\": \"^0.5.21\",\n \"swagger-ui-express\": \"^5.0.0\",\n \"ts-loader\": \"^9.5.1\",\n \"ts-node\": \"^10.9.1\",\n \"ts-patch\": \"^3.3.0\",\n \"typescript\": \"~5.9.2\",\n \"typescript-transform-paths\": \"^3.5.5\",\n \"webpack\": \"^5.89.0\",\n \"webpack-cli\": \"^5.1.4\",\n \"write-file-webpack-plugin\": \"^4.5.1\"\n },\n \"dependencies\": {\n \"@nestia/core\": \"^9.0.1\",\n \"@nestia/fetcher\": \"^9.0.1\",\n \"@nestjs/common\": \"^11.1.3\",\n \"@nestjs/core\": \"^11.1.3\",\n \"@nestjs/platform-express\": \"^11.1.3\",\n \"@nestjs/platform-fastify\": \"^11.1.3\",\n \"@prisma/adapter-pg\": \"^6.16.2\",\n \"@prisma/adapter-better-sqlite3\": \"^6.16.2\",\n \"@prisma/client\": \"^6.16.2\",\n \"bcryptjs\": \"^3.0.2\",\n \"commander\": \"10.0.0\",\n \"dotenv\": \"^16.3.1\",\n \"dotenv-expand\": \"^10.0.0\",\n \"inquirer\": \"8.2.5\",\n \"jsonwebtoken\": \"^9.0.2\",\n \"prisma\": \"^6.16.2\",\n \"serialize-error\": \"^4.1.0\",\n \"tgrid\": \"^1.1.0\",\n \"tstl\": \"^3.0.0\",\n \"typia\": \"^10.0.2\",\n \"uuid\": \"^9.0.0\"\n },\n \"pnpm\": {\n \"onlyBuiltDependencies\": [\"better-sqlite3\"]\n },\n \"stackblitz\": {\n \"startCommand\": \"npm run prepare && npm run build:test && npm run test -- --simultaneous 1\"\n }\n}\n",
5
+ "package.json": "{\n \"private\": true,\n \"name\": \"@ORGANIZATION/PROJECT\",\n \"version\": \"0.1.0\",\n \"description\": \"Starter kit of Nestia\",\n \"main\": \"lib/index.js\",\n \"scripts\": {\n \"benchmark\": \"node bin/test/benchmark\",\n \"test\": \"node bin/test\",\n \"test:webpack\": \"npm run webpack && node bin/test/webpack.js\",\n \"------------------------BUILDS------------------------\": \"\",\n \"build\": \"npm run build:prisma && npm run build:sdk && npm run build:main && npm run build:test\",\n \"build:api\": \"rimraf packages/api/lib && nestia all && rimraf packages/api/lib && tsc -p packages/api/tsconfig.json && rollup -c packages/api/rollup.config.js\",\n \"build:env\": \"ts-node build/env.ts\",\n \"build:main\": \"rimraf lib && tsc\",\n \"build:sdk\": \"rimraf src/api/functional && nestia sdk\",\n \"build:prisma\": \"prisma generate --schema prisma/schema\",\n \"build:swagger\": \"nestia swagger\",\n \"build:test\": \"rimraf bin && tsc -p test/tsconfig.json\",\n \"dev\": \"npm run build:test -- --watch\",\n \"eslint\": \"eslint src && eslint test\",\n \"eslint:fix\": \"eslint --fix src && eslint --fix test\",\n \"prepare\": \"ts-patch install && npm run build:env && npm run build:prisma\",\n \"prettier\": \"prettier src --write && prettier test --write\",\n \"------------------------WEBPACK------------------------\": \"\",\n \"webpack\": \"rimraf dist && webpack\",\n \"webpack:start\": \"cd dist && node dist/server\",\n \"webpack:test\": \"npm run webpack && node bin/test/webpack.js\",\n \"------------------------DEPLOYS------------------------\": \"\",\n \"package:api\": \"npm run build:api && cd packages/api && npm publish\",\n \"schema\": \"ts-node src/executable/schema\",\n \"start\": \"node lib/executable/server\",\n \"start:dev\": \"nest start --watch\",\n \"start:swagger\": \"ts-node src/executable/swagger.ts\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia-start\"\n },\n \"keywords\": [\n \"nestia\",\n \"template\",\n \"boilerplate\"\n ],\n \"author\": \"AUTHOR\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\n },\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\n \"devDependencies\": {\n \"@nestia/benchmark\": \"^11.0.1\",\n \"@nestia/e2e\": \"^11.0.1\",\n \"@nestia/sdk\": \"^11.0.1\",\n \"@nestjs/cli\": \"^11.0.7\",\n \"@rollup/plugin-terser\": \"^0.4.4\",\n \"@rollup/plugin-typescript\": \"^11.1.6\",\n \"@trivago/prettier-plugin-sort-imports\": \"^4.3.0\",\n \"@types/bcryptjs\": \"^3.0.0\",\n \"@types/cli\": \"^0.11.21\",\n \"@types/cli-progress\": \"^3.11.5\",\n \"@types/express\": \"^4.17.21\",\n \"@types/inquirer\": \"^8.2.5\",\n \"@types/jsonwebtoken\": \"^9.0.5\",\n \"@types/node\": \"^18.11.0\",\n \"@types/uuid\": \"^8.3.4\",\n \"@typescript-eslint/eslint-plugin\": \"^8.1.0\",\n \"@typescript-eslint/parser\": \"^8.1.0\",\n \"chalk\": \"^4.1.2\",\n \"cli\": \"^1.0.1\",\n \"cli-progress\": \"^3.12.0\",\n \"copy-webpack-plugin\": \"^11.0.0\",\n \"eslint-plugin-deprecation\": \"^3.0.0\",\n \"express\": \"^4.18.2\",\n \"fastify\": \"^5.4.0\",\n \"nestia\": \"^11.0.1\",\n \"prettier\": \"^3.2.4\",\n \"prettier-plugin-prisma\": \"^5.0.0\",\n \"prisma-markdown\": \"^4.0.0\",\n \"rimraf\": \"^3.0.2\",\n \"rollup\": \"^4.18.0\",\n \"source-map-support\": \"^0.5.21\",\n \"swagger-ui-express\": \"^5.0.0\",\n \"ts-loader\": \"^9.5.1\",\n \"ts-node\": \"^10.9.1\",\n \"ts-patch\": \"^3.3.0\",\n \"typescript\": \"~5.9.2\",\n \"typescript-transform-paths\": \"^3.5.5\",\n \"webpack\": \"^5.89.0\",\n \"webpack-cli\": \"^5.1.4\",\n \"write-file-webpack-plugin\": \"^4.5.1\"\n },\n \"dependencies\": {\n \"@nestia/core\": \"^11.010\",\n \"@nestia/fetcher\": \"^11.0.1\",\n \"@nestjs/common\": \"^11.1.3\",\n \"@nestjs/core\": \"^11.1.3\",\n \"@nestjs/platform-express\": \"^11.1.3\",\n \"@nestjs/platform-fastify\": \"^11.1.3\",\n \"@prisma/adapter-pg\": \"^7.0.0\",\n \"@prisma/adapter-better-sqlite3\": \"^7.0.0\",\n \"@prisma/client\": \"^7.0.0\",\n \"bcryptjs\": \"^3.0.2\",\n \"commander\": \"10.0.0\",\n \"dotenv\": \"^16.3.1\",\n \"dotenv-expand\": \"^10.0.0\",\n \"inquirer\": \"8.2.5\",\n \"jsonwebtoken\": \"^9.0.2\",\n \"prisma\": \"^7.0.0\",\n \"serialize-error\": \"^4.1.0\",\n \"tgrid\": \"^1.1.0\",\n \"tstl\": \"^3.0.0\",\n \"typia\": \"^12.0.1\",\n \"uuid\": \"^9.0.0\"\n },\n \"pnpm\": {\n \"onlyBuiltDependencies\": [\"better-sqlite3\"]\n },\n \"stackblitz\": {\n \"startCommand\": \"npm run prepare && npm run build:test && npm run test -- --simultaneous 1\"\n }\n}\n",
6
6
  "src/executable/schema.ts": "import { MySetupWizard } from \"../setup/MySetupWizard\";\n\nconst main = async (): Promise<void> => {\n await MySetupWizard.schema();\n await MySetupWizard.seed();\n};\nmain().catch((error) => {\n console.error(error);\n process.exit(-1);\n});\n",
7
7
  "src/setup/MySetupWizard.ts": "export namespace MySetupWizard {\n export async function schema(): Promise<void> {\n console.log(\"Realize agent has not generated main program yet.\");\n }\n\n export async function seed(): Promise<void> {}\n}\n",
8
8
  "test/helpers/TestAutomation.ts": "import api from \"@ORGANIZATION/PROJECT-api\";\nimport { DynamicExecutor } from \"@nestia/e2e\";\nimport { sleep_for } from \"tstl\";\n\nimport { MyConfiguration } from \"../../src/MyConfiguration\";\nimport { MySetupWizard } from \"../../src/setup/MySetupWizard\";\n\nexport namespace TestAutomation {\n export interface IProps<T> {\n open(options: IOptions): Promise<T>;\n close(backend: T): Promise<void>;\n onComplete(exec: DynamicExecutor.IExecution): void;\n onReset(): void;\n options: IOptions;\n }\n\n export interface IOptions {\n reset: boolean;\n simultaneous: number;\n include?: string[];\n exclude?: string[];\n }\n\n export const execute = async <T>(\n props: IProps<T>,\n ): Promise<DynamicExecutor.IReport> => {\n // RESET\n if (props.options.reset === true) {\n await MySetupWizard.schema();\n await MySetupWizard.seed();\n await props.onReset();\n }\n\n // OPEN BACKEND\n const backend: T = await props.open(props.options);\n const connection: api.IConnection = {\n host: `http://127.0.0.1:${MyConfiguration.API_PORT()}`,\n };\n\n // DO TEST\n const report: DynamicExecutor.IReport = await DynamicExecutor.validate({\n prefix: \"test\",\n location: __dirname + \"/../features\",\n parameters: () => [\n {\n host: connection.host,\n } satisfies api.IConnection,\n ],\n filter: (func) =>\n (!props.options.include?.length ||\n (props.options.include ?? []).some((str) => func.includes(str))) &&\n (!props.options.exclude?.length ||\n (props.options.exclude ?? []).every((str) => !func.includes(str))),\n onComplete: props.onComplete,\n simultaneous: props.options.simultaneous,\n extension: __filename.split(\".\").pop()!,\n });\n\n // TERMINATE\n await sleep_for(2500);\n await props.close(backend);\n return report;\n };\n}\n",
@@ -1 +1 @@
1
- {"version":3,"file":"AutoBeCompilerTestTemplate.js","sourceRoot":"","sources":["../../src/raw/AutoBeCompilerTestTemplate.ts"],"names":[],"mappings":";;;AAAa,QAAA,0BAA0B,GAA2B;IAChE,cAAc,EAAE,mxJAAmxJ;IACnyJ,0BAA0B,EAAE,4PAA4P;IACxR,4BAA4B,EAAE,4NAA4N;IAC1P,gCAAgC,EAAE,q5DAAq5D;IACv7D,qCAAqC,EAAE,gmFAAgmF;IACvoF,eAAe,EAAE,svBAAsvB;IACvwB,iBAAiB,EAAE,isCAAisC;IACptC,eAAe,EAAE,2xZAA2xZ;CAC7yZ,CAAC"}
1
+ {"version":3,"file":"AutoBeCompilerTestTemplate.js","sourceRoot":"","sources":["../../src/raw/AutoBeCompilerTestTemplate.ts"],"names":[],"mappings":";;;AAAa,QAAA,0BAA0B,GAA2B;IAChE,cAAc,EAAE,qxJAAqxJ;IACryJ,0BAA0B,EAAE,4PAA4P;IACxR,4BAA4B,EAAE,4NAA4N;IAC1P,gCAAgC,EAAE,q5DAAq5D;IACv7D,qCAAqC,EAAE,gmFAAgmF;IACvoF,eAAe,EAAE,svBAAsvB;IACvwB,iBAAiB,EAAE,isCAAisC;IACptC,eAAe,EAAE,2xZAA2xZ;CAC7yZ,CAAC"}