@chkp/policy-insights-mcp 0.3.4 → 0.3.8
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/dist/index.js +24 -4
- package/dist/package.json +5 -5
- package/package.json +5 -5
- package/package.json.bak +5 -5
package/dist/index.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __esm = (fn, res) => function __init() {
|
|
5
|
-
|
|
4
|
+
var __esm = (fn, res, err) => function __init() {
|
|
5
|
+
if (err) throw err[0];
|
|
6
|
+
try {
|
|
7
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
8
|
+
} catch (e) {
|
|
9
|
+
throw err = [e], e;
|
|
10
|
+
}
|
|
6
11
|
};
|
|
7
12
|
var __export = (target, all) => {
|
|
8
13
|
for (var name in all)
|
|
@@ -2476,10 +2481,17 @@ var APIManagerBase = class {
|
|
|
2476
2481
|
* Call an API endpoint
|
|
2477
2482
|
*/
|
|
2478
2483
|
async callApi(method, uri, data, domain) {
|
|
2484
|
+
return (await this.callApiWithStatus(method, uri, data, domain)).response;
|
|
2485
|
+
}
|
|
2486
|
+
/**
|
|
2487
|
+
* Call an API endpoint and return both the HTTP status code and the response body.
|
|
2488
|
+
* Used by callers that need to track the underlying HTTP status (e.g. management-write).
|
|
2489
|
+
*/
|
|
2490
|
+
async callApiWithStatus(method, uri, data, domain) {
|
|
2479
2491
|
const sanitizedData = sanitizeData(data);
|
|
2480
2492
|
const apiClient = domain && !data["domains-to-process"] ? await this.getDomainApiClientByDomain(domain) : this.client;
|
|
2481
2493
|
const clientResponse = await apiClient.callApi(method, uri, sanitizedData, void 0);
|
|
2482
|
-
return clientResponse.response;
|
|
2494
|
+
return { status: clientResponse.status, response: clientResponse.response };
|
|
2483
2495
|
}
|
|
2484
2496
|
/**
|
|
2485
2497
|
* Get the result of a management API task (similar to getTaskResult but for management tasks)
|
|
@@ -2997,7 +3009,7 @@ var Settings = class _Settings {
|
|
|
2997
3009
|
* Check if the provided string is a valid region
|
|
2998
3010
|
*/
|
|
2999
3011
|
isValidRegion(region) {
|
|
3000
|
-
return ["EU", "US", "
|
|
3012
|
+
return ["EU", "US", "AU", "IN", "AE", "CA", "DEV", "STG", "LOCAL"].includes(region.toUpperCase());
|
|
3001
3013
|
}
|
|
3002
3014
|
/**
|
|
3003
3015
|
* Get the base gateway URL for a given region
|
|
@@ -3008,6 +3020,14 @@ var Settings = class _Settings {
|
|
|
3008
3020
|
return "https://cloudinfra-gw.portal.checkpoint.com";
|
|
3009
3021
|
case "US":
|
|
3010
3022
|
return "https://cloudinfra-gw-us.portal.checkpoint.com";
|
|
3023
|
+
case "AU":
|
|
3024
|
+
return "https://cloudinfra-gw.ap.portal.checkpoint.com";
|
|
3025
|
+
case "IN":
|
|
3026
|
+
return "https://cloudinfra-gw.in.portal.checkpoint.com";
|
|
3027
|
+
case "AE":
|
|
3028
|
+
return "https://cloudinfra-gw.ae.portal.checkpoint.com";
|
|
3029
|
+
case "CA":
|
|
3030
|
+
return "https://cloudinfra-gw.ca.portal.checkpoint.com";
|
|
3011
3031
|
case "STG":
|
|
3012
3032
|
case "DEV":
|
|
3013
3033
|
case "LOCAL":
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chkp/policy-insights-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"bin": {
|
|
5
5
|
"policy-insights-mcp": "dist/index.js"
|
|
6
6
|
},
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@chkp/mcp-utils": "*",
|
|
29
29
|
"@chkp/quantum-infra": "*",
|
|
30
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
31
|
-
"axios": "^1.
|
|
32
|
-
"commander": "^
|
|
30
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
31
|
+
"axios": "^1.16.0",
|
|
32
|
+
"commander": "^14.0.3",
|
|
33
33
|
"node-machine-id": "^1.1.12",
|
|
34
34
|
"zod": "^3.22.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/node": "^
|
|
37
|
+
"@types/node": "^26.0.0",
|
|
38
38
|
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
39
39
|
"@typescript-eslint/parser": "^8.38.0",
|
|
40
40
|
"eslint": "^8.57.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chkp/policy-insights-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"bin": {
|
|
5
5
|
"policy-insights-mcp": "dist/index.js"
|
|
6
6
|
},
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"postpack": "node ../../scripts/strip-bundled-deps.js restore"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
29
|
-
"commander": "^
|
|
30
|
-
"axios": "^1.
|
|
28
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
29
|
+
"commander": "^14.0.3",
|
|
30
|
+
"axios": "^1.16.0",
|
|
31
31
|
"node-machine-id": "^1.1.12",
|
|
32
32
|
"zod": "^3.24.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@types/node": "^
|
|
35
|
+
"@types/node": "^26.0.0",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
37
37
|
"@typescript-eslint/parser": "^8.38.0",
|
|
38
38
|
"eslint": "^8.57.0",
|
package/package.json.bak
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chkp/policy-insights-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"bin": {
|
|
5
5
|
"policy-insights-mcp": "dist/index.js"
|
|
6
6
|
},
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@chkp/mcp-utils": "*",
|
|
29
29
|
"@chkp/quantum-infra": "*",
|
|
30
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
31
|
-
"commander": "^
|
|
32
|
-
"axios": "^1.
|
|
30
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
31
|
+
"commander": "^14.0.3",
|
|
32
|
+
"axios": "^1.16.0",
|
|
33
33
|
"node-machine-id": "^1.1.12",
|
|
34
34
|
"zod": "^3.24.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/node": "^
|
|
37
|
+
"@types/node": "^26.0.0",
|
|
38
38
|
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
39
39
|
"@typescript-eslint/parser": "^8.38.0",
|
|
40
40
|
"eslint": "^8.57.0",
|