@xapp/stentor-lex-lib 1.58.31 → 1.60.0
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/lib/guards/isLexImportExportBot.js +1 -2
- package/lib/guards/isLexImportExportBot.js.map +1 -1
- package/lib/utils/ConvertName.js +8 -8
- package/lib/utils/ConvertName.js.map +1 -1
- package/lib/utils/CreatePostFix.js +1 -2
- package/lib/utils/CreatePostFix.js.map +1 -1
- package/lib/utils/slugForLex.js +1 -2
- package/lib/utils/slugForLex.js.map +1 -1
- package/package.json +11 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isLexImportExportBot =
|
|
3
|
+
exports.isLexImportExportBot = isLexImportExportBot;
|
|
4
4
|
/**
|
|
5
5
|
* Determines if the provided objet is a LexImportExportBot.
|
|
6
6
|
*
|
|
@@ -9,5 +9,4 @@ exports.isLexImportExportBot = void 0;
|
|
|
9
9
|
function isLexImportExportBot(possible) {
|
|
10
10
|
return !!possible && possible.intents !== undefined;
|
|
11
11
|
}
|
|
12
|
-
exports.isLexImportExportBot = isLexImportExportBot;
|
|
13
12
|
//# sourceMappingURL=isLexImportExportBot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isLexImportExportBot.js","sourceRoot":"","sources":["../../src/guards/isLexImportExportBot.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isLexImportExportBot.js","sourceRoot":"","sources":["../../src/guards/isLexImportExportBot.ts"],"names":[],"mappings":";;AAQA,oDAEC;AAPD;;;;GAIG;AACH,SAAgB,oBAAoB,CAAC,QAAgB;IACjD,OAAO,CAAC,CAAC,QAAQ,IAAK,QAA+B,CAAC,OAAO,KAAK,SAAS,CAAC;AAChF,CAAC"}
|
package/lib/utils/ConvertName.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*! Copyright (c) 2020, XAPPmedia */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.MAX_LEX_BOT_SLOT_TYPE_LENGTH = exports.MIN_LEX_BOT_SLOT_TYPE_LENGTH = exports.MAX_LEX_BOT_INTENT_NAME_LENGTH = exports.MIN_LEX_BOT_INTENT_NAME_LENGTH = exports.MAX_LEX_BOT_NAME_LENGTH = exports.MIN_LEX_BOT_NAME_LENGTH = void 0;
|
|
5
|
+
exports.convertLexBotName = convertLexBotName;
|
|
6
|
+
exports.convertLexIntentName = convertLexIntentName;
|
|
7
|
+
exports.convertLexSlotTypeName = convertLexSlotTypeName;
|
|
8
|
+
exports.convertName = convertName;
|
|
9
|
+
exports.removeEmoji = removeEmoji;
|
|
10
|
+
exports.replaceNumbers = replaceNumbers;
|
|
11
|
+
exports.growUntil = growUntil;
|
|
5
12
|
exports.MIN_LEX_BOT_NAME_LENGTH = 2;
|
|
6
13
|
exports.MAX_LEX_BOT_NAME_LENGTH = 50;
|
|
7
14
|
exports.MIN_LEX_BOT_INTENT_NAME_LENGTH = 1;
|
|
@@ -18,7 +25,6 @@ exports.MAX_LEX_BOT_SLOT_TYPE_LENGTH = 100;
|
|
|
18
25
|
function convertLexBotName(name) {
|
|
19
26
|
return convertName(name, exports.MIN_LEX_BOT_NAME_LENGTH, exports.MAX_LEX_BOT_NAME_LENGTH);
|
|
20
27
|
}
|
|
21
|
-
exports.convertLexBotName = convertLexBotName;
|
|
22
28
|
/**
|
|
23
29
|
* converts the name of a lex bot intent to the standards that lex allows.
|
|
24
30
|
*
|
|
@@ -29,7 +35,6 @@ exports.convertLexBotName = convertLexBotName;
|
|
|
29
35
|
function convertLexIntentName(name) {
|
|
30
36
|
return convertName(name, exports.MIN_LEX_BOT_INTENT_NAME_LENGTH, exports.MAX_LEX_BOT_INTENT_NAME_LENGTH);
|
|
31
37
|
}
|
|
32
|
-
exports.convertLexIntentName = convertLexIntentName;
|
|
33
38
|
/**
|
|
34
39
|
* Converts the name of the lex bot slot type to the standards that lex allows.
|
|
35
40
|
*
|
|
@@ -40,7 +45,6 @@ exports.convertLexIntentName = convertLexIntentName;
|
|
|
40
45
|
function convertLexSlotTypeName(name) {
|
|
41
46
|
return convertName(name, exports.MIN_LEX_BOT_SLOT_TYPE_LENGTH, exports.MAX_LEX_BOT_SLOT_TYPE_LENGTH);
|
|
42
47
|
}
|
|
43
|
-
exports.convertLexSlotTypeName = convertLexSlotTypeName;
|
|
44
48
|
/**
|
|
45
49
|
* Converts the name to a lex allowed name.
|
|
46
50
|
*
|
|
@@ -57,7 +61,6 @@ function convertName(name = "", minChars = 0, maxChars = Number.MAX_SAFE_INTEGER
|
|
|
57
61
|
newName = growUntil(minChars, newName, "_");
|
|
58
62
|
return newName.slice(0, maxChars);
|
|
59
63
|
}
|
|
60
|
-
exports.convertName = convertName;
|
|
61
64
|
/**
|
|
62
65
|
* A regex pattern which can be used to match all emoji.
|
|
63
66
|
*
|
|
@@ -73,7 +76,6 @@ const emojiPattern = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83
|
|
|
73
76
|
function removeEmoji(stringValue) {
|
|
74
77
|
return stringValue.replace(emojiPattern, "");
|
|
75
78
|
}
|
|
76
|
-
exports.removeEmoji = removeEmoji;
|
|
77
79
|
const nameMap = {
|
|
78
80
|
"1": "a",
|
|
79
81
|
"2": "b",
|
|
@@ -100,7 +102,6 @@ function replaceNumbers(name = "") {
|
|
|
100
102
|
}
|
|
101
103
|
return returnValue;
|
|
102
104
|
}
|
|
103
|
-
exports.replaceNumbers = replaceNumbers;
|
|
104
105
|
/**
|
|
105
106
|
* Appends characters to a string until it's finished length.
|
|
106
107
|
*
|
|
@@ -118,5 +119,4 @@ function growUntil(length, name = "", prefix = "") {
|
|
|
118
119
|
}
|
|
119
120
|
return name.length === 0 ? postFix : postFix.length === 0 ? name : name + prefix + postFix;
|
|
120
121
|
}
|
|
121
|
-
exports.growUntil = growUntil;
|
|
122
122
|
//# sourceMappingURL=ConvertName.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConvertName.js","sourceRoot":"","sources":["../../src/utils/ConvertName.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;
|
|
1
|
+
{"version":3,"file":"ConvertName.js","sourceRoot":"","sources":["../../src/utils/ConvertName.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;AAkBpC,8CAEC;AASD,oDAEC;AASD,wDAEC;AASD,kCAQC;AAeD,kCAEC;AAsBD,wCAMC;AAUD,8BAQC;AAxHY,QAAA,uBAAuB,GAAG,CAAC,CAAC;AAC5B,QAAA,uBAAuB,GAAG,EAAE,CAAC;AAE7B,QAAA,8BAA8B,GAAG,CAAC,CAAC;AACnC,QAAA,8BAA8B,GAAG,GAAG,CAAC;AAErC,QAAA,4BAA4B,GAAG,CAAC,CAAC;AACjC,QAAA,4BAA4B,GAAG,GAAG,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAAC,IAAY;IAC1C,OAAO,WAAW,CAAC,IAAI,EAAE,+BAAuB,EAAE,+BAAuB,CAAC,CAAC;AAC/E,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAY;IAC7C,OAAO,WAAW,CAAC,IAAI,EAAE,sCAA8B,EAAE,sCAA8B,CAAC,CAAC;AAC7F,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,sBAAsB,CAAC,IAAY;IAC/C,OAAO,WAAW,CAAC,IAAI,EAAE,oCAA4B,EAAE,oCAA4B,CAAC,CAAC;AACzF,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,OAAe,EAAE,EAAE,WAAmB,CAAC,EAAE,WAAmB,MAAM,CAAC,gBAAgB;IAC3G,IAAI,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IA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OAAe,EAAE,EAAE,SAAiB,EAAE;IAC5E,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,MAAM,aAAa,GAAG,4BAA4B,CAAC;IACnD,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,OAAO,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;AAC/F,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPostFix =
|
|
3
|
+
exports.createPostFix = createPostFix;
|
|
4
4
|
/*! Copyright (c) 2020, XAPPmedia */
|
|
5
5
|
const stentor_utils_1 = require("stentor-utils");
|
|
6
6
|
const ConvertName_1 = require("./ConvertName");
|
|
@@ -15,5 +15,4 @@ const ConvertName_1 = require("./ConvertName");
|
|
|
15
15
|
function createPostFix(app, postFixSize = 4) {
|
|
16
16
|
return (0, ConvertName_1.convertName)(`_${(0, stentor_utils_1.md5)(app.appId)}`.slice(0, postFixSize));
|
|
17
17
|
}
|
|
18
|
-
exports.createPostFix = createPostFix;
|
|
19
18
|
//# sourceMappingURL=CreatePostFix.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatePostFix.js","sourceRoot":"","sources":["../../src/utils/CreatePostFix.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CreatePostFix.js","sourceRoot":"","sources":["../../src/utils/CreatePostFix.ts"],"names":[],"mappings":";;AAYA,sCAEC;AAdD,oCAAoC;AACpC,iDAAoC;AACpC,+CAA4C;AAE5C;;;;;;;GAOG;AACH,SAAgB,aAAa,CAAC,GAAsB,EAAE,cAAsB,CAAC;IACzE,OAAO,IAAA,yBAAW,EAAC,IAAI,IAAA,mBAAG,EAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;AACnE,CAAC"}
|
package/lib/utils/slugForLex.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*! Copyright (c) 2020, XAPPmedia */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.slugForLex =
|
|
4
|
+
exports.slugForLex = slugForLex;
|
|
5
5
|
/**
|
|
6
6
|
* Generates a name that is acceptable for LEX.
|
|
7
7
|
*
|
|
@@ -20,5 +20,4 @@ function slugForLex(name) {
|
|
|
20
20
|
name = name.replace(/_{2,}/g, "_");
|
|
21
21
|
return name;
|
|
22
22
|
}
|
|
23
|
-
exports.slugForLex = slugForLex;
|
|
24
23
|
//# sourceMappingURL=slugForLex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slugForLex.js","sourceRoot":"","sources":["../../src/utils/slugForLex.ts"],"names":[],"mappings":";AAAA,oCAAoC
|
|
1
|
+
{"version":3,"file":"slugForLex.js","sourceRoot":"","sources":["../../src/utils/slugForLex.ts"],"names":[],"mappings":";AAAA,oCAAoC;;AASpC,gCAYC;AAnBD;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY;IACnC,4CAA4C;IAC5C,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IACzC,mBAAmB;IACnB,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IACnB,6CAA6C;IAC7C,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACnC,yCAAyC;IACzC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAEnC,OAAO,IAAI,CAAC;AAEhB,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.60.0",
|
|
8
8
|
"description": "Shared AWS LEX Library for :mega: stentor",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"main": "lib/index",
|
|
@@ -18,20 +18,20 @@
|
|
|
18
18
|
"@types/chai": "4.3.16",
|
|
19
19
|
"@types/sinon": "4.3.3",
|
|
20
20
|
"@xapp/config": "0.2.3",
|
|
21
|
-
"aws-sdk": "2.
|
|
21
|
+
"aws-sdk": "2.1650.0",
|
|
22
22
|
"chai": "4.4.1",
|
|
23
|
-
"mocha": "10.
|
|
23
|
+
"mocha": "10.5.2",
|
|
24
24
|
"sinon": "18.0.0",
|
|
25
|
-
"stentor-interaction-model": "1.59.
|
|
26
|
-
"stentor-locales": "1.59.
|
|
27
|
-
"stentor-models": "1.59.
|
|
28
|
-
"stentor-request": "1.59.
|
|
29
|
-
"stentor-utils": "1.59.
|
|
25
|
+
"stentor-interaction-model": "1.59.73",
|
|
26
|
+
"stentor-locales": "1.59.73",
|
|
27
|
+
"stentor-models": "1.59.75",
|
|
28
|
+
"stentor-request": "1.59.73",
|
|
29
|
+
"stentor-utils": "1.59.73",
|
|
30
30
|
"ts-node": "10.9.2",
|
|
31
|
-
"typescript": "5.
|
|
31
|
+
"typescript": "5.5.2"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@xapp/stentor-alexa-lib": "1.
|
|
34
|
+
"@xapp/stentor-alexa-lib": "1.60.0",
|
|
35
35
|
"lodash.merge": "4.6.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"clean": "rm -rf ./lib/*",
|
|
47
47
|
"test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\""
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "33641e97bc24c6670cba8c94ae7563c1c2445786"
|
|
50
50
|
}
|