@wisemen/wise-date 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -7,3 +7,5 @@ export * from './future-infinity-date.js';
7
7
  export * from './past-infinity-date.js';
8
8
  export * from './wise-date.factory.js';
9
9
  export * from './wise-date.column.js';
10
+ export * from './is-wise-date-string.validator.js';
11
+ export * from './wise-date.api-property.js';
package/dist/index.js CHANGED
@@ -9,4 +9,6 @@ export * from './future-infinity-date.js';
9
9
  export * from './past-infinity-date.js';
10
10
  export * from './wise-date.factory.js';
11
11
  export * from './wise-date.column.js';
12
+ export * from './is-wise-date-string.validator.js';
13
+ export * from './wise-date.api-property.js';
12
14
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,SAAS,EAAE,CAAA;AAEX,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,SAAS,EAAE,CAAA;AAEX,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oCAAoC,CAAA;AAClD,cAAc,6BAA6B,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { ValidationOptions } from 'class-validator';
2
+ export declare function IsWiseDateString(options?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,5 @@
1
+ import { IsDateWithoutTimeString } from '@wisemen/validators';
2
+ export function IsWiseDateString(options) {
3
+ return IsDateWithoutTimeString({ ...options, allowInfinity: true });
4
+ }
5
+ //# sourceMappingURL=is-wise-date-string.validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-wise-date-string.validator.js","sourceRoot":"","sources":["../lib/is-wise-date-string.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAG7D,MAAM,UAAU,gBAAgB,CAAE,OAA2B;IAC3D,OAAO,uBAAuB,CAAC,EAAE,GAAG,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AACrE,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { ApiPropertyOptions } from '@nestjs/swagger';
2
+ export declare function WiseDateApiProperty(options?: ApiPropertyOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ export function WiseDateApiProperty(options) {
3
+ return ApiProperty({
4
+ ...options,
5
+ oneOf: [
6
+ { type: 'string', format: 'date' },
7
+ { enum: ['infinity'] },
8
+ { enum: ['-infinity'] }
9
+ ]
10
+ });
11
+ }
12
+ //# sourceMappingURL=wise-date.api-property.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wise-date.api-property.js","sourceRoot":"","sources":["../lib/wise-date.api-property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAsB,MAAM,iBAAiB,CAAA;AAEjE,MAAM,UAAU,mBAAmB,CAAE,OAA4B;IAC/D,OAAO,WAAW,CAAC;QACjB,GAAG,OAAO;QACV,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE;YAClC,EAAE,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE;YACtB,EAAE,IAAI,EAAE,CAAC,WAAW,CAAC,EAAE;SACxB;KACF,CAAC,CAAA;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wisemen/wise-date",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",
@@ -19,16 +19,21 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "dayjs": "^1.11.13",
22
- "typeorm": "^0.3.22"
22
+ "typeorm": "^0.3.24"
23
+ },
24
+ "peerDependencies": {
25
+ "@nestjs/swagger": "^11.2.0",
26
+ "class-validator": "^0.14.1",
27
+ "@wisemen/validators": "0.0.12"
23
28
  },
24
29
  "devDependencies": {
25
- "@types/node": "^22.14.0",
30
+ "@types/node": "^22.15.27",
26
31
  "expect": "^29.7.0",
27
32
  "typescript": "^5.8.3",
28
- "@stylistic/eslint-plugin": "^4.2.0",
29
- "@typescript-eslint/eslint-plugin": "^8.29.1",
33
+ "@stylistic/eslint-plugin": "^4.4.0",
34
+ "@typescript-eslint/eslint-plugin": "^8.33.0",
30
35
  "@wisemen/eslint-config-nestjs": "^0.1.7",
31
- "eslint": "^9.24.0"
36
+ "eslint": "^9.27.0"
32
37
  },
33
38
  "author": "Kobe Kwanten",
34
39
  "contributors": [],