@lcap/nasl 2.18.0-beta.3 → 2.18.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/out/bak/translator.js +1 -1
- package/out/bak/translator.js.map +1 -1
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.js +4 -4
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchExpression__.d.ts +97 -0
- package/out/concepts/MatchExpression__.js +281 -0
- package/out/concepts/MatchExpression__.js.map +1 -0
- package/out/concepts/Match__.js +1 -1
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/Param__.js +2 -2
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Return__.js +1 -1
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/StringInterpolation__.d.ts +16 -16
- package/out/concepts/StringInterpolation__.js +12 -12
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.js +1 -1
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/View__.js +2 -2
- package/out/concepts/View__.js.map +1 -1
- package/out/server/naslServer.d.ts +2 -1
- package/out/server/naslServer.js +84 -38
- package/out/server/naslServer.js.map +1 -1
- package/out/templator/genQueryComponent.d.ts +2 -2
- package/out/templator/genQueryComponent.js +4 -1
- package/out/templator/genQueryComponent.js.map +1 -1
- package/out/templator/sql-parser/index.d.ts +1 -0
- package/out/templator/sql-parser/index.js +228 -0
- package/out/templator/sql-parser/index.js.map +1 -0
- package/out/templator/sql-parser/parser.js +26664 -0
- package/out/templator/sql-parser/parser.js.map +1 -0
- package/package.json +3 -4
- package/src/automate/engine/dist/index.dev.js +517 -0
- package/src/bak/translator.js +1 -1
- package/src/common/dist/BaseNode.js +1101 -0
- package/src/concepts/CallInterface__.ts +9 -9
- package/src/concepts/Destination__.ts +9 -9
- package/src/concepts/ExternalDestination__.ts +5 -5
- package/src/concepts/LogicItem__.ts +4 -0
- package/src/concepts/Logic__.ts +42 -5
- package/src/concepts/Match__.ts +21 -1
- package/src/concepts/MemberExpression__.ts +11 -0
- package/src/concepts/OqlQueryComponent__.ts +7 -0
- package/src/concepts/Param__.ts +3 -2
- package/src/concepts/Return__.ts +5 -1
- package/src/concepts/StringInterpolation__.ts +26 -26
- package/src/concepts/UnaryExpression__.ts +4 -4
- package/src/concepts/ValidationRule__.ts +1 -1
- package/src/concepts/Variable__.ts +1 -1
- package/src/concepts/ViewElement__.ts +1 -1
- package/src/concepts/View__.ts +2 -2
- package/src/concepts/basics/stdlib/dist/reference2TypeAnnotationList.js +24 -0
- package/src/concepts/dist/Anchor__.js +179 -0
- package/src/concepts/dist/Assignment__.js +301 -0
- package/src/concepts/dist/CallFunction__.js +473 -0
- package/src/concepts/dist/CallInterface__.js +533 -0
- package/src/concepts/dist/CallLogic__.js +864 -0
- package/src/concepts/dist/ForEachStatement__.js +426 -0
- package/src/concepts/dist/MatchCase__.js +587 -0
- package/src/concepts/dist/MemberExpression__.js +348 -0
- package/src/concepts/dist/Param__.js +537 -0
- package/src/concepts/dist/Return__.js +493 -0
- package/src/generator/dist/genBundleFiles.js +414 -0
- package/src/server/dist/formatTsUtils.js +683 -0
- package/src/server/dist/naslServer.js +3396 -0
- package/src/server/naslServer.ts +84 -39
- package/src/service/storage/dist/init.js +541 -0
- package/src/templator/genQueryComponent.ts +8 -3
- package/ts-worker/dist/webpack.config.dev.js +104 -0
- package/ts-worker/lib/cancellationToken.js +67 -0
- package/ts-worker/lib/dist/tsserver.dev.js +22953 -0
- package/ts-worker/lib/harness.js +1 -1
- package/ts-worker/sources/lib/dist/tsserver.dev.js +22912 -0
- package/ts-worker/src/start.js +1 -1
- package/ts-worker/webpack.config.js +3 -1
- package/dist/bundle.js +0 -3962
- package/dist/bundle.js.LICENSE.txt +0 -16
- package/out/generator/release.d.ts +0 -1
- package/out/generator/release.js +0 -51
- package/out/generator/release.js.map +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
"use strict";
|
|
18
|
+
var fs = require("fs");
|
|
19
|
+
function pipeExists(name) {
|
|
20
|
+
return fs.existsSync(name);
|
|
21
|
+
}
|
|
22
|
+
function createCancellationToken(args) {
|
|
23
|
+
var cancellationPipeName;
|
|
24
|
+
for (var i = 0; i < args.length - 1; i++) {
|
|
25
|
+
if (args[i] === "--cancellationPipeName") {
|
|
26
|
+
cancellationPipeName = args[i + 1];
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (!cancellationPipeName) {
|
|
31
|
+
return {
|
|
32
|
+
isCancellationRequested: function () { return false; },
|
|
33
|
+
setRequest: function (_requestId) { return void 0; },
|
|
34
|
+
resetRequest: function (_requestId) { return void 0; }
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
if (cancellationPipeName.charAt(cancellationPipeName.length - 1) === "*") {
|
|
38
|
+
var namePrefix_1 = cancellationPipeName.slice(0, -1);
|
|
39
|
+
if (namePrefix_1.length === 0 || namePrefix_1.indexOf("*") >= 0) {
|
|
40
|
+
throw new Error("Invalid name for template cancellation pipe: it should have length greater than 2 characters and contain only one '*'.");
|
|
41
|
+
}
|
|
42
|
+
var perRequestPipeName_1;
|
|
43
|
+
var currentRequestId_1;
|
|
44
|
+
return {
|
|
45
|
+
isCancellationRequested: function () { return perRequestPipeName_1 !== undefined && pipeExists(perRequestPipeName_1); },
|
|
46
|
+
setRequest: function (requestId) {
|
|
47
|
+
currentRequestId_1 = requestId;
|
|
48
|
+
perRequestPipeName_1 = namePrefix_1 + requestId;
|
|
49
|
+
},
|
|
50
|
+
resetRequest: function (requestId) {
|
|
51
|
+
if (currentRequestId_1 !== requestId) {
|
|
52
|
+
throw new Error("Mismatched request id, expected ".concat(currentRequestId_1, ", actual ").concat(requestId));
|
|
53
|
+
}
|
|
54
|
+
perRequestPipeName_1 = undefined;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
return {
|
|
60
|
+
isCancellationRequested: function () { return pipeExists(cancellationPipeName); },
|
|
61
|
+
setRequest: function (_requestId) { return void 0; },
|
|
62
|
+
resetRequest: function (_requestId) { return void 0; }
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
module.exports = createCancellationToken;
|
|
67
|
+
//# sourceMappingURL=cancellationToken.js.map
|