export const AutoBeCompilerTestTemplate: Record<string, string> = {
  "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: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:main\": \"rimraf lib && tsc\",\n    \"build:sdk\": \"rimraf src/api/functional && nestia sdk\",\n    \"build:swagger\": \"npx 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 && ts-node build/env.ts\",\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    \"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\": \"^7.1.1\",\n    \"@nestia/e2e\": \"^7.1.1\",\n    \"@nestia/sdk\": \"^7.1.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/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/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    \"nestia\": \"^7.1.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.8.3\",\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\": \"^7.1.1\",\n    \"@nestia/fetcher\": \"^7.1.1\",\n    \"@nestjs/common\": \"^11.1.3\",\n    \"@nestjs/core\": \"^11.1.3\",\n    \"@nestjs/platform-express\": \"^11.1.3\",\n    \"@prisma/client\": \"^6.11.1\",\n    \"commander\": \"10.0.0\",\n    \"dotenv\": \"^16.3.1\",\n    \"dotenv-expand\": \"^10.0.0\",\n    \"inquirer\": \"8.2.5\",\n    \"prisma\": \"^6.11.1\",\n    \"serialize-error\": \"^4.1.0\",\n    \"tgrid\": \"^1.1.0\",\n    \"tstl\": \"^3.0.0\",\n    \"typia\": \"^9.5.0\",\n    \"uuid\": \"^9.0.0\"\n  },\n  \"stackblitz\": {\n    \"startCommand\": \"npm run prepare && npm run build:test && npm run test -- --simultaneous 1\"\n  }\n}\n",
  "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",
  "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",
  "test/helpers/TestAutomationStdio.ts": "import { DynamicExecutor } from \"@nestia/e2e\";\nimport chalk from \"chalk\";\n\nimport { ArgumentParser } from \"./ArgumentParser\";\nimport { TestAutomation } from \"./TestAutomation\";\n\nexport namespace TestAutomationStdio {\n  export const getOptions = () =>\n    ArgumentParser.parse<TestAutomation.IOptions>(\n      async (command, prompt, action) => {\n        command.option(\"--reset <true|false>\", \"reset local DB or not\");\n        command.option(\n          \"--simultaneous <number>\",\n          \"number of simultaneous requests\",\n        );\n        command.option(\"--include <string...>\", \"include feature files\");\n        command.option(\"--exclude <string...>\", \"exclude feature files\");\n\n        return action(async (options) => {\n          // reset\n          if (typeof options.reset === \"string\")\n            options.reset = options.reset === \"true\";\n          options.reset ??= await prompt.boolean(\"reset\")(\"Reset local DB\");\n\n          // simultaneous\n          options.simultaneous = Number(\n            options.simultaneous ??\n              (await prompt.number(\"simultaneous\")(\n                \"Number of simultaneous requests to make\",\n              )),\n          );\n          if (isNaN(options.simultaneous) || options.simultaneous <= 0)\n            options.simultaneous = 1;\n          return options as TestAutomation.IOptions;\n        });\n      },\n    );\n\n  export const onComplete = (exec: DynamicExecutor.IExecution): void => {\n    const trace = (str: string) =>\n      console.log(`  - ${chalk.green(exec.name)}: ${str}`);\n    if (exec.error === null) {\n      const elapsed: number =\n        new Date(exec.completed_at).getTime() -\n        new Date(exec.started_at).getTime();\n      trace(`${chalk.yellow(elapsed.toLocaleString())} ms`);\n    } else trace(chalk.red(exec.error.name));\n  };\n\n  export const onReset = (start: Date) => (): void => {\n    const now: Date = new Date();\n    console.log(\n      `  - Reset DB: ${(now.getDate() - start.getDate()).toLocaleString()} ms`,\n    );\n  };\n\n  export const report = (report: DynamicExecutor.IReport): void => {\n    const exceptions: Error[] = report.executions\n      .filter((exec) => exec.error !== null)\n      .map((exec) => exec.error!);\n    if (exceptions.length === 0) {\n      console.log(\"Success\");\n      console.log(\"Elapsed time\", report.time.toLocaleString(), `ms`);\n    } else {\n      for (const exp of exceptions) console.log(exp);\n      console.log(\"Failed\");\n      console.log(\"Elapsed time\", report.time.toLocaleString(), `ms`);\n      process.exit(-1);\n    }\n  };\n}\n",
  "test/index.ts": "import { MyBackend } from \"../src/MyBackend\";\nimport { MyGlobal } from \"../src/MyGlobal\";\nimport { TestAutomation } from \"./helpers/TestAutomation\";\nimport { TestAutomationStdio } from \"./helpers/TestAutomationStdio\";\n\nconst main = async (): Promise<void> => {\n  MyGlobal.testing = true;\n  await TestAutomation.execute({\n    open: async () => {\n      const backend: MyBackend = new MyBackend();\n      await backend.open();\n      return backend;\n    },\n    close: (backend) => backend.close(),\n    options: await TestAutomationStdio.getOptions(),\n    onComplete: TestAutomationStdio.onComplete,\n    onReset: TestAutomationStdio.onReset(new Date()),\n  });\n};\nmain().catch((exp) => {\n  console.log(exp);\n  process.exit(-1);\n});\n",
  "test/webpack.ts": "import cp from \"child_process\";\nimport { sleep_for } from \"tstl\";\n\nimport { MyConfiguration } from \"../src/MyConfiguration\";\nimport { MyGlobal } from \"../src/MyGlobal\";\nimport { TestAutomation } from \"./helpers/TestAutomation\";\nimport { TestAutomationStdio } from \"./helpers/TestAutomationStdio\";\n\nconst wait = async (): Promise<void> => {\n  while (true)\n    try {\n      await fetch(`http://localhost:${MyConfiguration.API_PORT()}/dsafdsafsd`);\n      return;\n    } catch (exp) {\n      await sleep_for(100);\n    }\n};\n\nconst main = async (): Promise<void> => {\n  MyGlobal.testing = true;\n  await TestAutomation.execute({\n    open: async () => {\n      const backend: cp.ChildProcess = cp.fork(\n        `${MyConfiguration.ROOT}/dist/server.js`,\n        {\n          cwd: `${MyConfiguration.ROOT}/dist`,\n        },\n      );\n      await wait();\n      return backend;\n    },\n    close: async (backend) => {\n      backend.kill();\n    },\n    options: await TestAutomationStdio.getOptions(),\n    onComplete: TestAutomationStdio.onComplete,\n    onReset: TestAutomationStdio.onReset(new Date()),\n  });\n};\nmain().catch((exp) => {\n  console.log(exp);\n  process.exit(-1);\n});\n"
};