@sassoftware/sas-score-mcp-serverjs 0.3.1-1 → 0.3.2
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/cli.js +1 -1
- package/package.json +2 -2
- package/src/handleRequest.js +4 -0
- package/src/hapiMcpServer.js +1 -1
package/cli.js
CHANGED
|
@@ -103,7 +103,7 @@ if (process.env.SUBCLASS != null) {
|
|
|
103
103
|
let clientID = process.env.CLIENTID || process.env.CLIENTIDPW || null;
|
|
104
104
|
let clientSecret = process.env.CLIENTSECRET || process.env.CLIENTSECRETPW || null;
|
|
105
105
|
let https = process.env.HTTPS != null ? process.env.HTTPS.toUpperCase() : "FALSE";
|
|
106
|
-
let autoLogon = process.env.AUTOLOGON != null ? process.env.AUTOLOGON.toUpperCase() : "
|
|
106
|
+
let autoLogon = process.env.AUTOLOGON != null ? process.env.AUTOLOGON.toUpperCase() : "FALSE";
|
|
107
107
|
const appEnvBase = {
|
|
108
108
|
version: version,
|
|
109
109
|
mcpType: mcpType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sassoftware/sas-score-mcp-serverjs",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "A mcp server for SAS Viya",
|
|
5
5
|
"author": "Deva Kumar <deva.kumar@sas.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"deploy": "bash ./deploy.sh",
|
|
19
19
|
"push2acr": "bash ./push2acr.sh",
|
|
20
20
|
"bump": "npm version prerelease",
|
|
21
|
-
"pub": "npm publish --tag
|
|
21
|
+
"pub": "npm publish --tag dev --access public"
|
|
22
22
|
},
|
|
23
23
|
"repository": "https://github.com/sassoftware/sas-score-mcp-serverjs",
|
|
24
24
|
"keywords": [
|
package/src/handleRequest.js
CHANGED
|
@@ -35,6 +35,10 @@ async function handleRequest(mcpServer, cache, req, h, credentials) {
|
|
|
35
35
|
console.error("[Note] Creating new app context for session ID:", sessionId);
|
|
36
36
|
let appEnvTemplate = cache.get("appEnvTemplate");
|
|
37
37
|
_appContext = Object.assign({}, appEnvTemplate, headerCache);
|
|
38
|
+
if (headerCache.AUTHFLOW === 'bearer') {
|
|
39
|
+
_appContext.contexts.AUTHFLOW = 'bearer';
|
|
40
|
+
_appContext.contexts.bearerToken = headerCache.bearerToken;
|
|
41
|
+
}
|
|
38
42
|
_appContext.contexts.oauthInfo = credentials;
|
|
39
43
|
cache.set(sessionId, _appContext);
|
|
40
44
|
}
|
package/src/hapiMcpServer.js
CHANGED
|
@@ -16,7 +16,7 @@ async function hapiMcpServer(mcpServer, cache, baseAppEnvContext) {
|
|
|
16
16
|
process.env.APPHOST = '0.0.0.0';
|
|
17
17
|
let r = await appServer.asyncCore(mcpHandlers, true, 'app', null);
|
|
18
18
|
console.error('Hapi server running result:', r);
|
|
19
|
-
if (baseAppEnvContext.AUTHFLOW === 'code' && baseAppEnvContext.AUTOLOGON
|
|
19
|
+
if (baseAppEnvContext.AUTHFLOW === 'code' && baseAppEnvContext.AUTOLOGON === 'TRUE') {
|
|
20
20
|
await urlOpen(r);
|
|
21
21
|
}
|
|
22
22
|
return r;
|