@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,128 @@
|
|
|
1
|
+
import {
|
|
2
|
+
File,
|
|
3
|
+
isFile
|
|
4
|
+
} from "./sse-server-gt7tx6n2.js";
|
|
5
|
+
import {
|
|
6
|
+
__commonJS,
|
|
7
|
+
__require,
|
|
8
|
+
__toESM
|
|
9
|
+
} from "./sse-server-7wcvyxyj.js";
|
|
10
|
+
|
|
11
|
+
// node_modules/node-domexception/index.js
|
|
12
|
+
var require_node_domexception = __commonJS((exports, module) => {
|
|
13
|
+
/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
|
14
|
+
if (!globalThis.DOMException) {
|
|
15
|
+
try {
|
|
16
|
+
const { MessageChannel } = __require("worker_threads"), port = new MessageChannel().port1, ab = new ArrayBuffer;
|
|
17
|
+
port.postMessage(ab, [ab, ab]);
|
|
18
|
+
} catch (err) {
|
|
19
|
+
err.constructor.name === "DOMException" && (globalThis.DOMException = err.constructor);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
module.exports = globalThis.DOMException;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// node_modules/formdata-node/lib/esm/fileFromPath.js
|
|
26
|
+
var import_node_domexception = __toESM(require_node_domexception(), 1);
|
|
27
|
+
import { statSync, createReadStream, promises as fs } from "fs";
|
|
28
|
+
import { basename } from "path";
|
|
29
|
+
|
|
30
|
+
// node_modules/formdata-node/lib/esm/isPlainObject.js
|
|
31
|
+
var getType = (value) => Object.prototype.toString.call(value).slice(8, -1).toLowerCase();
|
|
32
|
+
function isPlainObject(value) {
|
|
33
|
+
if (getType(value) !== "object") {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
const pp = Object.getPrototypeOf(value);
|
|
37
|
+
if (pp === null || pp === undefined) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
const Ctor = pp.constructor && pp.constructor.toString();
|
|
41
|
+
return Ctor === Object.toString();
|
|
42
|
+
}
|
|
43
|
+
var isPlainObject_default = isPlainObject;
|
|
44
|
+
|
|
45
|
+
// node_modules/formdata-node/lib/esm/fileFromPath.js
|
|
46
|
+
var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
|
|
47
|
+
if (kind === "m")
|
|
48
|
+
throw new TypeError("Private method is not writable");
|
|
49
|
+
if (kind === "a" && !f)
|
|
50
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
51
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
52
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
53
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
54
|
+
};
|
|
55
|
+
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
56
|
+
if (kind === "a" && !f)
|
|
57
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
58
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
59
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
60
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
61
|
+
};
|
|
62
|
+
var _FileFromPath_path;
|
|
63
|
+
var _FileFromPath_start;
|
|
64
|
+
var MESSAGE = "The requested file could not be read, " + "typically due to permission problems that have occurred after a reference " + "to a file was acquired.";
|
|
65
|
+
|
|
66
|
+
class FileFromPath {
|
|
67
|
+
constructor(input) {
|
|
68
|
+
_FileFromPath_path.set(this, undefined);
|
|
69
|
+
_FileFromPath_start.set(this, undefined);
|
|
70
|
+
__classPrivateFieldSet(this, _FileFromPath_path, input.path, "f");
|
|
71
|
+
__classPrivateFieldSet(this, _FileFromPath_start, input.start || 0, "f");
|
|
72
|
+
this.name = basename(__classPrivateFieldGet(this, _FileFromPath_path, "f"));
|
|
73
|
+
this.size = input.size;
|
|
74
|
+
this.lastModified = input.lastModified;
|
|
75
|
+
}
|
|
76
|
+
slice(start, end) {
|
|
77
|
+
return new FileFromPath({
|
|
78
|
+
path: __classPrivateFieldGet(this, _FileFromPath_path, "f"),
|
|
79
|
+
lastModified: this.lastModified,
|
|
80
|
+
size: end - start,
|
|
81
|
+
start
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
async* stream() {
|
|
85
|
+
const { mtimeMs } = await fs.stat(__classPrivateFieldGet(this, _FileFromPath_path, "f"));
|
|
86
|
+
if (mtimeMs > this.lastModified) {
|
|
87
|
+
throw new import_node_domexception.default(MESSAGE, "NotReadableError");
|
|
88
|
+
}
|
|
89
|
+
if (this.size) {
|
|
90
|
+
yield* createReadStream(__classPrivateFieldGet(this, _FileFromPath_path, "f"), {
|
|
91
|
+
start: __classPrivateFieldGet(this, _FileFromPath_start, "f"),
|
|
92
|
+
end: __classPrivateFieldGet(this, _FileFromPath_start, "f") + this.size - 1
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
get [(_FileFromPath_path = new WeakMap, _FileFromPath_start = new WeakMap, Symbol.toStringTag)]() {
|
|
97
|
+
return "File";
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function createFileFromPath(path, { mtimeMs, size }, filenameOrOptions, options = {}) {
|
|
101
|
+
let filename;
|
|
102
|
+
if (isPlainObject_default(filenameOrOptions)) {
|
|
103
|
+
[options, filename] = [filenameOrOptions, undefined];
|
|
104
|
+
} else {
|
|
105
|
+
filename = filenameOrOptions;
|
|
106
|
+
}
|
|
107
|
+
const file = new FileFromPath({ path, size, lastModified: mtimeMs });
|
|
108
|
+
if (!filename) {
|
|
109
|
+
filename = file.name;
|
|
110
|
+
}
|
|
111
|
+
return new File([file], filename, {
|
|
112
|
+
...options,
|
|
113
|
+
lastModified: file.lastModified
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function fileFromPathSync(path, filenameOrOptions, options = {}) {
|
|
117
|
+
const stats = statSync(path);
|
|
118
|
+
return createFileFromPath(path, stats, filenameOrOptions, options);
|
|
119
|
+
}
|
|
120
|
+
async function fileFromPath(path, filenameOrOptions, options) {
|
|
121
|
+
const stats = await fs.stat(path);
|
|
122
|
+
return createFileFromPath(path, stats, filenameOrOptions, options);
|
|
123
|
+
}
|
|
124
|
+
export {
|
|
125
|
+
isFile,
|
|
126
|
+
fileFromPathSync,
|
|
127
|
+
fileFromPath
|
|
128
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
require_dist_cjs as require_dist_cjs2
|
|
3
|
+
} from "./sse-server-qj4zxq0f.js";
|
|
4
|
+
import"./sse-server-4g9za0qq.js";
|
|
5
|
+
import {
|
|
6
|
+
require_client
|
|
7
|
+
} from "./sse-server-mkesh468.js";
|
|
8
|
+
import {
|
|
9
|
+
require_dist_cjs
|
|
10
|
+
} from "./sse-server-3343e7xh.js";
|
|
11
|
+
import {
|
|
12
|
+
__esm,
|
|
13
|
+
__require
|
|
14
|
+
} from "./sse-server-7wcvyxyj.js";
|
|
15
|
+
|
|
16
|
+
// node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js
|
|
17
|
+
var sharedIniFileLoader, propertyProvider, child_process, util, client, getValidatedProcessCredentials = (profileName, data, profiles) => {
|
|
18
|
+
if (data.Version !== 1) {
|
|
19
|
+
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
|
|
20
|
+
}
|
|
21
|
+
if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {
|
|
22
|
+
throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
|
|
23
|
+
}
|
|
24
|
+
if (data.Expiration) {
|
|
25
|
+
const currentTime = new Date;
|
|
26
|
+
const expireTime = new Date(data.Expiration);
|
|
27
|
+
if (expireTime < currentTime) {
|
|
28
|
+
throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
let accountId = data.AccountId;
|
|
32
|
+
if (!accountId && profiles?.[profileName]?.aws_account_id) {
|
|
33
|
+
accountId = profiles[profileName].aws_account_id;
|
|
34
|
+
}
|
|
35
|
+
const credentials = {
|
|
36
|
+
accessKeyId: data.AccessKeyId,
|
|
37
|
+
secretAccessKey: data.SecretAccessKey,
|
|
38
|
+
...data.SessionToken && { sessionToken: data.SessionToken },
|
|
39
|
+
...data.Expiration && { expiration: new Date(data.Expiration) },
|
|
40
|
+
...data.CredentialScope && { credentialScope: data.CredentialScope },
|
|
41
|
+
...accountId && { accountId }
|
|
42
|
+
};
|
|
43
|
+
client.setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
|
|
44
|
+
return credentials;
|
|
45
|
+
}, resolveProcessCredentials = async (profileName, profiles, logger) => {
|
|
46
|
+
const profile = profiles[profileName];
|
|
47
|
+
if (profiles[profileName]) {
|
|
48
|
+
const credentialProcess = profile["credential_process"];
|
|
49
|
+
if (credentialProcess !== undefined) {
|
|
50
|
+
const execPromise = util.promisify(sharedIniFileLoader.externalDataInterceptor?.getTokenRecord?.().exec ?? child_process.exec);
|
|
51
|
+
try {
|
|
52
|
+
const { stdout } = await execPromise(credentialProcess);
|
|
53
|
+
let data;
|
|
54
|
+
try {
|
|
55
|
+
data = JSON.parse(stdout.trim());
|
|
56
|
+
} catch {
|
|
57
|
+
throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
|
|
58
|
+
}
|
|
59
|
+
return getValidatedProcessCredentials(profileName, data, profiles);
|
|
60
|
+
} catch (error) {
|
|
61
|
+
throw new propertyProvider.CredentialsProviderError(error.message, { logger });
|
|
62
|
+
}
|
|
63
|
+
} else {
|
|
64
|
+
throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
|
|
65
|
+
}
|
|
66
|
+
} else {
|
|
67
|
+
throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
|
|
68
|
+
logger
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}, fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
72
|
+
init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
|
|
73
|
+
const profiles = await sharedIniFileLoader.parseKnownFiles(init);
|
|
74
|
+
return resolveProcessCredentials(sharedIniFileLoader.getProfileName({
|
|
75
|
+
profile: init.profile ?? callerClientConfig?.profile
|
|
76
|
+
}), profiles, init.logger);
|
|
77
|
+
}, $fromProcess;
|
|
78
|
+
var init_dist_cjs = __esm(() => {
|
|
79
|
+
sharedIniFileLoader = require_dist_cjs2();
|
|
80
|
+
propertyProvider = require_dist_cjs();
|
|
81
|
+
child_process = __require("child_process");
|
|
82
|
+
util = __require("util");
|
|
83
|
+
client = require_client();
|
|
84
|
+
$fromProcess = fromProcess;
|
|
85
|
+
});
|
|
86
|
+
init_dist_cjs();
|
|
87
|
+
|
|
88
|
+
export {
|
|
89
|
+
$fromProcess as fromProcess
|
|
90
|
+
};
|
|
91
|
+
export default {
|
|
92
|
+
get fromProcess() {
|
|
93
|
+
return $fromProcess;
|
|
94
|
+
}
|
|
95
|
+
};
|