stentor-guards 1.46.3 → 1.48.1
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/CHANGELOG.md +35 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/isTemplatedList.d.ts +8 -0
- package/lib/isTemplatedList.js +18 -0
- package/lib/isTemplatedList.js.map +1 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.48.1](https://github.com/stentorium/stentor/compare/v1.48.0...v1.48.1) (2021-10-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package stentor-guards
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.48.0](https://github.com/stentorium/stentor/compare/v1.47.0...v1.48.0) (2021-10-28)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* List Template ([#1200](https://github.com/stentorium/stentor/issues/1200)) ([6dc854a](https://github.com/stentorium/stentor/commit/6dc854ae810be1f752eea31160759427e768715e))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.46.7](https://github.com/stentorium/stentor/compare/v1.46.6...v1.46.7) (2021-10-25)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package stentor-guards
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [1.46.6](https://github.com/stentorium/stentor/compare/v1.46.5...v1.46.6) (2021-10-25)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package stentor-guards
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
## [1.46.3](https://github.com/stentorium/stentor/compare/v1.46.2...v1.46.3) (2021-10-20)
|
|
7
42
|
|
|
8
43
|
**Note:** Version bump only for package stentor-guards
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -27,5 +27,6 @@ __exportStar(require("./isLinkoutSuggestion"), exports);
|
|
|
27
27
|
__exportStar(require("./isPreviousHandlerPath"), exports);
|
|
28
28
|
__exportStar(require("./isSchedulableResponse"), exports);
|
|
29
29
|
__exportStar(require("./isScheduled"), exports);
|
|
30
|
+
__exportStar(require("./isTemplatedList"), exports);
|
|
30
31
|
__exportStar(require("./isTimeContextual"), exports);
|
|
31
32
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAoC;AACpC,iDAA+B;AAC/B,mDAAiC;AACjC,qDAAmC;AACnC,qDAAmC;AACnC,gDAA8B;AAC9B,oDAAkC;AAClC,8CAA4B;AAC5B,wDAAsC;AACtC,qDAAmC;AACnC,6CAA2B;AAC3B,iDAA+B;AAC/B,yDAAuC;AACvC,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,gDAA8B;AAC9B,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAoC;AACpC,iDAA+B;AAC/B,mDAAiC;AACjC,qDAAmC;AACnC,qDAAmC;AACnC,gDAA8B;AAC9B,oDAAkC;AAClC,8CAA4B;AAC5B,wDAAsC;AACtC,qDAAmC;AACnC,6CAA2B;AAC3B,iDAA+B;AAC/B,yDAAuC;AACvC,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,gDAA8B;AAC9B,oDAAkC;AAClC,qDAAmC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*! Copyright (c) 2021, XAPPmedia */
|
|
2
|
+
import { TemplatedList } from "stentor-models";
|
|
3
|
+
/**
|
|
4
|
+
* Guard to check if the provided object is a TemplatedList object for compilation.
|
|
5
|
+
* @param list
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function isTemplatedList(list: object): list is TemplatedList;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isTemplatedList = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Guard to check if the provided object is a TemplatedList object for compilation.
|
|
6
|
+
* @param list
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
function isTemplatedList(list) {
|
|
10
|
+
// We need itemsObject, itemsName & array of items for this to check out
|
|
11
|
+
return !!list
|
|
12
|
+
&& typeof list.itemsObject === "string"
|
|
13
|
+
// Not required actually, we default it to "item"
|
|
14
|
+
// && typeof (list as TemplatedList).itemsName === "string"
|
|
15
|
+
&& Array.isArray(list.items);
|
|
16
|
+
}
|
|
17
|
+
exports.isTemplatedList = isTemplatedList;
|
|
18
|
+
//# sourceMappingURL=isTemplatedList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isTemplatedList.js","sourceRoot":"","sources":["../src/isTemplatedList.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH,SAAgB,eAAe,CAAC,IAAY;IACxC,wEAAwE;IACxE,OAAO,CAAC,CAAC,IAAI;WACN,OAAQ,IAAsB,CAAC,WAAW,KAAK,QAAQ;QAC1D,iDAAiD;QACjD,2DAA2D;WACxD,KAAK,CAAC,OAAO,CAAE,IAAsB,CAAC,KAAK,CAAC,CAAC;AACxD,CAAC;AAPD,0CAOC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.48.1",
|
|
8
8
|
"description": "Common type guards for 📣 stentor",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"main": "lib/index",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"@types/sinon-chai": "3.2.5",
|
|
21
21
|
"@xapp/config": "0.2.3",
|
|
22
22
|
"chai": "4.3.4",
|
|
23
|
-
"mocha": "9.1.
|
|
23
|
+
"mocha": "9.1.3",
|
|
24
24
|
"sinon": "10.0.0",
|
|
25
25
|
"sinon-chai": "3.7.0",
|
|
26
|
-
"stentor-models": "1.
|
|
26
|
+
"stentor-models": "1.48.1",
|
|
27
27
|
"ts-node": "9.1.1",
|
|
28
|
-
"typescript": "4.4.
|
|
28
|
+
"typescript": "4.4.4"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"stentor-constants": "1.
|
|
31
|
+
"stentor-constants": "1.48.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"stentor-models": "1.x"
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"clean": "rm -rf ./lib/* ",
|
|
39
39
|
"test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\""
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "04361594f85ca4a96cd6cf4b24edd088ac350822"
|
|
42
42
|
}
|