@sisense/mcp-server 0.2.1
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/LICENSE.md +35 -0
- package/README.md +121 -0
- package/dist/ai-hspmgr2c.js +3148 -0
- package/dist/fileFromPath-s6ap5vrh.js +128 -0
- package/dist/index-29n08mw7.js +95 -0
- package/dist/index-atgbxy7h.js +98603 -0
- package/dist/index-d6843g0v.js +372 -0
- package/dist/index-dcrjg3fk.js +207 -0
- package/dist/index-dxfb3krz.js +1489 -0
- package/dist/index-er0yspcy.js +918 -0
- package/dist/index-g8bgq79c.js +53 -0
- package/dist/index-p1pxtmwn.js +162 -0
- package/dist/index-qdth51hx.js +250 -0
- package/dist/index-tqba2rwh.js +603 -0
- package/dist/index-vrapm0b4.js +765 -0
- package/dist/index-vx54d05h.js +475 -0
- package/dist/sse-server-3343e7xh.js +117 -0
- package/dist/sse-server-36t17nga.js +12127 -0
- package/dist/sse-server-3e0efmg2.js +6276 -0
- package/dist/sse-server-4b60tg0c.js +136 -0
- package/dist/sse-server-4g9za0qq.js +89 -0
- package/dist/sse-server-4jjec4fz.js +9753 -0
- package/dist/sse-server-5tmgacdx.js +62 -0
- package/dist/sse-server-7wcvyxyj.js +31 -0
- package/dist/sse-server-brx9qtyd.js +2131 -0
- package/dist/sse-server-epd916s3.js +167 -0
- package/dist/sse-server-gt7tx6n2.js +2240 -0
- package/dist/sse-server-mkesh468.js +53 -0
- package/dist/sse-server-nwjjjz6x.js +113 -0
- package/dist/sse-server-qj4zxq0f.js +267 -0
- package/dist/sse-server-rr3dp62e.js +116721 -0
- package/dist/sse-server-ss0mydv4.js +3980 -0
- package/dist/sse-server-txz5g5t0.js +5328 -0
- package/dist/sse-server.js +30432 -0
- package/dist/view.html +3016 -0
- package/dist/widget-renderer-66ws3xtk.js +312 -0
- package/package.json +82 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import {
|
|
2
|
+
require_dist_cjs
|
|
3
|
+
} from "./sse-server-4g9za0qq.js";
|
|
4
|
+
import {
|
|
5
|
+
__commonJS
|
|
6
|
+
} from "./sse-server-7wcvyxyj.js";
|
|
7
|
+
|
|
8
|
+
// node_modules/@smithy/protocol-http/dist-cjs/index.js
|
|
9
|
+
var require_dist_cjs2 = __commonJS((exports) => {
|
|
10
|
+
var types = require_dist_cjs();
|
|
11
|
+
var getHttpHandlerExtensionConfiguration = (runtimeConfig) => {
|
|
12
|
+
return {
|
|
13
|
+
setHttpHandler(handler) {
|
|
14
|
+
runtimeConfig.httpHandler = handler;
|
|
15
|
+
},
|
|
16
|
+
httpHandler() {
|
|
17
|
+
return runtimeConfig.httpHandler;
|
|
18
|
+
},
|
|
19
|
+
updateHttpClientConfig(key, value) {
|
|
20
|
+
runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
|
|
21
|
+
},
|
|
22
|
+
httpHandlerConfigs() {
|
|
23
|
+
return runtimeConfig.httpHandler.httpHandlerConfigs();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
var resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {
|
|
28
|
+
return {
|
|
29
|
+
httpHandler: httpHandlerExtensionConfiguration.httpHandler()
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
class Field {
|
|
34
|
+
name;
|
|
35
|
+
kind;
|
|
36
|
+
values;
|
|
37
|
+
constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {
|
|
38
|
+
this.name = name;
|
|
39
|
+
this.kind = kind;
|
|
40
|
+
this.values = values;
|
|
41
|
+
}
|
|
42
|
+
add(value) {
|
|
43
|
+
this.values.push(value);
|
|
44
|
+
}
|
|
45
|
+
set(values) {
|
|
46
|
+
this.values = values;
|
|
47
|
+
}
|
|
48
|
+
remove(value) {
|
|
49
|
+
this.values = this.values.filter((v) => v !== value);
|
|
50
|
+
}
|
|
51
|
+
toString() {
|
|
52
|
+
return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", ");
|
|
53
|
+
}
|
|
54
|
+
get() {
|
|
55
|
+
return this.values;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
class Fields {
|
|
60
|
+
entries = {};
|
|
61
|
+
encoding;
|
|
62
|
+
constructor({ fields = [], encoding = "utf-8" }) {
|
|
63
|
+
fields.forEach(this.setField.bind(this));
|
|
64
|
+
this.encoding = encoding;
|
|
65
|
+
}
|
|
66
|
+
setField(field) {
|
|
67
|
+
this.entries[field.name.toLowerCase()] = field;
|
|
68
|
+
}
|
|
69
|
+
getField(name) {
|
|
70
|
+
return this.entries[name.toLowerCase()];
|
|
71
|
+
}
|
|
72
|
+
removeField(name) {
|
|
73
|
+
delete this.entries[name.toLowerCase()];
|
|
74
|
+
}
|
|
75
|
+
getByType(kind) {
|
|
76
|
+
return Object.values(this.entries).filter((field) => field.kind === kind);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
class HttpRequest {
|
|
81
|
+
method;
|
|
82
|
+
protocol;
|
|
83
|
+
hostname;
|
|
84
|
+
port;
|
|
85
|
+
path;
|
|
86
|
+
query;
|
|
87
|
+
headers;
|
|
88
|
+
username;
|
|
89
|
+
password;
|
|
90
|
+
fragment;
|
|
91
|
+
body;
|
|
92
|
+
constructor(options) {
|
|
93
|
+
this.method = options.method || "GET";
|
|
94
|
+
this.hostname = options.hostname || "localhost";
|
|
95
|
+
this.port = options.port;
|
|
96
|
+
this.query = options.query || {};
|
|
97
|
+
this.headers = options.headers || {};
|
|
98
|
+
this.body = options.body;
|
|
99
|
+
this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
|
|
100
|
+
this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
|
|
101
|
+
this.username = options.username;
|
|
102
|
+
this.password = options.password;
|
|
103
|
+
this.fragment = options.fragment;
|
|
104
|
+
}
|
|
105
|
+
static clone(request) {
|
|
106
|
+
const cloned = new HttpRequest({
|
|
107
|
+
...request,
|
|
108
|
+
headers: { ...request.headers }
|
|
109
|
+
});
|
|
110
|
+
if (cloned.query) {
|
|
111
|
+
cloned.query = cloneQuery(cloned.query);
|
|
112
|
+
}
|
|
113
|
+
return cloned;
|
|
114
|
+
}
|
|
115
|
+
static isInstance(request) {
|
|
116
|
+
if (!request) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
const req = request;
|
|
120
|
+
return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
|
|
121
|
+
}
|
|
122
|
+
clone() {
|
|
123
|
+
return HttpRequest.clone(this);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function cloneQuery(query) {
|
|
127
|
+
return Object.keys(query).reduce((carry, paramName) => {
|
|
128
|
+
const param = query[paramName];
|
|
129
|
+
return {
|
|
130
|
+
...carry,
|
|
131
|
+
[paramName]: Array.isArray(param) ? [...param] : param
|
|
132
|
+
};
|
|
133
|
+
}, {});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
class HttpResponse {
|
|
137
|
+
statusCode;
|
|
138
|
+
reason;
|
|
139
|
+
headers;
|
|
140
|
+
body;
|
|
141
|
+
constructor(options) {
|
|
142
|
+
this.statusCode = options.statusCode;
|
|
143
|
+
this.reason = options.reason;
|
|
144
|
+
this.headers = options.headers || {};
|
|
145
|
+
this.body = options.body;
|
|
146
|
+
}
|
|
147
|
+
static isInstance(response) {
|
|
148
|
+
if (!response)
|
|
149
|
+
return false;
|
|
150
|
+
const resp = response;
|
|
151
|
+
return typeof resp.statusCode === "number" && typeof resp.headers === "object";
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function isValidHostname(hostname) {
|
|
155
|
+
const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
|
|
156
|
+
return hostPattern.test(hostname);
|
|
157
|
+
}
|
|
158
|
+
exports.Field = Field;
|
|
159
|
+
exports.Fields = Fields;
|
|
160
|
+
exports.HttpRequest = HttpRequest;
|
|
161
|
+
exports.HttpResponse = HttpResponse;
|
|
162
|
+
exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration;
|
|
163
|
+
exports.isValidHostname = isValidHostname;
|
|
164
|
+
exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig;
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
export { require_dist_cjs2 as require_dist_cjs };
|