Updated VSCode Extension to use latest 4.9.3 package
Also added inteli-sense for a couple of newer pre-built functions
This commit is contained in:
Родитель
9240ef32c3
Коммит
f52c04d4b2
Двоичный файл не отображается.
|
@ -5,14 +5,19 @@
|
|||
"requires": true,
|
||||
"dependencies": {
|
||||
"@microsoft/recognizers-text-data-types-timex-expression": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/@microsoft/recognizers-text-data-types-timex-expression/-/@microsoft/recognizers-text-data-types-timex-expression-1.3.0.tgz",
|
||||
"integrity": "sha1-/F1YbIJuR46Ed7f8sh6eKDDoHGc="
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@microsoft/recognizers-text-data-types-timex-expression/-/recognizers-text-data-types-timex-expression-1.1.4.tgz",
|
||||
"integrity": "sha512-2vICaEJfV9EpaDKs5P1PLAEs+WpNqrtpkl7CLsmc5gKmxgpQtsojG4tk6km5JRKg1mYuLV5ZzJ/65oOEeyTMvQ=="
|
||||
},
|
||||
"@types/atob": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/atob/-/atob-2.1.2.tgz",
|
||||
"integrity": "sha512-8GAYQ1jDRUQkSpHzJUqXwAkYFOxuWAOGLhIR4aPd/Y/yL12Q/9m7LsKpHKlfKdNE/362Hc9wPI1Yh6opDfxVJg=="
|
||||
},
|
||||
"@types/lru-cache": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/@types/lru-cache/-/@types/lru-cache-5.1.0.tgz",
|
||||
"integrity": "sha1-V/Io8rgMBGtKG9XKwDH4HyB/TwM="
|
||||
"resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.0.tgz",
|
||||
"integrity": "sha512-RaE0B+14ToE4l6UqdarKPnXwVDuigfFv+5j9Dze/Nqr23yyuqdNvzcZi3xB+3Agvi5R4EOgAksfv3lXX4vBt9w=="
|
||||
},
|
||||
"@types/mocha": {
|
||||
"version": "7.0.2",
|
||||
|
@ -22,8 +27,8 @@
|
|||
},
|
||||
"@types/moment-timezone": {
|
||||
"version": "0.5.13",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/@types/moment-timezone/-/@types/moment-timezone-0.5.13.tgz",
|
||||
"integrity": "sha1-AxfMyR60x/SQFwQWYWY5XDknZSg=",
|
||||
"resolved": "https://registry.npmjs.org/@types/moment-timezone/-/moment-timezone-0.5.13.tgz",
|
||||
"integrity": "sha512-SWk1qM8DRssS5YR9L4eEX7WUhK/wc96aIr4nMa6p0kTk9YhGGOJjECVhIdPEj13fvJw72Xun69gScXSZ/UmcPg==",
|
||||
"requires": {
|
||||
"moment": ">=2.14.0"
|
||||
}
|
||||
|
@ -41,25 +46,28 @@
|
|||
"dev": true
|
||||
},
|
||||
"@types/xmldom": {
|
||||
"version": "0.1.29",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/@types/xmldom/-/@types/xmldom-0.1.29.tgz",
|
||||
"integrity": "sha1-xEKLDKhtO4gUdXJv2UmAs4onw4E="
|
||||
"version": "0.1.30",
|
||||
"resolved": "https://registry.npmjs.org/@types/xmldom/-/xmldom-0.1.30.tgz",
|
||||
"integrity": "sha512-edqgAFXMEtVvaBZ3YnhamvmrHjoYpuxETmnb0lbTZmf/dXpAsO9ZKotUO4K2rn2SIZBDFCMOuA7fOe0H6dRZcA=="
|
||||
},
|
||||
"adaptive-expressions": {
|
||||
"version": "4.8.0-preview",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/adaptive-expressions/-/adaptive-expressions-4.8.0-preview.tgz",
|
||||
"integrity": "sha1-qZfHRVJxRREOMZZ3vS2ngvB0ReY=",
|
||||
"version": "4.9.3",
|
||||
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.9.3.tgz",
|
||||
"integrity": "sha512-+EF3rGtuDXOfuP+EUKEP+a3S8m1st6ZDgQJsLih76Q1se3TxDiWt6UolJTxvNLDG1osHuWzF5z0AC2d6psWOFg==",
|
||||
"requires": {
|
||||
"@microsoft/recognizers-text-data-types-timex-expression": "^1.1.4",
|
||||
"@microsoft/recognizers-text-data-types-timex-expression": "1.1.4",
|
||||
"@types/atob": "^2.1.2",
|
||||
"@types/lru-cache": "^5.1.0",
|
||||
"@types/moment-timezone": "^0.5.12",
|
||||
"@types/xmldom": "^0.1.29",
|
||||
"antlr4ts": "0.5.0-alpha.1",
|
||||
"atob": "^2.1.2",
|
||||
"big-integer": "^1.6.48",
|
||||
"jspath": "^0.4.0",
|
||||
"lodash": "^4.17.15",
|
||||
"lru-cache": "^5.1.1",
|
||||
"moment": "2.24.0",
|
||||
"moment-timezone": "^0.5.25"
|
||||
"moment": "^2.25.1",
|
||||
"moment-timezone": "^0.5.28"
|
||||
}
|
||||
},
|
||||
"agent-base": {
|
||||
|
@ -73,17 +81,13 @@
|
|||
},
|
||||
"antlr4ts": {
|
||||
"version": "0.5.0-alpha.1",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/antlr4ts/-/antlr4ts-0.5.0-alpha.1.tgz",
|
||||
"integrity": "sha1-xCHYJpUjNWxCxVM2A67AQQtCOAY="
|
||||
"resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.1.tgz",
|
||||
"integrity": "sha512-LU5FLWq2fUwg2cTL/DeIL16ucUm5jv6SNVFoMjbYLviXAp6p5g1ZzkTAnWiOKX/muEEy0PY78perPj6WUBSQCw=="
|
||||
},
|
||||
"assert": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/assert/-/assert-1.5.0.tgz",
|
||||
"integrity": "sha1-VcEJqvbgrv2z3EtxJAxwv1dLGOs=",
|
||||
"requires": {
|
||||
"object-assign": "^4.1.1",
|
||||
"util": "0.10.3"
|
||||
}
|
||||
"atob": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
|
||||
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
|
@ -91,33 +95,23 @@
|
|||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true
|
||||
},
|
||||
"botbuilder-core": {
|
||||
"version": "4.8.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/botbuilder-core/-/botbuilder-core-4.8.0.tgz",
|
||||
"integrity": "sha1-EiP1E7ElisX018c7F1a08L6Gnqs=",
|
||||
"requires": {
|
||||
"assert": "^1.4.1",
|
||||
"botframework-schema": "4.8.0"
|
||||
}
|
||||
"big-integer": {
|
||||
"version": "1.6.48",
|
||||
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz",
|
||||
"integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w=="
|
||||
},
|
||||
"botbuilder-lg": {
|
||||
"version": "4.8.0-preview",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/botbuilder-lg/-/botbuilder-lg-4.8.0-preview.tgz",
|
||||
"integrity": "sha1-mPL7nsQQOL8W7HAbKlHotubCdlc=",
|
||||
"version": "4.9.3",
|
||||
"resolved": "https://registry.npmjs.org/botbuilder-lg/-/botbuilder-lg-4.9.3.tgz",
|
||||
"integrity": "sha512-dexZ8YDI3GENSSbtYYRt3ByHWo2Am6QMmelJzDO4DoGGUHqJ6rUDeaGpt5o0sIFNIIXLyUdNvtA5A5O6w+MIjA==",
|
||||
"requires": {
|
||||
"adaptive-expressions": "4.8.0-preview",
|
||||
"adaptive-expressions": "4.9.3",
|
||||
"antlr4ts": "0.5.0-alpha.1",
|
||||
"botbuilder-core": "4.8.0",
|
||||
"lodash": "^4.17.11",
|
||||
"path": "^0.12.7",
|
||||
"uuid": "^3.3.3"
|
||||
}
|
||||
},
|
||||
"botframework-schema": {
|
||||
"version": "4.8.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/botframework-schema/-/botframework-schema-4.8.0.tgz",
|
||||
"integrity": "sha1-u233qlo8C5C70VCKr7Bc5j2GWhQ="
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
|
@ -211,22 +205,23 @@
|
|||
"inherits": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/inherits/-/inherits-2.0.1.tgz",
|
||||
"integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE="
|
||||
"integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
|
||||
"dev": true
|
||||
},
|
||||
"jspath": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/jspath/-/jspath-0.4.0.tgz",
|
||||
"integrity": "sha1-L1/RgI/yJJqIo8ReZCKIoib4Xh0="
|
||||
"resolved": "https://registry.npmjs.org/jspath/-/jspath-0.4.0.tgz",
|
||||
"integrity": "sha512-2/R8wkot8NCXrppBT/onp+4mcAUAZqtPxsW6aSJU3hrFAVqKqtFYcat2XJZ7inN4RtATUxfv0UQSYOmvJKiIGA=="
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg="
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||
"integrity": "sha1-HaJ+ZxAnGUdpXa9oSOhH8B2EuSA=",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
|
||||
"requires": {
|
||||
"yallist": "^3.0.2"
|
||||
}
|
||||
|
@ -241,14 +236,14 @@
|
|||
}
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.24.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/moment/-/moment-2.24.0.tgz",
|
||||
"integrity": "sha1-DQVdU/UFKqZTyfbraLtdEr9cK1s="
|
||||
"version": "2.27.0",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz",
|
||||
"integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ=="
|
||||
},
|
||||
"moment-timezone": {
|
||||
"version": "0.5.28",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/moment-timezone/-/moment-timezone-0.5.28.tgz",
|
||||
"integrity": "sha1-8JPXidCR7XsFXYKqgagkZ/cuQzg=",
|
||||
"version": "0.5.31",
|
||||
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.31.tgz",
|
||||
"integrity": "sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==",
|
||||
"requires": {
|
||||
"moment": ">= 2.9.0"
|
||||
}
|
||||
|
@ -259,11 +254,6 @@
|
|||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/once/-/once-1.4.0.tgz",
|
||||
|
@ -309,17 +299,24 @@
|
|||
"dev": true
|
||||
},
|
||||
"util": {
|
||||
"version": "0.10.3",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/util/-/util-0.10.3.tgz",
|
||||
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
|
||||
"version": "0.10.4",
|
||||
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
|
||||
"integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
|
||||
"requires": {
|
||||
"inherits": "2.0.1"
|
||||
"inherits": "2.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
||||
}
|
||||
}
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/uuid/-/uuid-3.3.3.tgz",
|
||||
"integrity": "sha1-RWjwIW54dg7h2/Ok0s9T4iQRKGY="
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
|
||||
},
|
||||
"vscode-test": {
|
||||
"version": "1.3.0",
|
||||
|
@ -340,8 +337,8 @@
|
|||
},
|
||||
"yallist": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-declarative/npm/yallist/-/yallist-3.1.1.tgz",
|
||||
"integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0="
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
||||
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -192,6 +192,6 @@
|
|||
"typescript": "^3.8.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"botbuilder-lg": "4.8.0-preview"
|
||||
"botbuilder-lg": "4.9.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,7 +126,17 @@ export const buildInfunctionsMap: Map<string, FunctionEntity> = new Map<string,
|
|||
['xpath', new FunctionEntity(['xml: any', 'xpath: any'], ReturnType.Object, 'Check XML for nodes or values that match an XPath (XML Path Language) expression, and return the matching nodes or values. An XPath expression, or just "XPath", helps you navigate an XML document structure so that you can select nodes or compute values in the XML content.')],
|
||||
['sortBy', new FunctionEntity(['collection: Array', 'property?: string'], ReturnType.Object, 'Sort elements in the collection with ascending order and return the sorted collection')],
|
||||
['sortByDescending', new FunctionEntity(['collection: Array', 'property?: string'], ReturnType.Object, 'Sort elements in the collection with descending order and return the sorted collection')],
|
||||
['isInteger', new FunctionEntity(['input: any'], ReturnType.Boolean, 'Return true if a given input is an integer number.')],
|
||||
['isFloat', new FunctionEntity(['input: any'], ReturnType.Boolean, 'Return true if a given input is an floating-point number.')],
|
||||
['isBoolean', new FunctionEntity(['input: any'], ReturnType.Boolean, 'Return true if a given input is a Boolean.')],
|
||||
['isArray', new FunctionEntity(['input: any'], ReturnType.Boolean, 'Return true if a given input is an array.')],
|
||||
['isObject', new FunctionEntity(['input: any'], ReturnType.Boolean, 'Return true if a given input is a complex object or return false if it is a primitive object.')],
|
||||
['isDateTime', new FunctionEntity(['input: any'], ReturnType.Boolean, 'Return true if a given input is a UTC ISO format (YYYY-MM-DDTHH:mm:ss.fffZ) timestamp string.')],
|
||||
['isString', new FunctionEntity(['input: any'], ReturnType.Boolean, 'Return true if a given input is a string.')],
|
||||
['where', new FunctionEntity(['collection: Array', 'iteratorName: string', 'function: any'], ReturnType.Object, 'Filter on each element and return the new collection of filtered elements which match a specific condition.')],
|
||||
['select', new FunctionEntity(['collection: Array', 'iteratorName: string', 'function: any'], ReturnType.Object, 'Operate on each element and return the new collection of transformed elements.')],
|
||||
|
||||
|
||||
// LG functions
|
||||
['template', new FunctionEntity(['templateName: string', 'scope?: any'], ReturnType.Object, 'Evaluate another la template')],
|
||||
['fromFile', new FunctionEntity(['filePath: string'], ReturnType.String, 'Get content from absolute/relative file path')],
|
||||
|
|
|
@ -41,7 +41,7 @@ class LGCompletionItemProvider implements vscode.CompletionItemProvider {
|
|||
return new Promise((res, _) => {
|
||||
let paths: string[] = [];
|
||||
|
||||
DataStorage.templatesMap.forEach(u => paths = paths.concat(u.templates.toArray().map(u => u.source)));
|
||||
DataStorage.templatesMap.forEach(u => paths = paths.concat(u.templates.toArray().map(u => u.sourceRange.source)));
|
||||
paths = Array.from(new Set(paths));
|
||||
|
||||
const headingCompletions = paths.reduce((prev, curr) => {
|
||||
|
|
|
@ -43,13 +43,13 @@ class LGDefinitionProvider implements vscode.DefinitionProvider{
|
|||
return undefined;
|
||||
|
||||
|
||||
const lineNumber: number = template.parseTree.start.line - 1;
|
||||
const columnNumber: number = template.parseTree.start.charPositionInLine;
|
||||
const lineNumber: number = template.sourceRange.parseTree.start.line - 1;
|
||||
const columnNumber: number = template.sourceRange.parseTree.start.charPositionInLine;
|
||||
const definitionPosition: vscode.Position = new vscode.Position(lineNumber, columnNumber);
|
||||
|
||||
let definitionUri: vscode.Uri = undefined;
|
||||
DataStorage.templatesMap.forEach((value, key) => {
|
||||
if (template.source === key) {
|
||||
if (template.sourceRange.source === key) {
|
||||
definitionUri = value.uri;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -41,7 +41,7 @@ class LGHoverProvider implements vscode.HoverProvider {
|
|||
const template: Template = templates.toArray().find(u=>u.name === wordName);
|
||||
if (template !== undefined) {
|
||||
const contents = [];
|
||||
contents.push(new vscode.MarkdownString(template.source));
|
||||
contents.push(new vscode.MarkdownString(template.sourceRange.source));
|
||||
contents.push(new vscode.MarkdownString(template.body));
|
||||
return new vscode.Hover(contents, wordRange);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче