@nestia/migrate 14.3.0 → 14.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/NestiaMigrateApplication.mjs.map +1 -1
- package/lib/analyzers/NestiaMigrateControllerAnalyzer.mjs.map +1 -1
- package/lib/archivers/NestiaMigrateFileArchiver.mjs.map +1 -1
- package/lib/bundles/NEST_TEMPLATE.js +1 -1
- package/lib/bundles/NEST_TEMPLATE.mjs +1 -1
- package/lib/bundles/NEST_TEMPLATE.mjs.map +1 -1
- package/lib/bundles/SDK_TEMPLATE.js +1 -1
- package/lib/bundles/SDK_TEMPLATE.mjs +1 -1
- package/lib/bundles/SDK_TEMPLATE.mjs.map +1 -1
- package/lib/executable/NestiaMigrateCommander.mjs.map +1 -1
- package/lib/executable/NestiaMigrateInquirer.mjs.map +1 -1
- package/lib/executable/TemplateBundleCache.mjs.map +1 -1
- package/lib/executable/bundle.mjs.map +1 -1
- package/lib/executable/migrate.mjs.map +1 -1
- package/lib/factories/ExpressionFactory.mjs.map +1 -1
- package/lib/factories/IdentifierFactory.mjs.map +1 -1
- package/lib/factories/LiteralFactory.mjs.map +1 -1
- package/lib/factories/StatementFactory.mjs.map +1 -1
- package/lib/factories/SupportedStringFormats.mjs.map +1 -1
- package/lib/factories/TypeFactory.mjs.map +1 -1
- package/lib/factories/TypeLiteralFactory.mjs.map +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/internal/ts.mjs.map +1 -1
- package/lib/module.mjs.map +1 -1
- package/lib/package.mjs +1 -1
- package/lib/programmers/NestiaMigrateApiFileProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateApiProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateApiSimulationProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateApiStartProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateDtoProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateE2eFileProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateE2eProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateImportProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateNestControllerProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateNestMethodProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateNestModuleProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateNestProgrammer.mjs.map +1 -1
- package/lib/programmers/NestiaMigrateSchemaProgrammer.mjs.map +1 -1
- package/lib/utils/FilePrinter.mjs.map +1 -1
- package/lib/utils/MapUtil.mjs.map +1 -1
- package/lib/utils/PathTemplate.mjs.map +1 -1
- package/lib/utils/RequestBody.mjs.map +1 -1
- package/lib/utils/StringUtil.mjs.map +1 -1
- package/lib/utils/SuccessStatus.mjs.map +1 -1
- package/package.json +5 -5
- package/src/bundles/NEST_TEMPLATE.ts +1 -1
- package/src/bundles/SDK_TEMPLATE.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDK_TEMPLATE.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"SDK_TEMPLATE.mjs","names":[],"sources":["../../src/bundles/SDK_TEMPLATE.ts"],"sourcesContent":["export const SDK_TEMPLATE: Record<string, string> = {\n \".gitignore\": \".git/\\nbin/\\nlib/\\nnode_modules/\\n\\npackage-lock.json\",\n \".vscode/launch.json\": \"{\\n // Use IntelliSense to learn about possible Node.js debug attributes.\\n // Hover to view descriptions of existing attributes.\\n // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\\n \\\"version\\\": \\\"0.2.0\\\",\\n \\\"configurations\\\": [\\n {\\n \\\"type\\\": \\\"node\\\",\\n \\\"request\\\": \\\"launch\\\",\\n \\\"name\\\": \\\"JavaScript Test using SourceMap\\\",\\n \\\"program\\\": \\\"${workspaceRoot}/test/index.ts\\\",\\n \\\"cwd\\\": \\\"${workspaceRoot}\\\",\\n \\\"args\\\": [\\n //----\\n // You can run specific test functions\\n //----\\n // \\\"--include\\\", \\\"something\\\",\\n // \\\"--exclude\\\", \\\"nothing\\\",\\n ],\\n \\\"outFiles\\\": [\\\"${workspaceRoot}/bin/**/*.js\\\"],\\n }\\n ]\\n}\",\n \".vscode/settings.json\": \"{\\n \\\"editor.tabSize\\\": 2,\\n \\\"editor.formatOnSave\\\": true,\\n \\\"[javascript][typescript]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\",\\n \\\"editor.codeActionsOnSave\\\": {\\n \\\"source.fixAll.eslint\\\": \\\"explicit\\\"\\n },\\n },\\n}\",\n \"LICENSE\": \"MIT License\\n\\nCopyright (c) 2024 Jeongho Nam\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\\"Software\\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n\",\n \"README.md\": \"# Software Development Kit\\nThis is a SDK library generated by [`@nestia/migrate`](https://nestia.io/docs/migrate) or [`@nestia/editor`](https://nestia.io/docs/editor).\\n\\nWith this SDK library, you can easily and safely interact with backend server.\\n\\nJust import and call some API functions like gif image below:\\n\\n\\n\\n> Left is server code, and right is client code utilizing the SDK\\n\\n\\n\\n\\n## How to Test\\n```bash\\npnpm install\\npnpm run start # run only \\\"test/start.ts\\\" file\\npnpm run test # everything under the \\\"test/features\\\" directory\\npnpm run test:simulate # \\\"test/features\\\" with mockup simulation mode\\n```\\n\\nIf you run `pnpm run start` command, only [test/start.ts](test/start.ts) file would be executed.\\n\\nOtherwise you run `pnpm run test` command instead, run everything in the [test/features](test/features) directory.\\n\\nFor reference, the [test/features](test/features) directory and E2E test functions (for each API endpoints) would be automatically composed only when you've configured the \\\"E2E test function generation mode\\\" of the `@nestia/migrate` (or `@nestia/editor`).\\n\\n```bash\\npnpm dlx @nestia/migrate\\n? Migration mode (Use arrow keys):\\n NestJS\\n > SDK\\n? Swagger file location: assets/input/clickhouse.json\\n? Output directory path: assets/output/clickhouse-sdk-manual\\n? Mokup Simulator: true\\n? E2E Test Functions: true\\n```\\n\\n\\n\\n\\n## Deploy\\n```bash\\npnpm install\\npnpm run deploy\\n```\\n\\nJust run `pnpm run deploy` command, then your SDK library would be published.\\n\\nBy the way, the initial package name of this template repository is `@ORGANIZATION/PROJECT-api`. I think it would better to change the word to your own organization and project name. If you're utilizing `VsCode`, you can do it through `Edit > Replace in Files` (*Ctrl + Shift + H*) feature.\\n\\n-----------\\n\\n> ## What [`Nestia`](https://nestia.io) is:\\n> \\n> \\n> [](https://github.com/samchon/nestia/blob/master/LICENSE)\\n> [](https://www.npmjs.com/package/@nestia/core)\\n> [](https://www.npmjs.com/package/@nestia/core)\\n> [](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)\\n> [](https://nestia.io/docs/)\\n> \\n> Nestia is a set of helper libraries for NestJS, supporting below features:\\n> \\n> - `@nestia/core`: Super-fast decorators\\n> - `@nestia/sdk`:\\n> - Swagger generator evolved than ever\\n> - SDK library generator for clients\\n> - Mockup Simulator for client applications\\n> - Automatic E2E test functions generator\\n> - `@nestia/migrate`: Migration from Swagger to NestJS\\n> - `@nestia/editor`: Online TypeScript Swagger Editor\\n> - `nestia`: Just CLI (command line interface) tool\\n> \\n>> **Note**\\n>> \\n>> - **Only one line** required, with pure TypeScript type\\n>> - Enhance performance **30x** up\\n>> - Runtime validator is **20,000x faster** than `class-validator`\\n>> - JSON serialization is **200x faster** than `class-transformer`\\n>> - Software Development Kit\\n>> - SDK is a collection of `fetch` functions with type definitions like [tRPC](https://> trpc.io/)\\n>> - Mockup simulator means embedded backend simulator in SDK\\n>> - similar with [msw](https://mswjs.io/), but fully automated\\n\",\n \"hello.js\": \"function print(command, description) {\\n return console.log(`\\\\x1b[1m${command}\\\\x1b[2m: ${description}\\\\x1b[0m`);\\n}\\n\\nconsole.log(\\\"-----------------------------------------\\\");\\nconsole.log(\\\"\\\\x1b[7mGenerated by \\\\x1b[2m@nestia/editor\\\\x1b[0m\\\");\\nconsole.log(\\\"\\\");\\nconsole.log(\\\" - \\\\x1b[36mhttps://nestia.io/docs/editor\\\\x1b[0m\\\");\\nconsole.log(\\\" - \\\\x1b[36mhttps://github.com/samchon/nestia\\\\x1b[0m\\\");\\nconsole.log(\\\"-----------------------------------------\\\");\\n\\nprint(\\\"pnpm run start\\\", \\\"Run only test/start.ts\\\");\\nprint(\\\"pnpm run test\\\", \\\"Run every test/features/**/*.ts files\\\");\\nprint(\\\"pnpm run test:simulate\\\", \\\"Test with mockup simulator\\\");\\n\",\n \"package.json\": \"{\\n \\\"name\\\": \\\"@ORGANIZATION/PROJECT-api\\\",\\n \\\"version\\\": \\\"0.1.0\\\",\\n \\\"description\\\": \\\"SDK library generated by Nestia\\\",\\n \\\"main\\\": \\\"src/index.ts\\\",\\n \\\"exports\\\": {\\n \\\".\\\": \\\"./src/index.ts\\\",\\n \\\"./lib/*\\\": \\\"./src/*.ts\\\",\\n \\\"./package.json\\\": \\\"./package.json\\\"\\n },\\n \\\"publishConfig\\\": {\\n \\\"main\\\": \\\"lib/index.mjs\\\",\\n \\\"module\\\": \\\"lib/index.mjs\\\",\\n \\\"types\\\": \\\"lib/index.d.ts\\\",\\n \\\"exports\\\": {\\n \\\".\\\": {\\n \\\"types\\\": \\\"./lib/index.d.ts\\\",\\n \\\"import\\\": \\\"./lib/index.mjs\\\",\\n \\\"default\\\": \\\"./lib/index.js\\\"\\n },\\n \\\"./lib/*\\\": {\\n \\\"types\\\": \\\"./lib/*.d.ts\\\",\\n \\\"import\\\": \\\"./lib/*.mjs\\\",\\n \\\"default\\\": \\\"./lib/*.js\\\"\\n },\\n \\\"./package.json\\\": \\\"./package.json\\\"\\n }\\n },\\n \\\"scripts\\\": {\\n \\\"build\\\": \\\"rimraf lib && ttsc && rolldown -c\\\",\\n \\\"build:test\\\": \\\"rimraf bin && ttsc --project test/tsconfig.json\\\",\\n \\\"deploy\\\": \\\"pnpm run build && pnpm publish\\\",\\n \\\"dev\\\": \\\"pnpm run build:test --watch\\\",\\n \\\"hello\\\": \\\"node hello\\\",\\n \\\"start\\\": \\\"ttsx test/start.ts\\\",\\n \\\"swagger\\\": \\\"ttsx test/swagger.ts\\\",\\n \\\"test\\\": \\\"ttsx test/index.ts\\\",\\n \\\"test:simulate\\\": \\\"ttsx test/index.ts --simulate true\\\"\\n },\\n \\\"repository\\\": {\\n \\\"type\\\": \\\"git\\\",\\n \\\"url\\\": \\\"https://github.com/samchon/nestia\\\"\\n },\\n \\\"author\\\": \\\"Jeongho Nam\\\",\\n \\\"license\\\": \\\"MIT\\\",\\n \\\"bugs\\\": {\\n \\\"url\\\": \\\"https://github.com/samchon/nestia/issues\\\"\\n },\\n \\\"homepage\\\": \\\"https://nestia.io\\\",\\n \\\"files\\\": [\\n \\\"lib\\\",\\n \\\"swagger.json\\\",\\n \\\"package.json\\\",\\n \\\"README.md\\\"\\n ],\\n \\\"dependencies\\\": {\\n \\\"@nestia/fetcher\\\": \\\"^14.4.0\\\",\\n \\\"tgrid\\\": \\\"^1.2.1\\\",\\n \\\"typia\\\": \\\"15.5.0\\\"\\n },\\n \\\"devDependencies\\\": {\\n \\\"@nestia/e2e\\\": \\\"^14.4.0\\\",\\n \\\"@ttsc/unplugin\\\": \\\"^0.38.1\\\",\\n \\\"@types/express\\\": \\\"^4.17.21\\\",\\n \\\"@types/swagger-ui-express\\\": \\\"^4.1.6\\\",\\n \\\"chalk\\\": \\\"4.1.2\\\",\\n \\\"express\\\": \\\"^4.19.2\\\",\\n \\\"rimraf\\\": \\\"^5.0.5\\\",\\n \\\"rolldown\\\": \\\"^1.1.5\\\",\\n \\\"swagger-ui-express\\\": \\\"^5.0.0\\\",\\n \\\"tinyglobby\\\": \\\"^0.2.17\\\",\\n \\\"ttsc\\\": \\\"^0.38.1\\\",\\n \\\"typescript\\\": \\\"^7.0.2\\\",\\n \\\"@nestia/core\\\": \\\"^14.4.0\\\"\\n },\\n \\\"packageManager\\\": \\\"pnpm@10.19.0\\\"\\n}\",\n \"rolldown.config.mjs\": \"import ttsc from \\\"@ttsc/unplugin/rolldown\\\";\\nimport path from \\\"node:path\\\";\\nimport { globSync } from \\\"tinyglobby\\\";\\n\\nexport default {\\n input: globSync(\\\"./src/**/*.ts\\\"),\\n external: (id) => !id.startsWith(\\\".\\\") && !path.isAbsolute(id),\\n output: {\\n dir: \\\"./lib\\\",\\n format: \\\"esm\\\",\\n sourcemap: true,\\n entryFileNames: \\\"[name].mjs\\\",\\n preserveModules: true,\\n preserveModulesRoot: \\\"src\\\",\\n },\\n plugins: [ttsc()],\\n};\\n\",\n \"src/HttpError.ts\": \"export { HttpError } from \\\"@nestia/fetcher\\\";\\n\",\n \"src/IConnection.ts\": \"export type { IConnection } from \\\"@nestia/fetcher\\\";\\n\",\n \"src/index.ts\": \"import * as api from \\\"./module\\\";\\n\\nexport * from \\\"./module\\\";\\nexport default api;\\n\",\n \"src/module.ts\": \"export type * from \\\"./IConnection\\\";\\nexport * from \\\"./HttpError\\\";\\n\\nexport * as functional from \\\"./functional\\\";\\n\",\n \"swagger.json\": \"{\\n \\\"openapi\\\": \\\"3.0.1\\\",\\n \\\"servers\\\": [\\n {\\n \\\"url\\\": \\\"http://localhost:37001\\\",\\n \\\"description\\\": \\\"Local Server\\\"\\n }\\n ],\\n \\\"info\\\": {\\n \\\"version\\\": \\\"2.2.0\\\",\\n \\\"title\\\": \\\"@samchon/bbs-backend\\\",\\n \\\"description\\\": \\\"Backend for bbs\\\",\\n \\\"license\\\": {\\n \\\"name\\\": \\\"MIT\\\"\\n }\\n },\\n \\\"paths\\\": {\\n \\\"/bbs/articles\\\": {\\n \\\"patch\\\": {\\n \\\"tags\\\": [\\n \\\"BBS\\\"\\n ],\\n \\\"parameters\\\": [],\\n \\\"requestBody\\\": {\\n \\\"description\\\": \\\"Request info of pagination and searching options.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle.IRequest\\\"\\n }\\n }\\n },\\n \\\"required\\\": true\\n },\\n \\\"responses\\\": {\\n \\\"200\\\": {\\n \\\"description\\\": \\\"Paginated summarized articles.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IPageIBbsArticle.ISummary\\\"\\n }\\n }\\n }\\n }\\n },\\n \\\"summary\\\": \\\"List up all summarized articles\\\",\\n \\\"description\\\": \\\"List up all summarized articles.\\\\n\\\\nList up all summarized articles with pagination and searching options.\\\"\\n },\\n \\\"post\\\": {\\n \\\"tags\\\": [\\n \\\"BBS\\\"\\n ],\\n \\\"parameters\\\": [],\\n \\\"requestBody\\\": {\\n \\\"description\\\": \\\"Article information to create.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle.ICreate\\\"\\n }\\n }\\n },\\n \\\"required\\\": true\\n },\\n \\\"responses\\\": {\\n \\\"201\\\": {\\n \\\"description\\\": \\\"Newly created article.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle\\\"\\n }\\n }\\n }\\n }\\n },\\n \\\"summary\\\": \\\"Create a new article\\\",\\n \\\"description\\\": \\\"Create a new article.\\\\n\\\\nCreate a new article with its first {@link IBbsArticle.ISnapshot snapshot}.\\\"\\n }\\n },\\n \\\"/bbs/articles/abridges\\\": {\\n \\\"patch\\\": {\\n \\\"tags\\\": [\\n \\\"BBS\\\"\\n ],\\n \\\"parameters\\\": [],\\n \\\"requestBody\\\": {\\n \\\"description\\\": \\\"Request info of pagination and searching options.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle.IRequest\\\"\\n }\\n }\\n },\\n \\\"required\\\": true\\n },\\n \\\"responses\\\": {\\n \\\"200\\\": {\\n \\\"description\\\": \\\"Paginated abridged articles.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IPageIBbsArticle.IAbridge\\\"\\n }\\n }\\n }\\n }\\n },\\n \\\"summary\\\": \\\"List up all abridged articles\\\",\\n \\\"description\\\": \\\"List up all abridged articles.\\\\n\\\\nList up all abridged articles with pagination and searching options.\\\"\\n }\\n },\\n \\\"/bbs/articles/{id}\\\": {\\n \\\"get\\\": {\\n \\\"tags\\\": [\\n \\\"BBS\\\"\\n ],\\n \\\"parameters\\\": [\\n {\\n \\\"name\\\": \\\"id\\\",\\n \\\"in\\\": \\\"path\\\",\\n \\\"schema\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\"\\n },\\n \\\"description\\\": \\\"Target article's \\\",\\n \\\"required\\\": true\\n }\\n ],\\n \\\"responses\\\": {\\n \\\"200\\\": {\\n \\\"description\\\": \\\"Article information\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle\\\"\\n }\\n }\\n }\\n }\\n },\\n \\\"summary\\\": \\\"Read individual article\\\",\\n \\\"description\\\": \\\"Read individual article.\\\\n\\\\nReads an article with its every {@link IBbsArticle.ISnapshot snapshots}.\\\"\\n },\\n \\\"put\\\": {\\n \\\"tags\\\": [\\n \\\"BBS\\\"\\n ],\\n \\\"parameters\\\": [\\n {\\n \\\"name\\\": \\\"id\\\",\\n \\\"in\\\": \\\"path\\\",\\n \\\"schema\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\"\\n },\\n \\\"description\\\": \\\"Target article's \\\",\\n \\\"required\\\": true\\n }\\n ],\\n \\\"requestBody\\\": {\\n \\\"description\\\": \\\"Article information to update.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle.IUpdate\\\"\\n }\\n }\\n },\\n \\\"required\\\": true\\n },\\n \\\"responses\\\": {\\n \\\"200\\\": {\\n \\\"description\\\": \\\"Newly accumulated snapshot information.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle.ISnapshot\\\"\\n }\\n }\\n }\\n }\\n },\\n \\\"summary\\\": \\\"Update an article\\\",\\n \\\"description\\\": \\\"Update an article.\\\\n\\\\nAccumulate a new {@link IBbsArticle.ISnapshot snapshot} record to the article.\\\"\\n },\\n \\\"delete\\\": {\\n \\\"tags\\\": [\\n \\\"BBS\\\"\\n ],\\n \\\"parameters\\\": [\\n {\\n \\\"name\\\": \\\"id\\\",\\n \\\"in\\\": \\\"path\\\",\\n \\\"schema\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\"\\n },\\n \\\"description\\\": \\\"Target article's \\\",\\n \\\"required\\\": true\\n }\\n ],\\n \\\"requestBody\\\": {\\n \\\"description\\\": \\\"Password of the article.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle.IErase\\\"\\n }\\n }\\n },\\n \\\"required\\\": true\\n },\\n \\\"responses\\\": {\\n \\\"200\\\": {\\n \\\"description\\\": \\\"\\\"\\n }\\n },\\n \\\"summary\\\": \\\"Erase an article\\\",\\n \\\"description\\\": \\\"Erase an article.\\\\n\\\\nPerforms soft deletion to the article.\\\"\\n }\\n },\\n \\\"/bbs/articles/{articleId}/comments\\\": {\\n \\\"patch\\\": {\\n \\\"tags\\\": [\\n \\\"BBS\\\"\\n ],\\n \\\"parameters\\\": [\\n {\\n \\\"name\\\": \\\"articleId\\\",\\n \\\"in\\\": \\\"path\\\",\\n \\\"schema\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\"\\n },\\n \\\"description\\\": \\\"\\\",\\n \\\"required\\\": true\\n }\\n ],\\n \\\"requestBody\\\": {\\n \\\"description\\\": \\\"Request info of pagination and searching options.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticleComment.IRequest\\\"\\n }\\n }\\n },\\n \\\"required\\\": true\\n },\\n \\\"responses\\\": {\\n \\\"200\\\": {\\n \\\"description\\\": \\\"Paginated summarized comments.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IPageIBbsArticleComment\\\"\\n }\\n }\\n }\\n }\\n },\\n \\\"summary\\\": \\\"List up all summarized comments\\\",\\n \\\"description\\\": \\\"List up all summarized comments.\\\\n\\\\nList up all summarized comments with pagination and searching options.\\\"\\n },\\n \\\"post\\\": {\\n \\\"tags\\\": [\\n \\\"BBS\\\"\\n ],\\n \\\"parameters\\\": [\\n {\\n \\\"name\\\": \\\"articleId\\\",\\n \\\"in\\\": \\\"path\\\",\\n \\\"schema\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\"\\n },\\n \\\"description\\\": \\\"Belonged article's \\\",\\n \\\"required\\\": true\\n }\\n ],\\n \\\"requestBody\\\": {\\n \\\"description\\\": \\\"Comment information to create.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticleComment.ICreate\\\"\\n }\\n }\\n },\\n \\\"required\\\": true\\n },\\n \\\"responses\\\": {\\n \\\"201\\\": {\\n \\\"description\\\": \\\"Newly created comment.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticleComment\\\"\\n }\\n }\\n }\\n }\\n },\\n \\\"summary\\\": \\\"Create a new comment\\\",\\n \\\"description\\\": \\\"Create a new comment.\\\\n\\\\nCreate a new comment with its first {@link IBbsArticleComment.ISnapshot snapshot}.\\\"\\n }\\n },\\n \\\"/bbs/articles/{articleId}/comments/{id}\\\": {\\n \\\"get\\\": {\\n \\\"tags\\\": [\\n \\\"BBS\\\"\\n ],\\n \\\"parameters\\\": [\\n {\\n \\\"name\\\": \\\"articleId\\\",\\n \\\"in\\\": \\\"path\\\",\\n \\\"schema\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\"\\n },\\n \\\"description\\\": \\\"Belonged article's \\\",\\n \\\"required\\\": true\\n },\\n {\\n \\\"name\\\": \\\"id\\\",\\n \\\"in\\\": \\\"path\\\",\\n \\\"schema\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\"\\n },\\n \\\"description\\\": \\\"Target comment's \\\",\\n \\\"required\\\": true\\n }\\n ],\\n \\\"responses\\\": {\\n \\\"200\\\": {\\n \\\"description\\\": \\\"Comment information\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticleComment\\\"\\n }\\n }\\n }\\n }\\n },\\n \\\"summary\\\": \\\"Read individual comment\\\",\\n \\\"description\\\": \\\"Read individual comment.\\\\n\\\\nReads a comment with its every {@link IBbsArticleComment.ISnapshot snapshots}.\\\"\\n },\\n \\\"put\\\": {\\n \\\"tags\\\": [\\n \\\"BBS\\\"\\n ],\\n \\\"parameters\\\": [\\n {\\n \\\"name\\\": \\\"articleId\\\",\\n \\\"in\\\": \\\"path\\\",\\n \\\"schema\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\"\\n },\\n \\\"description\\\": \\\"Belonged article's \\\",\\n \\\"required\\\": true\\n },\\n {\\n \\\"name\\\": \\\"id\\\",\\n \\\"in\\\": \\\"path\\\",\\n \\\"schema\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\"\\n },\\n \\\"description\\\": \\\"Target comment's \\\",\\n \\\"required\\\": true\\n }\\n ],\\n \\\"requestBody\\\": {\\n \\\"description\\\": \\\"Comment information to update.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticleComment.IUpdate\\\"\\n }\\n }\\n },\\n \\\"required\\\": true\\n },\\n \\\"responses\\\": {\\n \\\"200\\\": {\\n \\\"description\\\": \\\"Newly accumulated snapshot information.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticleComment.ISnapshot\\\"\\n }\\n }\\n }\\n }\\n },\\n \\\"summary\\\": \\\"Update a comment\\\",\\n \\\"description\\\": \\\"Update a comment.\\\\n\\\\nAccumulate a new {@link IBbsArticleComment.ISnapshot snapshot} record to the comment.\\\"\\n },\\n \\\"delete\\\": {\\n \\\"tags\\\": [\\n \\\"BBS\\\"\\n ],\\n \\\"parameters\\\": [\\n {\\n \\\"name\\\": \\\"articleId\\\",\\n \\\"in\\\": \\\"path\\\",\\n \\\"schema\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\"\\n },\\n \\\"description\\\": \\\"Belonged article's \\\",\\n \\\"required\\\": true\\n },\\n {\\n \\\"name\\\": \\\"id\\\",\\n \\\"in\\\": \\\"path\\\",\\n \\\"schema\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\"\\n },\\n \\\"description\\\": \\\"Target comment's \\\",\\n \\\"required\\\": true\\n }\\n ],\\n \\\"requestBody\\\": {\\n \\\"description\\\": \\\"Password of the comment.\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticleComment.IErase\\\"\\n }\\n }\\n },\\n \\\"required\\\": true\\n },\\n \\\"responses\\\": {\\n \\\"200\\\": {\\n \\\"description\\\": \\\"\\\"\\n }\\n },\\n \\\"summary\\\": \\\"Erase a comment\\\",\\n \\\"description\\\": \\\"Erase a comment.\\\\n\\\\nPerforms soft deletion to the comment.\\\"\\n }\\n },\\n \\\"/monitors/health\\\": {\\n \\\"get\\\": {\\n \\\"tags\\\": [\\n \\\"Monitor\\\"\\n ],\\n \\\"parameters\\\": [],\\n \\\"responses\\\": {\\n \\\"200\\\": {\\n \\\"description\\\": \\\"\\\"\\n }\\n },\\n \\\"summary\\\": \\\"Health check API\\\",\\n \\\"description\\\": \\\"Health check API.\\\"\\n }\\n },\\n \\\"/monitors/performance\\\": {\\n \\\"get\\\": {\\n \\\"tags\\\": [\\n \\\"Monitor\\\"\\n ],\\n \\\"parameters\\\": [],\\n \\\"responses\\\": {\\n \\\"200\\\": {\\n \\\"description\\\": \\\"Performance info\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IPerformance\\\"\\n }\\n }\\n }\\n }\\n },\\n \\\"summary\\\": \\\"Get performance information\\\",\\n \\\"description\\\": \\\"Get performance information.\\\\n\\\\nGet perofmration information composed with CPU, memory and resource usage.\\\"\\n }\\n },\\n \\\"/monitors/system\\\": {\\n \\\"get\\\": {\\n \\\"tags\\\": [\\n \\\"Monitor\\\"\\n ],\\n \\\"parameters\\\": [],\\n \\\"responses\\\": {\\n \\\"200\\\": {\\n \\\"description\\\": \\\"System info\\\",\\n \\\"content\\\": {\\n \\\"application/json\\\": {\\n \\\"schema\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/ISystem\\\"\\n }\\n }\\n }\\n }\\n },\\n \\\"summary\\\": \\\"Get system information\\\",\\n \\\"description\\\": \\\"Get system information.\\\\n\\\\nGet system information with commit and package information.\\\"\\n }\\n }\\n },\\n \\\"components\\\": {\\n \\\"schemas\\\": {\\n \\\"IBbsArticle.IRequest\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"search\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle.IRequest.ISearch\\\",\\n \\\"title\\\": \\\"Search condition\\\",\\n \\\"description\\\": \\\"Search condition.\\\"\\n },\\n \\\"sort\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"+created_at\\\",\\n \\\"+title\\\",\\n \\\"+updated_at\\\",\\n \\\"+writer\\\",\\n \\\"-created_at\\\",\\n \\\"-title\\\",\\n \\\"-updated_at\\\",\\n \\\"-writer\\\"\\n ]\\n },\\n \\\"title\\\": \\\"Sort condition\\\",\\n \\\"description\\\": \\\"Sort condition.\\\"\\n },\\n \\\"page\\\": {\\n \\\"type\\\": \\\"integer\\\",\\n \\\"title\\\": \\\"Page number\\\",\\n \\\"description\\\": \\\"Page number.\\\"\\n },\\n \\\"limit\\\": {\\n \\\"type\\\": \\\"integer\\\",\\n \\\"default\\\": 100,\\n \\\"title\\\": \\\"Limitation of records per a page\\\",\\n \\\"description\\\": \\\"Limitation of records per a page.\\\"\\n }\\n },\\n \\\"nullable\\\": false\\n },\\n \\\"IBbsArticle.IRequest.ISearch\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"writer\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"title\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"body\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"title_or_body\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"from\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date-time\\\"\\n },\\n \\\"to\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date-time\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"description\\\": \\\"검색 정보.\\\"\\n },\\n \\\"IPageIBbsArticle.ISummary\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"pagination\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IPage.IPagination\\\",\\n \\\"title\\\": \\\"Page information\\\",\\n \\\"description\\\": \\\"Page information.\\\"\\n },\\n \\\"data\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle.ISummary\\\"\\n },\\n \\\"title\\\": \\\"List of records\\\",\\n \\\"description\\\": \\\"List of records.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"pagination\\\",\\n \\\"data\\\"\\n ],\\n \\\"description\\\": \\\"A page.\\\\n\\\\nCollection of records with pagination indformation.\\\"\\n },\\n \\\"IPage.IPagination\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"current\\\": {\\n \\\"type\\\": \\\"integer\\\",\\n \\\"title\\\": \\\"Current page number\\\",\\n \\\"description\\\": \\\"Current page number.\\\"\\n },\\n \\\"limit\\\": {\\n \\\"type\\\": \\\"integer\\\",\\n \\\"default\\\": 100,\\n \\\"title\\\": \\\"Limitation of records per a page\\\",\\n \\\"description\\\": \\\"Limitation of records per a page.\\\"\\n },\\n \\\"records\\\": {\\n \\\"type\\\": \\\"integer\\\",\\n \\\"title\\\": \\\"Total records in the database\\\",\\n \\\"description\\\": \\\"Total records in the database.\\\"\\n },\\n \\\"pages\\\": {\\n \\\"type\\\": \\\"integer\\\",\\n \\\"title\\\": \\\"Total pages\\\",\\n \\\"description\\\": \\\"Total pages.\\\\n\\\\nEqual to {@link records } / {@link limit } with ceiling.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"current\\\",\\n \\\"limit\\\",\\n \\\"records\\\",\\n \\\"pages\\\"\\n ],\\n \\\"description\\\": \\\"Page information.\\\"\\n },\\n \\\"IBbsArticle.ISummary\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"id\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\",\\n \\\"title\\\": \\\"Primary Key\\\",\\n \\\"description\\\": \\\"Primary Key.\\\"\\n },\\n \\\"writer\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Writer of the article\\\",\\n \\\"description\\\": \\\"Writer of the article.\\\"\\n },\\n \\\"title\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Title of the last snapshot\\\",\\n \\\"description\\\": \\\"Title of the last snapshot.\\\"\\n },\\n \\\"created_at\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date-time\\\",\\n \\\"title\\\": \\\"Creation time of the article\\\",\\n \\\"description\\\": \\\"Creation time of the article.\\\"\\n },\\n \\\"updated_at\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date-time\\\",\\n \\\"title\\\": \\\"Modification time of the article\\\",\\n \\\"description\\\": \\\"Modification time of the article.\\\\n\\\\nIn other words, the time when the last snapshot was created.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"id\\\",\\n \\\"writer\\\",\\n \\\"title\\\",\\n \\\"created_at\\\",\\n \\\"updated_at\\\"\\n ],\\n \\\"description\\\": \\\"Summarized information of the article.\\\"\\n },\\n \\\"IPageIBbsArticle.IAbridge\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"pagination\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IPage.IPagination\\\",\\n \\\"title\\\": \\\"Page information\\\",\\n \\\"description\\\": \\\"Page information.\\\"\\n },\\n \\\"data\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle.IAbridge\\\"\\n },\\n \\\"title\\\": \\\"List of records\\\",\\n \\\"description\\\": \\\"List of records.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"pagination\\\",\\n \\\"data\\\"\\n ],\\n \\\"description\\\": \\\"A page.\\\\n\\\\nCollection of records with pagination indformation.\\\"\\n },\\n \\\"IBbsArticle.IAbridge\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"id\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\",\\n \\\"title\\\": \\\"Primary Key\\\",\\n \\\"description\\\": \\\"Primary Key.\\\"\\n },\\n \\\"writer\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Writer of the article\\\",\\n \\\"description\\\": \\\"Writer of the article.\\\"\\n },\\n \\\"title\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Title of the last snapshot\\\",\\n \\\"description\\\": \\\"Title of the last snapshot.\\\"\\n },\\n \\\"created_at\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date-time\\\",\\n \\\"title\\\": \\\"Creation time of the article\\\",\\n \\\"description\\\": \\\"Creation time of the article.\\\"\\n },\\n \\\"updated_at\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date-time\\\",\\n \\\"title\\\": \\\"Modification time of the article\\\",\\n \\\"description\\\": \\\"Modification time of the article.\\\\n\\\\nIn other words, the time when the last snapshot was created.\\\"\\n },\\n \\\"format\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle.Format\\\",\\n \\\"title\\\": \\\"Format of body\\\",\\n \\\"description\\\": \\\"Format of body.\\\\n\\\\nSame meaning with extension like `html`, `md`, `txt`.\\\"\\n },\\n \\\"body\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Content body of article\\\",\\n \\\"description\\\": \\\"Content body of article.\\\"\\n },\\n \\\"files\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IAttachmentFile.ICreate\\\"\\n },\\n \\\"title\\\": \\\"List of attachment files\\\",\\n \\\"description\\\": \\\"List of attachment files.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"id\\\",\\n \\\"writer\\\",\\n \\\"title\\\",\\n \\\"created_at\\\",\\n \\\"updated_at\\\",\\n \\\"format\\\",\\n \\\"body\\\",\\n \\\"files\\\"\\n ],\\n \\\"description\\\": \\\"Abriged information of the article.\\\"\\n },\\n \\\"IBbsArticle.Format\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"txt\\\",\\n \\\"md\\\",\\n \\\"html\\\"\\n ]\\n },\\n \\\"IAttachmentFile.ICreate\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"name\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"maxLength\\\": 255,\\n \\\"title\\\": \\\"File name, except extension\\\",\\n \\\"description\\\": \\\"File name, except extension.\\\"\\n },\\n \\\"extension\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"maxLength\\\": 8,\\n \\\"minLength\\\": 1,\\n \\\"nullable\\\": true,\\n \\\"title\\\": \\\"Extension\\\",\\n \\\"description\\\": \\\"Extension.\\\\n\\\\nPossible to omit like `README` case.\\\"\\n },\\n \\\"url\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uri\\\",\\n \\\"title\\\": \\\"URL path of the real file\\\",\\n \\\"description\\\": \\\"URL path of the real file.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"name\\\",\\n \\\"extension\\\",\\n \\\"url\\\"\\n ]\\n },\\n \\\"IBbsArticle\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"id\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\",\\n \\\"title\\\": \\\"Primary Key\\\",\\n \\\"description\\\": \\\"Primary Key.\\\"\\n },\\n \\\"writer\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Writer of article\\\",\\n \\\"description\\\": \\\"Writer of article.\\\"\\n },\\n \\\"snapshots\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle.ISnapshot\\\"\\n },\\n \\\"minItems\\\": 1,\\n \\\"title\\\": \\\"List of snapshot contents\\\",\\n \\\"description\\\": \\\"List of snapshot contents.\\\\n\\\\nIt is created for the first time when an article is created, and is\\\\naccumulated every time the article is modified.\\\"\\n },\\n \\\"created_at\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date-time\\\",\\n \\\"title\\\": \\\"Creation time of article\\\",\\n \\\"description\\\": \\\"Creation time of article.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"id\\\",\\n \\\"writer\\\",\\n \\\"snapshots\\\",\\n \\\"created_at\\\"\\n ],\\n \\\"description\\\": \\\"Article entity.\\\\n\\\\n`IBbsArticle* is a super-type entity of all kinds of articles in the current\\\\nbackend system, literally shaping individual articles of the bulletin board.\\\\n\\\\nAnd, as you can see, the elements that must inevitably exist in the article,\\\\nsuch as the `title` or the `body`, do not exist in the `IBbsArticle`, but exist\\\\nin the subsidiary entity, {@link IBbsArticle.ISnapshot }, as a 1: N relationship,\\\\nwhich is because a new snapshot record is published every time the article is\\\\nmodified.\\\\n\\\\nThe reason why a new snapshot record is published every time the article is\\\\nmodified is to preserve the evidence. Due to the nature of e-community, there\\\\nis always a threat of dispute among the participants. And it can happen that\\\\ndisputes arise through articles or {@link IBbsArticleComment comments}, and to\\\\nprevent such things as modifying existing articles to manipulate the situation,\\\\nthe article is designed in this structure.\\\\n\\\\nIn other words, to keep evidence, and prevent fraud.\\\"\\n },\\n \\\"IBbsArticle.ISnapshot\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"id\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\",\\n \\\"title\\\": \\\"Primary Key\\\",\\n \\\"description\\\": \\\"Primary Key.\\\"\\n },\\n \\\"created_at\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date-time\\\",\\n \\\"title\\\": \\\"Creation time of snapshot record\\\",\\n \\\"description\\\": \\\"Creation time of snapshot record.\\\\n\\\\nIn other words, creation time or update time or article.\\\"\\n },\\n \\\"format\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticle.Format\\\",\\n \\\"title\\\": \\\"Format of body\\\",\\n \\\"description\\\": \\\"Format of body.\\\\n\\\\nSame meaning with extension like `html`, `md`, `txt`.\\\"\\n },\\n \\\"body\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Content body of article\\\",\\n \\\"description\\\": \\\"Content body of article.\\\"\\n },\\n \\\"files\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IAttachmentFile.ICreate\\\"\\n },\\n \\\"title\\\": \\\"List of attachment files\\\",\\n \\\"description\\\": \\\"List of attachment files.\\\"\\n },\\n \\\"title\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Title of article\\\",\\n \\\"description\\\": \\\"Title of article.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"id\\\",\\n \\\"created_at\\\",\\n \\\"format\\\",\\n \\\"body\\\",\\n \\\"files\\\",\\n \\\"title\\\"\\n ],\\n \\\"description\\\": \\\"Snapshot of article.\\\\n\\\\n`IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of\\\\nthe article, as mentioned in {@link IBbsArticle }, the contents of the article\\\\nare separated from the article record to keep evidence and prevent fraud.\\\"\\n },\\n \\\"IBbsArticle.ICreate\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"writer\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"format\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"html\\\",\\n \\\"md\\\",\\n \\\"txt\\\"\\n ],\\n \\\"title\\\": \\\"Format of body\\\",\\n \\\"description\\\": \\\"Format of body.\\\\n\\\\nSame meaning with extension like `html`, `md`, `txt`.\\\"\\n },\\n \\\"title\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Title of article\\\",\\n \\\"description\\\": \\\"Title of article.\\\"\\n },\\n \\\"body\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Content body of article\\\",\\n \\\"description\\\": \\\"Content body of article.\\\"\\n },\\n \\\"files\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IAttachmentFile.ICreate\\\"\\n },\\n \\\"title\\\": \\\"List of attachment files\\\",\\n \\\"description\\\": \\\"List of attachment files.\\\"\\n },\\n \\\"password\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Password for modification\\\",\\n \\\"description\\\": \\\"Password for modification.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"writer\\\",\\n \\\"format\\\",\\n \\\"title\\\",\\n \\\"body\\\",\\n \\\"files\\\",\\n \\\"password\\\"\\n ],\\n \\\"description\\\": \\\"Store content type of the article.\\\"\\n },\\n \\\"IBbsArticle.IUpdate\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"format\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"html\\\",\\n \\\"md\\\",\\n \\\"txt\\\"\\n ],\\n \\\"title\\\": \\\"Format of body\\\",\\n \\\"description\\\": \\\"Format of body.\\\\n\\\\nSame meaning with extension like `html`, `md`, `txt`.\\\"\\n },\\n \\\"title\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Title of article\\\",\\n \\\"description\\\": \\\"Title of article.\\\"\\n },\\n \\\"body\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Content body of article\\\",\\n \\\"description\\\": \\\"Content body of article.\\\"\\n },\\n \\\"files\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IAttachmentFile.ICreate\\\"\\n },\\n \\\"title\\\": \\\"List of attachment files\\\",\\n \\\"description\\\": \\\"List of attachment files.\\\"\\n },\\n \\\"password\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Password for modification\\\",\\n \\\"description\\\": \\\"Password for modification.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"format\\\",\\n \\\"title\\\",\\n \\\"body\\\",\\n \\\"files\\\",\\n \\\"password\\\"\\n ]\\n },\\n \\\"IBbsArticle.IErase\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"password\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"password\\\"\\n ]\\n },\\n \\\"IBbsArticleComment.IRequest\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"search\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticleComment.IRequest.ISearch\\\"\\n },\\n \\\"sort\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"+created_at\\\",\\n \\\"+writer\\\",\\n \\\"-created_at\\\",\\n \\\"-writer\\\"\\n ]\\n }\\n },\\n \\\"page\\\": {\\n \\\"type\\\": \\\"integer\\\",\\n \\\"title\\\": \\\"Page number\\\",\\n \\\"description\\\": \\\"Page number.\\\"\\n },\\n \\\"limit\\\": {\\n \\\"type\\\": \\\"integer\\\",\\n \\\"default\\\": 100,\\n \\\"title\\\": \\\"Limitation of records per a page\\\",\\n \\\"description\\\": \\\"Limitation of records per a page.\\\"\\n }\\n },\\n \\\"nullable\\\": false\\n },\\n \\\"IBbsArticleComment.IRequest.ISearch\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"writer\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"body\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"nullable\\\": false\\n },\\n \\\"IPageIBbsArticleComment\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"pagination\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IPage.IPagination\\\",\\n \\\"title\\\": \\\"Page information\\\",\\n \\\"description\\\": \\\"Page information.\\\"\\n },\\n \\\"data\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticleComment\\\"\\n },\\n \\\"title\\\": \\\"List of records\\\",\\n \\\"description\\\": \\\"List of records.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"pagination\\\",\\n \\\"data\\\"\\n ],\\n \\\"description\\\": \\\"A page.\\\\n\\\\nCollection of records with pagination indformation.\\\"\\n },\\n \\\"IBbsArticleComment\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"id\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\",\\n \\\"title\\\": \\\"Primary Key\\\",\\n \\\"description\\\": \\\"Primary Key.\\\"\\n },\\n \\\"parent_id\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\",\\n \\\"nullable\\\": true,\\n \\\"title\\\": \\\"Parent comment's ID\\\",\\n \\\"description\\\": \\\"Parent comment's ID.\\\"\\n },\\n \\\"writer\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Writer of comment\\\",\\n \\\"description\\\": \\\"Writer of comment.\\\"\\n },\\n \\\"snapshots\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticleComment.ISnapshot\\\"\\n },\\n \\\"minItems\\\": 1,\\n \\\"title\\\": \\\"List of snapshot contents\\\",\\n \\\"description\\\": \\\"List of snapshot contents.\\\\n\\\\nIt is created for the first time when a comment being created, and is\\\\naccumulated every time the comment is modified.\\\"\\n },\\n \\\"created_at\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date-time\\\",\\n \\\"title\\\": \\\"Creation time of comment\\\",\\n \\\"description\\\": \\\"Creation time of comment.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"id\\\",\\n \\\"parent_id\\\",\\n \\\"writer\\\",\\n \\\"snapshots\\\",\\n \\\"created_at\\\"\\n ],\\n \\\"description\\\": \\\"Comment written on an article.\\\\n\\\\n`IBbsArticleComment` is an entity that shapes the comments written on an article.\\\\n\\\\nAnd for this comment, as in the previous relationship between\\\\n{@link IBbsArticle } and {@link IBbsArticle.ISnapshot }, the content body of the\\\\ncomment is stored in the sub {@link IBbsArticleComment.ISnapshot } table for\\\\nevidentialism, and a new snapshot record is issued every time the comment is modified.\\\\n\\\\nAlso, `IBbsArticleComment` is expressing the relationship of the hierarchical reply\\\\nstructure through the {@link IBbsArticleComment.parent_id } attribute.\\\"\\n },\\n \\\"IBbsArticleComment.ISnapshot\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"id\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"uuid\\\",\\n \\\"title\\\": \\\"Primary Key\\\",\\n \\\"description\\\": \\\"Primary Key.\\\"\\n },\\n \\\"created_at\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date-time\\\",\\n \\\"title\\\": \\\"Creation time of snapshot record\\\",\\n \\\"description\\\": \\\"Creation time of snapshot record.\\\\n\\\\nIn other words, creation time or update time or comment.\\\"\\n },\\n \\\"format\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IBbsArticleComment.Format\\\",\\n \\\"title\\\": \\\"Format of body\\\",\\n \\\"description\\\": \\\"Format of body.\\\\n\\\\nSame meaning with extension like `html`, `md`, `txt`.\\\"\\n },\\n \\\"body\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Content body of comment\\\",\\n \\\"description\\\": \\\"Content body of comment.\\\"\\n },\\n \\\"files\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IAttachmentFile.ICreate\\\"\\n },\\n \\\"title\\\": \\\"List of attachment files\\\",\\n \\\"description\\\": \\\"List of attachment files.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"id\\\",\\n \\\"created_at\\\",\\n \\\"format\\\",\\n \\\"body\\\",\\n \\\"files\\\"\\n ],\\n \\\"description\\\": \\\"Snapshot of comment.\\\\n\\\\n`IBbsArticleComment.ISnapshot` is a snapshot entity that contains\\\\nthe contents of the comment.\\\\n\\\\nAs mentioned in {@link IBbsArticleComment }, designed to keep evidence\\\\nand prevent fraud.\\\"\\n },\\n \\\"IBbsArticleComment.Format\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"txt\\\",\\n \\\"md\\\",\\n \\\"html\\\"\\n ]\\n },\\n \\\"IBbsArticleComment.ICreate\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"writer\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Writer of comment\\\",\\n \\\"description\\\": \\\"Writer of comment.\\\"\\n },\\n \\\"format\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"html\\\",\\n \\\"md\\\",\\n \\\"txt\\\"\\n ],\\n \\\"title\\\": \\\"Format of body\\\",\\n \\\"description\\\": \\\"Format of body.\\\\n\\\\nSame meaning with extension like `html`, `md`, `txt`.\\\"\\n },\\n \\\"body\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Content body of comment\\\",\\n \\\"description\\\": \\\"Content body of comment.\\\"\\n },\\n \\\"files\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IAttachmentFile.ICreate\\\"\\n },\\n \\\"title\\\": \\\"List of attachment files\\\",\\n \\\"description\\\": \\\"List of attachment files.\\\"\\n },\\n \\\"password\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Password for modification\\\",\\n \\\"description\\\": \\\"Password for modification.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"writer\\\",\\n \\\"format\\\",\\n \\\"body\\\",\\n \\\"files\\\",\\n \\\"password\\\"\\n ]\\n },\\n \\\"IBbsArticleComment.IUpdate\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"format\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"html\\\",\\n \\\"md\\\",\\n \\\"txt\\\"\\n ],\\n \\\"title\\\": \\\"Format of body\\\",\\n \\\"description\\\": \\\"Format of body.\\\\n\\\\nSame meaning with extension like `html`, `md`, `txt`.\\\"\\n },\\n \\\"body\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Content body of comment\\\",\\n \\\"description\\\": \\\"Content body of comment.\\\"\\n },\\n \\\"files\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/IAttachmentFile.ICreate\\\"\\n },\\n \\\"title\\\": \\\"List of attachment files\\\",\\n \\\"description\\\": \\\"List of attachment files.\\\"\\n },\\n \\\"password\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Password for modification\\\",\\n \\\"description\\\": \\\"Password for modification.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"format\\\",\\n \\\"body\\\",\\n \\\"files\\\",\\n \\\"password\\\"\\n ]\\n },\\n \\\"IBbsArticleComment.IErase\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"password\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"password\\\"\\n ]\\n },\\n \\\"IPerformance\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"cpu\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/process.global.NodeJS.CpuUsage\\\"\\n },\\n \\\"memory\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/process.global.NodeJS.MemoryUsage\\\"\\n },\\n \\\"resource\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/process.global.NodeJS.ResourceUsage\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"cpu\\\",\\n \\\"memory\\\",\\n \\\"resource\\\"\\n ]\\n },\\n \\\"process.global.NodeJS.CpuUsage\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"user\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"system\\\": {\\n \\\"type\\\": \\\"number\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"user\\\",\\n \\\"system\\\"\\n ]\\n },\\n \\\"process.global.NodeJS.MemoryUsage\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"rss\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"heapTotal\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"heapUsed\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"external\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"arrayBuffers\\\": {\\n \\\"type\\\": \\\"number\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"rss\\\",\\n \\\"heapTotal\\\",\\n \\\"heapUsed\\\",\\n \\\"external\\\",\\n \\\"arrayBuffers\\\"\\n ]\\n },\\n \\\"process.global.NodeJS.ResourceUsage\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"fsRead\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"fsWrite\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"involuntaryContextSwitches\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"ipcReceived\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"ipcSent\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"majorPageFault\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"maxRSS\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"minorPageFault\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"sharedMemorySize\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"signalsCount\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"swappedOut\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"systemCPUTime\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"unsharedDataSize\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"unsharedStackSize\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"userCPUTime\\\": {\\n \\\"type\\\": \\\"number\\\"\\n },\\n \\\"voluntaryContextSwitches\\\": {\\n \\\"type\\\": \\\"number\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"fsRead\\\",\\n \\\"fsWrite\\\",\\n \\\"involuntaryContextSwitches\\\",\\n \\\"ipcReceived\\\",\\n \\\"ipcSent\\\",\\n \\\"majorPageFault\\\",\\n \\\"maxRSS\\\",\\n \\\"minorPageFault\\\",\\n \\\"sharedMemorySize\\\",\\n \\\"signalsCount\\\",\\n \\\"swappedOut\\\",\\n \\\"systemCPUTime\\\",\\n \\\"unsharedDataSize\\\",\\n \\\"unsharedStackSize\\\",\\n \\\"userCPUTime\\\",\\n \\\"voluntaryContextSwitches\\\"\\n ]\\n },\\n \\\"ISystem\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"uid\\\": {\\n \\\"type\\\": \\\"number\\\",\\n \\\"title\\\": \\\"Random Unique ID\\\",\\n \\\"description\\\": \\\"Random Unique ID.\\\"\\n },\\n \\\"arguments\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"description\\\": \\\"`process.argv`\\\"\\n },\\n \\\"commit\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/ISystem.ICommit\\\",\\n \\\"title\\\": \\\"Git commit info\\\",\\n \\\"description\\\": \\\"Git commit info.\\\"\\n },\\n \\\"package\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/ISystem.IPackage\\\",\\n \\\"description\\\": \\\"`package.json`\\\"\\n },\\n \\\"created_at\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"title\\\": \\\"Creation time of this server\\\",\\n \\\"description\\\": \\\"Creation time of this server.\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"uid\\\",\\n \\\"arguments\\\",\\n \\\"commit\\\",\\n \\\"package\\\",\\n \\\"created_at\\\"\\n ],\\n \\\"description\\\": \\\"System Information.\\\"\\n },\\n \\\"ISystem.ICommit\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"shortHash\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"branch\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"hash\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"subject\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"sanitizedSubject\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"body\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"author\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/ISystem.ICommit.IUser\\\"\\n },\\n \\\"committer\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/ISystem.ICommit.IUser\\\"\\n },\\n \\\"authored_at\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"commited_at\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"notes\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"tags\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"shortHash\\\",\\n \\\"branch\\\",\\n \\\"hash\\\",\\n \\\"subject\\\",\\n \\\"sanitizedSubject\\\",\\n \\\"body\\\",\\n \\\"author\\\",\\n \\\"committer\\\",\\n \\\"authored_at\\\",\\n \\\"commited_at\\\",\\n \\\"tags\\\"\\n ],\\n \\\"description\\\": \\\"Git commit info.\\\"\\n },\\n \\\"ISystem.ICommit.IUser\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"name\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"email\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"name\\\",\\n \\\"email\\\"\\n ],\\n \\\"description\\\": \\\"Git user account info.\\\"\\n },\\n \\\"ISystem.IPackage\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"name\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"version\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"description\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"main\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"typings\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"scripts\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/Recordstringstring\\\"\\n },\\n \\\"repository\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"type\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"git\\\"\\n ]\\n },\\n \\\"url\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"type\\\",\\n \\\"url\\\"\\n ]\\n },\\n \\\"author\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"license\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"bugs\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"url\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"url\\\"\\n ]\\n },\\n \\\"homepage\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"devDependencies\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/Recordstringstring\\\"\\n },\\n \\\"dependencies\\\": {\\n \\\"$ref\\\": \\\"#/components/schemas/Recordstringstring\\\"\\n },\\n \\\"publishConfig\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"registry\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"registry\\\"\\n ]\\n },\\n \\\"files\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n }\\n },\\n \\\"nullable\\\": false,\\n \\\"required\\\": [\\n \\\"name\\\",\\n \\\"version\\\",\\n \\\"description\\\",\\n \\\"scripts\\\",\\n \\\"repository\\\",\\n \\\"author\\\",\\n \\\"license\\\",\\n \\\"bugs\\\",\\n \\\"homepage\\\",\\n \\\"dependencies\\\"\\n ],\\n \\\"description\\\": \\\"NPM package info.\\\"\\n },\\n \\\"Recordstringstring\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {},\\n \\\"nullable\\\": false,\\n \\\"description\\\": \\\"Construct a type with a set of properties K of type T\\\"\\n }\\n }\\n }\\n}\",\n \"test/TestGlobal.ts\": \"import api from \\\"@ORGANIZATION/PROJECT-api\\\";\\n\\nexport namespace TestGlobal {\\n export const connection = (): api.IConnection => ({\\n host: `http://127.0.0.1:37001`,\\n });\\n}\\n\",\n \"test/index.ts\": \"import { DynamicExecutor } from \\\"@nestia/e2e\\\";\\nimport chalk from \\\"chalk\\\";\\n\\nimport { TestGlobal } from \\\"./TestGlobal\\\";\\nimport { ArgumentParser } from \\\"./utils/ArgumentParser\\\";\\n\\ninterface IOptions {\\n simulate: boolean;\\n include?: string[];\\n exclude?: string[];\\n trace: boolean;\\n}\\n\\nconst getOptions = () =>\\n ArgumentParser.parse<IOptions>(async (command, prompt, action) => {\\n command.option(\\\"--simulate <boolean>\\\", \\\"Mockup Simultator\\\");\\n command.option(\\\"--include <string...>\\\", \\\"include feature files\\\");\\n command.option(\\\"--exclude <string...>\\\", \\\"exclude feature files\\\");\\n command.option(\\\"--trace <boolean>\\\", \\\"trace detailed errors\\\");\\n\\n return action(async (options) => {\\n if (typeof options.simulate === \\\"string\\\")\\n options.simulate = options.simulate === \\\"true\\\";\\n options.simulate ??= await prompt.boolean(\\\"simulate\\\")(\\\"Mockup Simulator\\\");\\n options.trace = options.trace !== (\\\"false\\\" as any);\\n return options as IOptions;\\n });\\n });\\n\\nconst main = async (): Promise<void> => {\\n // DO TEST\\n const options: IOptions = await getOptions();\\n const report: DynamicExecutor.IReport = await DynamicExecutor.validate({\\n prefix: \\\"test\\\",\\n location: __dirname + \\\"/features\\\",\\n extension: __filename.substring(__filename.length - 2),\\n parameters: () => [\\n {\\n ...TestGlobal.connection(),\\n simulate: options.simulate,\\n },\\n ],\\n filter: (func) =>\\n (!options.include?.length ||\\n (options.include ?? []).some((str) => func.includes(str))) &&\\n (!options.exclude?.length ||\\n (options.exclude ?? []).every((str) => !func.includes(str))),\\n onComplete: (exec) => {\\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\\n // REPORT EXCEPTIONS\\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 if (options.trace !== false) for (const exp of exceptions) console.log(exp);\\n console.log(\\\"Failed\\\");\\n console.log(\\\"Elapsed time\\\", report.time.toLocaleString(), `ms`);\\n }\\n\\n // TERMINATE\\n if (exceptions.length) process.exit(-1);\\n else process.exit(0);\\n};\\nmain().catch((exp) => {\\n console.log(exp);\\n process.exit(-1);\\n});\\n\",\n \"test/start.ts\": \"import api from \\\"@ORGANIZATION/PROJECT-api\\\";\\nimport { IBbsArticleComment } from \\\"@ORGANIZATION/PROJECT-api/lib/structures/bbs/IBbsArticleComment\\\";\\nimport typia, { tags } from \\\"typia\\\";\\n\\nimport { TestGlobal } from \\\"./TestGlobal\\\";\\n\\nconst main = async () => {\\n const connection: api.IConnection = {\\n ...TestGlobal.connection(),\\n simulate: true,\\n };\\n const output: IBbsArticleComment =\\n await api.functional.bbs.articles.comments.create(\\n connection,\\n typia.random<string & tags.Format<\\\"uuid\\\">>(),\\n typia.random<IBbsArticleComment.ICreate>(),\\n );\\n typia.assert(output);\\n};\\nmain().catch((exp) => {\\n console.log(exp);\\n process.exit(-1);\\n});\\n\",\n \"test/swagger.ts\": \"import express from \\\"express\\\";\\nimport ui from \\\"swagger-ui-express\\\";\\n\\nimport swagger from \\\"../swagger.json\\\";\\n\\nconst main = async (): Promise<void> => {\\n const app = express();\\n app.use(\\\"/\\\", ui.serve, ui.setup(swagger));\\n app.listen(3000);\\n\\n console.log(\\\"-----------------------------------------------------------\\\");\\n console.log(\\\"\\\\n Swagger UI Address: http://127.0.0.1:3000 \\\\n\\\");\\n console.log(\\\"-----------------------------------------------------------\\\");\\n};\\nmain().catch((exp) => {\\n console.log(exp);\\n process.exit(-1);\\n});\\n\",\n \"test/tsconfig.json\": \"{\\n \\\"extends\\\": \\\"../tsconfig.json\\\",\\n \\\"compilerOptions\\\": {\\n \\\"noEmit\\\": true,\\n \\\"rootDir\\\": \\\"../\\\",\\n },\\n \\\"include\\\": [\\n \\\".\\\", \\n \\\"../src\\\",\\n ],\\n}\",\n \"test/utils/ArgumentParser.ts\": \"import { createInterface } from \\\"node:readline/promises\\\";\\n\\nexport namespace ArgumentParser {\\n export interface Command {\\n option: (flags: string, description?: string) => Command;\\n }\\n\\n export interface Prompt {\\n select: (\\n name: string,\\n ) => (\\n message: string,\\n ) => <Choice extends string>(choices: Choice[]) => Promise<Choice>;\\n boolean: (name: string) => (message: string) => Promise<boolean>;\\n number: (name: string) => (message: string) => Promise<number>;\\n }\\n\\n export const parse = async <T>(\\n inquiry: (\\n command: Command,\\n prompt: Prompt,\\n action: (closure: (options: Partial<T>) => Promise<T>) => Promise<T>,\\n ) => Promise<T>,\\n ): Promise<T> => {\\n const command: Command = {\\n option: (_flags: string, _description?: string): Command => command,\\n };\\n const action = (closure: (options: Partial<T>) => Promise<T>) =>\\n closure(parseArguments() as Partial<T>);\\n return inquiry(\\n command,\\n { select, boolean, number },\\n action,\\n );\\n };\\n\\n const select =\\n (_name: string) =>\\n (message: string) =>\\n async <Choice extends string>(choices: Choice[]): Promise<Choice> => {\\n const answer: string = await ask(`${message} (${choices.join(\\\"/\\\")})`);\\n return (choices.find((choice) => choice === answer) ?? choices[0])!;\\n };\\n\\n const boolean = (_name: string) => async (message: string) =>\\n /^(true|t|yes|y|1)$/i.test(await ask(`${message} [y/N]`));\\n\\n const number = (_name: string) => async (message: string) =>\\n Number(await ask(message));\\n\\n const ask = async (message: string): Promise<string> => {\\n const reader = createInterface({\\n input: process.stdin,\\n output: process.stdout,\\n });\\n try {\\n return (await reader.question(`${message}: `)).trim();\\n } finally {\\n reader.close();\\n }\\n };\\n\\n const parseArguments = (): Record<string, string | string[] | boolean> => {\\n const output: Record<string, string | string[] | boolean> = {};\\n const args: string[] = process.argv.slice(2);\\n for (let i = 0; i < args.length; ++i) {\\n const raw: string = args[i]!;\\n if (raw.startsWith(\\\"--\\\") === false) continue;\\n\\n const equal: number = raw.indexOf(\\\"=\\\");\\n const name: string = toCamelCase(\\n raw.slice(2, equal === -1 ? undefined : equal),\\n );\\n if (equal !== -1) {\\n assign(output, name, raw.slice(equal + 1));\\n continue;\\n }\\n\\n const values: string[] = [];\\n while (i + 1 < args.length && args[i + 1]!.startsWith(\\\"--\\\") === false)\\n values.push(args[++i]!);\\n assign(\\n output,\\n name,\\n values.length === 0 ? true : values.length === 1 ? values[0]! : values,\\n );\\n }\\n return output;\\n };\\n\\n const assign = (\\n output: Record<string, string | string[] | boolean>,\\n name: string,\\n value: string | string[] | boolean,\\n ): void => {\\n const current: string | string[] | boolean | undefined = output[name];\\n if (current === undefined) output[name] = value;\\n else\\n output[name] = [\\n ...(Array.isArray(current) ? current : [String(current)]),\\n ...(Array.isArray(value) ? value : [String(value)]),\\n ];\\n };\\n\\n const toCamelCase = (str: string): string =>\\n str.replace(/-([a-z])/g, (_matched, letter: string) =>\\n letter.toUpperCase(),\\n );\\n}\\n\",\n \"tsconfig.json\": \"{\\n \\\"compilerOptions\\\": {\\n /* Visit https://aka.ms/tsconfig to read more about this file */\\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 /* Language and Environment */\\n \\\"target\\\": \\\"ESNext\\\", /* 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. */// \\\"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 /* Modules */\\n \\\"module\\\": \\\"nodenext\\\", /* Specify what module code is generated. */\\n \\\"moduleResolution\\\": \\\"nodenext\\\", /* Specify how TypeScript looks up a file from a given module specifier. */\\n \\\"rootDir\\\": \\\"src\\\", /* Specify the root folder within your source files. */\\n // \\\"baseUrl\\\": \\\"./\\\", /* Specify the base directory to resolve non-relative module names. */\\n // \\\"paths\\\": {}, /* 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 /* 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 /* Emit */\\n \\\"declaration\\\": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */// \\\"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. */// \\\"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. */// \\\"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. */// \\\"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. */// \\\"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 /* 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. */// \\\"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. *//* Type Checking */\\n \\\"strict\\\": true, /* Enable all strict type-checking options. */// \\\"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\\\": true, /* Enable error reporting when local variables aren't read. */\\n // \\\"noUnusedParameters\\\": true, /* 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 /* 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 },\\n \\\"include\\\": [\\\"src\\\"],\\n}\"\n}"],"mappings":";AAAA,MAAa,eAAuC;CAClD,cAAc;CACd,uBAAuB;CACvB,yBAAyB;CACzB,WAAW;CACX,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,uBAAuB;CACvB,oBAAoB;CACpB,sBAAsB;CACtB,gBAAgB;CAChB,iBAAiB;CACjB,gBAAgB;CAChB,sBAAsB;CACtB,iBAAiB;CACjB,iBAAiB;CACjB,mBAAmB;CACnB,sBAAsB;CACtB,gCAAgC;CAChC,iBAAiB;AACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateCommander.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"NestiaMigrateCommander.mjs","names":[],"sources":["../../src/executable/NestiaMigrateCommander.ts"],"sourcesContent":["import * as prettierPluginSortImport from \"@trivago/prettier-plugin-sort-imports\";\nimport {\n OpenApiV3,\n OpenApiV3_1,\n OpenApiV3_2,\n SwaggerV2,\n} from \"@typia/interface\";\nimport fs from \"fs\";\nimport path from \"path\";\nimport { format } from \"prettier\";\nimport * as prettierPluginJsDoc from \"prettier-plugin-jsdoc\";\nimport type { IValidation } from \"typia\";\n\nimport { NestiaMigrateApplication } from \"../NestiaMigrateApplication\";\nimport { NestiaMigrateFileArchiver } from \"../archivers/NestiaMigrateFileArchiver\";\nimport { NestiaMigrateInquirer } from \"./NestiaMigrateInquirer\";\n\n/**\n * The command-line entry of `@nestia/migrate`.\n *\n * The output path is resolved with `path.resolve` and its parent tested with\n * `existsSync` and `statSync`, with backslashes converted to `/`, which Windows\n * accepts. The input is fetched when it parses as an http or https URL, so a\n * Windows path whose drive letter parses as a scheme is read from disk, and it\n * is read as UTF-8 otherwise. Only files with a `.ts`, `.cts`, `.mts` or `.tsx`\n * extension, tested case-sensitively, are formatted, and text is written\n * without a byte order mark and with the line endings the generator and\n * Prettier produce, which are not the platform's. A failure ends the process\n * through `process.exit(-1)`, whose status the platform truncates to a non-zero\n * value.\n *\n * @evidence contracts/common.md#principled-implementation The command reads the options, validates the output directory, reads the document from a file or an http(s) URL, converts it, reports the operations that could not be migrated, and writes the files, formatting only TypeScript files.\n * @evidence contracts/common.md#clear-and-simple-design One entry function, with formatting, halting, and URL detection as private helpers.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts Every failure ends with a message and a non-zero exit, and unformattable content is written unformatted.\n * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.\n */\nexport namespace NestiaMigrateCommander {\n /**\n * Runs the command: reads the options and the document, generates the\n * project, and writes it to the output directory.\n *\n * It stops with an error when the output directory exists, when its parent\n * does not exist or is not a directory, when the input cannot be read or\n * fetched, or when the document is invalid. Explicit arguments follow Node's\n * executable/script/flags layout; omitting them reads the current process\n * arguments.\n *\n * Creation and writing use `fs.promises` through the injected archiver, so\n * the volume decides case policy and permissions, and the checks that precede\n * any write are the filesystem's own answers.\n *\n * @evidence contracts/common.md#principled-implementation The checks run before any file is written, the document is fetched only for an http or https URL, a failed HTTP status stops the command, and only files with a TypeScript extension are formatted, because Prettier's TypeScript parser would rewrite a dotfile line into code.\n * @evidence contracts/common.md#clear-and-simple-design One asynchronous function whose phases are marked in comments, with the option parsing in `NestiaMigrateInquirer`.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The checks apply to every input, and a formatting failure keeps the original text.\n * @evidence contracts/common.md#meaningful-documentation The comment states the conditions under which it stops.\n */\n export const main = async (argv?: string[]): Promise<void> => {\n const resolve = (str: string | undefined) =>\n str ? path.resolve(str).split(\"\\\\\").join(\"/\") : undefined;\n const options: NestiaMigrateInquirer.IOutput =\n await NestiaMigrateInquirer.parse(argv);\n\n // VALIDATE OUTPUT DIRECTORY\n const parent: string = resolve(options.output + \"/..\")!;\n if (fs.existsSync(options.output))\n halt(\"Response directory already exists.\");\n else if (fs.existsSync(parent) === false)\n halt(\"Response directory's parent directory does not exist.\");\n else if (fs.statSync(parent).isDirectory() === false)\n halt(\"Response directory's parent is not a directory.\");\n\n // READ SWAGGER\n const document:\n | SwaggerV2.IDocument\n | OpenApiV3.IDocument\n | OpenApiV3_1.IDocument\n | OpenApiV3_2.IDocument = await (async () => {\n if (isUri(options.input)) {\n const response: Response = await fetch(options.input);\n if (response.ok === false)\n halt(\n `Unable to fetch the input swagger.json: ${response.status} ${response.statusText}`,\n );\n const content: string = await response.text();\n return JSON.parse(content);\n }\n if (fs.existsSync(options.input) === false)\n halt(\"Unable to find the input swagger.json file.\");\n const stats: fs.Stats = fs.statSync(options.input);\n if (stats.isFile() === false)\n halt(\"The input swagger.json is not a file.\");\n const content: string = await fs.promises.readFile(\n options.input,\n \"utf-8\",\n );\n return JSON.parse(content);\n })();\n\n const result: IValidation<NestiaMigrateApplication> =\n NestiaMigrateApplication.validate(document);\n if (result.success === false) {\n console.error(\"nestia migrate: invalid swagger:\");\n for (const err of result.errors)\n console.error(` - ${err.path}: ${err.value}`);\n throw new Error(\n `Invalid swagger file (must follow the OpenAPI 3.0 spec): ${options.input}`,\n );\n }\n\n const app: NestiaMigrateApplication = result.data;\n const files: Record<string, string> =\n options.mode === \"nest\" ? app.nest(options) : app.sdk(options);\n if (app.getData().errors)\n for (const error of app.getData().errors)\n console.error(\n `Failed to migrate ${error.method} ${error.path}`,\n ...error.messages.map((msg) => ` - ${msg}`),\n );\n await NestiaMigrateFileArchiver.archive({\n mkdir: fs.promises.mkdir,\n // only TypeScript is formatted: prettier's TypeScript parser also\n // accepts a `.gitignore` or `.env` line, and rewrites it into code\n writeFile: async (file, content) =>\n fs.promises.writeFile(\n file,\n /\\.[cm]?tsx?$/.test(file) ? await beautify(content) : content,\n \"utf-8\",\n ),\n root: options.output,\n files,\n });\n };\n\n const beautify = async (script: string): Promise<string> => {\n try {\n return await format(script, {\n parser: \"typescript\",\n plugins: [prettierPluginSortImport, prettierPluginJsDoc],\n importOrder: [\"<THIRD_PARTY_MODULES>\", \"^[./]\"],\n importOrderSeparation: true,\n importOrderSortSpecifiers: true,\n importOrderParserPlugins: [\"decorators-legacy\", \"typescript\", \"jsx\"],\n bracketSpacing: true,\n });\n } catch {\n return script;\n }\n };\n\n const halt = (desc: string): never => {\n console.error(desc);\n process.exit(-1);\n };\n\n const isUri = (input: string): boolean => {\n try {\n const url: URL = new URL(input);\n return url.protocol === \"http:\" || url.protocol === \"https:\";\n } catch {\n return false;\n }\n };\n}\n"],"mappings":";;;;;;;;;AAoCO,IAAA;;gCAoBe,OAAO,SAAmC;EAC5D,MAAM,WAAW,QACf,MAAM,KAAK,QAAQ,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,GAAG,IAAI,KAAA;EAClD,MAAM,UACJ,MAAM,sBAAsB,MAAM,IAAI;EAGxC,MAAM,SAAiB,QAAQ,QAAQ,SAAS,KAAK;EACrD,IAAI,GAAG,WAAW,QAAQ,MAAM,GAC9B,KAAK,oCAAoC;OACtC,IAAI,GAAG,WAAW,MAAM,MAAM,OACjC,KAAK,uDAAuD;OACzD,IAAI,GAAG,SAAS,MAAM,CAAC,CAAC,YAAY,MAAM,OAC7C,KAAK,iDAAiD;EAGxD,MAAM,WAIsB,OAAO,YAAY;GAC7C,IAAI,MAAM,QAAQ,KAAK,GAAG;IACxB,MAAM,WAAqB,MAAM,MAAM,QAAQ,KAAK;IACpD,IAAI,SAAS,OAAO,OAClB,KACE,2CAA2C,SAAS,OAAO,GAAG,SAAS,YACzE;IACF,MAAM,UAAkB,MAAM,SAAS,KAAK;IAC5C,OAAO,KAAK,MAAM,OAAO;GAC3B;GACA,IAAI,GAAG,WAAW,QAAQ,KAAK,MAAM,OACnC,KAAK,6CAA6C;GAEpD,IADwB,GAAG,SAAS,QAAQ,KACpC,CAAC,CAAC,OAAO,MAAM,OACrB,KAAK,uCAAuC;GAC9C,MAAM,UAAkB,MAAM,GAAG,SAAS,SACxC,QAAQ,OACR,OACF;GACA,OAAO,KAAK,MAAM,OAAO;EAC3B,EAAA,CAAG;EAEH,MAAM,SACJ,yBAAyB,SAAS,QAAQ;EAC5C,IAAI,OAAO,YAAY,OAAO;GAC5B,QAAQ,MAAM,kCAAkC;GAChD,KAAK,MAAM,OAAO,OAAO,QACvB,QAAQ,MAAM,OAAO,IAAI,KAAK,IAAI,IAAI,OAAO;GAC/C,MAAM,IAAI,MACR,4DAA4D,QAAQ,OACtE;EACF;EAEA,MAAM,MAAgC,OAAO;EAC7C,MAAM,QACJ,QAAQ,SAAS,SAAS,IAAI,KAAK,OAAO,IAAI,IAAI,IAAI,OAAO;EAC/D,IAAI,IAAI,QAAQ,CAAC,CAAC,QAChB,KAAK,MAAM,SAAS,IAAI,QAAQ,CAAC,CAAC,QAChC,QAAQ,MACN,qBAAqB,MAAM,OAAO,GAAG,MAAM,QAC3C,GAAG,MAAM,SAAS,KAAK,QAAQ,OAAO,KAAK,CAC7C;EACJ,MAAM,0BAA0B,QAAQ;GACtC,OAAO,GAAG,SAAS;GAGnB,WAAW,OAAO,MAAM,YACtB,GAAG,SAAS,UACV,MACA,eAAe,KAAK,IAAI,IAAI,MAAM,SAAS,OAAO,IAAI,SACtD,OACF;GACF,MAAM,QAAQ;GACd;EACF,CAAC;CACH;CAEA,MAAM,WAAW,OAAO,WAAoC;EAC1D,IAAI;GACF,OAAO,MAAM,OAAO,QAAQ;IAC1B,QAAQ;IACR,SAAS,CAAC,0BAA0B,mBAAmB;IACvD,aAAa,CAAC,yBAAyB,OAAO;IAC9C,uBAAuB;IACvB,2BAA2B;IAC3B,0BAA0B;KAAC;KAAqB;KAAc;IAAK;IACnE,gBAAgB;GAClB,CAAC;EACH,QAAQ;GACN,OAAO;EACT;CACF;CAEA,MAAM,QAAQ,SAAwB;EACpC,QAAQ,MAAM,IAAI;EAClB,QAAQ,KAAK,EAAE;CACjB;CAEA,MAAM,SAAS,UAA2B;EACxC,IAAI;GACF,MAAM,MAAW,IAAI,IAAI,KAAK;GAC9B,OAAO,IAAI,aAAa,WAAW,IAAI,aAAa;EACtD,QAAQ;GACN,OAAO;EACT;CACF;GACD,2BAAA,yBAAA,CAAA,EAAD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateInquirer.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"NestiaMigrateInquirer.mjs","names":[],"sources":["../../src/executable/NestiaMigrateInquirer.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport { createPromptModule } from \"inquirer\";\n\n/**\n * Reads the options of the command from flags, asking interactively for what is\n * missing.\n *\n * @evidence contracts/common.md#principled-implementation Each option is taken from its flag when given, and asked with a prompt otherwise, so the same command runs non-interactively when every flag is present.\n * @evidence contracts/common.md#clear-and-simple-design One function and the output type; the prompt helpers are local.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The prompts are the standard `inquirer` ones, and a flag always wins over a prompt.\n * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.\n */\nexport namespace NestiaMigrateInquirer {\n /**\n * The options of the command: the mode, the input and output locations, the\n * flags, and the package name.\n *\n * @evidence contracts/common.md#principled-implementation The record holds the answers needed to run the migration, each as a value and not as an optional.\n * @evidence contracts/common.md#clear-and-simple-design A flat record.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The comment lists the options.\n */\n export interface IOutput {\n mode: \"nest\" | \"sdk\";\n input: string;\n output: string;\n keyword: boolean;\n simulate: boolean;\n e2e: boolean;\n package: string;\n }\n\n /**\n * Parses the flags and asks for the missing options.\n *\n * A boolean flag given without a value is `true`, and one given a value is\n * true only for the text `true`. Each invocation owns its parser; explicit\n * arguments use Node's executable/script/flags layout and default to the\n * current process arguments.\n *\n * @evidence contracts/common.md#principled-implementation A fresh Commander parser interprets the supplied Node-style arguments, the action asks a prompt for each undefined option, and boolean flags are normalized by one rule, so the result has every field set without retaining another invocation's options.\n * @evidence contracts/common.md#clear-and-simple-design One invocation owns the parser and prompt action; the optional argument vector defaults to the ordinary process input.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It asks only for what is missing.\n * @evidence contracts/common.md#meaningful-documentation The comment states the boolean flag rule.\n */\n export const parse = async (argv?: string[]): Promise<IOutput> => {\n const program = new Command();\n // PREPARE ASSETS\n program.option(\"--mode [nest/sdk]\", \"migration mode\");\n program.option(\n \"--input [swagger.json]\",\n \"location of target swagger.json file\",\n );\n program.option(\"--output [directory]\", \"output directory path\");\n program.option(\"--keyword [boolean]\", \"Keyword parameter mode\");\n program.option(\"--simulate [boolean]\", \"Mockup simulator\");\n program.option(\"--e2e [boolean]\", \"Generate E2E tests\");\n program.option(\"--package [name]\", \"Package name\");\n\n // INTERNAL PROCEDURES\n const questioned = { value: false };\n const action = (closure: (options: Partial<IOutput>) => Promise<IOutput>) =>\n new Promise<IOutput>((resolve, reject) => {\n program.action(async (options) => {\n try {\n resolve(await closure(options));\n } catch (exp) {\n reject(exp);\n }\n });\n program.parseAsync(argv).catch(reject);\n });\n const select =\n (name: string) =>\n (message: string) =>\n async <Choice extends string>(\n choices: Choice[],\n filter?: (value: string) => Choice,\n ): Promise<Choice> => {\n questioned.value = true;\n return (\n await createPromptModule()({\n type: \"list\",\n name: name,\n message: message,\n choices: choices,\n filter,\n })\n )[name];\n };\n const input = (name: string) => async (message: string) =>\n (\n await createPromptModule()({\n type: \"input\",\n name,\n message,\n })\n )[name];\n\n // DO CONSTRUCT\n return action(async (partial) => {\n partial.mode ??= await select(\"mode\")(\"Migration mode\")(\n [\"NestJS\" as \"nest\", \"SDK\" as \"sdk\"],\n (value) => (value === \"NestJS\" ? \"nest\" : \"sdk\"),\n );\n partial.input ??= await input(\"input\")(\"Swagger file location\");\n partial.output ??= await input(\"output\")(\"Response directory path\");\n partial.package ??= await input(\"package\")(\"Package name\");\n // a flag given alone is `true`, and one given a value is its text\n const flag = (value: unknown): boolean | undefined =>\n value === undefined ? undefined : value === true || value === \"true\";\n const ask = async (name: string, message: string): Promise<boolean> =>\n (await select(name)(message)([\"true\", \"false\"])) === \"true\";\n partial.keyword =\n flag(partial.keyword) ??\n (await ask(\"keyword\", \"Keyword parameter mode\"));\n partial.simulate =\n flag(partial.simulate) ?? (await ask(\"simulate\", \"Mokup Simulator\"));\n partial.e2e =\n flag(partial.e2e) ?? (await ask(\"e2e\", \"Generate E2E tests\"));\n return partial as IOutput;\n });\n };\n}\n"],"mappings":";;;AAYO,IAAA;;gCAiCgB,OAAO,SAAsC;EAChE,MAAM,UAAU,IAAI,QAAQ;EAE5B,QAAQ,OAAO,qBAAqB,gBAAgB;EACpD,QAAQ,OACN,0BACA,sCACF;EACA,QAAQ,OAAO,wBAAwB,uBAAuB;EAC9D,QAAQ,OAAO,uBAAuB,wBAAwB;EAC9D,QAAQ,OAAO,wBAAwB,kBAAkB;EACzD,QAAQ,OAAO,mBAAmB,oBAAoB;EACtD,QAAQ,OAAO,oBAAoB,cAAc;EAGjD,MAAM,aAAa,EAAE,OAAO,MAAM;EAClC,MAAM,UAAU,YACd,IAAI,SAAkB,SAAS,WAAW;GACxC,QAAQ,OAAO,OAAO,YAAY;IAChC,IAAI;KACF,QAAQ,MAAM,QAAQ,OAAO,CAAC;IAChC,SAAS,KAAK;KACZ,OAAO,GAAG;IACZ;GACF,CAAC;GACD,QAAQ,WAAW,IAAI,CAAC,CAAC,MAAM,MAAM;EACvC,CAAC;EACH,MAAM,UACH,UACA,YACD,OACE,SACA,WACoB;GACpB,WAAW,QAAQ;GACnB,QACE,MAAM,mBAAmB,CAAC,CAAC;IACzB,MAAM;IACA;IACG;IACA;IACT;GACF,CAAC,EAAA,CACD;EACJ;EACF,MAAM,SAAS,SAAiB,OAAO,aAEnC,MAAM,mBAAmB,CAAC,CAAC;GACzB,MAAM;GACN;GACA;EACF,CAAC,EAAA,CACD;EAGJ,OAAO,OAAO,OAAO,YAAY;GAC/B,QAAQ,SAAS,MAAM,OAAO,MAAM,CAAC,CAAC,gBAAgB,CAAC,CACrD,CAAC,UAAoB,KAAc,IAClC,UAAW,UAAU,WAAW,SAAS,KAC5C;GACA,QAAQ,UAAU,MAAM,MAAM,OAAO,CAAC,CAAC,uBAAuB;GAC9D,QAAQ,WAAW,MAAM,MAAM,QAAQ,CAAC,CAAC,yBAAyB;GAClE,QAAQ,YAAY,MAAM,MAAM,SAAS,CAAC,CAAC,cAAc;GAEzD,MAAM,QAAQ,UACZ,UAAU,KAAA,IAAY,KAAA,IAAY,UAAU,QAAQ,UAAU;GAChE,MAAM,MAAM,OAAO,MAAc,YAC9B,MAAM,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,OAAO,CAAC,MAAO;GACvD,QAAQ,UACN,KAAK,QAAQ,OAAO,KACnB,MAAM,IAAI,WAAW,wBAAwB;GAChD,QAAQ,WACN,KAAK,QAAQ,QAAQ,KAAM,MAAM,IAAI,YAAY,iBAAiB;GACpE,QAAQ,MACN,KAAK,QAAQ,GAAG,KAAM,MAAM,IAAI,OAAO,oBAAoB;GAC7D,OAAO;EACT,CAAC;CACH;GACD,0BAAA,wBAAA,CAAA,EAAD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateBundleCache.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"TemplateBundleCache.mjs","names":[],"sources":["../../src/executable/TemplateBundleCache.ts"],"sourcesContent":["import crypto from \"node:crypto\";\nimport fs from \"node:fs\";\n\n/**\n * Reuses a complete template generation only while its inputs and outputs\n * match.\n *\n * The caller owns the generated paths and cold generation. This module owns the\n * validity manifest; failed generation never publishes a new manifest.\n * Concurrent generation of the same output paths is not supported.\n *\n * @evidence contracts/common.md#principled-implementation Input identity includes the cache implementation and caller-supplied generator inputs. Reuse requires every expected output's current SHA-256 to match the manifest; a missing, changed or partial generation cannot authorize reuse.\n * @evidence contracts/common.md#clear-and-simple-design One operation checks a manifest, delegates cold generation and publishes its successful output digests. The caller retains template-specific fetching and stamping rules.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts Generated contents are never replaced by expected answers. Invalid metadata is treated as a cache miss and failed generation remains a rejection.\n * @evidence contracts/common.md#meaningful-documentation Documents manifest ownership, failed publication and the existing single-writer premise.\n * @evidence contracts/performance.md#efficient-algorithms A hit hashes each output once, with time proportional to input/output bytes and one manifest rather than scanning template trees or fetching Git history.\n * @evidence contracts/performance.md#reuse-equivalent-work The cache implementation, caller inputs and current output digests jointly establish reuse validity; changed inputs, edited outputs and missing files invalidate it.\n * @evidence contracts/performance.md#bound-retention-and-release-resources Each output set owns one replaceable manifest, not per-run history. Synchronous reads and awaited writes close their file handles. The caller must serialize writers to the same paths.\n * @evidence contracts/portability.md#os-neutral-implementation Node fs consumes caller-owned native paths; identity hashes bytes and never assumes timestamp resolution, case folding or path separators.\n */\nexport const run = async ({\n inputs,\n outputs,\n stampFile,\n generate,\n}: {\n inputs: readonly unknown[];\n outputs: readonly string[];\n stampFile: string;\n generate: () => Promise<void>;\n}): Promise<boolean> => {\n const digest = (content: string | Buffer): string =>\n crypto.createHash(\"sha256\").update(content).digest(\"hex\");\n const input = digest(\n JSON.stringify([fs.readFileSync(__filename, \"utf8\"), inputs]),\n );\n let stamp: { input?: string; outputs?: string[] } | undefined;\n if (fs.existsSync(stampFile)) {\n try {\n stamp = JSON.parse(fs.readFileSync(stampFile, \"utf8\"));\n } catch {\n // Invalid or interrupted metadata cannot authorize reuse.\n }\n }\n if (\n outputs.length !== 0 &&\n stamp?.input === input &&\n outputs.every(\n (file, index) =>\n fs.existsSync(file) &&\n stamp.outputs?.[index] === digest(fs.readFileSync(file)),\n )\n )\n return true;\n await generate();\n await fs.promises.writeFile(\n stampFile,\n JSON.stringify({\n input,\n outputs: outputs.map((file) => digest(fs.readFileSync(file))),\n }),\n \"utf8\",\n );\n return false;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,MAAa,MAAM,OAAO,EACxB,QACA,SACA,WACA,eAMsB;CACtB,MAAM,UAAU,YACd,OAAO,WAAW,QAAQ,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,OAAO,KAAK;CAC1D,MAAM,QAAQ,OACZ,KAAK,UAAU,CAAC,GAAG,aAAa,YAAY,MAAM,GAAG,MAAM,CAAC,CAC9D;CACA,IAAI;CACJ,IAAI,GAAG,WAAW,SAAS,GACzB,IAAI;EACF,QAAQ,KAAK,MAAM,GAAG,aAAa,WAAW,MAAM,CAAC;CACvD,QAAQ,CAER;CAEF,IACE,QAAQ,WAAW,KACnB,OAAO,UAAU,SACjB,QAAQ,OACL,MAAM,UACL,GAAG,WAAW,IAAI,KAClB,MAAM,UAAU,WAAW,OAAO,GAAG,aAAa,IAAI,CAAC,CAC3D,GAEA,OAAO;CACT,MAAM,SAAS;CACf,MAAM,GAAG,SAAS,UAChB,WACA,KAAK,UAAU;EACb;EACA,SAAS,QAAQ,KAAK,SAAS,OAAO,GAAG,aAAa,IAAI,CAAC,CAAC;CAC9D,CAAC,GACD,MACF;CACA,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"bundle.mjs","names":["runCached"],"sources":["../../src/executable/bundle.ts"],"sourcesContent":["import cp from \"node:child_process\";\nimport fs from \"node:fs\";\n\nimport { run as runCached } from \"./TemplateBundleCache\";\n\nconst { version } = require(\"../../../../package.json\");\n\nconst ROOT = `${__dirname}/../..`;\nconst ASSETS = `${ROOT}/assets`;\nconst CATALOGS: Record<\n string,\n Record<string, { specifier: string; version: string }>\n> = require(\"js-yaml\").load(\n fs.readFileSync(`${__dirname}/../../../../pnpm-lock.yaml`, \"utf8\"),\n).catalogs;\nconst TYPIA = CATALOGS.samchon!;\nconst TYPESCRIPT = CATALOGS.typescript ?? {};\n\n// Generated projects must use the runtime this build validated against the Go\n// transform, even when the repository itself admits upgrades through a range.\n// Compiler tools retain their declared ranges or exact nightly specifiers.\nconst catalogSpecifier = (name: string): string | undefined =>\n name === \"typia\"\n ? TYPIA[name]?.version\n : (TYPIA[name]?.specifier ?? TYPESCRIPT[name]?.specifier);\n\nconst update = (\n content: string,\n options: { sdkAggregate?: boolean } = {},\n): string => {\n const parsed = JSON.parse(content);\n for (const record of [\n parsed.dependencies ?? {},\n parsed.devDependencies ?? {},\n ])\n for (const key of Object.keys(record)) {\n const current = record[key];\n // `catalog:` / `workspace:` specifiers already carry their versions\n // through pnpm-workspace.yaml, which gets its own stamping pass.\n if (\n typeof current === \"string\" &&\n (current.startsWith(\"catalog:\") || current.startsWith(\"workspace:\"))\n )\n continue;\n if (key.startsWith(\"@nestia/\") || key === \"nestia\")\n record[key] = `^${version}`;\n // Both catalogs, and in the same order updateWorkspaceCatalog resolves\n // them. A template can pin a version two ways -- a `catalog:` reference\n // its pnpm-workspace.yaml resolves, or a plain specifier here -- and a\n // rule that reads only one catalog on this path leaves the toolchain\n // frozen at whatever the upstream template last wrote. That is how a\n // generated SDK project ended up with ttsc ^0.18.2 beside a `@nestia/core`\n // stamped to this repository's version.\n else {\n const specifier = catalogSpecifier(key);\n if (specifier) record[key] = specifier;\n }\n }\n migratePackageJson(parsed);\n if (options.sdkAggregate) {\n parsed.devDependencies ??= {};\n parsed.devDependencies[\"@nestia/core\"] = `^${version}`;\n }\n return JSON.stringify(parsed, null, 2);\n};\n\nconst migratePackageJson = (parsed: {\n scripts?: Record<string, string>;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n}): void => {\n if (parsed.scripts)\n for (const [key, value] of Object.entries(parsed.scripts))\n if (typeof value === \"string\")\n parsed.scripts[key] = normalizeScript(value);\n\n const devDependencies = parsed.devDependencies;\n if (devDependencies) {\n const usesTypeScript =\n typeof devDependencies.typescript === \"string\" &&\n devDependencies.typescript.startsWith(\"catalog:\") === false;\n delete devDependencies[\"typescript-transform-paths\"];\n // Single-package templates compiling with a direct typescript dependency\n // need the ttsc compiler this repository currently builds against.\n if (usesTypeScript && TYPESCRIPT.ttsc)\n devDependencies.ttsc ??= TYPESCRIPT.ttsc.specifier;\n }\n};\n\n// Stamp the template's pnpm-workspace.yaml catalogs with this repository's\n// current versions. Keep the rewrite line-targeted so quoted package names,\n// comments, ordering, and any anchors supplied by the upstream template remain\n// intact.\nconst updateWorkspaceCatalog = (content: string): string => {\n const replace = (line: string): string => {\n const match = line.match(\n /^(\\s+(?:\"([^\"]+)\"|'([^']+)'|([^:\\s]+)): (?:&[A-Za-z0-9_-]+ )?)\\S[^\\r\\n]*(\\r?)$/,\n );\n if (match === null) return line;\n\n const name = (match[2] ?? match[3] ?? match[4])!;\n const specifier =\n name === \"nestia\" || name.startsWith(\"@nestia/\")\n ? `^${version}`\n : catalogSpecifier(name);\n if (typeof specifier !== \"string\") return line;\n return `${match[1]}${specifier}${match[5]}`;\n };\n return content.split(\"\\n\").map(replace).join(\"\\n\");\n};\n\nconst trimTemplateDependencies = (parsed: {\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n}): void => {\n if (parsed.dependencies) {\n delete parsed.dependencies.commander;\n delete parsed.dependencies.inquirer;\n }\n if (parsed.devDependencies) {\n delete parsed.devDependencies[\"@types/inquirer\"];\n delete parsed.devDependencies.commander;\n delete parsed.devDependencies.inquirer;\n }\n};\n\nconst normalizeScript = (script: string): string =>\n script.replace(/(^|[^A-Za-z0-9_-])tsc(?=$|[^A-Za-z0-9_-])/g, \"$1ttsc\");\n\nconst ARGUMENT_PARSER = `import { createInterface } from \"node:readline/promises\";\n\nexport namespace ArgumentParser {\n export interface Command {\n option: (flags: string, description?: string) => Command;\n }\n\n export interface Prompt {\n select: (\n name: string,\n ) => (\n message: string,\n ) => <Choice extends string>(choices: Choice[]) => Promise<Choice>;\n boolean: (name: string) => (message: string) => Promise<boolean>;\n number: (name: string) => (message: string) => Promise<number>;\n }\n\n export const parse = async <T>(\n inquiry: (\n command: Command,\n prompt: Prompt,\n action: (closure: (options: Partial<T>) => Promise<T>) => Promise<T>,\n ) => Promise<T>,\n ): Promise<T> => {\n const command: Command = {\n option: (_flags: string, _description?: string): Command => command,\n };\n const action = (closure: (options: Partial<T>) => Promise<T>) =>\n closure(parseArguments() as Partial<T>);\n return inquiry(\n command,\n { select, boolean, number },\n action,\n );\n };\n\n const select =\n (_name: string) =>\n (message: string) =>\n async <Choice extends string>(choices: Choice[]): Promise<Choice> => {\n const answer: string = await ask(\\`\\${message} (\\${choices.join(\"/\")})\\`);\n return (choices.find((choice) => choice === answer) ?? choices[0])!;\n };\n\n const boolean = (_name: string) => async (message: string) =>\n /^(true|t|yes|y|1)$/i.test(await ask(\\`\\${message} [y/N]\\`));\n\n const number = (_name: string) => async (message: string) =>\n Number(await ask(message));\n\n const ask = async (message: string): Promise<string> => {\n const reader = createInterface({\n input: process.stdin,\n output: process.stdout,\n });\n try {\n return (await reader.question(\\`\\${message}: \\`)).trim();\n } finally {\n reader.close();\n }\n };\n\n const parseArguments = (): Record<string, string | string[] | boolean> => {\n const output: Record<string, string | string[] | boolean> = {};\n const args: string[] = process.argv.slice(2);\n for (let i = 0; i < args.length; ++i) {\n const raw: string = args[i]!;\n if (raw.startsWith(\"--\") === false) continue;\n\n const equal: number = raw.indexOf(\"=\");\n const name: string = toCamelCase(\n raw.slice(2, equal === -1 ? undefined : equal),\n );\n if (equal !== -1) {\n assign(output, name, raw.slice(equal + 1));\n continue;\n }\n\n const values: string[] = [];\n while (i + 1 < args.length && args[i + 1]!.startsWith(\"--\") === false)\n values.push(args[++i]!);\n assign(\n output,\n name,\n values.length === 0 ? true : values.length === 1 ? values[0]! : values,\n );\n }\n return output;\n };\n\n const assign = (\n output: Record<string, string | string[] | boolean>,\n name: string,\n value: string | string[] | boolean,\n ): void => {\n const current: string | string[] | boolean | undefined = output[name];\n if (current === undefined) output[name] = value;\n else\n output[name] = [\n ...(Array.isArray(current) ? current : [String(current)]),\n ...(Array.isArray(value) ? value : [String(value)]),\n ];\n };\n\n const toCamelCase = (str: string): string =>\n str.replace(/-([a-z])/g, (_matched, letter: string) =>\n letter.toUpperCase(),\n );\n}\n`;\n\nconst updateTsConfig = (content: string): string => {\n content = content.replace(\n /^\\s*\\{\\s*\"transform\":\\s*\"typescript-transform-paths\"\\s*\\},\\r?\\n/gm,\n \"\",\n );\n content = content.replace(\n /^\\s*\\{\\s*\"transform\":\\s*\"typia\\/lib\\/transform\"(?:,\\s*\"enabled\":\\s*false)?\\s*\\},?\\r?\\n/gm,\n \"\",\n );\n content = content.replace(\n /^\\s*\\{\\s*\"transform\":\\s*\"@nestia\\/core\\/lib\\/transform\"\\s*\\},?\\r?\\n/gm,\n \"\",\n );\n content = content.replace(\n /^\\s*\\{\\s*\"transform\":\\s*\"@nestia\\/core\\/native\\/transform\\.cjs\"\\s*\\},?\\r?\\n/gm,\n \"\",\n );\n content = content.replace(\n /^\\s*\\{\\s*\"transform\":\\s*\"@nestia\\/sdk\\/lib\\/transform\"\\s*\\},\\r?\\n/gm,\n \"\",\n );\n return content;\n};\n\nconst bundle = async ({\n mode,\n repository,\n revision,\n exceptions,\n transform,\n}: {\n mode: string;\n repository: string;\n revision: string;\n exceptions?: readonly string[];\n transform?: (key: string, value: string) => string;\n}): Promise<void> => {\n const root = `${__dirname}/../..`;\n const assets = `${root}/assets`;\n const template = `${assets}/${mode}`;\n\n const clone = async () => {\n // CLONE REPOSITORY\n if (fs.existsSync(template))\n await fs.promises.rm(template, { recursive: true });\n else\n try {\n await fs.promises.mkdir(ASSETS);\n } catch {}\n\n // Disable line-ending conversion so the bundled template is byte-identical\n // on every platform: with core.autocrlf=true (the common Windows default)\n // the checkout would rewrite LF to CRLF and break the line-targeted\n // transforms below.\n await fs.promises.mkdir(template, { recursive: true });\n cp.execFileSync(\"git\", [\"init\", \"--quiet\"], { cwd: template });\n // The template repositories are live projects; an unpinned clone lets any\n // upstream push break this build (samchon/nestia-start#632 did exactly\n // that), so every bundle checks out a reviewed revision.\n cp.execFileSync(\n \"git\",\n [\n \"fetch\",\n \"--quiet\",\n \"--depth=1\",\n // This checkout is consumed and removed immediately. Fetch's default\n // auto-maintenance can detach a writer into .git/objects after fetch\n // returns, racing the awaited removal below on a cold CI build.\n \"--no-auto-maintenance\",\n `https://github.com/samchon/${repository}`,\n revision,\n ],\n { cwd: template },\n );\n cp.execFileSync(\n \"git\",\n [\n \"-c\",\n \"core.autocrlf=false\",\n \"checkout\",\n \"--quiet\",\n \"--detach\",\n revision,\n ],\n {\n cwd: template,\n stdio: \"pipe\",\n },\n );\n\n // REMOVE VULNERABLE FILES\n for (const location of exceptions ?? [])\n await fs.promises.rm(`${template}/${location}`, { recursive: true });\n };\n\n const iterate =\n (collection: Record<string, string>) =>\n async (location: string): Promise<void> => {\n const directory = await fs.promises.readdir(location);\n for (const file of directory) {\n const absolute = location + \"/\" + file;\n const stats = await fs.promises.stat(absolute);\n if (stats.isDirectory()) await iterate(collection)(absolute);\n else {\n const content = await fs.promises.readFile(absolute, \"utf-8\");\n collection[\n (() => {\n const str = absolute.replace(template, \"\");\n return str[0] === \"/\" ? str.substring(1) : str;\n })()\n ] = content;\n }\n }\n };\n\n const archive = async (collection: Record<string, string>): Promise<void> => {\n const name = `${mode.toUpperCase()}_TEMPLATE`;\n const body = JSON.stringify(collection, null, 2);\n const content = `export const ${name}: Record<string, string> = ${body}`;\n\n try {\n await fs.promises.mkdir(`${ROOT}/src/bundles`);\n } catch {}\n await fs.promises.writeFile(\n `${ROOT}/src/bundles/${name}.ts`,\n content,\n \"utf8\",\n );\n };\n\n const collection: Record<string, string> = {};\n await clone();\n await iterate(collection)(template);\n if (transform)\n for (const [key, value] of Object.entries(collection))\n collection[key] = await writeTransformedAsset(\n template,\n key,\n transform(key, value),\n );\n await archive(collection);\n};\n\nconst writeTransformedAsset = async (\n template: string,\n key: string,\n value: string,\n): Promise<string> => {\n await fs.promises.writeFile(`${template}/${key}`, value, \"utf8\");\n return value;\n};\n\n/**\n * Generates both pinned templates using the current release and catalog stamps.\n *\n * The complete script is a cache input because it contains the revisions,\n * exclusions and every transformation rule. A hit still verifies output bytes.\n */\nconst generate = async () => {\n await bundle({\n mode: \"nest\",\n repository: \"nestia-start\",\n // Pin the reviewed pnpm monorepo template after its catalog, rolldown, and\n // package self-reference migrations.\n revision: \"8188661cb1c1b0fb30e6184b06422764d64a5f68\",\n exceptions: [\n \".git\",\n \".github/dependabot.yml\",\n \".github/workflows/dependabot-automerge.yml\",\n // The template's lockfile resolves the catalog versions that the\n // stamping below rewrites; shipping it would only bloat NEST_TEMPLATE\n // with 160 KB of immediately-stale data.\n \"pnpm-lock.yaml\",\n \"packages/api/src/functional\",\n \"packages/api/src/structures\",\n \"packages/backend/src/MyModule.ts\",\n \"packages/backend/src/controllers\",\n \"packages/backend/src/providers\",\n \"packages/backend/test/features\",\n ],\n transform: (key, value) => {\n if (key.endsWith(\"package.json\")) {\n const parsed = JSON.parse(update(value));\n trimTemplateDependencies(parsed);\n return JSON.stringify(parsed, null, 2);\n }\n if (key === \"pnpm-workspace.yaml\") return updateWorkspaceCatalog(value);\n if (key === \"packages/backend/test/helpers/ArgumentParser.ts\")\n return ARGUMENT_PARSER;\n if (key.endsWith(\"tsconfig.json\")) return updateTsConfig(value);\n return value;\n },\n });\n await bundle({\n mode: \"sdk\",\n repository: \"nestia-sdk-template\",\n // Pin the reviewed pnpm-native SDK template.\n revision: \"37a019e2b8dea3d02237137aaec2f242f53dcd2d\",\n exceptions: [\n \".git\",\n \".github/dependabot.yml\",\n \".github/workflows/build.yml\",\n \".github/workflows/dependabot-automerge.yml\",\n // update() stamps the current Nestia version into package.json. The\n // template repository's lockfile resolves its own version, so let the\n // first pnpm install create a lockfile that matches the migrated output.\n \"pnpm-lock.yaml\",\n \"src/functional\",\n \"src/structures\",\n \"test/features\",\n ],\n transform: (key, value) => {\n if (key.endsWith(\"package.json\")) {\n const parsed = JSON.parse(\n update(value, { sdkAggregate: key === \"package.json\" }),\n );\n trimTemplateDependencies(parsed);\n return JSON.stringify(parsed, null, 2);\n }\n if (key === \"test/utils/ArgumentParser.ts\") return ARGUMENT_PARSER;\n if (key.endsWith(\"tsconfig.json\")) return updateTsConfig(value);\n return value;\n },\n });\n};\nconst main = async () => {\n const reused = await runCached({\n inputs: [version, CATALOGS, fs.readFileSync(__filename, \"utf8\")],\n outputs: [\"NEST_TEMPLATE\", \"SDK_TEMPLATE\"].map(\n (name) => `${ROOT}/src/bundles/${name}.ts`,\n ),\n stampFile: `${ASSETS}/.bundle-cache.json`,\n generate,\n });\n if (reused) console.log(\"Reuse verified migration template bundles.\");\n};\nmain().catch((exp) => {\n console.error(exp);\n process.exit(-1);\n});\n"],"mappings":";;;;;;AAKA,MAAM,EAAE,YAAA,gBAAA;AAER,MAAM,OAAO,GAAG,UAAU;AAC1B,MAAM,SAAS,GAAG,KAAK;AACvB,MAAM,WAAA,UAGM,SAAS,CAAC,CAAC,KACrB,GAAG,aAAa,GAAG,UAAU,8BAA8B,MAAM,CACnE,CAAC,CAAC;AACF,MAAM,QAAQ,SAAS;AACvB,MAAM,aAAa,SAAS,cAAc,CAAC;AAK3C,MAAM,oBAAoB,SACxB,SAAS,UACL,MAAM,KAAK,EAAE,UACZ,MAAM,KAAK,EAAE,aAAa,WAAW,KAAK,EAAE;AAEnD,MAAM,UACJ,SACA,UAAsC,CAAC,MAC5B;CACX,MAAM,SAAS,KAAK,MAAM,OAAO;CACjC,KAAK,MAAM,UAAU,CACnB,OAAO,gBAAgB,CAAC,GACxB,OAAO,mBAAmB,CAAC,CAC7B,GACE,KAAK,MAAM,OAAO,OAAO,KAAK,MAAM,GAAG;EACrC,MAAM,UAAU,OAAO;EAGvB,IACE,OAAO,YAAY,aAClB,QAAQ,WAAW,UAAU,KAAK,QAAQ,WAAW,YAAY,IAElE;EACF,IAAI,IAAI,WAAW,UAAU,KAAK,QAAQ,UACxC,OAAO,OAAO,IAAI;OAQf;GACH,MAAM,YAAY,iBAAiB,GAAG;GACtC,IAAI,WAAW,OAAO,OAAO;EAC/B;CACF;CACF,mBAAmB,MAAM;CACzB,IAAI,QAAQ,cAAc;EACxB,OAAO,oBAAoB,CAAC;EAC5B,OAAO,gBAAgB,kBAAkB,IAAI;CAC/C;CACA,OAAO,KAAK,UAAU,QAAQ,MAAM,CAAC;AACvC;AAEA,MAAM,sBAAsB,WAIhB;CACV,IAAI,OAAO;OACJ,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,OAAO,OAAO,GACtD,IAAI,OAAO,UAAU,UACnB,OAAO,QAAQ,OAAO,gBAAgB,KAAK;CAAA;CAEjD,MAAM,kBAAkB,OAAO;CAC/B,IAAI,iBAAiB;EACnB,MAAM,iBACJ,OAAO,gBAAgB,eAAe,YACtC,gBAAgB,WAAW,WAAW,UAAU,MAAM;EACxD,OAAO,gBAAgB;EAGvB,IAAI,kBAAkB,WAAW,MAC/B,gBAAgB,SAAS,WAAW,KAAK;CAC7C;AACF;AAMA,MAAM,0BAA0B,YAA4B;CAC1D,MAAM,WAAW,SAAyB;EACxC,MAAM,QAAQ,KAAK,MACjB,gFACF;EACA,IAAI,UAAU,MAAM,OAAO;EAE3B,MAAM,OAAQ,MAAM,MAAM,MAAM,MAAM,MAAM;EAC5C,MAAM,YACJ,SAAS,YAAY,KAAK,WAAW,UAAU,IAC3C,IAAI,YACJ,iBAAiB,IAAI;EAC3B,IAAI,OAAO,cAAc,UAAU,OAAO;EAC1C,OAAO,GAAG,MAAM,KAAK,YAAY,MAAM;CACzC;CACA,OAAO,QAAQ,MAAM,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,KAAK,IAAI;AACnD;AAEA,MAAM,4BAA4B,WAGtB;CACV,IAAI,OAAO,cAAc;EACvB,OAAO,OAAO,aAAa;EAC3B,OAAO,OAAO,aAAa;CAC7B;CACA,IAAI,OAAO,iBAAiB;EAC1B,OAAO,OAAO,gBAAgB;EAC9B,OAAO,OAAO,gBAAgB;EAC9B,OAAO,OAAO,gBAAgB;CAChC;AACF;AAEA,MAAM,mBAAmB,WACvB,OAAO,QAAQ,8CAA8C,QAAQ;AAEvE,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+GxB,MAAM,kBAAkB,YAA4B;CAClD,UAAU,QAAQ,QAChB,qEACA,EACF;CACA,UAAU,QAAQ,QAChB,4FACA,EACF;CACA,UAAU,QAAQ,QAChB,yEACA,EACF;CACA,UAAU,QAAQ,QAChB,iFACA,EACF;CACA,UAAU,QAAQ,QAChB,uEACA,EACF;CACA,OAAO;AACT;AAEA,MAAM,SAAS,OAAO,EACpB,MACA,YACA,UACA,YACA,gBAOmB;CAGnB,MAAM,WAAW,GAAG,GADF,GADF,UAAU,QACH,SACI,GAAG;CAE9B,MAAM,QAAQ,YAAY;EAExB,IAAI,GAAG,WAAW,QAAQ,GACxB,MAAM,GAAG,SAAS,GAAG,UAAU,EAAE,WAAW,KAAK,CAAC;OAElD,IAAI;GACF,MAAM,GAAG,SAAS,MAAM,MAAM;EAChC,QAAQ,CAAC;EAMX,MAAM,GAAG,SAAS,MAAM,UAAU,EAAE,WAAW,KAAK,CAAC;EACrD,GAAG,aAAa,OAAO,CAAC,QAAQ,SAAS,GAAG,EAAE,KAAK,SAAS,CAAC;EAI7D,GAAG,aACD,OACA;GACE;GACA;GACA;GAIA;GACA,8BAA8B;GAC9B;EACF,GACA,EAAE,KAAK,SAAS,CAClB;EACA,GAAG,aACD,OACA;GACE;GACA;GACA;GACA;GACA;GACA;EACF,GACA;GACE,KAAK;GACL,OAAO;EACT,CACF;EAGA,KAAK,MAAM,YAAY,cAAc,CAAC,GACpC,MAAM,GAAG,SAAS,GAAG,GAAG,SAAS,GAAG,YAAY,EAAE,WAAW,KAAK,CAAC;CACvE;CAEA,MAAM,WACH,eACD,OAAO,aAAoC;EACzC,MAAM,YAAY,MAAM,GAAG,SAAS,QAAQ,QAAQ;EACpD,KAAK,MAAM,QAAQ,WAAW;GAC5B,MAAM,WAAW,WAAW,MAAM;GAElC,KAAI,MADgB,GAAG,SAAS,KAAK,QAAQ,EAAA,CACnC,YAAY,GAAG,MAAM,QAAQ,UAAU,CAAC,CAAC,QAAQ;QACtD;IACH,MAAM,UAAU,MAAM,GAAG,SAAS,SAAS,UAAU,OAAO;IAC5D,kBACS;KACL,MAAM,MAAM,SAAS,QAAQ,UAAU,EAAE;KACzC,OAAO,IAAI,OAAO,MAAM,IAAI,UAAU,CAAC,IAAI;IAC7C,EAAA,CAAG,KACD;GACN;EACF;CACF;CAEF,MAAM,UAAU,OAAO,eAAsD;EAC3E,MAAM,OAAO,GAAG,KAAK,YAAY,EAAE;EAEnC,MAAM,UAAU,gBAAgB,KAAK,6BADxB,KAAK,UAAU,YAAY,MAAM,CACuB;EAErE,IAAI;GACF,MAAM,GAAG,SAAS,MAAM,GAAG,KAAK,aAAa;EAC/C,QAAQ,CAAC;EACT,MAAM,GAAG,SAAS,UAChB,GAAG,KAAK,eAAe,KAAK,MAC5B,SACA,MACF;CACF;CAEA,MAAM,aAAqC,CAAC;CAC5C,MAAM,MAAM;CACZ,MAAM,QAAQ,UAAU,CAAC,CAAC,QAAQ;CAClC,IAAI,WACF,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,UAAU,GAClD,WAAW,OAAO,MAAM,sBACtB,UACA,KACA,UAAU,KAAK,KAAK,CACtB;CACJ,MAAM,QAAQ,UAAU;AAC1B;AAEA,MAAM,wBAAwB,OAC5B,UACA,KACA,UACoB;CACpB,MAAM,GAAG,SAAS,UAAU,GAAG,SAAS,GAAG,OAAO,OAAO,MAAM;CAC/D,OAAO;AACT;;;;;;;AAQA,MAAM,WAAW,YAAY;CAC3B,MAAM,OAAO;EACX,MAAM;EACN,YAAY;EAGZ,UAAU;EACV,YAAY;GACV;GACA;GACA;GAIA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,YAAY,KAAK,UAAU;GACzB,IAAI,IAAI,SAAS,cAAc,GAAG;IAChC,MAAM,SAAS,KAAK,MAAM,OAAO,KAAK,CAAC;IACvC,yBAAyB,MAAM;IAC/B,OAAO,KAAK,UAAU,QAAQ,MAAM,CAAC;GACvC;GACA,IAAI,QAAQ,uBAAuB,OAAO,uBAAuB,KAAK;GACtE,IAAI,QAAQ,mDACV,OAAO;GACT,IAAI,IAAI,SAAS,eAAe,GAAG,OAAO,eAAe,KAAK;GAC9D,OAAO;EACT;CACF,CAAC;CACD,MAAM,OAAO;EACX,MAAM;EACN,YAAY;EAEZ,UAAU;EACV,YAAY;GACV;GACA;GACA;GACA;GAIA;GACA;GACA;GACA;EACF;EACA,YAAY,KAAK,UAAU;GACzB,IAAI,IAAI,SAAS,cAAc,GAAG;IAChC,MAAM,SAAS,KAAK,MAClB,OAAO,OAAO,EAAE,cAAc,QAAQ,eAAe,CAAC,CACxD;IACA,yBAAyB,MAAM;IAC/B,OAAO,KAAK,UAAU,QAAQ,MAAM,CAAC;GACvC;GACA,IAAI,QAAQ,gCAAgC,OAAO;GACnD,IAAI,IAAI,SAAS,eAAe,GAAG,OAAO,eAAe,KAAK;GAC9D,OAAO;EACT;CACF,CAAC;AACH;AACA,MAAM,OAAO,YAAY;CASvB,IAAI,MARiBA,IAAU;EAC7B,QAAQ;GAAC;GAAS;GAAU,GAAG,aAAa,YAAY,MAAM;EAAC;EAC/D,SAAS,CAAC,iBAAiB,cAAc,CAAC,CAAC,KACxC,SAAS,GAAG,KAAK,eAAe,KAAK,IACxC;EACA,WAAW,GAAG,OAAO;EACrB;CACF,CAAC,GACW,QAAQ,IAAI,4CAA4C;AACtE;AACA,KAAK,CAAC,CAAC,OAAO,QAAQ;CACpB,QAAQ,MAAM,GAAG;CACjB,QAAQ,KAAK,EAAE;AACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"migrate.mjs","names":[],"sources":["../../src/executable/migrate.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { NestiaMigrateCommander } from \"./NestiaMigrateCommander\";\n\nNestiaMigrateCommander.main().catch((exp) => {\n console.error(exp);\n process.exit(-1);\n});\n"],"mappings":";;;AAGA,uBAAuB,KAAK,CAAC,CAAC,OAAO,QAAQ;CAC3C,QAAQ,MAAM,GAAG;CACjB,QAAQ,KAAK,EAAE;AACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionFactory.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ExpressionFactory.mjs","names":[],"sources":["../../src/factories/ExpressionFactory.ts"],"sourcesContent":["import {\n type NumericLiteral,\n type PrefixUnaryExpression,\n SyntaxKind,\n factory,\n} from \"@ttsc/factory\";\n\n/**\n * Numeric-literal helper that handles negative values via a leading\n * `MinusToken` prefix unary, matching how the TypeScript factory itself emits\n * negative numeric literals.\n *\n * @evidence contracts/common.md#principled-implementation The namespace holds the number literal builder that the generators need.\n * @evidence contracts/common.md#clear-and-simple-design One function.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It only builds nodes.\n * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.\n */\nexport namespace ExpressionFactory {\n /**\n * Builds a numeric literal, using a prefix minus for a negative value,\n * because a negative numeric literal is not a valid node.\n *\n * @evidence contracts/common.md#principled-implementation TypeScript represents a negative number as a prefix unary minus applied to a positive literal, so the function builds that shape for values below zero and a plain literal otherwise.\n * @evidence contracts/common.md#clear-and-simple-design One conditional.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It follows the syntax tree grammar.\n * @evidence contracts/common.md#meaningful-documentation The comment states the negative case.\n */\n export const number = (\n value: number,\n ): NumericLiteral | PrefixUnaryExpression =>\n value < 0\n ? factory.createPrefixUnaryExpression(\n SyntaxKind.MinusToken,\n factory.createNumericLiteral(Math.abs(value)),\n )\n : factory.createNumericLiteral(value);\n}\n"],"mappings":";;AAiBO,IAAA;;8BAWH,UAEA,QAAQ,IACJ,QAAQ,4BACN,WAAW,YACX,QAAQ,qBAAqB,KAAK,IAAI,KAAK,CAAC,CAC9C,IACA,QAAQ,qBAAqB,KAAK;GACzC,sBAAA,oBAAA,CAAA,EAAD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentifierFactory.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"IdentifierFactory.mjs","names":[],"sources":["../../src/factories/IdentifierFactory.ts"],"sourcesContent":["import {\n type Expression,\n type Identifier,\n type ParameterDeclaration,\n type StringLiteral,\n SyntaxKind,\n type Token,\n type TypeNode,\n factory,\n} from \"@ttsc/factory\";\n\nimport { TypeFactory } from \"./TypeFactory\";\n\n// Conservative \"is this string a syntactically valid JavaScript variable\n// name?\" test, inlined to avoid pulling in @typia/utils' full namespace.\nconst VARIABLE_REGEX = /^[A-Za-z_$][A-Za-z0-9_$]*$/;\nconst isVariableName = (str: string): boolean => VARIABLE_REGEX.test(str);\n\n/**\n * Identifier and member-access helpers. The surface kept here is the subset\n * nestia generators actually call (`identifier`, `access`, `parameter`).\n *\n * @evidence contracts/common.md#principled-implementation The functions decide between an identifier and a string literal by the syntax of the name, so any string can be used as a key.\n * @evidence contracts/common.md#clear-and-simple-design Three small functions and one private predicate.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The variable-name test is a regular expression of the language's identifier syntax, which is inlined so that the package need not load a larger namespace.\n * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.\n */\nexport namespace IdentifierFactory {\n /**\n * Build an identifier or string literal depending on whether `name` is a\n * valid JavaScript identifier.\n *\n * @evidence contracts/common.md#principled-implementation The name is tested against the identifier grammar `[A-Za-z_$][A-Za-z0-9_$]*`, which is conservative: a valid name outside it, such as one with non-ASCII letters, becomes a quoted key, which is equivalent.\n * @evidence contracts/common.md#clear-and-simple-design One conditional.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The test applies to every name.\n * @evidence contracts/common.md#meaningful-documentation The comment states the two results.\n */\n export const identifier = (name: string): Identifier | StringLiteral =>\n isVariableName(name)\n ? factory.createIdentifier(name)\n : factory.createStringLiteral(name);\n\n /**\n * Member access on `input` by `key`. Falls back to element access when the\n * key is not a valid identifier.\n *\n * @evidence contracts/common.md#principled-implementation The postfix is built by `identifier`, and its kind selects the property form or the element form, with the chain token added when requested.\n * @evidence contracts/common.md#clear-and-simple-design One function delegating the naming rule.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It never concatenates source text.\n * @evidence contracts/common.md#meaningful-documentation The comment states the forms.\n */\n export const access = (\n input: Expression,\n key: string,\n chain?: boolean,\n ): Expression => {\n const postfix = identifier(key);\n if (postfix.kind === \"StringLiteral\")\n return chain === true\n ? factory.createElementAccessChain(\n input,\n factory.createToken(SyntaxKind.QuestionDotToken),\n postfix,\n )\n : factory.createElementAccessExpression(input, postfix);\n return chain === true\n ? factory.createPropertyAccessChain(\n input,\n factory.createToken(SyntaxKind.QuestionDotToken),\n postfix,\n )\n : factory.createPropertyAccessExpression(input, postfix);\n };\n\n /**\n * Parameter declaration with default `any` type when the caller omits one.\n * Passing a `QuestionToken` as `init` marks the parameter optional.\n *\n * @evidence contracts/common.md#principled-implementation An initializer that is the question token becomes the optional marker and is not an initializer, and any other initializer is passed through.\n * @evidence contracts/common.md#clear-and-simple-design One function with one branch.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It follows the declaration grammar.\n * @evidence contracts/common.md#meaningful-documentation The comment states the optional marker and the default type.\n */\n export const parameter = (\n name: string | Identifier,\n type?: TypeNode,\n init?: Expression | Token,\n ): ParameterDeclaration => {\n const isQuestionToken =\n !!init &&\n init.kind === \"Token\" &&\n (init as Token).token === SyntaxKind.QuestionToken;\n return factory.createParameterDeclaration(\n undefined,\n undefined,\n name,\n isQuestionToken\n ? factory.createToken(SyntaxKind.QuestionToken)\n : undefined,\n type ?? TypeFactory.keyword(\"any\"),\n isQuestionToken ? undefined : (init as Expression | undefined),\n );\n };\n}\n"],"mappings":";;;AAeA,MAAM,iBAAiB;AACvB,MAAM,kBAAkB,QAAyB,eAAe,KAAK,GAAG;AAWjE,IAAA;;CAUE,MAAM,aAAA,mBAAA,cAAc,SACzB,eAAe,IAAI,IACf,QAAQ,iBAAiB,IAAI,IAC7B,QAAQ,oBAAoB,IAAI;8BAYpC,OACA,KACA,UACe;EACf,MAAM,UAAU,WAAW,GAAG;EAC9B,IAAI,QAAQ,SAAS,iBACnB,OAAO,UAAU,OACb,QAAQ,yBACN,OACA,QAAQ,YAAY,WAAW,gBAAgB,GAC/C,OACF,IACA,QAAQ,8BAA8B,OAAO,OAAO;EAC1D,OAAO,UAAU,OACb,QAAQ,0BACN,OACA,QAAQ,YAAY,WAAW,gBAAgB,GAC/C,OACF,IACA,QAAQ,+BAA+B,OAAO,OAAO;CAC3D;iCAYE,MACA,MACA,SACyB;EACzB,MAAM,kBACJ,CAAC,CAAC,QACF,KAAK,SAAS,WACb,KAAe,UAAU,WAAW;EACvC,OAAO,QAAQ,2BACb,KAAA,GACA,KAAA,GACA,MACA,kBACI,QAAQ,YAAY,WAAW,aAAa,IAC5C,KAAA,GACJ,QAAQ,YAAY,QAAQ,KAAK,GACjC,kBAAkB,KAAA,IAAa,IACjC;CACF;GACD,sBAAA,oBAAA,CAAA,EAAD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiteralFactory.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"LiteralFactory.mjs","names":[],"sources":["../../src/factories/LiteralFactory.ts"],"sourcesContent":["import { type Expression, factory } from \"@ttsc/factory\";\n\nimport { ExpressionFactory } from \"./ExpressionFactory\";\nimport { IdentifierFactory } from \"./IdentifierFactory\";\n\nconst PASSTHROUGH_KINDS = new Set<string>([\n \"ArrowFunction\",\n \"CallExpression\",\n \"Identifier\",\n]);\n\nconst isNode = (value: unknown): value is Expression =>\n typeof value === \"object\" &&\n value !== null &&\n typeof (value as { kind?: unknown }).kind === \"string\";\n\n/**\n * Recursive value-to-AST-literal builder. Hands back already-AST inputs\n * unchanged for arrow functions, calls and identifiers (so callers can mix\n * those factory expressions with raw values inside objects/arrays), and emits\n * the appropriate literal node otherwise.\n *\n * @evidence contracts/common.md#principled-implementation The namespace maps null, booleans, numbers, strings, bigint text, arrays and object entries to literal expressions, passes through the three accepted AST kinds, maps functions to undefined and refuses unsupported primitive types.\n * @evidence contracts/common.md#clear-and-simple-design One entry function and two private helpers for containers.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is by type, with no value special-cased.\n * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.\n */\nexport namespace LiteralFactory {\n /**\n * Builds the expression of a value: `null`, a boolean, a number, a string, a\n * bigint as its text, an array, an object without its `undefined` members, or\n * an expression node as it is.\n *\n * @evidence contracts/common.md#principled-implementation The value is dispatched by type in a fixed order; nodes of the kinds arrow function, call, and identifier pass through, functions become `undefined`, and an unsupported type is a `TypeError`, so the result is total over the listed types.\n * @evidence contracts/common.md#clear-and-simple-design One function with one branch per type.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The dispatch is general, and a bigint becomes text because a literal bigint is not supported by the target syntax here.\n * @evidence contracts/common.md#meaningful-documentation The comment lists the mapping.\n */\n export const write = (input: any): Expression => {\n if (input === null) return factory.createNull();\n if (isNode(input) && PASSTHROUGH_KINDS.has(input.kind)) return input;\n if (Array.isArray(input)) return writeArray(input);\n if (typeof input === \"object\") return writeObject(input as object);\n if (typeof input === \"boolean\")\n return input ? factory.createTrue() : factory.createFalse();\n if (typeof input === \"number\") return ExpressionFactory.number(input);\n if (typeof input === \"string\") return factory.createStringLiteral(input);\n if (typeof input === \"bigint\")\n return factory.createStringLiteral(input.toString());\n if (typeof input === \"function\")\n return factory.createIdentifier(\"undefined\");\n throw new TypeError(\"LiteralFactory.write: unsupported input type.\");\n };\n\n const writeObject = (obj: object): Expression =>\n factory.createObjectLiteralExpression(\n Object.entries(obj)\n .filter(([, value]) => value !== undefined)\n .map(([key, value]) =>\n factory.createPropertyAssignment(\n IdentifierFactory.identifier(key),\n write(value),\n ),\n ),\n true,\n );\n\n const writeArray = (array: readonly any[]): Expression =>\n factory.createArrayLiteralExpression(array.map(write), true);\n}\n"],"mappings":";;;;AAKA,MAAM,oCAAoB,IAAI,IAAY;CACxC;CACA;CACA;AACF,CAAC;AAED,MAAM,UAAU,UACd,OAAO,UAAU,YACjB,UAAU,QACV,OAAQ,MAA6B,SAAS;AAazC,IAAA;;CAWE,MAAM,QAAA,gBAAA,SAAS,UAA2B;EAC/C,IAAI,UAAU,MAAM,OAAO,QAAQ,WAAW;EAC9C,IAAI,OAAO,KAAK,KAAK,kBAAkB,IAAI,MAAM,IAAI,GAAG,OAAO;EAC/D,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,WAAW,KAAK;EACjD,IAAI,OAAO,UAAU,UAAU,OAAO,YAAY,KAAe;EACjE,IAAI,OAAO,UAAU,WACnB,OAAO,QAAQ,QAAQ,WAAW,IAAI,QAAQ,YAAY;EAC5D,IAAI,OAAO,UAAU,UAAU,OAAO,kBAAkB,OAAO,KAAK;EACpE,IAAI,OAAO,UAAU,UAAU,OAAO,QAAQ,oBAAoB,KAAK;EACvE,IAAI,OAAO,UAAU,UACnB,OAAO,QAAQ,oBAAoB,MAAM,SAAS,CAAC;EACrD,IAAI,OAAO,UAAU,YACnB,OAAO,QAAQ,iBAAiB,WAAW;EAC7C,MAAM,IAAI,UAAU,+CAA+C;CACrE;CAEA,MAAM,eAAe,QACnB,QAAQ,8BACN,OAAO,QAAQ,GAAG,CAAC,CAChB,QAAQ,GAAG,WAAW,UAAU,KAAA,CAAS,CAAC,CAC1C,KAAK,CAAC,KAAK,WACV,QAAQ,yBACN,kBAAkB,WAAW,GAAG,GAChC,MAAM,KAAK,CACb,CACF,GACF,IACF;CAEF,MAAM,cAAc,UAClB,QAAQ,6BAA6B,MAAM,IAAI,KAAK,GAAG,IAAI;GAC9D,mBAAA,iBAAA,CAAA,EAAD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatementFactory.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"StatementFactory.mjs","names":[],"sources":["../../src/factories/StatementFactory.ts"],"sourcesContent":["import {\n type Expression,\n NodeFlags,\n type TypeNode,\n type VariableStatement,\n factory,\n} from \"@ttsc/factory\";\n\nimport { TypeFactory } from \"./TypeFactory\";\n\n/**\n * Variable-statement helpers. `constant` emits `const`, `mut` emits `let`.\n *\n * @evidence contracts/common.md#principled-implementation The namespace builds `let` and `const` statements from a name, an optional type, and an optional value.\n * @evidence contracts/common.md#clear-and-simple-design Two functions.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It only builds nodes.\n * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.\n */\nexport namespace StatementFactory {\n /**\n * Builds a `let` statement; a declaration without a type and without an\n * initializer is typed `any`.\n *\n * @evidence contracts/common.md#principled-implementation A `let` without both a type and an initializer would be implicitly any, so the type is stated explicitly in that case.\n * @evidence contracts/common.md#clear-and-simple-design One expression.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It follows the declaration grammar.\n * @evidence contracts/common.md#meaningful-documentation The comment states the default type.\n */\n export const mut = (props: {\n name: string;\n type?: TypeNode | undefined;\n initializer?: Expression | undefined;\n }): VariableStatement =>\n factory.createVariableStatement(\n undefined,\n factory.createVariableDeclarationList(\n [\n factory.createVariableDeclaration(\n props.name,\n undefined,\n props.type !== undefined\n ? props.type\n : props.initializer === undefined\n ? TypeFactory.keyword(\"any\")\n : undefined,\n props.initializer,\n ),\n ],\n NodeFlags.Let,\n ),\n );\n\n /**\n * Builds a `const` statement from a name, an optional type, and an optional\n * value.\n *\n * @evidence contracts/common.md#principled-implementation The declaration list carries the const flag and the given parts.\n * @evidence contracts/common.md#clear-and-simple-design One expression.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It follows the declaration grammar.\n * @evidence contracts/common.md#meaningful-documentation The comment states its inputs.\n */\n export const constant = (props: {\n name: string;\n type?: TypeNode | undefined;\n value?: Expression | undefined;\n }): VariableStatement =>\n factory.createVariableStatement(\n undefined,\n factory.createVariableDeclarationList(\n [\n factory.createVariableDeclaration(\n props.name,\n undefined,\n props.type,\n props.value,\n ),\n ],\n NodeFlags.Const,\n ),\n );\n}\n"],"mappings":";;;AAkBO,IAAA;;0BAUe,UAKlB,QAAQ,wBACN,KAAA,GACA,QAAQ,8BACN,CACE,QAAQ,0BACN,MAAM,MACN,KAAA,GACA,MAAM,SAAS,KAAA,IACX,MAAM,OACN,MAAM,gBAAgB,KAAA,IACpB,YAAY,QAAQ,KAAK,IACzB,KAAA,GACN,MAAM,WACR,CACF,GACA,UAAU,GACZ,CACF;+BAWuB,UAKvB,QAAQ,wBACN,KAAA,GACA,QAAQ,8BACN,CACE,QAAQ,0BACN,MAAM,MACN,KAAA,GACA,MAAM,MACN,MAAM,KACR,CACF,GACA,UAAU,KACZ,CACF;GACH,qBAAA,mBAAA,CAAA,EAAD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportedStringFormats.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"SupportedStringFormats.mjs","names":[],"sources":["../../src/factories/SupportedStringFormats.ts"],"sourcesContent":["/**\n * The string formats of the OpenAPI document that the typia `Format` tag\n * validates, so a schema carrying one of them is generated as a `Format` tag\n * and a schema carrying any other format stays a plain `string`.\n */\nexport const SUPPORTED_STRING_FORMATS: ReadonlySet<string> = new Set([\n \"byte\",\n \"password\",\n \"regex\",\n \"uuid\",\n \"email\",\n \"hostname\",\n \"idn-email\",\n \"idn-hostname\",\n \"iri\",\n \"iri-reference\",\n \"ipv4\",\n \"ipv6\",\n \"uri\",\n \"uri-reference\",\n \"uri-template\",\n \"url\",\n \"date-time\",\n \"date\",\n \"time\",\n \"duration\",\n \"json-pointer\",\n \"relative-json-pointer\",\n]);\n"],"mappings":";;;;;;AAKA,MAAa,2CAAgD,IAAI,IAAI;CACnE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeFactory.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"TypeFactory.mjs","names":[],"sources":["../../src/factories/TypeFactory.ts"],"sourcesContent":["import { type KeywordTypeNode, SyntaxKind, factory } from \"@ttsc/factory\";\n\n/**\n * Higher-level type-keyword factory.\n *\n * Wraps {@link factory.createKeywordTypeNode} with a name-based interface so\n * generator code reads as `TypeFactory.keyword(\"any\")` instead of selecting the\n * `SyntaxKind.AnyKeyword` token by hand.\n *\n * @evidence contracts/common.md#principled-implementation The namespace maps the names of the nine keyword types to their syntax kinds.\n * @evidence contracts/common.md#clear-and-simple-design One table, one type, and one function.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It only builds nodes.\n * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.\n */\nexport namespace TypeFactory {\n const KEYWORDS = {\n void: SyntaxKind.VoidKeyword,\n any: SyntaxKind.AnyKeyword,\n unknown: SyntaxKind.UnknownKeyword,\n boolean: SyntaxKind.BooleanKeyword,\n number: SyntaxKind.NumberKeyword,\n bigint: SyntaxKind.BigIntKeyword,\n string: SyntaxKind.StringKeyword,\n never: SyntaxKind.NeverKeyword,\n undefined: SyntaxKind.UndefinedKeyword,\n } as const;\n\n /**\n * The names of the supported keyword types.\n *\n * @evidence contracts/common.md#principled-implementation The type is the key set of the table that maps names to syntax kinds, so a new keyword is one table entry.\n * @evidence contracts/common.md#clear-and-simple-design One derived type.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The comment names the set.\n */\n export type Keyword = keyof typeof KEYWORDS;\n\n /**\n * Builds the keyword type node of a keyword name.\n *\n * @evidence contracts/common.md#principled-implementation The name is looked up in the table, so an unsupported name is a compile error.\n * @evidence contracts/common.md#clear-and-simple-design One lookup.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It follows the type grammar.\n * @evidence contracts/common.md#meaningful-documentation The comment states its input.\n */\n export const keyword = (type: Keyword): KeywordTypeNode =>\n factory.createKeywordTypeNode(KEYWORDS[type]);\n}\n"],"mappings":";;AAcO,IAAA;;CACL,MAAM,WAAW;EACf,MAAM,WAAW;EACjB,KAAK,WAAW;EAChB,SAAS,WAAW;EACpB,SAAS,WAAW;EACpB,QAAQ,WAAW;EACnB,QAAQ,WAAW;EACnB,QAAQ,WAAW;EACnB,OAAO,WAAW;EAClB,WAAW,WAAW;CACxB;yBAoBwB,SACtB,QAAQ,sBAAsB,SAAS,KAAK;GAC/C,gBAAA,cAAA,CAAA,EAAD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeLiteralFactory.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"TypeLiteralFactory.mjs","names":[],"sources":["../../src/factories/TypeLiteralFactory.ts"],"sourcesContent":["import { SyntaxKind, factory } from \"@ttsc/factory\";\nimport { NamingConvention } from \"@typia/utils\";\n\nimport ts from \"../internal/ts\";\n\n/**\n * Builds type nodes from JavaScript values, so a value can be written as a\n * literal type.\n *\n * @evidence contracts/common.md#principled-implementation The namespace maps booleans, numbers, strings, null, arrays as tuples, and objects as type literals, and anything else to `any`.\n * @evidence contracts/common.md#clear-and-simple-design One entry function and small private builders per kind.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is by type, with no value special-cased.\n * @evidence contracts/common.md#meaningful-documentation The comment states its purpose.\n */\nexport namespace TypeLiteralFactory {\n /**\n * Builds the literal type of a value: a literal for a primitive, a tuple for\n * an array, a type literal for an object, and `any` for other values.\n *\n * @evidence contracts/common.md#principled-implementation The value is dispatched by type, negative numbers use a prefix minus as expressions do, and object keys that are not identifiers are quoted.\n * @evidence contracts/common.md#clear-and-simple-design One function with one branch per kind.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The dispatch is general.\n * @evidence contracts/common.md#meaningful-documentation The comment lists the mapping.\n */\n export const generate = (value: any): ts.TypeNode =>\n typeof value === \"boolean\"\n ? generateBoolean(value)\n : typeof value === \"number\"\n ? generateNumber(value)\n : typeof value === \"string\"\n ? generatestring(value)\n : typeof value === \"object\"\n ? value === null\n ? generateNull()\n : Array.isArray(value)\n ? generateTuple(value)\n : generateObject(value)\n : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword);\n\n const generatestring = (str: string) =>\n factory.createLiteralTypeNode(factory.createStringLiteral(str));\n\n const generateNumber = (num: number) =>\n factory.createLiteralTypeNode(\n num < 0\n ? factory.createPrefixUnaryExpression(\n SyntaxKind.MinusToken,\n factory.createNumericLiteral(-num),\n )\n : factory.createNumericLiteral(num),\n );\n\n const generateBoolean = (bool: boolean) =>\n factory.createLiteralTypeNode(\n bool ? factory.createTrue() : factory.createFalse(),\n );\n\n const generateNull = () =>\n factory.createLiteralTypeNode(factory.createNull());\n\n const generateTuple = (items: any[]) =>\n factory.createTupleTypeNode(items.map(generate));\n\n const generateObject = (obj: object) =>\n factory.createTypeLiteralNode(\n Object.entries(obj).map(([key, value]) =>\n factory.createPropertySignature(\n undefined,\n NamingConvention.variable(key)\n ? factory.createIdentifier(key)\n : factory.createStringLiteral(key),\n undefined,\n generate(value),\n ),\n ),\n );\n}\n"],"mappings":";;;AAcO,IAAA;;CAUE,MAAM,WAAA,oBAAA,YAAY,UACvB,OAAO,UAAU,YACb,gBAAgB,KAAK,IACrB,OAAO,UAAU,WACf,eAAe,KAAK,IACpB,OAAO,UAAU,WACf,eAAe,KAAK,IACpB,OAAO,UAAU,WACf,UAAU,OACR,aAAa,IACb,MAAM,QAAQ,KAAK,IACjB,cAAc,KAAK,IACnB,eAAe,KAAK,IACxB,QAAQ,sBAAsB,WAAW,UAAU;CAE/D,MAAM,kBAAkB,QACtB,QAAQ,sBAAsB,QAAQ,oBAAoB,GAAG,CAAC;CAEhE,MAAM,kBAAkB,QACtB,QAAQ,sBACN,MAAM,IACF,QAAQ,4BACN,WAAW,YACX,QAAQ,qBAAqB,CAAC,GAAG,CACnC,IACA,QAAQ,qBAAqB,GAAG,CACtC;CAEF,MAAM,mBAAmB,SACvB,QAAQ,sBACN,OAAO,QAAQ,WAAW,IAAI,QAAQ,YAAY,CACpD;CAEF,MAAM,qBACJ,QAAQ,sBAAsB,QAAQ,WAAW,CAAC;CAEpD,MAAM,iBAAiB,UACrB,QAAQ,oBAAoB,MAAM,IAAI,QAAQ,CAAC;CAEjD,MAAM,kBAAkB,QACtB,QAAQ,sBACN,OAAO,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,WAC7B,QAAQ,wBACN,KAAA,GACA,iBAAiB,SAAS,GAAG,IACzB,QAAQ,iBAAiB,GAAG,IAC5B,QAAQ,oBAAoB,GAAG,GACnC,KAAA,GACA,SAAS,KAAK,CAChB,CACF,CACF;GACH,uBAAA,qBAAA,CAAA,EAAD"}
|
package/lib/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["migrate"],"sources":["../src/index.ts"],"sourcesContent":["import * as migrate from \"./module\";\n\nexport default migrate;\nexport * from \"./module\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,IAAA,cAAeA"}
|
package/lib/internal/ts.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ts.mjs","names":[],"sources":["../../src/internal/ts.ts"],"sourcesContent":["// Compatibility shim that replaces `import ts from \"typescript\"`. AST\n// construction now goes through `@ttsc/factory`'s `factory`, `SyntaxKind`, and\n// `NodeFlags`, imported directly where needed; the value side here exposes only\n// the `isUnionTypeNode` guard the migrate generators still call. The type\n// aliases (`ts.Expression`, `ts.ParameterDeclaration`, …) map to the matching\n// `@ttsc/factory` node types so existing annotations keep their precise shapes.\nimport {\n type Block,\n type CallExpression,\n type Decorator,\n type Expression,\n type FunctionDeclaration,\n type Identifier,\n type KeywordTypeNode,\n type MethodDeclaration,\n type ModuleDeclaration,\n type Node,\n type ParameterDeclaration,\n type Statement,\n type TypeAliasDeclaration,\n type TypeNode,\n type TypeReferenceNode,\n type UnionTypeNode,\n type VariableStatement,\n} from \"@ttsc/factory\";\n\ninterface TsValue {\n isUnionTypeNode(node: Node | undefined): node is UnionTypeNode;\n}\n\nconst ts: TsValue = {\n isUnionTypeNode: (node: Node | undefined): node is UnionTypeNode =>\n !!node && node.kind === \"UnionTypeNode\",\n};\n\ntype _Block = Block;\ntype _CallExpression = CallExpression;\ntype _Decorator = Decorator;\ntype _Expression = Expression;\ntype _FunctionDeclaration = FunctionDeclaration;\ntype _Identifier = Identifier;\ntype _KeywordTypeNode = KeywordTypeNode;\ntype _MethodDeclaration = MethodDeclaration;\ntype _ModuleDeclaration = ModuleDeclaration;\ntype _Node = Node;\ntype _ParameterDeclaration = ParameterDeclaration;\ntype _Statement = Statement;\ntype _TypeAliasDeclaration = TypeAliasDeclaration;\ntype _TypeNode = TypeNode;\ntype _TypeReferenceNode = TypeReferenceNode;\ntype _UnionTypeNode = UnionTypeNode;\ntype _VariableStatement = VariableStatement;\n\n/**\n * A compatibility stand-in for `import ts from \"typescript\"`: the one value the\n * generators still call, and the node types under the names they use.\n *\n * @evidence contracts/common.md#principled-implementation The value is the union-type guard, and the namespace aliases map each used compiler type name to the matching node type of the factory package, so existing annotations keep their exact shapes.\n * @evidence contracts/common.md#clear-and-simple-design One value and one declaration-only namespace of aliases.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It avoids loading the compiler; the guard is implemented on the node kind, not on a patched compiler.\n * @evidence contracts/common.md#meaningful-documentation The leading comment explains why the shim exists.\n */\ndeclare namespace ts {\n /**\n * The `Node` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `Node` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type Node = _Node;\n /**\n * The `Block` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `Block` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type Block = _Block;\n /**\n * The `CallExpression` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `CallExpression` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type CallExpression = _CallExpression;\n /**\n * The `ConciseBody` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation A concise body is a block or an expression, the same union the compiler defines.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type ConciseBody = _Block | _Expression;\n /**\n * The `Decorator` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `Decorator` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type Decorator = _Decorator;\n /**\n * The `Expression` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `Expression` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type Expression = _Expression;\n /**\n * The `FunctionDeclaration` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `FunctionDeclaration` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type FunctionDeclaration = _FunctionDeclaration;\n /**\n * The `Identifier` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `Identifier` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type Identifier = _Identifier;\n /**\n * The `KeywordTypeNode` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `KeywordTypeNode` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type KeywordTypeNode = _KeywordTypeNode;\n /**\n * The `MethodDeclaration` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `MethodDeclaration` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type MethodDeclaration = _MethodDeclaration;\n /**\n * The `ModuleDeclaration` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `ModuleDeclaration` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type ModuleDeclaration = _ModuleDeclaration;\n /**\n * The `ParameterDeclaration` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `ParameterDeclaration` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type ParameterDeclaration = _ParameterDeclaration;\n /**\n * The `Statement` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `Statement` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type Statement = _Statement;\n /**\n * The `TypeAliasDeclaration` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `TypeAliasDeclaration` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type TypeAliasDeclaration = _TypeAliasDeclaration;\n /**\n * The `TypeNode` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `TypeNode` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type TypeNode = _TypeNode;\n /**\n * The `TypeReferenceNode` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `TypeReferenceNode` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type TypeReferenceNode = _TypeReferenceNode;\n /**\n * The `UnionTypeNode` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `UnionTypeNode` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type UnionTypeNode = _UnionTypeNode;\n /**\n * The `VariableStatement` node type under the name the generators use.\n *\n * @evidence contracts/common.md#principled-implementation The alias names the `VariableStatement` node type of the factory package.\n * @evidence contracts/common.md#clear-and-simple-design One alias.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The alias is named after the compiler type it replaces, and the file comment explains the shim.\n */\n export type VariableStatement = _VariableStatement;\n}\n\nexport default ts;\n"],"mappings":";AA8BA,MAAM,KAAc,EAClB,kBAAkB,SAChB,CAAC,CAAC,QAAQ,KAAK,SAAS,gBAC5B"}
|
package/lib/module.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"module.mjs","names":[],"sources":["../src/module.ts"],"sourcesContent":["export * from \"./NestiaMigrateApplication\";\nexport * from \"./structures/index\";\n\nexport * from \"./archivers/NestiaMigrateFileArchiver\";\n\nexport * from \"./programmers/index\";\n"],"mappings":""}
|
package/lib/package.mjs
CHANGED
|
@@ -4,7 +4,7 @@ var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
"private": true,
|
|
6
6
|
"name": "@nestia/station",
|
|
7
|
-
"version": "14.
|
|
7
|
+
"version": "14.4.0",
|
|
8
8
|
"description": "Nestia station",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "pnpm --filter=./packages/* -r build",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateApiFileProgrammer.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"NestiaMigrateApiFileProgrammer.mjs","names":[],"sources":["../../src/programmers/NestiaMigrateApiFileProgrammer.ts"],"sourcesContent":["import { factory } from \"@ttsc/factory\";\nimport { IHttpMigrateRoute, OpenApi } from \"@typia/interface\";\n\nimport ts from \"../internal/ts\";\nimport { INestiaMigrateConfig } from \"../structures/INestiaMigrateConfig\";\nimport { FilePrinter } from \"../utils/FilePrinter\";\nimport { NestiaMigrateApiFunctionProgrammer } from \"./NestiaMigrateApiFunctionProgrammer\";\nimport { NestiaMigrateApiNamespaceProgrammer } from \"./NestiaMigrateApiNamespaceProgrammer\";\nimport { NestiaMigrateImportProgrammer } from \"./NestiaMigrateImportProgrammer\";\n\n/**\n * Generates one file of the functional API: the imports, the exports of the\n * child namespaces, and the functions of the routes at this level.\n *\n * @evidence contracts/common.md#principled-implementation Each route contributes its function and its namespace, the imports are collected by one importer and emitted first, and each child namespace is re-exported, so a file is a complete module.\n * @evidence contracts/common.md#clear-and-simple-design One function over the two per-route programmers and the importer.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The output derives from the routes and the configuration.\n * @evidence contracts/common.md#meaningful-documentation The comment states the file's content.\n */\nexport namespace NestiaMigrateApiFileProgrammer {\n /**\n * The input of one API file: the configuration, the components, the namespace\n * path, the routes, and the child namespaces.\n *\n * @evidence contracts/common.md#principled-implementation The record holds exactly what a file needs, so files can be generated independently.\n * @evidence contracts/common.md#clear-and-simple-design A flat record.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.\n * @evidence contracts/common.md#meaningful-documentation The comment lists the fields.\n */\n export interface IProps {\n /** Calling convention and optional generated features for this operation. */\n config: INestiaMigrateConfig;\n\n /** Component schemas used to resolve DTO references. */\n components: OpenApi.IComponents;\n\n /** Accessor prefix locating this functional API index. */\n namespace: string[];\n\n /** Operations whose functions belong directly to this index. */\n routes: IHttpMigrateRoute[];\n\n /** Immediate child namespace names re-exported by this index. */\n children: Set<string>;\n }\n\n /**\n * Returns the statements of one API file.\n *\n * @evidence contracts/common.md#principled-implementation The relative path to the structures directory is derived from the namespace depth, so imports resolve from every level.\n * @evidence contracts/common.md#clear-and-simple-design One function.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The depth is computed, not hardcoded.\n * @evidence contracts/common.md#meaningful-documentation The comment states its result.\n */\n export const write = (props: IProps): ts.Statement[] => {\n const importer: NestiaMigrateImportProgrammer =\n new NestiaMigrateImportProgrammer();\n const statements: ts.Statement[] = props.routes\n .map((route) => [\n FilePrinter.newLine(),\n NestiaMigrateApiFunctionProgrammer.write({\n config: props.config,\n components: props.components,\n importer,\n route,\n }),\n NestiaMigrateApiNamespaceProgrammer.write({\n config: props.config,\n components: props.components,\n importer,\n route,\n }),\n ])\n .flat();\n return [\n ...importer.toStatements(\n (ref) => `../${\"../\".repeat(props.namespace.length)}structures/${ref}`,\n ),\n ...[...props.children].map((child) =>\n factory.createExportDeclaration(\n undefined,\n false,\n factory.createNamespaceExport(factory.createIdentifier(child)),\n factory.createStringLiteral(`./${child}/index`),\n ),\n ),\n ...statements,\n ];\n };\n}\n"],"mappings":";;;;;;AAmBO,IAAA;;0CAmCiB,UAAkC;EACtD,MAAM,WACJ,IAAI,8BAA8B;EACpC,MAAM,aAA6B,MAAM,OACtC,KAAK,UAAU;GACd,YAAY,QAAQ;GACpB,mCAAmC,MAAM;IACvC,QAAQ,MAAM;IACd,YAAY,MAAM;IAClB;IACA;GACF,CAAC;GACD,oCAAoC,MAAM;IACxC,QAAQ,MAAM;IACd,YAAY,MAAM;IAClB;IACA;GACF,CAAC;EACH,CAAC,CAAC,CACD,KAAK;EACR,OAAO;GACL,GAAG,SAAS,cACT,QAAQ,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,EAAE,aAAa,KACnE;GACA,GAAG,CAAC,GAAG,MAAM,QAAQ,CAAC,CAAC,KAAK,UAC1B,QAAQ,wBACN,KAAA,GACA,OACA,QAAQ,sBAAsB,QAAQ,iBAAiB,KAAK,CAAC,GAC7D,QAAQ,oBAAoB,KAAK,MAAM,OAAO,CAChD,CACF;GACA,GAAG;EACL;CACF;GACD,mCAAA,iCAAA,CAAA,EAAD"}
|