@puq/type 0.0.20 → 0.0.23
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 +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/common/package-json.d.ts +72 -0
- package/dist/lib/common/package-json.d.ts.map +1 -0
- package/dist/lib/common/package-json.js +3 -0
- package/dist/lib/common/package-json.js.map +1 -0
- package/dist/lib/property/common.d.ts +2 -1
- package/dist/lib/property/common.d.ts.map +1 -1
- package/dist/lib/property/common.js.map +1 -1
- package/dist/lib/property/string-format.d.ts +1 -1
- package/dist/lib/property/string-format.d.ts.map +1 -1
- package/dist/lib/property/string-format.js.map +1 -1
- package/dist/lib/property/string.d.ts +2 -2
- package/dist/lib/property/string.d.ts.map +1 -1
- package/dist/lib/property/string.js.map +1 -1
- package/package.json +1 -2
package/dist/index.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
export * from './lib/common/package-json.js';
|
1
2
|
export * from './lib/dto/count-result.js';
|
2
3
|
export * from './lib/dto/delete-result.js';
|
3
4
|
export * from './lib/dto/relation-param.js';
|
@@ -10,6 +11,7 @@ export * from './lib/property/big-integer.js';
|
|
10
11
|
export * from './lib/property/boolean.js';
|
11
12
|
export * from './lib/property/common-number.js';
|
12
13
|
export * from './lib/property/common.js';
|
14
|
+
export * from './lib/property/database-type.js';
|
13
15
|
export * from './lib/property/date.js';
|
14
16
|
export * from './lib/property/integer-format.js';
|
15
17
|
export * from './lib/property/integer.js';
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB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;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
// @index('./**/*.ts', f => `export * from '${f.path}.js'`)
|
2
|
+
export * from './lib/common/package-json.js';
|
2
3
|
export * from './lib/dto/count-result.js';
|
3
4
|
export * from './lib/dto/delete-result.js';
|
4
5
|
export * from './lib/dto/relation-param.js';
|
@@ -11,6 +12,7 @@ export * from './lib/property/big-integer.js';
|
|
11
12
|
export * from './lib/property/boolean.js';
|
12
13
|
export * from './lib/property/common-number.js';
|
13
14
|
export * from './lib/property/common.js';
|
15
|
+
export * from './lib/property/database-type.js';
|
14
16
|
export * from './lib/property/date.js';
|
15
17
|
export * from './lib/property/integer-format.js';
|
16
18
|
export * from './lib/property/integer.js';
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// @index('./**/*.ts', f => `export * from '${f.path}.js'`)\nexport * from './lib/dto/count-result.js';\nexport * from './lib/dto/delete-result.js';\nexport * from './lib/dto/relation-param.js';\nexport * from './lib/dto/update-result.js';\nexport * from './lib/model/base.js';\nexport * from './lib/model/id.js';\nexport * from './lib/model/timestamp.js';\nexport * from './lib/property/array.js';\nexport * from './lib/property/big-integer.js';\nexport * from './lib/property/boolean.js';\nexport * from './lib/property/common-number.js';\nexport * from './lib/property/common.js';\nexport * from './lib/property/date.js';\nexport * from './lib/property/integer-format.js';\nexport * from './lib/property/integer.js';\nexport * from './lib/property/number-format.js';\nexport * from './lib/property/number.js';\nexport * from './lib/property/object.js';\nexport * from './lib/property/property-type.js';\nexport * from './lib/property/property.js';\nexport * from './lib/property/string-format.js';\nexport * from './lib/property/string.js';\nexport * from './lib/utils/key-of.js';\nexport * from './lib/utils/keys.js';\nexport * from './lib/utils/pick-optional.js';\nexport * from './lib/utils/pick-required.js';\nexport * from './lib/utils/type.js';\n"],"names":[],"rangeMappings":"
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// @index('./**/*.ts', f => `export * from '${f.path}.js'`)\nexport * from './lib/common/package-json.js';\nexport * from './lib/dto/count-result.js';\nexport * from './lib/dto/delete-result.js';\nexport * from './lib/dto/relation-param.js';\nexport * from './lib/dto/update-result.js';\nexport * from './lib/model/base.js';\nexport * from './lib/model/id.js';\nexport * from './lib/model/timestamp.js';\nexport * from './lib/property/array.js';\nexport * from './lib/property/big-integer.js';\nexport * from './lib/property/boolean.js';\nexport * from './lib/property/common-number.js';\nexport * from './lib/property/common.js';\nexport * from './lib/property/database-type.js';\nexport * from './lib/property/date.js';\nexport * from './lib/property/integer-format.js';\nexport * from './lib/property/integer.js';\nexport * from './lib/property/number-format.js';\nexport * from './lib/property/number.js';\nexport * from './lib/property/object.js';\nexport * from './lib/property/property-type.js';\nexport * from './lib/property/property.js';\nexport * from './lib/property/string-format.js';\nexport * from './lib/property/string.js';\nexport * from './lib/utils/key-of.js';\nexport * from './lib/utils/keys.js';\nexport * from './lib/utils/pick-optional.js';\nexport * from './lib/utils/pick-required.js';\nexport * from './lib/utils/type.js';\n"],"names":[],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,2DAA2D;AAC3D,cAAc,+BAA+B;AAC7C,cAAc,4BAA4B;AAC1C,cAAc,6BAA6B;AAC3C,cAAc,8BAA8B;AAC5C,cAAc,6BAA6B;AAC3C,cAAc,sBAAsB;AACpC,cAAc,oBAAoB;AAClC,cAAc,2BAA2B;AACzC,cAAc,0BAA0B;AACxC,cAAc,gCAAgC;AAC9C,cAAc,4BAA4B;AAC1C,cAAc,kCAAkC;AAChD,cAAc,2BAA2B;AACzC,cAAc,kCAAkC;AAChD,cAAc,yBAAyB;AACvC,cAAc,mCAAmC;AACjD,cAAc,4BAA4B;AAC1C,cAAc,kCAAkC;AAChD,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,kCAAkC;AAChD,cAAc,6BAA6B;AAC3C,cAAc,kCAAkC;AAChD,cAAc,2BAA2B;AACzC,cAAc,wBAAwB;AACtC,cAAc,sBAAsB;AACpC,cAAc,+BAA+B;AAC7C,cAAc,+BAA+B;AAC7C,cAAc,sBAAsB"}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
export type PackageJSON = {
|
2
|
+
name: string;
|
3
|
+
version: string;
|
4
|
+
license: string;
|
5
|
+
description: string;
|
6
|
+
keywords: string[];
|
7
|
+
homepage: string;
|
8
|
+
categories: string[];
|
9
|
+
funding: string[];
|
10
|
+
icon: string;
|
11
|
+
type: string;
|
12
|
+
main: string;
|
13
|
+
module: string;
|
14
|
+
types: string;
|
15
|
+
author: {
|
16
|
+
email: string;
|
17
|
+
name: string;
|
18
|
+
url: string;
|
19
|
+
};
|
20
|
+
repository: {
|
21
|
+
directory: string;
|
22
|
+
url: string;
|
23
|
+
type: string;
|
24
|
+
};
|
25
|
+
bugs: {
|
26
|
+
email: string;
|
27
|
+
url: string;
|
28
|
+
};
|
29
|
+
publishConfig: {
|
30
|
+
access: string;
|
31
|
+
tag: string;
|
32
|
+
};
|
33
|
+
files: string[];
|
34
|
+
contributors: [
|
35
|
+
{
|
36
|
+
email: string;
|
37
|
+
name: string;
|
38
|
+
url: string;
|
39
|
+
}
|
40
|
+
];
|
41
|
+
exports: {
|
42
|
+
'./package.json': string;
|
43
|
+
'.': {
|
44
|
+
types: string;
|
45
|
+
import: string;
|
46
|
+
default: string;
|
47
|
+
};
|
48
|
+
};
|
49
|
+
nx: {
|
50
|
+
sourceRoot: string;
|
51
|
+
targets: {
|
52
|
+
build: {
|
53
|
+
executor: string;
|
54
|
+
outputs: string[];
|
55
|
+
options: {
|
56
|
+
outputPath: string;
|
57
|
+
main: string;
|
58
|
+
tsConfig: string;
|
59
|
+
skipTypeCheck: true;
|
60
|
+
stripLeadingPaths: true;
|
61
|
+
};
|
62
|
+
};
|
63
|
+
doc: {
|
64
|
+
command: string;
|
65
|
+
};
|
66
|
+
};
|
67
|
+
};
|
68
|
+
dependencies: Record<string, string>;
|
69
|
+
devDependencies: Record<string, string>;
|
70
|
+
peerDependencies: Record<string, string>;
|
71
|
+
};
|
72
|
+
//# sourceMappingURL=package-json.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"package-json.d.ts","sourceRoot":"","sources":["../../../src/lib/common/package-json.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,UAAU,EAAE;QACV,SAAS,EAAE,MAAM,CAAC;QAClB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,aAAa,EAAE;QACb,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,YAAY,EAAE;QACZ;YACE,KAAK,EAAE,MAAM,CAAC;YACd,IAAI,EAAE,MAAM,CAAC;YACb,GAAG,EAAE,MAAM,CAAC;SACb;KACF,CAAC;IACF,OAAO,EAAE;QACP,gBAAgB,EAAE,MAAM,CAAC;QACzB,GAAG,EAAE;YACH,KAAK,EAAE,MAAM,CAAC;YACd,MAAM,EAAE,MAAM,CAAC;YACf,OAAO,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,CAAC;IACF,EAAE,EAAE;QACF,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE;YACP,KAAK,EAAE;gBACL,QAAQ,EAAE,MAAM,CAAC;gBACjB,OAAO,EAAE,MAAM,EAAE,CAAC;gBAClB,OAAO,EAAE;oBACP,UAAU,EAAE,MAAM,CAAC;oBACnB,IAAI,EAAE,MAAM,CAAC;oBACb,QAAQ,EAAE,MAAM,CAAC;oBACjB,aAAa,EAAE,IAAI,CAAC;oBACpB,iBAAiB,EAAE,IAAI,CAAC;iBACzB,CAAC;aACH,CAAC;YACF,GAAG,EAAE;gBACH,OAAO,EAAE,MAAM,CAAC;aACjB,CAAC;SACH,CAAC;KACH,CAAC;IACF,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/common/package-json.ts"],"sourcesContent":["export type PackageJSON = {\r\n name: string;\r\n version: string;\r\n license: string;\r\n description: string;\r\n keywords: string[];\r\n homepage: string;\r\n categories: string[];\r\n funding: string[];\r\n icon: string;\r\n type: string;\r\n main: string;\r\n module: string;\r\n types: string;\r\n author: {\r\n email: string;\r\n name: string;\r\n url: string;\r\n };\r\n repository: {\r\n directory: string;\r\n url: string;\r\n type: string;\r\n };\r\n bugs: {\r\n email: string;\r\n url: string;\r\n };\r\n publishConfig: {\r\n access: string;\r\n tag: string;\r\n };\r\n files: string[];\r\n contributors: [\r\n {\r\n email: string;\r\n name: string;\r\n url: string;\r\n }\r\n ];\r\n exports: {\r\n './package.json': string;\r\n '.': {\r\n types: string;\r\n import: string;\r\n default: string;\r\n };\r\n };\r\n nx: {\r\n sourceRoot: string;\r\n targets: {\r\n build: {\r\n executor: string;\r\n outputs: string[];\r\n options: {\r\n outputPath: string;\r\n main: string;\r\n tsConfig: string;\r\n skipTypeCheck: true;\r\n stripLeadingPaths: true;\r\n };\r\n };\r\n doc: {\r\n command: string;\r\n };\r\n };\r\n };\r\n dependencies: Record<string, string>;\r\n devDependencies: Record<string, string>;\r\n peerDependencies: Record<string, string>;\r\n};\r\n"],"names":[],"rangeMappings":"","mappings":"AAAA,WAsEE"}
|
@@ -8,6 +8,7 @@ export type CommonOptions<T> = {
|
|
8
8
|
* Property type
|
9
9
|
*/
|
10
10
|
type: PropertyType;
|
11
|
+
name?: string;
|
11
12
|
/**
|
12
13
|
* Check the value is not undefined
|
13
14
|
*/
|
@@ -51,7 +52,7 @@ export type CommonOptions<T> = {
|
|
51
52
|
/**
|
52
53
|
* Check the value is not equal to property
|
53
54
|
*/
|
54
|
-
|
55
|
+
notEqualToProperty?: string;
|
55
56
|
/**
|
56
57
|
* If set, the value is ignored unless the target property is set
|
57
58
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/lib/property/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;IAC7B;;OAEG;IACH,IAAI,EAAE,YAAY,CA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AAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IAEzB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/property/common.ts"],"sourcesContent":["import { DatabaseType } from './database-type.js';\r\nimport { PropertyType } from './property-type.js';\r\n\r\n/**\r\n * Common property options\r\n */\r\nexport type CommonOptions<T> = {\r\n /**\r\n * Property type\r\n */\r\n type: PropertyType;\r\n\r\n /**\r\n * Check the value is not undefined\r\n */\r\n required?: boolean;\r\n\r\n /**\r\n * Check the property is unique or not\r\n */\r\n unique?: boolean;\r\n\r\n /**\r\n *\r\n */\r\n readonly?: boolean;\r\n\r\n /**\r\n * Property description\r\n */\r\n description?: string;\r\n\r\n /**\r\n * If set false, the property is excluded.\r\n */\r\n expose?: boolean;\r\n\r\n /**\r\n * Default value in case the input is undefined\r\n */\r\n default?: T;\r\n\r\n /**\r\n * Example value\r\n */\r\n example?: T;\r\n\r\n /**\r\n * Example values\r\n */\r\n examples?: Readonly<T[]>;\r\n\r\n /**\r\n * If ture, the string values are accepted and transformed\r\n */\r\n acceptString?: boolean;\r\n\r\n /**\r\n * Check the value is equal to property\r\n */\r\n equalToProperty?: string;\r\n\r\n /**\r\n * Check the value is not equal to property\r\n */\r\n
|
1
|
+
{"version":3,"sources":["../../../src/lib/property/common.ts"],"sourcesContent":["import { DatabaseType } from './database-type.js';\r\nimport { PropertyType } from './property-type.js';\r\n\r\n/**\r\n * Common property options\r\n */\r\nexport type CommonOptions<T> = {\r\n /**\r\n * Property type\r\n */\r\n type: PropertyType;\r\n\r\n name?: string;\r\n\r\n /**\r\n * Check the value is not undefined\r\n */\r\n required?: boolean;\r\n\r\n /**\r\n * Check the property is unique or not\r\n */\r\n unique?: boolean;\r\n\r\n /**\r\n *\r\n */\r\n readonly?: boolean;\r\n\r\n /**\r\n * Property description\r\n */\r\n description?: string;\r\n\r\n /**\r\n * If set false, the property is excluded.\r\n */\r\n expose?: boolean;\r\n\r\n /**\r\n * Default value in case the input is undefined\r\n */\r\n default?: T;\r\n\r\n /**\r\n * Example value\r\n */\r\n example?: T;\r\n\r\n /**\r\n * Example values\r\n */\r\n examples?: Readonly<T[]>;\r\n\r\n /**\r\n * If ture, the string values are accepted and transformed\r\n */\r\n acceptString?: boolean;\r\n\r\n /**\r\n * Check the value is equal to property\r\n */\r\n equalToProperty?: string;\r\n\r\n /**\r\n * Check the value is not equal to property\r\n */\r\n notEqualToProperty?: string;\r\n\r\n /**\r\n * If set, the value is ignored unless the target property is set\r\n */\r\n dependOnProperty?: string;\r\n\r\n /**\r\n * If set, the property only exist if the provided property does not\r\n */\r\n notWithProperty?: string;\r\n\r\n /**\r\n * Hash the data\r\n */\r\n hash?: boolean;\r\n\r\n /**\r\n * Encrypt the data\r\n */\r\n encrypt?: boolean;\r\n\r\n /**\r\n * Allows us to pick the right column type for the data\r\n */\r\n databaseType?: DatabaseType;\r\n};\r\n"],"names":[],"rangeMappings":";;","mappings":"AAGA;;CAEC,GACD,WAuFE"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export type StringFormat = 'email' | 'phone' | 'password' | '
|
1
|
+
export type StringFormat = 'alpha' | 'alphanumeric' | 'ascii' | 'base32' | 'base58' | 'base64' | 'bic' | 'boolean-string' | 'byte-length' | 'credit-card' | 'currency' | 'data-uri' | 'date-string' | 'decimal' | 'ean' | 'email' | 'ethereum-address' | 'firebase-push-id' | 'hash' | 'hex-color' | 'hsl' | 'iban' | 'identity-card' | 'imei' | 'ip-range' | 'ip' | 'isbn' | 'isin' | 'iso31661-alpha2' | 'iso31661-alpha3' | 'iso4217' | 'iso8601' | 'isrc' | 'issn' | 'json' | 'jwt' | 'lat-long' | 'locale' | 'mac-address' | 'magnet-uri' | 'mime-type' | 'mobile-phone' | 'mongo-id' | 'number-string' | 'octal' | 'passport-number' | 'phone-number' | 'port' | 'postal-code' | 'rgb-color' | 'sem-ver' | 'slug' | 'strong-password' | 'time-zone' | 'url' | 'uuid' | 'variable-width';
|
2
2
|
//# sourceMappingURL=string-format.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"string-format.d.ts","sourceRoot":"","sources":["../../../src/lib/property/string-format.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,OAAO,GACP,UAAU,GACV,MAAM,GACN,KAAK,GACL,KAAK,CAAC"}
|
1
|
+
{"version":3,"file":"string-format.d.ts","sourceRoot":"","sources":["../../../src/lib/property/string-format.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,cAAc,GACd,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,UAAU,GACV,UAAU,GACV,aAAa,GACb,SAAS,GACT,KAAK,GACL,OAAO,GACP,kBAAkB,GAClB,kBAAkB,GAClB,MAAM,GACN,WAAW,GACX,KAAK,GACL,MAAM,GACN,eAAe,GACf,MAAM,GACN,UAAU,GACV,IAAI,GACJ,MAAM,GACN,MAAM,GACN,iBAAiB,GACjB,iBAAiB,GACjB,SAAS,GACT,SAAS,GACT,MAAM,GACN,MAAM,GACN,MAAM,GACN,KAAK,GACL,UAAU,GACV,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,WAAW,GACX,cAAc,GACd,UAAU,GACV,eAAe,GACf,OAAO,GACP,iBAAiB,GACjB,cAAc,GACd,MAAM,GACN,aAAa,GACb,WAAW,GACX,SAAS,GACT,MAAM,GACN,iBAAiB,GACjB,WAAW,GACX,KAAK,GACL,MAAM,GACN,gBAAgB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/property/string-format.ts"],"sourcesContent":["export type StringFormat =\r\n | 'email'\r\n | 'phone'\r\n | 'password'\r\n | '
|
1
|
+
{"version":3,"sources":["../../../src/lib/property/string-format.ts"],"sourcesContent":["export type StringFormat =\r\n | 'alpha'\r\n | 'alphanumeric'\r\n | 'ascii'\r\n | 'base32'\r\n | 'base58'\r\n | 'base64'\r\n | 'bic'\r\n | 'boolean-string'\r\n | 'byte-length'\r\n | 'credit-card'\r\n | 'currency'\r\n | 'data-uri'\r\n | 'date-string'\r\n | 'decimal'\r\n | 'ean'\r\n | 'email'\r\n | 'ethereum-address'\r\n | 'firebase-push-id'\r\n | 'hash'\r\n | 'hex-color'\r\n | 'hsl'\r\n | 'iban'\r\n | 'identity-card'\r\n | 'imei'\r\n | 'ip-range'\r\n | 'ip'\r\n | 'isbn'\r\n | 'isin'\r\n | 'iso31661-alpha2'\r\n | 'iso31661-alpha3'\r\n | 'iso4217'\r\n | 'iso8601'\r\n | 'isrc'\r\n | 'issn'\r\n | 'json'\r\n | 'jwt'\r\n | 'lat-long'\r\n | 'locale'\r\n | 'mac-address'\r\n | 'magnet-uri'\r\n | 'mime-type'\r\n | 'mobile-phone'\r\n | 'mongo-id'\r\n | 'number-string'\r\n | 'octal'\r\n | 'passport-number'\r\n | 'phone-number'\r\n | 'port'\r\n | 'postal-code'\r\n | 'rgb-color'\r\n | 'sem-ver'\r\n | 'slug'\r\n | 'strong-password'\r\n | 'time-zone'\r\n | 'url'\r\n | 'uuid'\r\n | 'variable-width';\r\n"],"names":[],"rangeMappings":"","mappings":"AAAA,WAyDqB"}
|
@@ -33,11 +33,11 @@ export type __StringOptions = {
|
|
33
33
|
/**
|
34
34
|
* check the string contains
|
35
35
|
*/
|
36
|
-
contain?: string;
|
36
|
+
contain?: string[];
|
37
37
|
/**
|
38
38
|
* Check the string not contain
|
39
39
|
*/
|
40
|
-
notContain?: string;
|
40
|
+
notContain?: string[];
|
41
41
|
};
|
42
42
|
export type StringOptions = Readonly<CommonOptions<string> & __StringOptions>;
|
43
43
|
//# sourceMappingURL=string.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../src/lib/property/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAErD;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../src/lib/property/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAErD;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/property/string.ts"],"sourcesContent":["import { CommonOptions } from './common.js';\r\nimport { StringFormat } from './string-format.js';\r\n\r\nexport type __StringOptions = {\r\n type: 'string';\r\n\r\n /**\r\n * Minimum allowed string length\r\n */\r\n minLength?: number;\r\n /**\r\n * Maximum allowed string length\r\n */\r\n maxLength?: number;\r\n\r\n /**\r\n * String format such as email, password.\r\n */\r\n stringFormat?: StringFormat;\r\n\r\n /**\r\n * Allowed strings\r\n */\r\n enum?: Readonly<unknown[] | Record<string, unknown>>;\r\n\r\n /**\r\n * Not allowed strings\r\n */\r\n notIn?: Readonly<string[]>;\r\n\r\n /**\r\n * string starts with\r\n */\r\n startWith?: string;\r\n\r\n /**\r\n * string ends with\r\n */\r\n endWith?: string;\r\n\r\n /**\r\n * check the string contains\r\n */\r\n contain?: string;\r\n\r\n /**\r\n * Check the string not contain\r\n */\r\n notContain?: string;\r\n};\r\n\r\nexport type StringOptions = Readonly<CommonOptions<string> & __StringOptions>;\r\n"],"names":[],"rangeMappings":"","mappings":"AAmDA,WAA8E"}
|
1
|
+
{"version":3,"sources":["../../../src/lib/property/string.ts"],"sourcesContent":["import { CommonOptions } from './common.js';\r\nimport { StringFormat } from './string-format.js';\r\n\r\nexport type __StringOptions = {\r\n type: 'string';\r\n\r\n /**\r\n * Minimum allowed string length\r\n */\r\n minLength?: number;\r\n /**\r\n * Maximum allowed string length\r\n */\r\n maxLength?: number;\r\n\r\n /**\r\n * String format such as email, password.\r\n */\r\n stringFormat?: StringFormat;\r\n\r\n /**\r\n * Allowed strings\r\n */\r\n enum?: Readonly<unknown[] | Record<string, unknown>>;\r\n\r\n /**\r\n * Not allowed strings\r\n */\r\n notIn?: Readonly<string[]>;\r\n\r\n /**\r\n * string starts with\r\n */\r\n startWith?: string;\r\n\r\n /**\r\n * string ends with\r\n */\r\n endWith?: string;\r\n\r\n /**\r\n * check the string contains\r\n */\r\n contain?: string[];\r\n\r\n /**\r\n * Check the string not contain\r\n */\r\n notContain?: string[];\r\n};\r\n\r\nexport type StringOptions = Readonly<CommonOptions<string> & __StringOptions>;\r\n"],"names":[],"rangeMappings":"","mappings":"AAmDA,WAA8E"}
|