dbgate-tools 7.2.3 → 7.2.4
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/filterBehaviours.js +1 -0
- package/lib/packageTools.js +6 -6
- package/package.json +3 -3
package/lib/filterBehaviours.js
CHANGED
package/lib/packageTools.js
CHANGED
|
@@ -32,7 +32,7 @@ function isValidJsIdentifier(name) {
|
|
|
32
32
|
exports.isValidJsIdentifier = isValidJsIdentifier;
|
|
33
33
|
function assertValidJsIdentifier(name, label) {
|
|
34
34
|
if (!isValidJsIdentifier(name)) {
|
|
35
|
-
throw new Error(`DBGM-
|
|
35
|
+
throw new Error(`DBGM-00431 Invalid ${label}: ${String(name).substring(0, 100)}`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
exports.assertValidJsIdentifier = assertValidJsIdentifier;
|
|
@@ -44,20 +44,20 @@ exports.assertValidJsIdentifier = assertValidJsIdentifier;
|
|
|
44
44
|
*/
|
|
45
45
|
function assertValidShellApiFunctionName(functionName) {
|
|
46
46
|
if (typeof functionName !== 'string') {
|
|
47
|
-
throw new Error('DBGM-
|
|
47
|
+
throw new Error('DBGM-00432 functionName must be a string');
|
|
48
48
|
}
|
|
49
49
|
const nsMatch = functionName.match(/^([^@]+)@([^@]+)$/);
|
|
50
50
|
if (nsMatch) {
|
|
51
51
|
if (!isValidJsIdentifier(nsMatch[1])) {
|
|
52
|
-
throw new Error(`DBGM-
|
|
52
|
+
throw new Error(`DBGM-00433 Invalid function part in functionName: ${nsMatch[1].substring(0, 100)}`);
|
|
53
53
|
}
|
|
54
54
|
if (!/^dbgate-plugin-[a-zA-Z0-9_-]+$/.test(nsMatch[2])) {
|
|
55
|
-
throw new Error(`DBGM-
|
|
55
|
+
throw new Error(`DBGM-00434 Invalid plugin package in functionName: ${nsMatch[2].substring(0, 100)}`);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
else {
|
|
59
59
|
if (!isValidJsIdentifier(functionName)) {
|
|
60
|
-
throw new Error(`DBGM-
|
|
60
|
+
throw new Error(`DBGM-00435 Invalid functionName: ${functionName.substring(0, 100)}`);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -77,7 +77,7 @@ function extractShellApiPlugins(functionName, props) {
|
|
|
77
77
|
}
|
|
78
78
|
for (const plugin of res) {
|
|
79
79
|
if (!VALID_PLUGIN_NAME_RE.test(plugin)) {
|
|
80
|
-
throw new Error(`DBGM-
|
|
80
|
+
throw new Error(`DBGM-00436 Invalid plugin name: ${String(plugin).substring(0, 100)}`);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
return res;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "7.2.
|
|
2
|
+
"version": "7.2.4",
|
|
3
3
|
"name": "dbgate-tools",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"typings": "lib/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^13.7.0",
|
|
29
|
-
"dbgate-types": "7.2.
|
|
29
|
+
"dbgate-types": "7.2.4",
|
|
30
30
|
"jest": "^28.1.3",
|
|
31
31
|
"ts-jest": "^28.0.7",
|
|
32
32
|
"typescript": "^4.4.3"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"blueimp-md5": "^2.19.0",
|
|
36
36
|
"dbgate-query-splitter": "^4.12.0",
|
|
37
|
-
"dbgate-sqltree": "7.2.
|
|
37
|
+
"dbgate-sqltree": "7.2.4",
|
|
38
38
|
"debug": "^4.3.4",
|
|
39
39
|
"json-stable-stringify": "^1.0.1",
|
|
40
40
|
"lodash": "^4.17.21",
|