@nestia/migrate 12.0.0-rc.4 → 12.0.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.
@@ -8,17 +8,18 @@ exports.NEST_TEMPLATE = {
8
8
  ".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\": \"Backend Test\",\n \"runtimeExecutable\": \"pnpm\",\n \"runtimeArgs\": [\"ttsx\", \"--project\", \"test/tsconfig.json\", \"test/index.ts\"],\n \"cwd\": \"${workspaceRoot}/packages/backend\",\n \"args\": [\n //----\n // You can run specific test functions\n //\n // If you want to include or exclude multiple words,\n // then separate them with space character\n //----\n // \"--include\", \"some-words-to-include\",\n // \"--exclude\", \"some-word another-word\",\n ],\n }\n ]\n}\n",
9
9
  ".vscode/settings.json": "{\n \"editor.tabSize\": 2\n}\n",
10
10
  "LICENSE": "MIT License\n\nCopyright (c) 2022 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",
11
- "README.md": "# Nestia Template\n## Outline\n[![Build Status](https://github.com/samchon/nestia-start/workflows/build/badge.svg)](https://github.com/samchon/nestia-start/actions?query=workflow%3Abuild)\n\nA template repository for backend projects using [nestia](https://github.com/samchon/nestia).\n\nYou can create a new project from this boilerplate by running below command:\n\n```bash\nnpx nestia start <directory>\n```\n\nFor reference, this is a minimal boilerplate project concentrating only on [nestia](https://github.com/samchon/nestia) SDK generation. \n\nIf you wanna much detailed boilerplate project, visit [`@samchon/backend`](https://github.com/samchon/backend).\n\n\n\n\n## Directories and Files\nThis template project is a [pnpm](https://pnpm.io) monorepo composed with two packages.\n\nBackend source files are placed into the [packages/backend/src](packages/backend/src) directory, and they are compiled by [`ttsc`](https://ttsc.dev) (TypeScript-Go toolchain supporting compiler-powered plugins like [typia](https://github.com/samchon/typia)) into the `lib` directory. Otherwise, client SDK library files generated by [nestia](https://github.com/samchon/nestia) are placed into the [packages/api](packages/api) directory, and they would be published to the npm registry as `@ORGANIZATION/PROJECT-api`.\n\n - [packages/api/](packages/api): SDK library published to the `@ORGANIZATION/PROJECT-api`\n - [**packages/api/src/functional/**](packages/api/src/functional/): API functions generated by the [`nestia`](https://github.com/samchon/nestia)\n - [**packages/api/src/structures/**](packages/api/src/structures/): DTO structures\n - [packages/backend/](packages/backend): Backend server package\n - [packages/backend/src/](packages/backend/src): Backend source directory\n - [packages/backend/src/controllers/](packages/backend/src/controllers/): Controller classes of the Main Program\n - [**packages/backend/test/**](packages/backend/test): Test Automation Program\n - [packages/backend/nestia.config.ts](packages/backend/nestia.config.ts): Configuration file of [`nestia`](https://github.com/samchon/nestia)\n - [packages/backend/tsconfig.json](packages/backend/tsconfig.json): TypeScript configuration for the main program\n - [pnpm-workspace.yaml](pnpm-workspace.yaml): Workspace and catalog configuration of [pnpm](https://pnpm.io)\n - [package.json](package.json): Root workspace configuration\n\n\n\n\n## PNPM Run Commands\nList of the run commands defined in the [packages/backend/package.json](packages/backend/package.json) are like below:\n\n - Test\n - **`test`**: Run test automation program\n - `benchmark`: Run performance benchmark program\n - Build\n - `build`: Build everything (SDK + main program)\n - `build:main`: Build main program (`src` directory)\n - `build:test` Type check test automation program (`test` directory)\n - `build:sdk`: Build SDK into the [packages/api](packages/api) directory\n - `build:swagger`: Build Swagger Documents\n - **`dev`**: Incremental type checking for development (test program)\n - Deploy\n - `start`: Start the backend server\n - `start:dev`: Start the backend server with incremental build and reload\n - `start:prod`: Start the backend server with the compiled `lib` directory\n - Webpack\n - `webpack`: Run webpack bundler\n - `webpack:start`: Start the backend server built by webpack\n - `webpack:test`: Run test program to the webpack built\n\nAlso, in the root directory, you can run below commands:\n\n - `build`: Build every package (`pnpm -r build`)\n - `test`: Run test automation program of the backend\n - `start`: Start the backend server\n - `lint`: Type check and lint every package with [`ttsc`](https://ttsc.dev)\n - `format`: Format every TypeScript file with [`ttsc format`](https://ttsc.dev)\n\nFor reference, TypeScript compiler options and [`@ttsc/lint`](https://ttsc.dev) rules are shared from the [config](config) workspace package. Each package extends [config/tsconfig.json](config/tsconfig.json) and spreads [config/lint.config.ts](config/lint.config.ts) in its own `lint.config.ts` file.\n\nTo publish the SDK library, run `npm publish` in the [packages/api](packages/api) directory. The `prepack` script would build everything before the publishing.\n\n\n\n\n## Specialization\nTransform this template project to be yours.\n\nWhen you've created a new backend project through this template project, you can specialize it to be suitable for you by changing some words. Replace below words through IDE specific function like `Edit > Replace in Files` (*Ctrl + Shift + H*), who've been supported by the VSCode.\n\n| Before | After\n|-----------------|----------------------------------------\n| ORGANIZATION | Your account or corporation name\n| PROJECT | Your own project name\n| AUTHOR | Author name\n| https://github.com/samchon/nestia-start | Your repository URL\n\n\n\n\n## Test Driven Development\nWith [nestia](https://github.com/samchon/nestia) helps to accomplish TDD (Test Driven Development). \n\nJust define DTOs and API controllers' methods (only declarations) first. After the definitions, and build SDK (Software Development Kit) through [nestia](https://github.com/samchon/nestia) (`pnpm build:sdk`). After buildling those SDK, develop test automation program using the SDK, following use-case scenarios in the framework of client side.\n\nDuring the test automation program development, you can find that which API is miss-designed or which requirement analysis is not exact. Development of the main program must be the last step after such validation process during TDD.\n\n> Visit the [samchon/backend](https://github.com/samchon/backend), then you may find much detailed story about this TDD.\n>\n> 1. Definitions\n> 2. SDK\n> 3. Test Automation Program\n> 4. Main Program\n\n```typescript\nimport {\n ArrayUtil,\n GaffComparator,\n RandomGenerator,\n TestValidator,\n} from \"@nestia/e2e\";\n\nimport api, { IBbsArticle, IPage } from \"@ORGANIZATION/PROJECT-api\";\n\nexport async function test_api_bbs_article_index_sort(\n connection: api.IConnection,\n): Promise<void> {\n // GENERATE 100 ARTICLES\n const section: string = \"general\";\n await ArrayUtil.asyncRepeat(100, () =>\n api.functional.bbs.articles.create(connection, {\n section,\n body: {\n writer: RandomGenerator.name(),\n title: RandomGenerator.paragraph(),\n body: RandomGenerator.content(),\n format: \"txt\",\n files: [],\n password: RandomGenerator.alphabets(8),\n },\n }),\n );\n\n // PREPARE VALIDATOR\n const validator = TestValidator.sort(\n \"BbsArticleProvider.index()\",\n async (sort: IPage.Sort<IBbsArticle.IRequest.SortableColumns>) => {\n const page: IPage<IBbsArticle.ISummary> =\n await api.functional.bbs.articles.index(connection, {\n section,\n body: {\n limit: 100,\n sort,\n },\n });\n return page.data;\n },\n );\n\n // DO VALIDATE\n const components = [\n validator(\"created_at\")(GaffComparator.dates((x) => x.created_at)),\n validator(\"updated_at\")(GaffComparator.dates((x) => x.updated_at)),\n validator(\"title\")(GaffComparator.strings((x) => x.title)),\n validator(\"writer\")(GaffComparator.strings((x) => x.writer)),\n validator(\n \"writer\",\n \"title\",\n )(GaffComparator.strings((x) => [x.writer, x.title])),\n ];\n for (const comp of components) {\n await comp(\"+\", false);\n await comp(\"-\", false);\n }\n}\n```\n\nFor reference, if you run `pnpm benchmark` command, your test functions defined in the [packages/backend/test/features/api](packages/backend/test/features/api) directory would be utilized for performance benchmarking. If you want to see the performance bench result earlier, visit below link please:\n\n - [packages/backend/docs/benchmarks/AMD Ryzen 9 7940HS w Radeon 780M Graphics.md](https://github.com/samchon/nestia-start/blob/master/packages/backend/docs/benchmarks/AMD%20Ryzen%209%207940HS%20w%20Radeon%20780M%20Graphics.md)\n",
11
+ "README.md": "# Nestia Template\n## Outline\n[![Build Status](https://github.com/samchon/nestia-start/workflows/build/badge.svg)](https://github.com/samchon/nestia-start/actions?query=workflow%3Abuild)\n\nA template repository for backend projects using [nestia](https://github.com/samchon/nestia).\n\nYou can create a new project from this boilerplate by running below command:\n\n```bash\npnpm dlx nestia start <directory>\n```\n\nFor reference, this is a minimal boilerplate project concentrating only on [nestia](https://github.com/samchon/nestia) SDK generation. \n\nIf you wanna much detailed boilerplate project, visit [`@samchon/backend`](https://github.com/samchon/backend).\n\n\n\n\n## Directories and Files\nThis template project is a [pnpm](https://pnpm.io) monorepo composed with two packages.\n\nBackend source files are placed into the [packages/backend/src](packages/backend/src) directory, and they are compiled by [`ttsc`](https://ttsc.dev) (TypeScript-Go toolchain supporting compiler-powered plugins like [typia](https://github.com/samchon/typia)) into the `lib` directory. Otherwise, client SDK library files generated by [nestia](https://github.com/samchon/nestia) are placed into the [packages/api](packages/api) directory, and they would be published to the npm registry as `@ORGANIZATION/PROJECT-api`.\n\n - [packages/api/](packages/api): SDK library published to the `@ORGANIZATION/PROJECT-api`\n - [**packages/api/src/functional/**](packages/api/src/functional/): API functions generated by the [`nestia`](https://github.com/samchon/nestia)\n - [**packages/api/src/structures/**](packages/api/src/structures/): DTO structures\n - [packages/backend/](packages/backend): Backend server package\n - [packages/backend/src/](packages/backend/src): Backend source directory\n - [packages/backend/src/controllers/](packages/backend/src/controllers/): Controller classes of the Main Program\n - [**packages/backend/test/**](packages/backend/test): Test Automation Program\n - [packages/backend/nestia.config.ts](packages/backend/nestia.config.ts): Configuration file of [`nestia`](https://github.com/samchon/nestia)\n - [packages/backend/tsconfig.json](packages/backend/tsconfig.json): TypeScript configuration for the main program\n - [pnpm-workspace.yaml](pnpm-workspace.yaml): Workspace and catalog configuration of [pnpm](https://pnpm.io)\n - [package.json](package.json): Root workspace configuration\n\n\n\n\n## PNPM Run Commands\nList of the run commands defined in the [packages/backend/package.json](packages/backend/package.json) are like below:\n\n - Test\n - **`test`**: Run test automation program\n - `benchmark`: Run performance benchmark program\n - Build\n - `build`: Build everything (SDK + main program)\n - `build:main`: Build main program (`src` directory)\n - `build:test` Type check test automation program (`test` directory)\n - `build:sdk`: Build SDK into the [packages/api](packages/api) directory\n - `build:swagger`: Build Swagger Documents\n - **`dev`**: Incremental type checking for development (test program)\n - Deploy\n - `start`: Start the backend server\n - `start:dev`: Start the backend server with incremental build and reload\n - `start:prod`: Start the backend server with the compiled `lib` directory\n - Webpack\n - `webpack`: Run webpack bundler\n - `webpack:start`: Start the backend server built by webpack\n - `webpack:test`: Run test program to the webpack built\n\nAlso, in the root directory, you can run below commands:\n\n - `build`: Build every package (`pnpm -r build`)\n - `test`: Run test automation program of the backend\n - `start`: Start the backend server\n - `lint`: Type check and lint every package with [`ttsc`](https://ttsc.dev)\n - `format`: Format every TypeScript file with [`ttsc format`](https://ttsc.dev)\n\nFor reference, TypeScript compiler options and [`@ttsc/lint`](https://ttsc.dev) rules are shared from the [config](config) workspace package. Each package extends [config/tsconfig.json](config/tsconfig.json) and spreads [config/lint.config.ts](config/lint.config.ts) in its own `lint.config.ts` file.\n\nTo publish the SDK library, run `pnpm publish` in the [packages/api](packages/api) directory. The `prepack` script would build everything before the publishing.\n\n\n\n\n## Specialization\nTransform this template project to be yours.\n\nWhen you've created a new backend project through this template project, you can specialize it to be suitable for you by changing some words. Replace below words through IDE specific function like `Edit > Replace in Files` (*Ctrl + Shift + H*), who've been supported by the VSCode.\n\n| Before | After\n|-----------------|----------------------------------------\n| ORGANIZATION | Your account or corporation name\n| PROJECT | Your own project name\n| AUTHOR | Author name\n| https://github.com/samchon/nestia-start | Your repository URL\n\n\n\n\n## Test Driven Development\nWith [nestia](https://github.com/samchon/nestia) helps to accomplish TDD (Test Driven Development). \n\nJust define DTOs and API controllers' methods (only declarations) first. After the definitions, and build SDK (Software Development Kit) through [nestia](https://github.com/samchon/nestia) (`pnpm build:sdk`). After buildling those SDK, develop test automation program using the SDK, following use-case scenarios in the framework of client side.\n\nDuring the test automation program development, you can find that which API is miss-designed or which requirement analysis is not exact. Development of the main program must be the last step after such validation process during TDD.\n\n> Visit the [samchon/backend](https://github.com/samchon/backend), then you may find much detailed story about this TDD.\n>\n> 1. Definitions\n> 2. SDK\n> 3. Test Automation Program\n> 4. Main Program\n\n```typescript\nimport {\n ArrayUtil,\n GaffComparator,\n RandomGenerator,\n TestValidator,\n} from \"@nestia/e2e\";\n\nimport api, { IBbsArticle, IPage } from \"@ORGANIZATION/PROJECT-api\";\n\nexport async function test_api_bbs_article_index_sort(\n connection: api.IConnection,\n): Promise<void> {\n // GENERATE 100 ARTICLES\n const section: string = \"general\";\n await ArrayUtil.asyncRepeat(100, () =>\n api.functional.bbs.articles.create(connection, {\n section,\n body: {\n writer: RandomGenerator.name(),\n title: RandomGenerator.paragraph(),\n body: RandomGenerator.content(),\n format: \"txt\",\n files: [],\n password: RandomGenerator.alphabets(8),\n },\n }),\n );\n\n // PREPARE VALIDATOR\n const validator = TestValidator.sort(\n \"BbsArticleProvider.index()\",\n async (sort: IPage.Sort<IBbsArticle.IRequest.SortableColumns>) => {\n const page: IPage<IBbsArticle.ISummary> =\n await api.functional.bbs.articles.index(connection, {\n section,\n body: {\n limit: 100,\n sort,\n },\n });\n return page.data;\n },\n );\n\n // DO VALIDATE\n const components = [\n validator(\"created_at\")(GaffComparator.dates((x) => x.created_at)),\n validator(\"updated_at\")(GaffComparator.dates((x) => x.updated_at)),\n validator(\"title\")(GaffComparator.strings((x) => x.title)),\n validator(\"writer\")(GaffComparator.strings((x) => x.writer)),\n validator(\n \"writer\",\n \"title\",\n )(GaffComparator.strings((x) => [x.writer, x.title])),\n ];\n for (const comp of components) {\n await comp(\"+\", false);\n await comp(\"-\", false);\n }\n}\n```\n\nFor reference, if you run `pnpm benchmark` command, your test functions defined in the [packages/backend/test/features/api](packages/backend/test/features/api) directory would be utilized for performance benchmarking. If you want to see the performance bench result earlier, visit below link please:\n\n - [packages/backend/docs/benchmarks/AMD Ryzen 9 7940HS w Radeon 780M Graphics.md](https://github.com/samchon/nestia-start/blob/master/packages/backend/docs/benchmarks/AMD%20Ryzen%209%207940HS%20w%20Radeon%20780M%20Graphics.md)\n",
12
12
  "config/lint.config.ts": "import type { ITtscLintConfig } from \"@ttsc/lint\";\n\nconst config = {\n format: {\n // Keep @ttsc/lint formatting aligned with the repository import groups.\n severity: \"off\",\n semi: true,\n singleQuote: false,\n arrowParens: \"always\",\n bracketSpacing: true,\n quoteProps: \"as-needed\",\n trailingComma: \"all\",\n printWidth: 80,\n tabWidth: 2,\n useTabs: false,\n endOfLine: \"lf\",\n sortImports: {\n order: [\n \"^@ORGANIZATION/PROJECT-api(.*)$\",\n \"^@/(.*)$\",\n \"<THIRD_PARTY_MODULES>\",\n \"^[./]\",\n ],\n },\n jsDoc: true,\n },\n rules: {\n // ESLint core: runtime correctness and low-noise modern JavaScript.\n \"default-param-last\": \"error\",\n eqeqeq: \"error\",\n \"for-direction\": \"error\",\n \"getter-return\": \"error\",\n \"grouped-accessor-pairs\": \"error\",\n \"guard-for-in\": \"error\",\n \"no-array-constructor\": \"error\",\n \"no-async-promise-executor\": \"error\",\n \"no-caller\": \"error\",\n \"no-case-declarations\": \"error\",\n \"no-class-assign\": \"error\",\n \"no-compare-neg-zero\": \"error\",\n \"no-cond-assign\": \"error\",\n \"no-constructor-return\": \"error\",\n \"no-debugger\": \"error\",\n \"no-delete-var\": \"error\",\n \"no-dupe-args\": \"error\",\n \"no-dupe-class-members\": \"error\",\n \"no-dupe-else-if\": \"error\",\n \"no-dupe-keys\": \"error\",\n \"no-duplicate-case\": \"error\",\n \"no-duplicate-imports\": \"error\",\n \"no-empty-character-class\": \"error\",\n \"no-empty-pattern\": \"error\",\n \"no-empty-static-block\": \"error\",\n \"no-eval\": \"error\",\n \"no-ex-assign\": \"error\",\n \"no-extend-native\": \"error\",\n \"no-extra-bind\": \"error\",\n \"no-extra-boolean-cast\": \"error\",\n \"no-fallthrough\": \"error\",\n \"no-func-assign\": \"error\",\n \"no-import-assign\": \"error\",\n \"no-inner-declarations\": \"error\",\n \"no-invalid-this\": \"error\",\n \"no-irregular-whitespace\": \"error\",\n \"no-iterator\": \"error\",\n \"no-loss-of-precision\": \"error\",\n \"no-multi-assign\": \"error\",\n \"no-multi-str\": \"error\",\n \"no-new-func\": \"error\",\n \"no-new-symbol\": \"error\",\n \"no-new-wrappers\": \"error\",\n \"no-obj-calls\": \"error\",\n \"no-object-constructor\": \"error\",\n \"no-octal\": \"error\",\n \"no-octal-escape\": \"error\",\n \"no-promise-executor-return\": \"error\",\n \"no-proto\": \"error\",\n \"no-prototype-builtins\": \"error\",\n \"no-redeclare\": \"error\",\n \"no-regex-spaces\": \"error\",\n \"no-return-assign\": \"error\",\n \"no-script-url\": \"error\",\n \"no-self-assign\": \"error\",\n \"no-self-compare\": \"error\",\n \"no-sequences\": \"error\",\n \"no-setter-return\": \"error\",\n \"no-shadow-restricted-names\": \"error\",\n \"no-sparse-arrays\": \"error\",\n \"no-template-curly-in-string\": \"error\",\n \"no-this-before-super\": \"error\",\n \"no-unreachable\": \"error\",\n \"no-unsafe-finally\": \"error\",\n \"no-unsafe-negation\": \"error\",\n \"no-unused-labels\": \"error\",\n \"no-useless-assignment\": \"error\",\n \"no-useless-call\": \"error\",\n \"no-useless-catch\": \"error\",\n \"no-useless-computed-key\": \"error\",\n \"no-useless-escape\": \"error\",\n \"no-useless-rename\": \"error\",\n \"no-var\": \"error\",\n \"no-with\": \"error\",\n \"prefer-const\": \"error\",\n radix: \"error\",\n \"use-isnan\": \"error\",\n \"valid-typeof\": \"error\",\n\n // RegExp: invalid, empty, or misleading regular-expression structure.\n \"regexp/no-dupe-characters-character-class\": \"error\",\n \"regexp/no-empty-alternative\": \"error\",\n \"regexp/no-empty-capturing-group\": \"error\",\n \"regexp/no-empty-group\": \"error\",\n \"regexp/no-empty-lookarounds-assertion\": \"error\",\n \"regexp/no-useless-character-class\": \"error\",\n \"regexp/no-useless-escape\": \"error\",\n \"regexp/no-useless-flag\": \"error\",\n \"regexp/no-useless-quantifier\": \"error\",\n \"regexp/no-useless-two-nums-quantifier\": \"error\",\n \"regexp/no-zero-quantifier\": \"error\",\n \"regexp/sort-flags\": \"error\",\n\n // Promise: chain shapes that can swallow or misroute async errors.\n \"promise/no-multiple-resolved\": \"error\",\n \"promise/no-new-statics\": \"error\",\n \"promise/no-return-in-finally\": \"error\",\n \"promise/no-return-wrap\": \"error\",\n \"promise/param-names\": \"error\",\n \"promise/prefer-catch\": \"error\",\n \"promise/spec-only\": \"error\",\n\n // Security: concrete sink patterns with a low false-positive rate here.\n \"security/detect-bidi-characters\": \"error\",\n \"security/detect-buffer-noassert\": \"error\",\n \"security/detect-eval-with-expression\": \"error\",\n \"security/detect-new-buffer\": \"error\",\n \"security/detect-pseudoRandomBytes\": \"error\",\n \"security/detect-unsafe-regex\": \"error\",\n\n // TypeScript: type-aware correctness rules.\n \"typescript/adjacent-overload-signatures\": \"error\",\n \"typescript/await-thenable\": \"error\",\n \"typescript/ban-ts-comment\": \"error\",\n \"typescript/ban-tslint-comment\": \"error\",\n \"typescript/no-array-delete\": \"error\",\n \"typescript/no-confusing-non-null-assertion\": \"error\",\n \"typescript/no-duplicate-enum-values\": \"error\",\n \"typescript/no-extra-non-null-assertion\": \"error\",\n \"typescript/no-floating-promises\": \"error\",\n \"typescript/no-for-in-array\": \"error\",\n \"typescript/no-invalid-void-type\": \"error\",\n \"typescript/no-misused-new\": \"error\",\n \"typescript/no-misused-promises\": \"error\",\n \"typescript/no-misused-spread\": \"error\",\n \"typescript/no-mixed-enums\": \"error\",\n \"typescript/no-non-null-asserted-nullish-coalescing\": \"error\",\n \"typescript/no-non-null-asserted-optional-chain\": \"error\",\n \"typescript/no-redundant-type-constituents\": \"error\",\n \"typescript/no-unnecessary-type-constraint\": \"error\",\n \"typescript/no-unsafe-declaration-merging\": \"error\",\n \"typescript/no-unsafe-function-type\": \"error\",\n \"typescript/no-unsafe-unary-minus\": \"error\",\n \"typescript/no-wrapper-object-types\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/prefer-as-const\": \"error\",\n \"typescript/prefer-promise-reject-errors\": \"error\",\n \"typescript/require-array-sort-compare\": \"error\",\n \"typescript/switch-exhaustiveness-check\": \"error\",\n \"typescript/triple-slash-reference\": \"error\",\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n\n // Unicorn: correctness-oriented runtime/API traps, not broad style policy.\n \"unicorn/error-message\": \"error\",\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-await-in-promise-methods\": \"error\",\n \"unicorn/no-empty-file\": \"error\",\n \"unicorn/no-invalid-fetch-options\": \"error\",\n \"unicorn/no-invalid-remove-event-listener\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-thenable\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n },\n} satisfies ITtscLintConfig;\n\nexport default config;\n",
13
- "config/package.json": "{\n \"private\": true,\n \"name\": \"@ORGANIZATION/PROJECT-config\",\n \"version\": \"0.1.0\",\n \"description\": \"Shared TypeScript and @ttsc/lint configuration for the workspace\",\n \"files\": [\n \"lint.config.ts\",\n \"tsconfig.json\"\n ],\n \"devDependencies\": {\n \"@ttsc/lint\": \"catalog:typescript\",\n \"typescript\": \"catalog:typescript\"\n }\n}",
13
+ "config/package.json": "{\n \"private\": true,\n \"name\": \"@ORGANIZATION/PROJECT-config\",\n \"version\": \"0.1.0\",\n \"description\": \"Shared TypeScript and @ttsc/lint configuration for the workspace\",\n \"files\": [\n \"lint.config.ts\",\n \"rolldown.config.mjs\",\n \"tsconfig.json\"\n ],\n \"devDependencies\": {\n \"@ttsc/lint\": \"catalog:typescript\",\n \"@ttsc/unplugin\": \"catalog:typescript\",\n \"tinyglobby\": \"^0.2.12\",\n \"typescript\": \"catalog:typescript\"\n }\n}",
14
+ "config/rolldown.config.mjs": "import ttsc from \"@ttsc/unplugin/rolldown\";\nimport path from \"node:path\";\nimport { globSync } from \"tinyglobby\";\n\n// The `.mjs` build feeds the TypeScript sources straight to rolldown, which\n// transpiles them natively; `@ttsc/unplugin` applies the project's ttsc\n// plugins on the way in. `preserveModules` keeps the 1:1 module layout, so\n// every `lib/<path>.js` from the main ttsc build gets a genuine ESM twin at\n// `lib/<path>.mjs` — named exports intact, no facade chunks, no CommonJS\n// transcoding. Everything outside `src/` is an external module.\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",
14
15
  "config/tsconfig.json": "{\n \"compilerOptions\": {\n \"target\": \"esnext\",\n \"lib\": [\"DOM\", \"ESNext\"],\n \"module\": \"nodenext\",\n \"moduleResolution\": \"nodenext\",\n \"types\": [\"*\"],\n \"resolveJsonModule\": true,\n \"sourceMap\": true,\n \"newLine\": \"lf\",\n \"esModuleInterop\": true,\n \"forceConsistentCasingInFileNames\": true,\n \"strict\": true,\n \"noImplicitReturns\": true,\n \"noUncheckedIndexedAccess\": true,\n \"skipLibCheck\": true,\n }\n}\n",
15
16
  "package.json": "{\n \"private\": true,\n \"name\": \"@ORGANIZATION/PROJECT\",\n \"version\": \"0.1.0\",\n \"description\": \"Starter kit of Nestia\",\n \"scripts\": {\n \"build\": \"pnpm -r --if-present build\",\n \"dev\": \"pnpm -C packages/backend dev\",\n \"format\": \"pnpm -r --if-present format\",\n \"lint\": \"pnpm -r --if-present lint\",\n \"start\": \"pnpm -C packages/backend start\",\n \"test\": \"pnpm -C packages/backend test\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia-start\"\n },\n \"keywords\": [\n \"nestia\",\n \"template\",\n \"boilerplate\"\n ],\n \"author\": \"AUTHOR\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\n },\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\n \"packageManager\": \"pnpm@10.10.0\",\n \"stackblitz\": {\n \"startCommand\": \"pnpm install && pnpm test -- --simultaneous 1\"\n }\n}",
16
17
  "packages/api/.gitignore": "lib/\nnode_modules/\n\nswagger.json\nopenai.json",
17
18
  "packages/api/LICENSE": "MIT License\n\nCopyright (c) 2021 ORGANIZATION\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.",
18
19
  "packages/api/README.md": "# SDK Library\nThis is a SDK library generated by [`nestia`](https://nestia.io).\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![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)\n\n> Left is server code, and right is client code utilizing the SDK\n\n\n\n\n# What [`Nestia`](https://nestia.io) is:\n![Nestia Logo](https://nestia.io/logo.png)\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE)\n[![npm version](https://img.shields.io/npm/v/@nestia/core.svg)](https://www.npmjs.com/package/@nestia/core)\n[![Downloads](https://img.shields.io/npm/dm/@nestia/core.svg)](https://www.npmjs.com/package/@nestia/core)\n[![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)\n[![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/)\n\nNestia 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`: 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",
19
20
  "packages/api/lint.config.ts": "import type { ITtscLintConfig } from \"@ttsc/lint\";\n\nexport default {\n extends: \"../../config/lint.config.ts\",\n ignores: [\"src/functional/**/*.ts\"],\n} satisfies ITtscLintConfig;\n",
20
- "packages/api/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 },\n \"scripts\": {\n \"build\": \"pnpm build:sdk && pnpm build:ttsc && pnpm build:rollup\",\n \"build:sdk\": \"cd ../backend && pnpm build:sdk\",\n \"build:ttsc\": \"ttsc -p tsconfig.json\",\n \"build:rollup\": \"rollup -c\",\n \"format\": \"ttsc format -p tsconfig.json\",\n \"lint\": \"ttsc -p tsconfig.json --noEmit\",\n \"prepack\": \"pnpm build\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia-start\"\n },\n \"author\": \"AUTHOR\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\n },\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\n \"files\": [\n \"lib\",\n \"package.json\",\n \"swagger.json\",\n \"README.md\"\n ],\n \"dependencies\": {\n \"@nestia/fetcher\": \"catalog:samchon\",\n \"tgrid\": \"catalog:samchon\",\n \"typia\": \"catalog:samchon\"\n },\n \"devDependencies\": {\n \"@rollup/plugin-terser\": \"^0.4.4\",\n \"@ttsc/lint\": \"catalog:typescript\",\n \"@ttsc/paths\": \"catalog:typescript\",\n \"rollup\": \"^4.18.0\",\n \"ttsc\": \"catalog:typescript\",\n \"typescript\": \"catalog:typescript\"\n },\n \"publishConfig\": {\n \"main\": \"./lib/index.js\",\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 }\n }\n}",
21
- "packages/api/rollup.config.js": "const fs = require(\"fs\");\nconst os = require(\"os\");\nconst path = require(\"path\");\nconst terser = require(\"@rollup/plugin-terser\");\nconst { TtscCompiler } = require(\"ttsc\");\n\nconst PROJECT_DIR = __dirname;\nconst VIRTUAL_PREFIX = \"\\0ttsc:\";\n\nconst normalize = (file) => file.replace(/\\\\/g, \"/\");\n\nconst compileProject = () => {\n const directory = fs.mkdtempSync(path.join(os.tmpdir(), \"project-api-rollup-\"));\n const config = path.join(directory, \"tsconfig.json\");\n\n fs.writeFileSync(\n config,\n JSON.stringify(\n {\n extends: normalize(path.join(PROJECT_DIR, \"tsconfig.json\")),\n compilerOptions: {\n declaration: false,\n declarationMap: false,\n module: \"ESNext\",\n moduleResolution: \"bundler\",\n plugins: [\n {\n transform: \"@ttsc/lint\",\n configFile: normalize(path.join(PROJECT_DIR, \"lint.config.ts\")),\n },\n ],\n target: \"ESNext\",\n },\n },\n null,\n 2,\n ),\n );\n\n try {\n const result = new TtscCompiler({\n cwd: PROJECT_DIR,\n projectRoot: PROJECT_DIR,\n tsconfig: config,\n }).compile();\n\n if (result.type === \"exception\") {\n throw new Error(\n result.error instanceof Error ? result.error.message : String(result.error),\n );\n }\n if (result.type === \"failure\") {\n throw new Error(\n result.diagnostics\n .map((d) =>\n [d.file, d.line, d.character, d.messageText]\n .filter((v) => v !== null && v !== undefined && v !== \"\")\n .join(\":\"),\n )\n .join(\"\\n\"),\n );\n }\n return result.output;\n } finally {\n fs.rmSync(directory, { recursive: true, force: true });\n }\n};\n\nconst ttscMemory = () => {\n let output = {};\n\n const resolve = (source, importer) => {\n if (source === \"lib/index.js\") {\n return \"lib/index.js\";\n }\n if (importer === undefined || source.startsWith(\".\") === false) {\n return null;\n }\n\n const base = path.posix.normalize(\n path.posix.join(path.posix.dirname(importer), normalize(source)),\n );\n const candidates = [\n base.endsWith(\".js\") ? base : `${base}.js`,\n path.posix.join(base, \"index.js\"),\n ];\n return candidates.find((key) => output[key] !== undefined) ?? null;\n };\n\n return {\n name: \"ttsc-memory\",\n buildStart: () => {\n output = compileProject();\n },\n resolveId: (source, importer) => {\n const key = resolve(\n source,\n importer?.startsWith(VIRTUAL_PREFIX)\n ? importer.slice(VIRTUAL_PREFIX.length)\n : importer,\n );\n return key === null ? null : `${VIRTUAL_PREFIX}${key}`;\n },\n load: (id) => {\n if (id.startsWith(VIRTUAL_PREFIX) === false) {\n return null;\n }\n\n const key = id.slice(VIRTUAL_PREFIX.length);\n const code = output[key];\n if (code === undefined) {\n return null;\n }\n\n const map = output[`${key}.map`];\n return {\n code: code.replace(/\\n?\\/\\/# sourceMappingURL=.*$/u, \"\"),\n map: map === undefined ? null : JSON.parse(map),\n };\n },\n };\n};\n\nmodule.exports = {\n external: (id) =>\n id.startsWith(VIRTUAL_PREFIX) === false &&\n id.startsWith(\".\") === false &&\n id.startsWith(\"/\") === false &&\n /^[\\w@]/u.test(id),\n output: {\n dir: `${PROJECT_DIR}/lib`,\n entryFileNames: \"[name].mjs\",\n format: \"esm\",\n sourcemap: true,\n },\n input: {\n index: \"lib/index.js\",\n },\n plugins: [\n ttscMemory(),\n terser({\n format: {\n comments: \"some\",\n beautify: true,\n ecma: \"2020\",\n },\n compress: false,\n mangle: false,\n module: true,\n }),\n ],\n};\n",
21
+ "packages/api/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 },\n \"scripts\": {\n \"build\": \"pnpm build:sdk && pnpm build:ttsc && pnpm build:rolldown\",\n \"build:sdk\": \"cd ../backend && pnpm build:sdk\",\n \"build:ttsc\": \"ttsc -p tsconfig.json\",\n \"build:rolldown\": \"rolldown -c\",\n \"format\": \"ttsc format -p tsconfig.json\",\n \"lint\": \"ttsc -p tsconfig.json --noEmit\",\n \"prepack\": \"pnpm build\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia-start\"\n },\n \"author\": \"AUTHOR\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\n },\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\n \"files\": [\n \"lib\",\n \"package.json\",\n \"swagger.json\",\n \"README.md\"\n ],\n \"dependencies\": {\n \"@nestia/fetcher\": \"catalog:samchon\",\n \"tgrid\": \"catalog:samchon\",\n \"typia\": \"catalog:samchon\"\n },\n \"devDependencies\": {\n \"@ORGANIZATION/PROJECT-api\": \"workspace:*\",\n \"@ttsc/lint\": \"catalog:typescript\",\n \"rolldown\": \"catalog:rolldown\",\n \"ttsc\": \"catalog:typescript\",\n \"typescript\": \"catalog:typescript\"\n },\n \"publishConfig\": {\n \"main\": \"./lib/index.js\",\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 }\n }\n}",
22
+ "packages/api/rolldown.config.mjs": "export { default } from \"../../config/rolldown.config.mjs\";\n",
22
23
  "packages/api/scripts/ensure-nestia-exports.cjs": "const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst root = path.resolve(__dirname, \"..\");\n\nconst files = {\n \"src/index.ts\": `import * as api from \"./module\";\n\nexport type * from \"./IConnection\";\nexport type * from \"./Primitive\";\nexport type * from \"./Resolved\";\nexport * from \"./HttpError\";\n\nexport * from \"./structures\";\n\nexport * as functional from \"./functional/index\";\n\nexport default api;\n`,\n \"src/module.ts\": `export type * from \"./IConnection\";\nexport type * from \"./Primitive\";\nexport type * from \"./Resolved\";\nexport * from \"./HttpError\";\n\nexport * from \"./structures\";\n\nexport * as functional from \"./functional/index\";\n`,\n};\n\nfor (const [relative, content] of Object.entries(files)) {\n const file = path.join(root, relative);\n fs.mkdirSync(path.dirname(file), { recursive: true });\n if (fs.existsSync(file) && fs.readFileSync(file, \"utf8\") === content) continue;\n fs.writeFileSync(file, content, \"utf8\");\n}\n\nconst functional = path.join(root, \"src\", \"functional\", \"index.ts\");\nif (!fs.existsSync(functional)) {\n fs.mkdirSync(path.dirname(functional), { recursive: true });\n fs.writeFileSync(functional, \"export {};\\n\", \"utf8\");\n}\n",
23
24
  "packages/api/src/HttpError.ts": "export { HttpError } from \"@nestia/fetcher\";\n",
24
25
  "packages/api/src/IConnection.ts": "export type { IConnection } from \"@nestia/fetcher\";\n",
@@ -26,7 +27,7 @@ exports.NEST_TEMPLATE = {
26
27
  "packages/api/src/Resolved.ts": "export type { Resolved } from \"typia\";\n",
27
28
  "packages/api/src/index.ts": "import * as api from \"./module\";\nexport * from \"./module\";\n\nexport default api;\n",
28
29
  "packages/api/src/module.ts": "export type * from \"./IConnection\";\nexport type * from \"./Primitive\";\nexport type * from \"./Resolved\";\nexport * from \"./HttpError\";\n\nexport * from \"./structures\";\n\nexport * as functional from \"./functional/index\";\n",
29
- "packages/api/tsconfig.json": "{\n \"extends\": \"../../config/tsconfig.json\",\n \"compilerOptions\": {\n \"declaration\": true,\n \"stripInternal\": true,\n \"outDir\": \"lib\",\n \"rootDir\": \"src\",\n \"paths\": {\n \"@ORGANIZATION/PROJECT-api\": [\"./src\"]\n },\n \"experimentalDecorators\": true,\n \"emitDecoratorMetadata\": true\n },\n \"include\": [\"src\"]\n}\n",
30
+ "packages/api/tsconfig.json": "{\n \"extends\": \"../../config/tsconfig.json\",\n \"compilerOptions\": {\n \"declaration\": true,\n \"stripInternal\": true,\n \"outDir\": \"lib\",\n \"rootDir\": \"src\",\n \"experimentalDecorators\": true,\n \"emitDecoratorMetadata\": true\n },\n \"include\": [\"src\"]\n}\n",
30
31
  "packages/backend/.env.local": "API_PORT=37001",
31
32
  "packages/backend/build/env.js": "const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst env = path.join(__dirname, \"../.env\");\nconst local = path.join(__dirname, \"../.env.local\");\n\nif (fs.existsSync(env) === false) fs.copyFileSync(local, env);\n",
32
33
  "packages/backend/docs/benchmarks/AMD Ryzen 9 7940HS w Radeon 780M Graphics.md": "# Benchmark Report\n> Generated by [`@nestia/benchmark`](https://github.com/samchon/nestia)\n\n - Specifications\n - CPU: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics \n - RAM: 31 GB\n - NodeJS Version: v20.10.0\n - Backend Server: 1 core / 1 thread\n - Arguments\n - Count: 40,000\n - Threads: 4\n - Simultaneous: 32\n - Time\n - Start: 2024-10-29T19:14:35.941Z\n - Complete: 2024-10-29T19:16:11.418Z\n - Elapsed: 95,477 ms\n\nType | Count | Success | Mean. | Stdev. | Minimum | Maximum\n----|----|----|----|----|----|----\nTotal | 41,586 | 41,586 | 69.24 | 73.05 | 5 | 546\n\n> Unit: milliseconds\n\n## Memory Consumptions\n```mermaid\nxychart-beta\n x-axis \"Time (second)\"\n y-axis \"Memory (MB)\"\n line \"Resident Set Size\" [122, 156, 159, 142, 154, 165, 184, 185, 187, 189, 200, 205, 209, 217, 221, 225, 229, 224, 230, 235, 242, 250, 256, 262, 267, 272, 234, 237, 249, 259, 266, 273, 285, 292, 291, 216, 225, 235, 243, 200, 208, 214, 186, 186, 171, 177, 187, 199, 185, 192, 205, 171, 180, 158, 170, 179, 163, 163, 176, 188, 193, 202, 213, 219, 230, 239, 256, 265, 283, 301, 240, 249, 257, 267, 284, 282, 290, 202, 213, 166, 178, 188, 200, 203, 208, 180, 191, 199, 175]\n line \"Heap Total\" [85, 116, 120, 103, 114, 124, 146, 146, 147, 148, 158, 166, 170, 176, 180, 184, 187, 185, 190, 195, 203, 211, 217, 222, 225, 229, 194, 197, 209, 218, 225, 232, 241, 249, 247, 176, 185, 194, 202, 160, 168, 173, 146, 146, 130, 136, 146, 158, 145, 151, 165, 129, 139, 116, 128, 137, 120, 123, 136, 148, 152, 161, 172, 179, 189, 198, 215, 223, 241, 257, 200, 209, 216, 227, 244, 242, 249, 163, 174, 127, 136, 147, 159, 162, 166, 138, 150, 158, 132]\n line \"Heap Used + External\" [69, 94, 62, 82, 88, 107, 71, 83, 93, 107, 136, 72, 76, 85, 92, 106, 139, 48, 68, 69, 86, 95, 108, 116, 140, 175, 67, 74, 88, 112, 125, 136, 142, 169, 180, 91, 104, 105, 121, 60, 71, 91, 64, 74, 86, 110, 121, 135, 76, 82, 103, 70, 93, 66, 91, 107, 76, 75, 95, 101, 115, 127, 136, 154, 165, 168, 196, 193, 214, 232, 84, 94, 101, 118, 145, 147, 149, 86, 96, 72, 90, 112, 126, 133, 132, 78, 87, 107, 88]\n line \"Heap Used Only\" [66, 89, 59, 78, 83, 100, 68, 79, 88, 101, 129, 68, 72, 80, 86, 100, 131, 45, 64, 65, 81, 90, 103, 110, 133, 168, 64, 71, 84, 108, 120, 130, 136, 162, 173, 88, 100, 101, 117, 58, 68, 87, 61, 71, 83, 107, 118, 130, 73, 79, 99, 67, 89, 63, 88, 103, 74, 72, 91, 98, 111, 123, 132, 149, 160, 163, 190, 187, 208, 225, 81, 90, 97, 114, 140, 143, 145, 83, 93, 70, 87, 108, 122, 130, 128, 76, 84, 104, 85]\n```\n\n> - 🟦 Resident Set Size\n> - 🟢 Heap Total\n> - 🔴 Heap Used + External\n> - 🟡 Heap Used Only\n\n## Endpoints\nType | Count | Success | Mean. | Stdev. | Minimum | Maximum\n----|----|----|----|----|----|----\nPATCH /bbs/articles/:section | 6,439 | 6,439 | 108.37 | 76.56 | 6 | 546\nPUT /bbs/articles/:section/:id | 380 | 380 | 78.52 | 69.03 | 6 | 296\nGET /bbs/articles/:section/:id | 917 | 917 | 77.65 | 69.84 | 6 | 463\nDELETE /bbs/articles/:section/:id | 201 | 201 | 73.89 | 63.55 | 7 | 307\nPOST /bbs/articles/:section | 33,649 | 33,649 | 61.39 | 70.04 | 5 | 546\n\n> Unit: milliseconds\n\n## Failures\nMethod | Path | Count | Failures\n-------|------|-------|----------",
@@ -51,7 +52,7 @@ exports.NEST_TEMPLATE = {
51
52
  "packages/backend/test/webpack.ts": "import { DynamicExecutor } from \"@nestia/e2e\";\nimport cp from \"node:child_process\";\nimport { sleep_for } from \"tstl\";\n\nimport { MyConfiguration } from \"../src/MyConfiguration\";\nimport { MyGlobal } from \"../src/MyGlobal\";\nimport { TestAutomation } from \"./helpers/TestAutomation\";\nimport { TestAutomationStdio } from \"./helpers/TestAutomationStdio\";\n\nconst wait = async (): Promise<void> => {\n while (true)\n try {\n await fetch(`http://localhost:${MyConfiguration.API_PORT()}/dsafdsafsd`);\n return;\n } catch (exp) {\n await sleep_for(100);\n }\n};\n\nconst main = async (): Promise<void> => {\n MyGlobal.testing = true;\n\n const report: DynamicExecutor.IReport = await TestAutomation.execute({\n open: async () => {\n const backend: cp.ChildProcess = cp.fork(\n `${MyConfiguration.ROOT}/dist/server.js`,\n {\n cwd: `${MyConfiguration.ROOT}/dist`,\n },\n );\n await wait();\n return backend;\n },\n close: async (backend) => {\n backend.kill();\n },\n options: await TestAutomationStdio.getOptions(),\n onComplete: TestAutomationStdio.onComplete,\n });\n TestAutomationStdio.report(report);\n};\nmain().catch((exp: unknown) => {\n console.log(exp);\n process.exit(-1);\n});\n",
52
53
  "packages/backend/tsconfig.json": "{\n \"extends\": \"../../config/tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"lib\",\n \"rootDir\": \"src\",\n \"experimentalDecorators\": true,\n \"emitDecoratorMetadata\": true\n },\n \"include\": [\"src\"]\n}\n",
53
54
  "packages/backend/webpack.config.js": "const path = require(\"path\");\n\nconst CopyWebpackPlugin = require(\"copy-webpack-plugin\");\nconst WriteFilePlugin = require(\"write-file-webpack-plugin\");\nconst { IgnorePlugin } = require(\"webpack\");\n\nconst lazyImports = [\n \"@modelcontextprotocol/sdk\",\n \"@fastify/static\",\n \"@fastify/view\",\n \"@nestjs/microservices\",\n \"@nestjs/websockets\",\n \"class-transformer\",\n \"class-validator\",\n];\n\n// @reference https://tech-blog.s-yoshiki.com/entry/297\nmodule.exports = {\n // CUSTOMIZE HERE\n entry: {\n server: \"./lib/executable/server.js\",\n },\n output: {\n path: path.join(__dirname, \"dist\"),\n filename: \"[name].js\",\n },\n optimization: {\n minimize: true,\n },\n\n // JUST KEEP THEM\n mode: \"production\",\n target: \"node\",\n plugins: [\n new CopyWebpackPlugin({\n patterns: [\n {\n from: \".env\",\n to: \"[name][ext]\",\n },\n ],\n }),\n new WriteFilePlugin(),\n new IgnorePlugin({\n checkResource: (resource) => {\n if (lazyImports.some((modulo) => resource.startsWith(modulo))) {\n try {\n require.resolve(resource);\n } catch (err) {\n return true;\n }\n }\n return false;\n },\n }),\n ],\n};\n",
54
- "pnpm-workspace.yaml": "packages:\n - \"config\"\n - \"packages/*\"\ncatalogs:\n samchon:\n nestia: &nestia ^12.0.0-rc.3\n \"@nestia/benchmark\": *nestia\n \"@nestia/core\": *nestia\n \"@nestia/e2e\": *nestia\n \"@nestia/fetcher\": *nestia\n \"@nestia/sdk\": *nestia\n tgrid: ^1.2.1\n tstl: ^3.0.0\n typia: ^13.0.1\n utils:\n rimraf: ^6.1.3\n uuid: ^13.0.0\n typescript:\n ttsc: &ttsc ^0.18.1\n \"@ttsc/lint\": *ttsc\n \"@ttsc/paths\": *ttsc\n \"@ttsc/unplugin\": *ttsc\n typescript: ^7.0.2\n",
55
+ "pnpm-workspace.yaml": "packages:\n - \"config\"\n - \"packages/*\"\ncatalogs:\n samchon:\n \"@nestia/benchmark\": ^12.0.0\n \"@nestia/core\": ^12.0.0\n \"@nestia/e2e\": ^12.0.0\n \"@nestia/fetcher\": ^12.0.0\n \"@nestia/sdk\": ^12.0.0\n nestia: ^12.0.0\n tgrid: ^1.2.1\n tstl: ^3.0.0\n typia: ^13.0.2\n rolldown:\n rolldown: ^1.1.5\n utils:\n rimraf: ^6.1.3\n uuid: ^13.0.0\n typescript:\n \"@ttsc/lint\": ^0.18.2\n \"@ttsc/paths\": ^0.18.2\n \"@ttsc/unplugin\": ^0.18.4\n ttsc: ^0.18.4\n typescript: ^7.0.2\n",
55
56
  "typos.toml": "[default]\nlocale = 'en-us'\nextend-ignore-re = [\n \"(?Rm)^.*(<!--|#|//)\\\\s*spellchecker:disable-line(-->|\\n)?$\",\n \"(?s)(<!--|#|//)\\\\s*spellchecker:off\\\\s*(-->|\\n).*?(<!--|#|//)\\\\s*spellchecker:on\",\n]\n\n[default.extend-words]\nJeongho = \"Jeongho\"\nNam = \"Nam\"\ntypia = \"typia\"\n\n[files]\nextend-exclude = [\"*.json\"]"
56
57
  };
57
58
  //# sourceMappingURL=NEST_TEMPLATE.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NEST_TEMPLATE.js","sourceRoot":"","sources":["../../src/bundles/NEST_TEMPLATE.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAA2B;IACnD,6BAA6B,EAAE,scAAsc;IACre,6BAA6B,EAAE,oQAAoQ;IACnS,YAAY,EAAE,8EAA8E;IAC5F,qBAAqB,EAAE,s5BAAs5B;IAC76B,uBAAuB,EAAE,iCAAiC;IAC1D,SAAS,EAAE,ukCAAukC;IACllC,WAAW,EAAE,w+PAAw+P;IACr/P,uBAAuB,EAAE,23OAA23O;IACp5O,qBAAqB,EAAE,8XAA8X;IACrZ,sBAAsB,EAAE,gfAAgf;IACxgB,cAAc,EAAE,q+BAAq+B;IACr/B,yBAAyB,EAAE,kDAAkD;IAC7E,sBAAsB,EAAE,skCAAskC;IAC9lC,wBAAwB,EAAE,6gEAA6gE;IACviE,6BAA6B,EAAE,iMAAiM;IAChO,2BAA2B,EAAE,iuDAAiuD;IAC9vD,+BAA+B,EAAE,02HAA02H;IAC34H,gDAAgD,EAAE,uuCAAuuC;IACzxC,+BAA+B,EAAE,kDAAkD;IACnF,iCAAiC,EAAE,yDAAyD;IAC5F,+BAA+B,EAAE,6CAA6C;IAC9E,8BAA8B,EAAE,4CAA4C;IAC5E,2BAA2B,EAAE,0FAA0F;IACvH,4BAA4B,EAAE,4OAA4O;IAC1Q,4BAA4B,EAAE,yXAAyX;IACvZ,6BAA6B,EAAE,gBAAgB;IAC/C,+BAA+B,EAAE,4OAA4O;IAC7Q,+EAA+E,EAAE,4pGAA4pG;IAC7uG,iCAAiC,EAAE,uJAAuJ;IAC1L,gCAAgC,EAAE,8OAA8O;IAChR,mCAAmC,EAAE,8iBAA8iB;IACnlB,+BAA+B,EAAE,m1GAAm1G;IACp3G,mCAAmC,EAAE,mpCAAmpC;IACxrC,yCAAyC,EAAE,shBAAshB;IACjkB,kCAAkC,EAAE,6lBAA6lB;IACjoB,2CAA2C,EAAE,miBAAmiB;IAChlB,4CAA4C,EAAE,27BAA27B;IACz+B,yCAAyC,EAAE,4PAA4P;IACvS,uCAAuC,EAAE,sTAAsT;IAC/V,0CAA0C,EAAE,8vHAA8vH;IAC1yH,4CAA4C,EAAE,kbAAkb;IAChe,iDAAiD,EAAE,i4GAAi4G;IACp7G,iDAAiD,EAAE,qsDAAqsD;IACxvD,sDAAsD,EAAE,mlEAAmlE;IAC3oE,gCAAgC,EAAE,60BAA60B;IAC/2B,qCAAqC,EAAE,iKAAiK;IACxM,kCAAkC,EAAE,2xCAA2xC;IAC/zC,gCAAgC,EAAE,mPAAmP;IACrR,oCAAoC,EAAE,8xCAA8xC;IACp0C,qBAAqB,EAAE,2gBAA2gB;IACliB,YAAY,EAAE,yVAAyV;CACxW,CAAA"}
1
+ {"version":3,"file":"NEST_TEMPLATE.js","sourceRoot":"","sources":["../../src/bundles/NEST_TEMPLATE.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAA2B;IACnD,6BAA6B,EAAE,scAAsc;IACre,6BAA6B,EAAE,oQAAoQ;IACnS,YAAY,EAAE,8EAA8E;IAC5F,qBAAqB,EAAE,s5BAAs5B;IAC76B,uBAAuB,EAAE,iCAAiC;IAC1D,SAAS,EAAE,ukCAAukC;IACllC,WAAW,EAAE,8+PAA8+P;IAC3/P,uBAAuB,EAAE,23OAA23O;IACp5O,qBAAqB,EAAE,+eAA+e;IACtgB,4BAA4B,EAAE,64BAA64B;IAC36B,sBAAsB,EAAE,gfAAgf;IACxgB,cAAc,EAAE,q+BAAq+B;IACr/B,yBAAyB,EAAE,kDAAkD;IAC7E,sBAAsB,EAAE,skCAAskC;IAC9lC,wBAAwB,EAAE,6gEAA6gE;IACviE,6BAA6B,EAAE,iMAAiM;IAChO,2BAA2B,EAAE,6sDAA6sD;IAC1uD,kCAAkC,EAAE,iEAAiE;IACrG,gDAAgD,EAAE,uuCAAuuC;IACzxC,+BAA+B,EAAE,kDAAkD;IACnF,iCAAiC,EAAE,yDAAyD;IAC5F,+BAA+B,EAAE,6CAA6C;IAC9E,8BAA8B,EAAE,4CAA4C;IAC5E,2BAA2B,EAAE,0FAA0F;IACvH,4BAA4B,EAAE,4OAA4O;IAC1Q,4BAA4B,EAAE,6SAA6S;IAC3U,6BAA6B,EAAE,gBAAgB;IAC/C,+BAA+B,EAAE,4OAA4O;IAC7Q,+EAA+E,EAAE,4pGAA4pG;IAC7uG,iCAAiC,EAAE,uJAAuJ;IAC1L,gCAAgC,EAAE,8OAA8O;IAChR,mCAAmC,EAAE,8iBAA8iB;IACnlB,+BAA+B,EAAE,m1GAAm1G;IACp3G,mCAAmC,EAAE,mpCAAmpC;IACxrC,yCAAyC,EAAE,shBAAshB;IACjkB,kCAAkC,EAAE,6lBAA6lB;IACjoB,2CAA2C,EAAE,miBAAmiB;IAChlB,4CAA4C,EAAE,27BAA27B;IACz+B,yCAAyC,EAAE,4PAA4P;IACvS,uCAAuC,EAAE,sTAAsT;IAC/V,0CAA0C,EAAE,8vHAA8vH;IAC1yH,4CAA4C,EAAE,kbAAkb;IAChe,iDAAiD,EAAE,i4GAAi4G;IACp7G,iDAAiD,EAAE,qsDAAqsD;IACxvD,sDAAsD,EAAE,mlEAAmlE;IAC3oE,gCAAgC,EAAE,60BAA60B;IAC/2B,qCAAqC,EAAE,iKAAiK;IACxM,kCAAkC,EAAE,2xCAA2xC;IAC/zC,gCAAgC,EAAE,mPAAmP;IACrR,oCAAoC,EAAE,8xCAA8xC;IACp0C,qBAAqB,EAAE,iiBAAiiB;IACxjB,YAAY,EAAE,yVAAyV;CACxW,CAAA"}
@@ -6,17 +6,18 @@ const NEST_TEMPLATE = {
6
6
  ".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\": \"Backend Test\",\n \"runtimeExecutable\": \"pnpm\",\n \"runtimeArgs\": [\"ttsx\", \"--project\", \"test/tsconfig.json\", \"test/index.ts\"],\n \"cwd\": \"${workspaceRoot}/packages/backend\",\n \"args\": [\n //----\n // You can run specific test functions\n //\n // If you want to include or exclude multiple words,\n // then separate them with space character\n //----\n // \"--include\", \"some-words-to-include\",\n // \"--exclude\", \"some-word another-word\",\n ],\n }\n ]\n}\n",
7
7
  ".vscode/settings.json": "{\n \"editor.tabSize\": 2\n}\n",
8
8
  "LICENSE": "MIT License\n\nCopyright (c) 2022 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",
9
- "README.md": "# Nestia Template\n## Outline\n[![Build Status](https://github.com/samchon/nestia-start/workflows/build/badge.svg)](https://github.com/samchon/nestia-start/actions?query=workflow%3Abuild)\n\nA template repository for backend projects using [nestia](https://github.com/samchon/nestia).\n\nYou can create a new project from this boilerplate by running below command:\n\n```bash\nnpx nestia start <directory>\n```\n\nFor reference, this is a minimal boilerplate project concentrating only on [nestia](https://github.com/samchon/nestia) SDK generation. \n\nIf you wanna much detailed boilerplate project, visit [`@samchon/backend`](https://github.com/samchon/backend).\n\n\n\n\n## Directories and Files\nThis template project is a [pnpm](https://pnpm.io) monorepo composed with two packages.\n\nBackend source files are placed into the [packages/backend/src](packages/backend/src) directory, and they are compiled by [`ttsc`](https://ttsc.dev) (TypeScript-Go toolchain supporting compiler-powered plugins like [typia](https://github.com/samchon/typia)) into the `lib` directory. Otherwise, client SDK library files generated by [nestia](https://github.com/samchon/nestia) are placed into the [packages/api](packages/api) directory, and they would be published to the npm registry as `@ORGANIZATION/PROJECT-api`.\n\n - [packages/api/](packages/api): SDK library published to the `@ORGANIZATION/PROJECT-api`\n - [**packages/api/src/functional/**](packages/api/src/functional/): API functions generated by the [`nestia`](https://github.com/samchon/nestia)\n - [**packages/api/src/structures/**](packages/api/src/structures/): DTO structures\n - [packages/backend/](packages/backend): Backend server package\n - [packages/backend/src/](packages/backend/src): Backend source directory\n - [packages/backend/src/controllers/](packages/backend/src/controllers/): Controller classes of the Main Program\n - [**packages/backend/test/**](packages/backend/test): Test Automation Program\n - [packages/backend/nestia.config.ts](packages/backend/nestia.config.ts): Configuration file of [`nestia`](https://github.com/samchon/nestia)\n - [packages/backend/tsconfig.json](packages/backend/tsconfig.json): TypeScript configuration for the main program\n - [pnpm-workspace.yaml](pnpm-workspace.yaml): Workspace and catalog configuration of [pnpm](https://pnpm.io)\n - [package.json](package.json): Root workspace configuration\n\n\n\n\n## PNPM Run Commands\nList of the run commands defined in the [packages/backend/package.json](packages/backend/package.json) are like below:\n\n - Test\n - **`test`**: Run test automation program\n - `benchmark`: Run performance benchmark program\n - Build\n - `build`: Build everything (SDK + main program)\n - `build:main`: Build main program (`src` directory)\n - `build:test` Type check test automation program (`test` directory)\n - `build:sdk`: Build SDK into the [packages/api](packages/api) directory\n - `build:swagger`: Build Swagger Documents\n - **`dev`**: Incremental type checking for development (test program)\n - Deploy\n - `start`: Start the backend server\n - `start:dev`: Start the backend server with incremental build and reload\n - `start:prod`: Start the backend server with the compiled `lib` directory\n - Webpack\n - `webpack`: Run webpack bundler\n - `webpack:start`: Start the backend server built by webpack\n - `webpack:test`: Run test program to the webpack built\n\nAlso, in the root directory, you can run below commands:\n\n - `build`: Build every package (`pnpm -r build`)\n - `test`: Run test automation program of the backend\n - `start`: Start the backend server\n - `lint`: Type check and lint every package with [`ttsc`](https://ttsc.dev)\n - `format`: Format every TypeScript file with [`ttsc format`](https://ttsc.dev)\n\nFor reference, TypeScript compiler options and [`@ttsc/lint`](https://ttsc.dev) rules are shared from the [config](config) workspace package. Each package extends [config/tsconfig.json](config/tsconfig.json) and spreads [config/lint.config.ts](config/lint.config.ts) in its own `lint.config.ts` file.\n\nTo publish the SDK library, run `npm publish` in the [packages/api](packages/api) directory. The `prepack` script would build everything before the publishing.\n\n\n\n\n## Specialization\nTransform this template project to be yours.\n\nWhen you've created a new backend project through this template project, you can specialize it to be suitable for you by changing some words. Replace below words through IDE specific function like `Edit > Replace in Files` (*Ctrl + Shift + H*), who've been supported by the VSCode.\n\n| Before | After\n|-----------------|----------------------------------------\n| ORGANIZATION | Your account or corporation name\n| PROJECT | Your own project name\n| AUTHOR | Author name\n| https://github.com/samchon/nestia-start | Your repository URL\n\n\n\n\n## Test Driven Development\nWith [nestia](https://github.com/samchon/nestia) helps to accomplish TDD (Test Driven Development). \n\nJust define DTOs and API controllers' methods (only declarations) first. After the definitions, and build SDK (Software Development Kit) through [nestia](https://github.com/samchon/nestia) (`pnpm build:sdk`). After buildling those SDK, develop test automation program using the SDK, following use-case scenarios in the framework of client side.\n\nDuring the test automation program development, you can find that which API is miss-designed or which requirement analysis is not exact. Development of the main program must be the last step after such validation process during TDD.\n\n> Visit the [samchon/backend](https://github.com/samchon/backend), then you may find much detailed story about this TDD.\n>\n> 1. Definitions\n> 2. SDK\n> 3. Test Automation Program\n> 4. Main Program\n\n```typescript\nimport {\n ArrayUtil,\n GaffComparator,\n RandomGenerator,\n TestValidator,\n} from \"@nestia/e2e\";\n\nimport api, { IBbsArticle, IPage } from \"@ORGANIZATION/PROJECT-api\";\n\nexport async function test_api_bbs_article_index_sort(\n connection: api.IConnection,\n): Promise<void> {\n // GENERATE 100 ARTICLES\n const section: string = \"general\";\n await ArrayUtil.asyncRepeat(100, () =>\n api.functional.bbs.articles.create(connection, {\n section,\n body: {\n writer: RandomGenerator.name(),\n title: RandomGenerator.paragraph(),\n body: RandomGenerator.content(),\n format: \"txt\",\n files: [],\n password: RandomGenerator.alphabets(8),\n },\n }),\n );\n\n // PREPARE VALIDATOR\n const validator = TestValidator.sort(\n \"BbsArticleProvider.index()\",\n async (sort: IPage.Sort<IBbsArticle.IRequest.SortableColumns>) => {\n const page: IPage<IBbsArticle.ISummary> =\n await api.functional.bbs.articles.index(connection, {\n section,\n body: {\n limit: 100,\n sort,\n },\n });\n return page.data;\n },\n );\n\n // DO VALIDATE\n const components = [\n validator(\"created_at\")(GaffComparator.dates((x) => x.created_at)),\n validator(\"updated_at\")(GaffComparator.dates((x) => x.updated_at)),\n validator(\"title\")(GaffComparator.strings((x) => x.title)),\n validator(\"writer\")(GaffComparator.strings((x) => x.writer)),\n validator(\n \"writer\",\n \"title\",\n )(GaffComparator.strings((x) => [x.writer, x.title])),\n ];\n for (const comp of components) {\n await comp(\"+\", false);\n await comp(\"-\", false);\n }\n}\n```\n\nFor reference, if you run `pnpm benchmark` command, your test functions defined in the [packages/backend/test/features/api](packages/backend/test/features/api) directory would be utilized for performance benchmarking. If you want to see the performance bench result earlier, visit below link please:\n\n - [packages/backend/docs/benchmarks/AMD Ryzen 9 7940HS w Radeon 780M Graphics.md](https://github.com/samchon/nestia-start/blob/master/packages/backend/docs/benchmarks/AMD%20Ryzen%209%207940HS%20w%20Radeon%20780M%20Graphics.md)\n",
9
+ "README.md": "# Nestia Template\n## Outline\n[![Build Status](https://github.com/samchon/nestia-start/workflows/build/badge.svg)](https://github.com/samchon/nestia-start/actions?query=workflow%3Abuild)\n\nA template repository for backend projects using [nestia](https://github.com/samchon/nestia).\n\nYou can create a new project from this boilerplate by running below command:\n\n```bash\npnpm dlx nestia start <directory>\n```\n\nFor reference, this is a minimal boilerplate project concentrating only on [nestia](https://github.com/samchon/nestia) SDK generation. \n\nIf you wanna much detailed boilerplate project, visit [`@samchon/backend`](https://github.com/samchon/backend).\n\n\n\n\n## Directories and Files\nThis template project is a [pnpm](https://pnpm.io) monorepo composed with two packages.\n\nBackend source files are placed into the [packages/backend/src](packages/backend/src) directory, and they are compiled by [`ttsc`](https://ttsc.dev) (TypeScript-Go toolchain supporting compiler-powered plugins like [typia](https://github.com/samchon/typia)) into the `lib` directory. Otherwise, client SDK library files generated by [nestia](https://github.com/samchon/nestia) are placed into the [packages/api](packages/api) directory, and they would be published to the npm registry as `@ORGANIZATION/PROJECT-api`.\n\n - [packages/api/](packages/api): SDK library published to the `@ORGANIZATION/PROJECT-api`\n - [**packages/api/src/functional/**](packages/api/src/functional/): API functions generated by the [`nestia`](https://github.com/samchon/nestia)\n - [**packages/api/src/structures/**](packages/api/src/structures/): DTO structures\n - [packages/backend/](packages/backend): Backend server package\n - [packages/backend/src/](packages/backend/src): Backend source directory\n - [packages/backend/src/controllers/](packages/backend/src/controllers/): Controller classes of the Main Program\n - [**packages/backend/test/**](packages/backend/test): Test Automation Program\n - [packages/backend/nestia.config.ts](packages/backend/nestia.config.ts): Configuration file of [`nestia`](https://github.com/samchon/nestia)\n - [packages/backend/tsconfig.json](packages/backend/tsconfig.json): TypeScript configuration for the main program\n - [pnpm-workspace.yaml](pnpm-workspace.yaml): Workspace and catalog configuration of [pnpm](https://pnpm.io)\n - [package.json](package.json): Root workspace configuration\n\n\n\n\n## PNPM Run Commands\nList of the run commands defined in the [packages/backend/package.json](packages/backend/package.json) are like below:\n\n - Test\n - **`test`**: Run test automation program\n - `benchmark`: Run performance benchmark program\n - Build\n - `build`: Build everything (SDK + main program)\n - `build:main`: Build main program (`src` directory)\n - `build:test` Type check test automation program (`test` directory)\n - `build:sdk`: Build SDK into the [packages/api](packages/api) directory\n - `build:swagger`: Build Swagger Documents\n - **`dev`**: Incremental type checking for development (test program)\n - Deploy\n - `start`: Start the backend server\n - `start:dev`: Start the backend server with incremental build and reload\n - `start:prod`: Start the backend server with the compiled `lib` directory\n - Webpack\n - `webpack`: Run webpack bundler\n - `webpack:start`: Start the backend server built by webpack\n - `webpack:test`: Run test program to the webpack built\n\nAlso, in the root directory, you can run below commands:\n\n - `build`: Build every package (`pnpm -r build`)\n - `test`: Run test automation program of the backend\n - `start`: Start the backend server\n - `lint`: Type check and lint every package with [`ttsc`](https://ttsc.dev)\n - `format`: Format every TypeScript file with [`ttsc format`](https://ttsc.dev)\n\nFor reference, TypeScript compiler options and [`@ttsc/lint`](https://ttsc.dev) rules are shared from the [config](config) workspace package. Each package extends [config/tsconfig.json](config/tsconfig.json) and spreads [config/lint.config.ts](config/lint.config.ts) in its own `lint.config.ts` file.\n\nTo publish the SDK library, run `pnpm publish` in the [packages/api](packages/api) directory. The `prepack` script would build everything before the publishing.\n\n\n\n\n## Specialization\nTransform this template project to be yours.\n\nWhen you've created a new backend project through this template project, you can specialize it to be suitable for you by changing some words. Replace below words through IDE specific function like `Edit > Replace in Files` (*Ctrl + Shift + H*), who've been supported by the VSCode.\n\n| Before | After\n|-----------------|----------------------------------------\n| ORGANIZATION | Your account or corporation name\n| PROJECT | Your own project name\n| AUTHOR | Author name\n| https://github.com/samchon/nestia-start | Your repository URL\n\n\n\n\n## Test Driven Development\nWith [nestia](https://github.com/samchon/nestia) helps to accomplish TDD (Test Driven Development). \n\nJust define DTOs and API controllers' methods (only declarations) first. After the definitions, and build SDK (Software Development Kit) through [nestia](https://github.com/samchon/nestia) (`pnpm build:sdk`). After buildling those SDK, develop test automation program using the SDK, following use-case scenarios in the framework of client side.\n\nDuring the test automation program development, you can find that which API is miss-designed or which requirement analysis is not exact. Development of the main program must be the last step after such validation process during TDD.\n\n> Visit the [samchon/backend](https://github.com/samchon/backend), then you may find much detailed story about this TDD.\n>\n> 1. Definitions\n> 2. SDK\n> 3. Test Automation Program\n> 4. Main Program\n\n```typescript\nimport {\n ArrayUtil,\n GaffComparator,\n RandomGenerator,\n TestValidator,\n} from \"@nestia/e2e\";\n\nimport api, { IBbsArticle, IPage } from \"@ORGANIZATION/PROJECT-api\";\n\nexport async function test_api_bbs_article_index_sort(\n connection: api.IConnection,\n): Promise<void> {\n // GENERATE 100 ARTICLES\n const section: string = \"general\";\n await ArrayUtil.asyncRepeat(100, () =>\n api.functional.bbs.articles.create(connection, {\n section,\n body: {\n writer: RandomGenerator.name(),\n title: RandomGenerator.paragraph(),\n body: RandomGenerator.content(),\n format: \"txt\",\n files: [],\n password: RandomGenerator.alphabets(8),\n },\n }),\n );\n\n // PREPARE VALIDATOR\n const validator = TestValidator.sort(\n \"BbsArticleProvider.index()\",\n async (sort: IPage.Sort<IBbsArticle.IRequest.SortableColumns>) => {\n const page: IPage<IBbsArticle.ISummary> =\n await api.functional.bbs.articles.index(connection, {\n section,\n body: {\n limit: 100,\n sort,\n },\n });\n return page.data;\n },\n );\n\n // DO VALIDATE\n const components = [\n validator(\"created_at\")(GaffComparator.dates((x) => x.created_at)),\n validator(\"updated_at\")(GaffComparator.dates((x) => x.updated_at)),\n validator(\"title\")(GaffComparator.strings((x) => x.title)),\n validator(\"writer\")(GaffComparator.strings((x) => x.writer)),\n validator(\n \"writer\",\n \"title\",\n )(GaffComparator.strings((x) => [x.writer, x.title])),\n ];\n for (const comp of components) {\n await comp(\"+\", false);\n await comp(\"-\", false);\n }\n}\n```\n\nFor reference, if you run `pnpm benchmark` command, your test functions defined in the [packages/backend/test/features/api](packages/backend/test/features/api) directory would be utilized for performance benchmarking. If you want to see the performance bench result earlier, visit below link please:\n\n - [packages/backend/docs/benchmarks/AMD Ryzen 9 7940HS w Radeon 780M Graphics.md](https://github.com/samchon/nestia-start/blob/master/packages/backend/docs/benchmarks/AMD%20Ryzen%209%207940HS%20w%20Radeon%20780M%20Graphics.md)\n",
10
10
  "config/lint.config.ts": "import type { ITtscLintConfig } from \"@ttsc/lint\";\n\nconst config = {\n format: {\n // Keep @ttsc/lint formatting aligned with the repository import groups.\n severity: \"off\",\n semi: true,\n singleQuote: false,\n arrowParens: \"always\",\n bracketSpacing: true,\n quoteProps: \"as-needed\",\n trailingComma: \"all\",\n printWidth: 80,\n tabWidth: 2,\n useTabs: false,\n endOfLine: \"lf\",\n sortImports: {\n order: [\n \"^@ORGANIZATION/PROJECT-api(.*)$\",\n \"^@/(.*)$\",\n \"<THIRD_PARTY_MODULES>\",\n \"^[./]\",\n ],\n },\n jsDoc: true,\n },\n rules: {\n // ESLint core: runtime correctness and low-noise modern JavaScript.\n \"default-param-last\": \"error\",\n eqeqeq: \"error\",\n \"for-direction\": \"error\",\n \"getter-return\": \"error\",\n \"grouped-accessor-pairs\": \"error\",\n \"guard-for-in\": \"error\",\n \"no-array-constructor\": \"error\",\n \"no-async-promise-executor\": \"error\",\n \"no-caller\": \"error\",\n \"no-case-declarations\": \"error\",\n \"no-class-assign\": \"error\",\n \"no-compare-neg-zero\": \"error\",\n \"no-cond-assign\": \"error\",\n \"no-constructor-return\": \"error\",\n \"no-debugger\": \"error\",\n \"no-delete-var\": \"error\",\n \"no-dupe-args\": \"error\",\n \"no-dupe-class-members\": \"error\",\n \"no-dupe-else-if\": \"error\",\n \"no-dupe-keys\": \"error\",\n \"no-duplicate-case\": \"error\",\n \"no-duplicate-imports\": \"error\",\n \"no-empty-character-class\": \"error\",\n \"no-empty-pattern\": \"error\",\n \"no-empty-static-block\": \"error\",\n \"no-eval\": \"error\",\n \"no-ex-assign\": \"error\",\n \"no-extend-native\": \"error\",\n \"no-extra-bind\": \"error\",\n \"no-extra-boolean-cast\": \"error\",\n \"no-fallthrough\": \"error\",\n \"no-func-assign\": \"error\",\n \"no-import-assign\": \"error\",\n \"no-inner-declarations\": \"error\",\n \"no-invalid-this\": \"error\",\n \"no-irregular-whitespace\": \"error\",\n \"no-iterator\": \"error\",\n \"no-loss-of-precision\": \"error\",\n \"no-multi-assign\": \"error\",\n \"no-multi-str\": \"error\",\n \"no-new-func\": \"error\",\n \"no-new-symbol\": \"error\",\n \"no-new-wrappers\": \"error\",\n \"no-obj-calls\": \"error\",\n \"no-object-constructor\": \"error\",\n \"no-octal\": \"error\",\n \"no-octal-escape\": \"error\",\n \"no-promise-executor-return\": \"error\",\n \"no-proto\": \"error\",\n \"no-prototype-builtins\": \"error\",\n \"no-redeclare\": \"error\",\n \"no-regex-spaces\": \"error\",\n \"no-return-assign\": \"error\",\n \"no-script-url\": \"error\",\n \"no-self-assign\": \"error\",\n \"no-self-compare\": \"error\",\n \"no-sequences\": \"error\",\n \"no-setter-return\": \"error\",\n \"no-shadow-restricted-names\": \"error\",\n \"no-sparse-arrays\": \"error\",\n \"no-template-curly-in-string\": \"error\",\n \"no-this-before-super\": \"error\",\n \"no-unreachable\": \"error\",\n \"no-unsafe-finally\": \"error\",\n \"no-unsafe-negation\": \"error\",\n \"no-unused-labels\": \"error\",\n \"no-useless-assignment\": \"error\",\n \"no-useless-call\": \"error\",\n \"no-useless-catch\": \"error\",\n \"no-useless-computed-key\": \"error\",\n \"no-useless-escape\": \"error\",\n \"no-useless-rename\": \"error\",\n \"no-var\": \"error\",\n \"no-with\": \"error\",\n \"prefer-const\": \"error\",\n radix: \"error\",\n \"use-isnan\": \"error\",\n \"valid-typeof\": \"error\",\n\n // RegExp: invalid, empty, or misleading regular-expression structure.\n \"regexp/no-dupe-characters-character-class\": \"error\",\n \"regexp/no-empty-alternative\": \"error\",\n \"regexp/no-empty-capturing-group\": \"error\",\n \"regexp/no-empty-group\": \"error\",\n \"regexp/no-empty-lookarounds-assertion\": \"error\",\n \"regexp/no-useless-character-class\": \"error\",\n \"regexp/no-useless-escape\": \"error\",\n \"regexp/no-useless-flag\": \"error\",\n \"regexp/no-useless-quantifier\": \"error\",\n \"regexp/no-useless-two-nums-quantifier\": \"error\",\n \"regexp/no-zero-quantifier\": \"error\",\n \"regexp/sort-flags\": \"error\",\n\n // Promise: chain shapes that can swallow or misroute async errors.\n \"promise/no-multiple-resolved\": \"error\",\n \"promise/no-new-statics\": \"error\",\n \"promise/no-return-in-finally\": \"error\",\n \"promise/no-return-wrap\": \"error\",\n \"promise/param-names\": \"error\",\n \"promise/prefer-catch\": \"error\",\n \"promise/spec-only\": \"error\",\n\n // Security: concrete sink patterns with a low false-positive rate here.\n \"security/detect-bidi-characters\": \"error\",\n \"security/detect-buffer-noassert\": \"error\",\n \"security/detect-eval-with-expression\": \"error\",\n \"security/detect-new-buffer\": \"error\",\n \"security/detect-pseudoRandomBytes\": \"error\",\n \"security/detect-unsafe-regex\": \"error\",\n\n // TypeScript: type-aware correctness rules.\n \"typescript/adjacent-overload-signatures\": \"error\",\n \"typescript/await-thenable\": \"error\",\n \"typescript/ban-ts-comment\": \"error\",\n \"typescript/ban-tslint-comment\": \"error\",\n \"typescript/no-array-delete\": \"error\",\n \"typescript/no-confusing-non-null-assertion\": \"error\",\n \"typescript/no-duplicate-enum-values\": \"error\",\n \"typescript/no-extra-non-null-assertion\": \"error\",\n \"typescript/no-floating-promises\": \"error\",\n \"typescript/no-for-in-array\": \"error\",\n \"typescript/no-invalid-void-type\": \"error\",\n \"typescript/no-misused-new\": \"error\",\n \"typescript/no-misused-promises\": \"error\",\n \"typescript/no-misused-spread\": \"error\",\n \"typescript/no-mixed-enums\": \"error\",\n \"typescript/no-non-null-asserted-nullish-coalescing\": \"error\",\n \"typescript/no-non-null-asserted-optional-chain\": \"error\",\n \"typescript/no-redundant-type-constituents\": \"error\",\n \"typescript/no-unnecessary-type-constraint\": \"error\",\n \"typescript/no-unsafe-declaration-merging\": \"error\",\n \"typescript/no-unsafe-function-type\": \"error\",\n \"typescript/no-unsafe-unary-minus\": \"error\",\n \"typescript/no-wrapper-object-types\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/prefer-as-const\": \"error\",\n \"typescript/prefer-promise-reject-errors\": \"error\",\n \"typescript/require-array-sort-compare\": \"error\",\n \"typescript/switch-exhaustiveness-check\": \"error\",\n \"typescript/triple-slash-reference\": \"error\",\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n\n // Unicorn: correctness-oriented runtime/API traps, not broad style policy.\n \"unicorn/error-message\": \"error\",\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-await-in-promise-methods\": \"error\",\n \"unicorn/no-empty-file\": \"error\",\n \"unicorn/no-invalid-fetch-options\": \"error\",\n \"unicorn/no-invalid-remove-event-listener\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-thenable\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n },\n} satisfies ITtscLintConfig;\n\nexport default config;\n",
11
- "config/package.json": "{\n \"private\": true,\n \"name\": \"@ORGANIZATION/PROJECT-config\",\n \"version\": \"0.1.0\",\n \"description\": \"Shared TypeScript and @ttsc/lint configuration for the workspace\",\n \"files\": [\n \"lint.config.ts\",\n \"tsconfig.json\"\n ],\n \"devDependencies\": {\n \"@ttsc/lint\": \"catalog:typescript\",\n \"typescript\": \"catalog:typescript\"\n }\n}",
11
+ "config/package.json": "{\n \"private\": true,\n \"name\": \"@ORGANIZATION/PROJECT-config\",\n \"version\": \"0.1.0\",\n \"description\": \"Shared TypeScript and @ttsc/lint configuration for the workspace\",\n \"files\": [\n \"lint.config.ts\",\n \"rolldown.config.mjs\",\n \"tsconfig.json\"\n ],\n \"devDependencies\": {\n \"@ttsc/lint\": \"catalog:typescript\",\n \"@ttsc/unplugin\": \"catalog:typescript\",\n \"tinyglobby\": \"^0.2.12\",\n \"typescript\": \"catalog:typescript\"\n }\n}",
12
+ "config/rolldown.config.mjs": "import ttsc from \"@ttsc/unplugin/rolldown\";\nimport path from \"node:path\";\nimport { globSync } from \"tinyglobby\";\n\n// The `.mjs` build feeds the TypeScript sources straight to rolldown, which\n// transpiles them natively; `@ttsc/unplugin` applies the project's ttsc\n// plugins on the way in. `preserveModules` keeps the 1:1 module layout, so\n// every `lib/<path>.js` from the main ttsc build gets a genuine ESM twin at\n// `lib/<path>.mjs` — named exports intact, no facade chunks, no CommonJS\n// transcoding. Everything outside `src/` is an external module.\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",
12
13
  "config/tsconfig.json": "{\n \"compilerOptions\": {\n \"target\": \"esnext\",\n \"lib\": [\"DOM\", \"ESNext\"],\n \"module\": \"nodenext\",\n \"moduleResolution\": \"nodenext\",\n \"types\": [\"*\"],\n \"resolveJsonModule\": true,\n \"sourceMap\": true,\n \"newLine\": \"lf\",\n \"esModuleInterop\": true,\n \"forceConsistentCasingInFileNames\": true,\n \"strict\": true,\n \"noImplicitReturns\": true,\n \"noUncheckedIndexedAccess\": true,\n \"skipLibCheck\": true,\n }\n}\n",
13
14
  "package.json": "{\n \"private\": true,\n \"name\": \"@ORGANIZATION/PROJECT\",\n \"version\": \"0.1.0\",\n \"description\": \"Starter kit of Nestia\",\n \"scripts\": {\n \"build\": \"pnpm -r --if-present build\",\n \"dev\": \"pnpm -C packages/backend dev\",\n \"format\": \"pnpm -r --if-present format\",\n \"lint\": \"pnpm -r --if-present lint\",\n \"start\": \"pnpm -C packages/backend start\",\n \"test\": \"pnpm -C packages/backend test\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia-start\"\n },\n \"keywords\": [\n \"nestia\",\n \"template\",\n \"boilerplate\"\n ],\n \"author\": \"AUTHOR\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\n },\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\n \"packageManager\": \"pnpm@10.10.0\",\n \"stackblitz\": {\n \"startCommand\": \"pnpm install && pnpm test -- --simultaneous 1\"\n }\n}",
14
15
  "packages/api/.gitignore": "lib/\nnode_modules/\n\nswagger.json\nopenai.json",
15
16
  "packages/api/LICENSE": "MIT License\n\nCopyright (c) 2021 ORGANIZATION\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.",
16
17
  "packages/api/README.md": "# SDK Library\nThis is a SDK library generated by [`nestia`](https://nestia.io).\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![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)\n\n> Left is server code, and right is client code utilizing the SDK\n\n\n\n\n# What [`Nestia`](https://nestia.io) is:\n![Nestia Logo](https://nestia.io/logo.png)\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE)\n[![npm version](https://img.shields.io/npm/v/@nestia/core.svg)](https://www.npmjs.com/package/@nestia/core)\n[![Downloads](https://img.shields.io/npm/dm/@nestia/core.svg)](https://www.npmjs.com/package/@nestia/core)\n[![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)\n[![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/)\n\nNestia 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`: 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",
17
18
  "packages/api/lint.config.ts": "import type { ITtscLintConfig } from \"@ttsc/lint\";\n\nexport default {\n extends: \"../../config/lint.config.ts\",\n ignores: [\"src/functional/**/*.ts\"],\n} satisfies ITtscLintConfig;\n",
18
- "packages/api/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 },\n \"scripts\": {\n \"build\": \"pnpm build:sdk && pnpm build:ttsc && pnpm build:rollup\",\n \"build:sdk\": \"cd ../backend && pnpm build:sdk\",\n \"build:ttsc\": \"ttsc -p tsconfig.json\",\n \"build:rollup\": \"rollup -c\",\n \"format\": \"ttsc format -p tsconfig.json\",\n \"lint\": \"ttsc -p tsconfig.json --noEmit\",\n \"prepack\": \"pnpm build\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia-start\"\n },\n \"author\": \"AUTHOR\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\n },\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\n \"files\": [\n \"lib\",\n \"package.json\",\n \"swagger.json\",\n \"README.md\"\n ],\n \"dependencies\": {\n \"@nestia/fetcher\": \"catalog:samchon\",\n \"tgrid\": \"catalog:samchon\",\n \"typia\": \"catalog:samchon\"\n },\n \"devDependencies\": {\n \"@rollup/plugin-terser\": \"^0.4.4\",\n \"@ttsc/lint\": \"catalog:typescript\",\n \"@ttsc/paths\": \"catalog:typescript\",\n \"rollup\": \"^4.18.0\",\n \"ttsc\": \"catalog:typescript\",\n \"typescript\": \"catalog:typescript\"\n },\n \"publishConfig\": {\n \"main\": \"./lib/index.js\",\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 }\n }\n}",
19
- "packages/api/rollup.config.js": "const fs = require(\"fs\");\nconst os = require(\"os\");\nconst path = require(\"path\");\nconst terser = require(\"@rollup/plugin-terser\");\nconst { TtscCompiler } = require(\"ttsc\");\n\nconst PROJECT_DIR = __dirname;\nconst VIRTUAL_PREFIX = \"\\0ttsc:\";\n\nconst normalize = (file) => file.replace(/\\\\/g, \"/\");\n\nconst compileProject = () => {\n const directory = fs.mkdtempSync(path.join(os.tmpdir(), \"project-api-rollup-\"));\n const config = path.join(directory, \"tsconfig.json\");\n\n fs.writeFileSync(\n config,\n JSON.stringify(\n {\n extends: normalize(path.join(PROJECT_DIR, \"tsconfig.json\")),\n compilerOptions: {\n declaration: false,\n declarationMap: false,\n module: \"ESNext\",\n moduleResolution: \"bundler\",\n plugins: [\n {\n transform: \"@ttsc/lint\",\n configFile: normalize(path.join(PROJECT_DIR, \"lint.config.ts\")),\n },\n ],\n target: \"ESNext\",\n },\n },\n null,\n 2,\n ),\n );\n\n try {\n const result = new TtscCompiler({\n cwd: PROJECT_DIR,\n projectRoot: PROJECT_DIR,\n tsconfig: config,\n }).compile();\n\n if (result.type === \"exception\") {\n throw new Error(\n result.error instanceof Error ? result.error.message : String(result.error),\n );\n }\n if (result.type === \"failure\") {\n throw new Error(\n result.diagnostics\n .map((d) =>\n [d.file, d.line, d.character, d.messageText]\n .filter((v) => v !== null && v !== undefined && v !== \"\")\n .join(\":\"),\n )\n .join(\"\\n\"),\n );\n }\n return result.output;\n } finally {\n fs.rmSync(directory, { recursive: true, force: true });\n }\n};\n\nconst ttscMemory = () => {\n let output = {};\n\n const resolve = (source, importer) => {\n if (source === \"lib/index.js\") {\n return \"lib/index.js\";\n }\n if (importer === undefined || source.startsWith(\".\") === false) {\n return null;\n }\n\n const base = path.posix.normalize(\n path.posix.join(path.posix.dirname(importer), normalize(source)),\n );\n const candidates = [\n base.endsWith(\".js\") ? base : `${base}.js`,\n path.posix.join(base, \"index.js\"),\n ];\n return candidates.find((key) => output[key] !== undefined) ?? null;\n };\n\n return {\n name: \"ttsc-memory\",\n buildStart: () => {\n output = compileProject();\n },\n resolveId: (source, importer) => {\n const key = resolve(\n source,\n importer?.startsWith(VIRTUAL_PREFIX)\n ? importer.slice(VIRTUAL_PREFIX.length)\n : importer,\n );\n return key === null ? null : `${VIRTUAL_PREFIX}${key}`;\n },\n load: (id) => {\n if (id.startsWith(VIRTUAL_PREFIX) === false) {\n return null;\n }\n\n const key = id.slice(VIRTUAL_PREFIX.length);\n const code = output[key];\n if (code === undefined) {\n return null;\n }\n\n const map = output[`${key}.map`];\n return {\n code: code.replace(/\\n?\\/\\/# sourceMappingURL=.*$/u, \"\"),\n map: map === undefined ? null : JSON.parse(map),\n };\n },\n };\n};\n\nmodule.exports = {\n external: (id) =>\n id.startsWith(VIRTUAL_PREFIX) === false &&\n id.startsWith(\".\") === false &&\n id.startsWith(\"/\") === false &&\n /^[\\w@]/u.test(id),\n output: {\n dir: `${PROJECT_DIR}/lib`,\n entryFileNames: \"[name].mjs\",\n format: \"esm\",\n sourcemap: true,\n },\n input: {\n index: \"lib/index.js\",\n },\n plugins: [\n ttscMemory(),\n terser({\n format: {\n comments: \"some\",\n beautify: true,\n ecma: \"2020\",\n },\n compress: false,\n mangle: false,\n module: true,\n }),\n ],\n};\n",
19
+ "packages/api/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 },\n \"scripts\": {\n \"build\": \"pnpm build:sdk && pnpm build:ttsc && pnpm build:rolldown\",\n \"build:sdk\": \"cd ../backend && pnpm build:sdk\",\n \"build:ttsc\": \"ttsc -p tsconfig.json\",\n \"build:rolldown\": \"rolldown -c\",\n \"format\": \"ttsc format -p tsconfig.json\",\n \"lint\": \"ttsc -p tsconfig.json --noEmit\",\n \"prepack\": \"pnpm build\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia-start\"\n },\n \"author\": \"AUTHOR\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia-start/issues\"\n },\n \"homepage\": \"https://github.com/samchon/nestia-start#readme\",\n \"files\": [\n \"lib\",\n \"package.json\",\n \"swagger.json\",\n \"README.md\"\n ],\n \"dependencies\": {\n \"@nestia/fetcher\": \"catalog:samchon\",\n \"tgrid\": \"catalog:samchon\",\n \"typia\": \"catalog:samchon\"\n },\n \"devDependencies\": {\n \"@ORGANIZATION/PROJECT-api\": \"workspace:*\",\n \"@ttsc/lint\": \"catalog:typescript\",\n \"rolldown\": \"catalog:rolldown\",\n \"ttsc\": \"catalog:typescript\",\n \"typescript\": \"catalog:typescript\"\n },\n \"publishConfig\": {\n \"main\": \"./lib/index.js\",\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 }\n }\n}",
20
+ "packages/api/rolldown.config.mjs": "export { default } from \"../../config/rolldown.config.mjs\";\n",
20
21
  "packages/api/scripts/ensure-nestia-exports.cjs": "const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst root = path.resolve(__dirname, \"..\");\n\nconst files = {\n \"src/index.ts\": `import * as api from \"./module\";\n\nexport type * from \"./IConnection\";\nexport type * from \"./Primitive\";\nexport type * from \"./Resolved\";\nexport * from \"./HttpError\";\n\nexport * from \"./structures\";\n\nexport * as functional from \"./functional/index\";\n\nexport default api;\n`,\n \"src/module.ts\": `export type * from \"./IConnection\";\nexport type * from \"./Primitive\";\nexport type * from \"./Resolved\";\nexport * from \"./HttpError\";\n\nexport * from \"./structures\";\n\nexport * as functional from \"./functional/index\";\n`,\n};\n\nfor (const [relative, content] of Object.entries(files)) {\n const file = path.join(root, relative);\n fs.mkdirSync(path.dirname(file), { recursive: true });\n if (fs.existsSync(file) && fs.readFileSync(file, \"utf8\") === content) continue;\n fs.writeFileSync(file, content, \"utf8\");\n}\n\nconst functional = path.join(root, \"src\", \"functional\", \"index.ts\");\nif (!fs.existsSync(functional)) {\n fs.mkdirSync(path.dirname(functional), { recursive: true });\n fs.writeFileSync(functional, \"export {};\\n\", \"utf8\");\n}\n",
21
22
  "packages/api/src/HttpError.ts": "export { HttpError } from \"@nestia/fetcher\";\n",
22
23
  "packages/api/src/IConnection.ts": "export type { IConnection } from \"@nestia/fetcher\";\n",
@@ -24,7 +25,7 @@ const NEST_TEMPLATE = {
24
25
  "packages/api/src/Resolved.ts": "export type { Resolved } from \"typia\";\n",
25
26
  "packages/api/src/index.ts": "import * as api from \"./module\";\nexport * from \"./module\";\n\nexport default api;\n",
26
27
  "packages/api/src/module.ts": "export type * from \"./IConnection\";\nexport type * from \"./Primitive\";\nexport type * from \"./Resolved\";\nexport * from \"./HttpError\";\n\nexport * from \"./structures\";\n\nexport * as functional from \"./functional/index\";\n",
27
- "packages/api/tsconfig.json": "{\n \"extends\": \"../../config/tsconfig.json\",\n \"compilerOptions\": {\n \"declaration\": true,\n \"stripInternal\": true,\n \"outDir\": \"lib\",\n \"rootDir\": \"src\",\n \"paths\": {\n \"@ORGANIZATION/PROJECT-api\": [\"./src\"]\n },\n \"experimentalDecorators\": true,\n \"emitDecoratorMetadata\": true\n },\n \"include\": [\"src\"]\n}\n",
28
+ "packages/api/tsconfig.json": "{\n \"extends\": \"../../config/tsconfig.json\",\n \"compilerOptions\": {\n \"declaration\": true,\n \"stripInternal\": true,\n \"outDir\": \"lib\",\n \"rootDir\": \"src\",\n \"experimentalDecorators\": true,\n \"emitDecoratorMetadata\": true\n },\n \"include\": [\"src\"]\n}\n",
28
29
  "packages/backend/.env.local": "API_PORT=37001",
29
30
  "packages/backend/build/env.js": "const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst env = path.join(__dirname, \"../.env\");\nconst local = path.join(__dirname, \"../.env.local\");\n\nif (fs.existsSync(env) === false) fs.copyFileSync(local, env);\n",
30
31
  "packages/backend/docs/benchmarks/AMD Ryzen 9 7940HS w Radeon 780M Graphics.md": "# Benchmark Report\n> Generated by [`@nestia/benchmark`](https://github.com/samchon/nestia)\n\n - Specifications\n - CPU: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics \n - RAM: 31 GB\n - NodeJS Version: v20.10.0\n - Backend Server: 1 core / 1 thread\n - Arguments\n - Count: 40,000\n - Threads: 4\n - Simultaneous: 32\n - Time\n - Start: 2024-10-29T19:14:35.941Z\n - Complete: 2024-10-29T19:16:11.418Z\n - Elapsed: 95,477 ms\n\nType | Count | Success | Mean. | Stdev. | Minimum | Maximum\n----|----|----|----|----|----|----\nTotal | 41,586 | 41,586 | 69.24 | 73.05 | 5 | 546\n\n> Unit: milliseconds\n\n## Memory Consumptions\n```mermaid\nxychart-beta\n x-axis \"Time (second)\"\n y-axis \"Memory (MB)\"\n line \"Resident Set Size\" [122, 156, 159, 142, 154, 165, 184, 185, 187, 189, 200, 205, 209, 217, 221, 225, 229, 224, 230, 235, 242, 250, 256, 262, 267, 272, 234, 237, 249, 259, 266, 273, 285, 292, 291, 216, 225, 235, 243, 200, 208, 214, 186, 186, 171, 177, 187, 199, 185, 192, 205, 171, 180, 158, 170, 179, 163, 163, 176, 188, 193, 202, 213, 219, 230, 239, 256, 265, 283, 301, 240, 249, 257, 267, 284, 282, 290, 202, 213, 166, 178, 188, 200, 203, 208, 180, 191, 199, 175]\n line \"Heap Total\" [85, 116, 120, 103, 114, 124, 146, 146, 147, 148, 158, 166, 170, 176, 180, 184, 187, 185, 190, 195, 203, 211, 217, 222, 225, 229, 194, 197, 209, 218, 225, 232, 241, 249, 247, 176, 185, 194, 202, 160, 168, 173, 146, 146, 130, 136, 146, 158, 145, 151, 165, 129, 139, 116, 128, 137, 120, 123, 136, 148, 152, 161, 172, 179, 189, 198, 215, 223, 241, 257, 200, 209, 216, 227, 244, 242, 249, 163, 174, 127, 136, 147, 159, 162, 166, 138, 150, 158, 132]\n line \"Heap Used + External\" [69, 94, 62, 82, 88, 107, 71, 83, 93, 107, 136, 72, 76, 85, 92, 106, 139, 48, 68, 69, 86, 95, 108, 116, 140, 175, 67, 74, 88, 112, 125, 136, 142, 169, 180, 91, 104, 105, 121, 60, 71, 91, 64, 74, 86, 110, 121, 135, 76, 82, 103, 70, 93, 66, 91, 107, 76, 75, 95, 101, 115, 127, 136, 154, 165, 168, 196, 193, 214, 232, 84, 94, 101, 118, 145, 147, 149, 86, 96, 72, 90, 112, 126, 133, 132, 78, 87, 107, 88]\n line \"Heap Used Only\" [66, 89, 59, 78, 83, 100, 68, 79, 88, 101, 129, 68, 72, 80, 86, 100, 131, 45, 64, 65, 81, 90, 103, 110, 133, 168, 64, 71, 84, 108, 120, 130, 136, 162, 173, 88, 100, 101, 117, 58, 68, 87, 61, 71, 83, 107, 118, 130, 73, 79, 99, 67, 89, 63, 88, 103, 74, 72, 91, 98, 111, 123, 132, 149, 160, 163, 190, 187, 208, 225, 81, 90, 97, 114, 140, 143, 145, 83, 93, 70, 87, 108, 122, 130, 128, 76, 84, 104, 85]\n```\n\n> - 🟦 Resident Set Size\n> - 🟢 Heap Total\n> - 🔴 Heap Used + External\n> - 🟡 Heap Used Only\n\n## Endpoints\nType | Count | Success | Mean. | Stdev. | Minimum | Maximum\n----|----|----|----|----|----|----\nPATCH /bbs/articles/:section | 6,439 | 6,439 | 108.37 | 76.56 | 6 | 546\nPUT /bbs/articles/:section/:id | 380 | 380 | 78.52 | 69.03 | 6 | 296\nGET /bbs/articles/:section/:id | 917 | 917 | 77.65 | 69.84 | 6 | 463\nDELETE /bbs/articles/:section/:id | 201 | 201 | 73.89 | 63.55 | 7 | 307\nPOST /bbs/articles/:section | 33,649 | 33,649 | 61.39 | 70.04 | 5 | 546\n\n> Unit: milliseconds\n\n## Failures\nMethod | Path | Count | Failures\n-------|------|-------|----------",
@@ -49,7 +50,7 @@ const NEST_TEMPLATE = {
49
50
  "packages/backend/test/webpack.ts": "import { DynamicExecutor } from \"@nestia/e2e\";\nimport cp from \"node:child_process\";\nimport { sleep_for } from \"tstl\";\n\nimport { MyConfiguration } from \"../src/MyConfiguration\";\nimport { MyGlobal } from \"../src/MyGlobal\";\nimport { TestAutomation } from \"./helpers/TestAutomation\";\nimport { TestAutomationStdio } from \"./helpers/TestAutomationStdio\";\n\nconst wait = async (): Promise<void> => {\n while (true)\n try {\n await fetch(`http://localhost:${MyConfiguration.API_PORT()}/dsafdsafsd`);\n return;\n } catch (exp) {\n await sleep_for(100);\n }\n};\n\nconst main = async (): Promise<void> => {\n MyGlobal.testing = true;\n\n const report: DynamicExecutor.IReport = await TestAutomation.execute({\n open: async () => {\n const backend: cp.ChildProcess = cp.fork(\n `${MyConfiguration.ROOT}/dist/server.js`,\n {\n cwd: `${MyConfiguration.ROOT}/dist`,\n },\n );\n await wait();\n return backend;\n },\n close: async (backend) => {\n backend.kill();\n },\n options: await TestAutomationStdio.getOptions(),\n onComplete: TestAutomationStdio.onComplete,\n });\n TestAutomationStdio.report(report);\n};\nmain().catch((exp: unknown) => {\n console.log(exp);\n process.exit(-1);\n});\n",
50
51
  "packages/backend/tsconfig.json": "{\n \"extends\": \"../../config/tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"lib\",\n \"rootDir\": \"src\",\n \"experimentalDecorators\": true,\n \"emitDecoratorMetadata\": true\n },\n \"include\": [\"src\"]\n}\n",
51
52
  "packages/backend/webpack.config.js": "const path = require(\"path\");\n\nconst CopyWebpackPlugin = require(\"copy-webpack-plugin\");\nconst WriteFilePlugin = require(\"write-file-webpack-plugin\");\nconst { IgnorePlugin } = require(\"webpack\");\n\nconst lazyImports = [\n \"@modelcontextprotocol/sdk\",\n \"@fastify/static\",\n \"@fastify/view\",\n \"@nestjs/microservices\",\n \"@nestjs/websockets\",\n \"class-transformer\",\n \"class-validator\",\n];\n\n// @reference https://tech-blog.s-yoshiki.com/entry/297\nmodule.exports = {\n // CUSTOMIZE HERE\n entry: {\n server: \"./lib/executable/server.js\",\n },\n output: {\n path: path.join(__dirname, \"dist\"),\n filename: \"[name].js\",\n },\n optimization: {\n minimize: true,\n },\n\n // JUST KEEP THEM\n mode: \"production\",\n target: \"node\",\n plugins: [\n new CopyWebpackPlugin({\n patterns: [\n {\n from: \".env\",\n to: \"[name][ext]\",\n },\n ],\n }),\n new WriteFilePlugin(),\n new IgnorePlugin({\n checkResource: (resource) => {\n if (lazyImports.some((modulo) => resource.startsWith(modulo))) {\n try {\n require.resolve(resource);\n } catch (err) {\n return true;\n }\n }\n return false;\n },\n }),\n ],\n};\n",
52
- "pnpm-workspace.yaml": "packages:\n - \"config\"\n - \"packages/*\"\ncatalogs:\n samchon:\n nestia: &nestia ^12.0.0-rc.3\n \"@nestia/benchmark\": *nestia\n \"@nestia/core\": *nestia\n \"@nestia/e2e\": *nestia\n \"@nestia/fetcher\": *nestia\n \"@nestia/sdk\": *nestia\n tgrid: ^1.2.1\n tstl: ^3.0.0\n typia: ^13.0.1\n utils:\n rimraf: ^6.1.3\n uuid: ^13.0.0\n typescript:\n ttsc: &ttsc ^0.18.1\n \"@ttsc/lint\": *ttsc\n \"@ttsc/paths\": *ttsc\n \"@ttsc/unplugin\": *ttsc\n typescript: ^7.0.2\n",
53
+ "pnpm-workspace.yaml": "packages:\n - \"config\"\n - \"packages/*\"\ncatalogs:\n samchon:\n \"@nestia/benchmark\": ^12.0.0\n \"@nestia/core\": ^12.0.0\n \"@nestia/e2e\": ^12.0.0\n \"@nestia/fetcher\": ^12.0.0\n \"@nestia/sdk\": ^12.0.0\n nestia: ^12.0.0\n tgrid: ^1.2.1\n tstl: ^3.0.0\n typia: ^13.0.2\n rolldown:\n rolldown: ^1.1.5\n utils:\n rimraf: ^6.1.3\n uuid: ^13.0.0\n typescript:\n \"@ttsc/lint\": ^0.18.2\n \"@ttsc/paths\": ^0.18.2\n \"@ttsc/unplugin\": ^0.18.4\n ttsc: ^0.18.4\n typescript: ^7.0.2\n",
53
54
  "typos.toml": "[default]\nlocale = 'en-us'\nextend-ignore-re = [\n \"(?Rm)^.*(<!--|#|//)\\\\s*spellchecker:disable-line(-->|\\n)?$\",\n \"(?s)(<!--|#|//)\\\\s*spellchecker:off\\\\s*(-->|\\n).*?(<!--|#|//)\\\\s*spellchecker:on\",\n]\n\n[default.extend-words]\nJeongho = \"Jeongho\"\nNam = \"Nam\"\ntypia = \"typia\"\n\n[files]\nextend-exclude = [\"*.json\"]"
54
55
  };
55
56
  //#endregion
@@ -2,15 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_TEMPLATE = void 0;
4
4
  exports.SDK_TEMPLATE = {
5
- ".gitignore": ".git/\nbin/\nlib/\nnode_modules/\n\npackage-lock.json\npnpm-lock.yaml",
5
+ ".gitignore": ".git/\nbin/\nlib/\nnode_modules/\n\npackage-lock.json",
6
6
  ".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}",
7
7
  ".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}",
8
8
  "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",
9
- "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![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)\n\n> Left is server code, and right is client code utilizing the SDK\n\n\n\n\n## How to Test\n```bash\nnpm install\nnpm start # run only \"test/start.ts\" file\nnpm run test # everything under the \"test/features\" directory\nnpm run test:simulate # \"test/features\" with mockup simulation mode\n```\n\nIf you run `npm start` command, only [test/start.ts](test/start.ts) file would be executed.\n\nOtherwise you run `npm 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\nnpm install -g @nestia/migrate\nnpx @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\nnpm install\nnpm run deploy\n```\n\nJust run `npm 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> ![Nestia Logo](https://nestia.io/logo.png)\n> \n> [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE)\n> [![npm version](https://img.shields.io/npm/v/@nestia/core.svg)](https://www.npmjs.com/package/@nestia/core)\n> [![Downloads](https://img.shields.io/npm/dm/@nestia/core.svg)](https://www.npmjs.com/package/@nestia/core)\n> [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)\n> [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](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",
10
- "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(\"npm run start\", \"Run only test/start.ts\");\nprint(\"npm run test\", \"Run every test/features/**/*.ts files\");\nprint(\"npm run test:simulate\", \"Test with mockup simulator\");\n",
11
- "package.json": "{\n \"name\": \"@ORGANIZATION/PROJECT-api\",\n \"version\": \"0.1.0\",\n \"description\": \"SDK library generated by Nestia\",\n \"main\": \"lib/index.js\",\n \"module\": \"lib/index.mjs\",\n \"typings\": \"lib/index.d.ts\",\n \"scripts\": {\n \"build\": \"rimraf lib && ttsc && rollup -c\",\n \"build:test\": \"rimraf bin && ttsc --project test/tsconfig.json\",\n \"deploy\": \"npm run build && npm publish\",\n \"dev\": \"npm run build:test -- --watch\",\n \"hello\": \"node hello\",\n \"prepare\": \"ts-patch install\",\n \"start\": \"ts-node test/start.ts\",\n \"swagger\": \"ts-node test/swagger.ts\",\n \"test\": \"ts-node test/index.ts\",\n \"test:simulate\": \"ts-node 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\": \"^12.0.0-rc.3\",\n \"tgrid\": \"^1.2.1\",\n \"typia\": \"^13.0.1\"\n },\n \"devDependencies\": {\n \"@nestia/e2e\": \"^12.0.0-rc.3\",\n \"@rollup/plugin-terser\": \"^0.4.4\",\n \"@rollup/plugin-typescript\": \"^11.1.6\",\n \"@trivago/prettier-plugin-sort-imports\": \"^4.3.0\",\n \"@types/express\": \"^4.17.21\",\n \"@types/swagger-ui-express\": \"^4.1.6\",\n \"chalk\": \"4.1.2\",\n \"express\": \"^4.19.2\",\n \"prettier\": \"^3.2.5\",\n \"rimraf\": \"^5.0.5\",\n \"rollup\": \"^4.13.2\",\n \"swagger-ui-express\": \"^5.0.0\",\n \"ts-node\": \"^10.9.2\",\n \"ts-patch\": \"^4.0.1\",\n \"typescript\": \"~6.0.3\",\n \"ttsc\": \"^0.18.1\",\n \"@nestia/core\": \"^12.0.0-rc.3\"\n }\n}",
12
- "prettier.config.js": "module.exports = {\n // DEFAULT CONFIGURATIONS\n parser: \"typescript\",\n printWidth: 80,\n semi: true,\n tabWidth: 2,\n trailingComma: \"all\",\n\n // PLUG-IN CONFIGURATIONS\n plugins: [\"@trivago/prettier-plugin-sort-imports\"],\n importOrder: [\"<THIRD_PARTY_MODULES>\", \"^[./]\"],\n importOrderSeparation: true,\n importOrderSortSpecifiers: true,\n importOrderParserPlugins: [\"decorators-legacy\", \"typescript\", \"jsx\"],\n};\n",
13
- "rollup.config.js": "const typescript = require(\"@rollup/plugin-typescript\");\nconst terser = require(\"@rollup/plugin-terser\");\n\nmodule.exports = {\n input: \"./src/index.ts\",\n output: {\n dir: \"lib\",\n format: \"esm\",\n entryFileNames: \"[name].mjs\",\n sourcemap: true,\n },\n plugins: [\n typescript({\n tsconfig: \"tsconfig.json\",\n module: \"ES2020\",\n target: \"ES2020\",\n }),\n terser({\n format: {\n comments: \"some\",\n beautify: true,\n ecma: \"2020\",\n },\n compress: false,\n mangle: false,\n module: true,\n }),\n ],\n};\n",
9
+ "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![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)\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> ![Nestia Logo](https://nestia.io/logo.png)\n> \n> [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE)\n> [![npm version](https://img.shields.io/npm/v/@nestia/core.svg)](https://www.npmjs.com/package/@nestia/core)\n> [![Downloads](https://img.shields.io/npm/dm/@nestia/core.svg)](https://www.npmjs.com/package/@nestia/core)\n> [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)\n> [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](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",
10
+ "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",
11
+ "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\": \"^12.0.0\",\n \"tgrid\": \"^1.2.1\",\n \"typia\": \"^13.0.2\"\n },\n \"devDependencies\": {\n \"@nestia/e2e\": \"^12.0.0\",\n \"@ttsc/unplugin\": \"^0.18.2\",\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.18.2\",\n \"typescript\": \"^7.0.2\",\n \"@nestia/core\": \"^12.0.0\"\n },\n \"packageManager\": \"pnpm@10.19.0\"\n}",
12
+ "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",
14
13
  "src/HttpError.ts": "export { HttpError } from \"@nestia/fetcher\";\n",
15
14
  "src/IConnection.ts": "export type { IConnection } from \"@nestia/fetcher\";\n",
16
15
  "src/index.ts": "import * as api from \"./module\";\n\nexport * from \"./module\";\nexport default api;\n",
@@ -20,8 +19,8 @@ exports.SDK_TEMPLATE = {
20
19
  "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",
21
20
  "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",
22
21
  "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",
23
- "test/tsconfig.json": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"noEmit\": true,\n \"paths\": {\n \"@ORGANIZATION/PROJECT-api\": [\"../src\"],\n \"@ORGANIZATION/PROJECT-api/lib/*\": [\"../src/*\"],\n },\n \"plugins\": [\n ],\n \"rootDir\": \"../\",\n },\n \"include\": [\n \".\", \n \"../src\",\n ],\n}",
22
+ "test/tsconfig.json": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"noEmit\": true,\n \"rootDir\": \"../\",\n },\n \"include\": [\n \".\", \n \"../src\",\n ],\n}",
24
23
  "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",
25
- "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\": \"ES2015\", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */\n \"lib\": [\n \"DOM\",\n \"ES2015\"\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\": {\n \"@ORGANIZATION/PROJECT-api\": [\"../src\"],\n \"@ORGANIZATION/PROJECT-api/lib/*\": [\"../src/*\"],\n }, /* Specify a set of entries that re-map imports to additional lookup locations. */\n // \"rootDirs\": [], /* Allow multiple folders to be treated as one when resolving modules. */\n // \"typeRoots\": [], /* Specify multiple folders that act like './node_modules/@types'. */\n \"types\": [\"*\"], /* Specify type package names to be included without being referenced in a source file. */\n // \"allowUmdGlobalAccess\": true, /* Allow accessing UMD globals from modules. */\n // \"moduleSuffixes\": [], /* List of file name suffixes to search when resolving a module. */\n \"resolveJsonModule\": true, /* Enable importing .json files. */\n // \"noResolve\": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */\n /* 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 \"plugins\": [\n ],\n },\n \"include\": [\"src\"],\n}"
24
+ "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}"
26
25
  };
27
26
  //# sourceMappingURL=SDK_TEMPLATE.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SDK_TEMPLATE.js","sourceRoot":"","sources":["../../src/bundles/SDK_TEMPLATE.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAA2B;IAClD,YAAY,EAAE,uEAAuE;IACrF,qBAAqB,EAAE,wuBAAwuB;IAC/vB,uBAAuB,EAAE,oQAAoQ;IAC7R,SAAS,EAAE,ukCAAukC;IACllC,WAAW,EAAE,0nHAA0nH;IACvoH,UAAU,EAAE,gqBAAgqB;IAC5qB,cAAc,EAAE,y4DAAy4D;IACz5D,oBAAoB,EAAE,kcAAkc;IACxd,kBAAkB,EAAE,8mBAA8mB;IACloB,kBAAkB,EAAE,kDAAkD;IACtE,oBAAoB,EAAE,yDAAyD;IAC/E,cAAc,EAAE,0FAA0F;IAC1G,eAAe,EAAE,0HAA0H;IAC3I,cAAc,EAAE,g2lDAAg2lD;IACh3lD,oBAAoB,EAAE,yLAAyL;IAC/M,eAAe,EAAE,2uFAA2uF;IAC5vF,eAAe,EAAE,8rBAA8rB;IAC/sB,iBAAiB,EAAE,2jBAA2jB;IAC9kB,oBAAoB,EAAE,0VAA0V;IAChX,8BAA8B,EAAE,i4GAAi4G;IACj6G,eAAe,EAAE,6mWAA6mW;CAC/nW,CAAA"}
1
+ {"version":3,"file":"SDK_TEMPLATE.js","sourceRoot":"","sources":["../../src/bundles/SDK_TEMPLATE.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAA2B;IAClD,YAAY,EAAE,uDAAuD;IACrE,qBAAqB,EAAE,wuBAAwuB;IAC/vB,uBAAuB,EAAE,oQAAoQ;IAC7R,SAAS,EAAE,ukCAAukC;IACllC,WAAW,EAAE,knHAAknH;IAC/nH,UAAU,EAAE,mqBAAmqB;IAC/qB,cAAc,EAAE,6vEAA6vE;IAC7wE,qBAAqB,EAAE,6cAA6c;IACpe,kBAAkB,EAAE,kDAAkD;IACtE,oBAAoB,EAAE,yDAAyD;IAC/E,cAAc,EAAE,0FAA0F;IAC1G,eAAe,EAAE,0HAA0H;IAC3I,cAAc,EAAE,g2lDAAg2lD;IACh3lD,oBAAoB,EAAE,yLAAyL;IAC/M,eAAe,EAAE,2uFAA2uF;IAC5vF,eAAe,EAAE,8rBAA8rB;IAC/sB,iBAAiB,EAAE,2jBAA2jB;IAC9kB,oBAAoB,EAAE,oLAAoL;IAC1M,8BAA8B,EAAE,i4GAAi4G;IACj6G,eAAe,EAAE,89VAA89V;CACh/V,CAAA"}