diff --git a/benchmark/package.json b/benchmark/package.json index 3d86d4c66..e93636491 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -42,7 +42,7 @@ "reflect-metadata": "^0.2.2", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.5.0" + "typia": "^6.5.2" }, "devDependencies": { "@types/autocannon": "^7.9.0", diff --git a/package.json b/package.json index 0bf9031fc..4587484fd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.7.1", + "version": "3.7.2-dev.20240720", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json index 265feecfd..55fd294af 100644 --- a/packages/benchmark/package.json +++ b/packages/benchmark/package.json @@ -34,7 +34,7 @@ "ts-patch": "^3.2.1", "typescript": "^5.5.3", "typescript-transform-paths": "^3.4.7", - "typia": "^6.5.0", + "typia": "^6.5.2", "uuid": "^10.0.0" }, "dependencies": { diff --git a/packages/core/package.json b/packages/core/package.json index 615349c54..1c9772093 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.7.1", + "version": "3.7.2-dev.20240720", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,10 +36,10 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.1", + "@nestia/fetcher": "../fetcher/nestia-fetcher-3.7.2-dev.20240720.tgz", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", - "@samchon/openapi": "^0.4.1", + "@samchon/openapi": "^0.4.2", "detect-ts-node": "^1.0.5", "get-function-location": "^2.0.0", "glob": "^7.2.0", @@ -49,16 +49,16 @@ "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", "tgrid": "^1.0.0", - "typia": "^6.5.0", + "typia": "^6.5.2", "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.1", + "@nestia/fetcher": ">=3.7.2-dev.20240720", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", - "typia": ">=6.5.0 <7.0.0" + "typia": ">=6.5.2 <7.0.0" }, "devDependencies": { "@fastify/multipart": "^8.1.0", diff --git a/packages/e2e/package.json b/packages/e2e/package.json index dd29e5196..668f4a1e8 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -41,7 +41,7 @@ "ts-patch": "^3.2.1", "typescript": "^5.5.3", "typescript-transform-paths": "^3.4.7", - "typia": "^6.5.0" + "typia": "^6.5.2" }, "files": [ "lib", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index 227f53125..792671fcd 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.7.1", + "version": "3.7.2-dev.20240720", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -43,6 +43,6 @@ "src" ], "dependencies": { - "@samchon/openapi": "^0.4.1" + "@samchon/openapi": "^0.4.2" } } \ No newline at end of file diff --git a/packages/fetcher/src/Primitive.ts b/packages/fetcher/src/Primitive.ts index d3fc2ecf3..d63a4752e 100644 --- a/packages/fetcher/src/Primitive.ts +++ b/packages/fetcher/src/Primitive.ts @@ -47,15 +47,17 @@ type PrimitiveMain = Instance extends [never] ? never : ValueOf extends object ? Instance extends object - ? Instance extends NativeClass - ? never + ? Instance extends Date + ? string & FormatDateTime : Instance extends IJsonable ? ValueOf extends object ? Raw extends object ? PrimitiveObject // object would be primitified : never // cannot be : ValueOf // atomic value - : PrimitiveObject // object would be primitified + : Instance extends NativeClass + ? never + : PrimitiveObject // object would be primitified : never // cannot be : ValueOf; @@ -107,7 +109,10 @@ type NativeClass = | Float64Array | ArrayBuffer | SharedArrayBuffer - | DataView; + | DataView + | Blob + | File + | RegExp; type IsTuple = [T] extends [ never, @@ -134,3 +139,16 @@ interface IValueOf { interface IJsonable { toJSON(): T; } + +type FormatDateTime = { + "typia.tag"?: { + target: "string"; + kind: "format"; + value: "date-time"; + validate: `/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T|\\s)([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i.test($input)`; + exclusive: ["format", "pattern"]; + schema: { + format: "date-time"; + }; + }; +}; diff --git a/packages/fetcher/src/Resolved.ts b/packages/fetcher/src/Resolved.ts index c15627882..139cd85b2 100644 --- a/packages/fetcher/src/Resolved.ts +++ b/packages/fetcher/src/Resolved.ts @@ -70,6 +70,7 @@ type ResolvedObject = | DataView | Blob | File + | RegExp ? T : { [P in keyof T]: ResolvedMain; diff --git a/packages/migrate/package.json b/packages/migrate/package.json index 3f96ef584..439d1a3b0 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -71,7 +71,7 @@ "prettier": "^3.2.5", "tstl": "^3.0.0", "typescript": "^5.5.3", - "typia": "^6.5.0" + "typia": "^6.5.2" }, "files": [ "lib", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index bada1691f..db4dee64e 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.7.1", + "version": "3.7.2-dev.20240720", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,9 +32,9 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.1", - "@nestia/core": "^3.7.1", - "@samchon/openapi": "^0.4.1", + "@nestia/fetcher": "../fetcher/nestia-fetcher-3.7.2-dev.20240720.tgz", + "@nestia/core": "../core/nestia-core-3.7.2-dev.20240720.tgz", + "@samchon/openapi": "^0.4.2", "cli": "^1.0.1", "get-function-location": "^2.0.0", "glob": "^7.2.0", @@ -44,16 +44,16 @@ "tsconfck": "^2.0.1", "tsconfig-paths": "^4.1.1", "tstl": "^3.0.0", - "typia": "^6.5.0" + "typia": "^6.5.2" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.1", - "@nestia/core": ">=3.7.1", + "@nestia/fetcher": ">=3.7.2-dev.20240720", + "@nestia/core": ">=3.7.2-dev.20240720", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "ts-node": ">=10.6.0", - "typia": ">=6.5.0 <7.0.0" + "typia": ">=6.5.2 <7.0.0" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", diff --git a/test/features/date/src/api/structures/IDateDefined.ts b/test/features/date/src/api/structures/IDateDefined.ts index 4cf4c5d30..74863bf28 100644 --- a/test/features/date/src/api/structures/IDateDefined.ts +++ b/test/features/date/src/api/structures/IDateDefined.ts @@ -6,9 +6,6 @@ export interface IDateDefined { date: Date; - /** - * @format date-time - */ date_with_tag: Date; date_but_union: Date | Buffer; diff --git a/test/features/date/tsconfig.json b/test/features/date/tsconfig.json index c33dfa28f..3c815da8b 100644 --- a/test/features/date/tsconfig.json +++ b/test/features/date/tsconfig.json @@ -45,9 +45,9 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "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. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ + "outDir": "./bin", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - "noEmit": true, /* Disable emitting files from a compilation. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ diff --git a/test/features/distribute-assert-json/packages/api/package.json b/test/features/distribute-assert-json/packages/api/package.json index 1da929fb6..6487ac2c7 100644 --- a/test/features/distribute-assert-json/packages/api/package.json +++ b/test/features/distribute-assert-json/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.5.0" + "typia": "^6.5.2" } } \ No newline at end of file diff --git a/test/features/distribute-assert/packages/api/package.json b/test/features/distribute-assert/packages/api/package.json index 1da929fb6..6487ac2c7 100644 --- a/test/features/distribute-assert/packages/api/package.json +++ b/test/features/distribute-assert/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.5.0" + "typia": "^6.5.2" } } \ No newline at end of file diff --git a/test/features/distribute-json/packages/api/package.json b/test/features/distribute-json/packages/api/package.json index 1da929fb6..6487ac2c7 100644 --- a/test/features/distribute-json/packages/api/package.json +++ b/test/features/distribute-json/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.5.0" + "typia": "^6.5.2" } } \ No newline at end of file diff --git a/test/features/distribute/packages/api/package.json b/test/features/distribute/packages/api/package.json index 1da929fb6..6487ac2c7 100644 --- a/test/features/distribute/packages/api/package.json +++ b/test/features/distribute/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.5.0" + "typia": "^6.5.2" } } \ No newline at end of file diff --git a/test/package.json b/test/package.json index cdb1ed514..ff6a91dc0 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@samchon/nestia-test", - "version": "3.7.1", + "version": "3.7.2-dev.20240720", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,9 +26,9 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.7.1", + "@nestia/sdk": "../packages/sdk/nestia-sdk-3.7.2-dev.20240720.tgz", "@nestjs/swagger": "^7.1.2", - "@samchon/openapi": "^0.4.1", + "@samchon/openapi": "^0.4.2", "@types/express": "^4.17.17", "@types/node": "20.11.16", "@types/uuid": "^9.0.8", @@ -40,16 +40,16 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.7.1", + "@nestia/core": "../packages/core/nestia-core-3.7.2-dev.20240720.tgz", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^3.7.1", + "@nestia/fetcher": "../packages/fetcher/nestia-fetcher-3.7.2-dev.20240720.tgz", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", "@nestjs/platform-fastify": "^10.3.5", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.5.0", + "typia": "^6.5.2", "uuid": "^9.0.1" } } \ No newline at end of file diff --git a/website/package.json b/website/package.json index 6eb8875e4..d66f32c42 100644 --- a/website/package.json +++ b/website/package.json @@ -34,7 +34,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-mui-fileuploader": "^0.5.2", - "typia": "^6.5.0" + "typia": "^6.5.2" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0",