@tstdl/base 0.78.0-beta19 → 0.78.0-beta21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.78.0-beta19",
3
+ "version": "0.78.0-beta21",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -18,7 +18,7 @@
18
18
  "luxon": "^3.0",
19
19
  "reflect-metadata": "^0.1",
20
20
  "rxjs": "^7.5",
21
- "type-fest": "^2.18"
21
+ "type-fest": "^2.19"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/chroma-js": "2.1",
@@ -39,7 +39,7 @@
39
39
  "peerDependencies": {
40
40
  "@elastic/elasticsearch": "^8.2",
41
41
  "@koa/router": "^12.0",
42
- "@tstdl/angular": "^0.11.0-beta19",
42
+ "@tstdl/angular": "^0.11.0-beta21",
43
43
  "chroma-js": "^2.4",
44
44
  "got": "^12.3",
45
45
  "handlebars": "^4.7",
@@ -49,7 +49,7 @@
49
49
  "mongodb": "4.9",
50
50
  "nodemailer": "^6.7",
51
51
  "puppeteer": "^16.2",
52
- "undici": "^5.9",
52
+ "undici": "^5.10",
53
53
  "urlpattern-polyfill": "^4.0"
54
54
  },
55
55
  "peerDependenciesMeta": {
@@ -1,4 +1,7 @@
1
1
  import type { OneOrMany, Record } from "../../types";
2
2
  import type { Simplify } from 'type-fest';
3
3
  import type { ObjectSchema } from '../types';
4
- export declare function exclude<T extends Record, K extends keyof T>(schema: ObjectSchema<T>, key: OneOrMany<K>): ObjectSchema<Simplify<Omit<T, K>>>;
4
+ /**
5
+ * @deprecated use {@link omit}
6
+ */
7
+ export declare function exclude<T extends Record, K extends keyof T>(schema: ObjectSchema<T>, keys: OneOrMany<K>): ObjectSchema<Simplify<Omit<T, K>>>;
@@ -1,17 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.exclude = void 0;
4
- const array_1 = require("../../utils/array/array");
5
- const types_1 = require("../types");
6
- function exclude(schema, key) {
7
- const keys = (0, array_1.toArray)(key);
8
- const entries = Object.entries(schema.properties);
9
- const pickedEntries = entries.filter(([propertyKey]) => !keys.includes(propertyKey));
10
- const pickedSchema = (0, types_1.objectSchema)({
11
- ...schema,
12
- properties: Object.fromEntries(pickedEntries)
13
- });
14
- return pickedSchema;
4
+ const omit_1 = require("./omit");
5
+ /**
6
+ * @deprecated use {@link omit}
7
+ */
8
+ function exclude(schema, keys) {
9
+ return (0, omit_1.omit)(schema, keys);
15
10
  }
16
11
  exports.exclude = exclude;
17
12
  //# sourceMappingURL=exclude.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"exclude.js","sourceRoot":"","sources":["../../../source/schema/schemas/exclude.ts"],"names":[],"mappings":";;;AACA,mDAA8C;AAG9C,oCAAwC;AAExC,SAAgB,OAAO,CAAsC,MAAuB,EAAE,GAAiB;IACrG,MAAM,IAAI,GAAG,IAAA,eAAO,EAAC,GAAG,CAAC,CAAC;IAE1B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAClD,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAgB,CAAC,CAAC,CAAC;IAE1F,MAAM,YAAY,GAAG,IAAA,oBAAY,EAAC;QAChC,GAAG,MAAM;QACT,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,aAAa,CAA8B;KAC3E,CAAC,CAAC;IAEH,OAAO,YAAmD,CAAC;AAC7D,CAAC;AAZD,0BAYC"}
1
+ {"version":3,"file":"exclude.js","sourceRoot":"","sources":["../../../source/schema/schemas/exclude.ts"],"names":[],"mappings":";;;AAGA,iCAA8B;AAE9B;;GAEG;AACH,SAAgB,OAAO,CAAsC,MAAuB,EAAE,IAAkB;IACtG,OAAO,IAAA,WAAI,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC;AAFD,0BAEC"}
@@ -12,6 +12,7 @@ export * from './literal';
12
12
  export * from './nullable';
13
13
  export * from './number';
14
14
  export * from './object';
15
+ export * from './omit';
15
16
  export * from './optional';
16
17
  export * from './pick';
17
18
  export * from './readable-stream';
@@ -28,6 +28,7 @@ __exportStar(require("./literal"), exports);
28
28
  __exportStar(require("./nullable"), exports);
29
29
  __exportStar(require("./number"), exports);
30
30
  __exportStar(require("./object"), exports);
31
+ __exportStar(require("./omit"), exports);
31
32
  __exportStar(require("./optional"), exports);
32
33
  __exportStar(require("./pick"), exports);
33
34
  __exportStar(require("./readable-stream"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/schema/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,0CAAwB;AACxB,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B;AAC7B,yCAAuB;AACvB,8CAA4B;AAC5B,gDAA8B;AAC9B,4CAA0B;AAC1B,6CAA2B;AAC3B,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,oDAAkC;AAClC,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,8CAA4B;AAC5B,gDAA8B;AAC9B,0CAAwB;AACxB,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/schema/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,0CAAwB;AACxB,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B;AAC7B,yCAAuB;AACvB,8CAA4B;AAC5B,gDAA8B;AAC9B,4CAA0B;AAC1B,6CAA2B;AAC3B,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,yCAAuB;AACvB,6CAA2B;AAC3B,yCAAuB;AACvB,oDAAkC;AAClC,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,8CAA4B;AAC5B,gDAA8B;AAC9B,0CAAwB;AACxB,4CAA0B"}
@@ -0,0 +1,4 @@
1
+ import type { OneOrMany, Record } from "../../types";
2
+ import type { Simplify } from 'type-fest';
3
+ import type { ObjectSchema } from '../types';
4
+ export declare function omit<T extends Record, K extends keyof T>(schema: ObjectSchema<T>, keys: OneOrMany<K>): ObjectSchema<Simplify<Omit<T, K>>>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.omit = void 0;
4
+ const array_1 = require("../../utils/array/array");
5
+ const types_1 = require("../types");
6
+ function omit(schema, keys) {
7
+ const keyArray = (0, array_1.toArray)(keys);
8
+ const entries = Object.entries(schema.properties);
9
+ const pickedEntries = entries.filter(([propertyKey]) => !keyArray.includes(propertyKey));
10
+ const pickedSchema = (0, types_1.objectSchema)({
11
+ ...schema,
12
+ properties: Object.fromEntries(pickedEntries)
13
+ });
14
+ return pickedSchema;
15
+ }
16
+ exports.omit = omit;
17
+ //# sourceMappingURL=omit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"omit.js","sourceRoot":"","sources":["../../../source/schema/schemas/omit.ts"],"names":[],"mappings":";;;AACA,mDAA8C;AAG9C,oCAAwC;AAExC,SAAgB,IAAI,CAAsC,MAAuB,EAAE,IAAkB;IACnG,MAAM,QAAQ,GAAG,IAAA,eAAO,EAAC,IAAI,CAAC,CAAC;IAE/B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAClD,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAgB,CAAC,CAAC,CAAC;IAE9F,MAAM,YAAY,GAAG,IAAA,oBAAY,EAAC;QAChC,GAAG,MAAM;QACT,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,aAAa,CAA8B;KAC3E,CAAC,CAAC;IAEH,OAAO,YAAmD,CAAC;AAC7D,CAAC;AAZD,oBAYC"}
package/web-types.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ export declare type InputType = 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';
2
+ export declare type InputMode = 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
3
+ export declare type InputAutocomplete = 'off' | 'on' | 'name' | 'honorific-prefix' | 'given-name' | 'additional-name' | 'family-name' | 'honorific-suffix' | 'nickname' | 'email' | 'username' | 'new-password' | 'current-password' | 'one-time-code' | 'organization-title' | 'organization' | 'street-address' | 'address-line1' | 'address-line2' | 'address-line3' | 'address-level4' | 'address-level3' | 'address-level2' | 'address-level1' | 'country' | 'country-name' | 'postal-code' | 'cc-name' | 'cc-given-name' | 'cc-additional-name' | 'cc-family-name' | 'cc-number' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' | 'transaction-currency' | 'transaction-amount' | 'language' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'sex' | 'tel' | 'tel-country-code' | 'tel-national' | 'tel-area-code' | 'tel-local' | 'tel-extension' | 'impp' | 'url' | 'photo';
4
+ export declare type InputConfig = {
5
+ accept?: string;
6
+ autocomplete?: InputAutocomplete;
7
+ autofocus?: boolean;
8
+ capture?: 'user' | 'environment';
9
+ checked?: boolean;
10
+ disabled?: boolean;
11
+ id?: string;
12
+ list?: string;
13
+ max?: number | string;
14
+ maxlength?: number;
15
+ min?: number | string;
16
+ minlength?: number;
17
+ mode?: InputMode;
18
+ multiple?: boolean;
19
+ name?: string;
20
+ pattern?: string;
21
+ placeholder?: string;
22
+ readonly?: boolean;
23
+ required?: boolean;
24
+ step?: number;
25
+ title?: string;
26
+ type?: InputType;
27
+ value?: any;
28
+ };
package/web-types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=web-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-types.js","sourceRoot":"","sources":["../source/web-types.ts"],"names":[],"mappings":""}