@microsoft/agents-hosting-express 0.6.11 → 0.6.16-gc874f0c9d8
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/src/startServer.js +2 -35
- package/dist/src/startServer.js.map +1 -1
- package/package.json +2 -2
- package/src/startServer.ts +1 -2
package/dist/src/startServer.js
CHANGED
|
@@ -3,39 +3,6 @@
|
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
-
if (k2 === undefined) k2 = k;
|
|
8
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(o, k2, desc);
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
-
}) : function(o, v) {
|
|
20
|
-
o["default"] = v;
|
|
21
|
-
});
|
|
22
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
-
var ownKeys = function(o) {
|
|
24
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
-
var ar = [];
|
|
26
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
-
return ar;
|
|
28
|
-
};
|
|
29
|
-
return ownKeys(o);
|
|
30
|
-
};
|
|
31
|
-
return function (mod) {
|
|
32
|
-
if (mod && mod.__esModule) return mod;
|
|
33
|
-
var result = {};
|
|
34
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
-
__setModuleDefault(result, mod);
|
|
36
|
-
return result;
|
|
37
|
-
};
|
|
38
|
-
})();
|
|
39
6
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
40
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
41
8
|
};
|
|
@@ -43,6 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
43
10
|
exports.startServer = void 0;
|
|
44
11
|
const express_1 = __importDefault(require("express"));
|
|
45
12
|
const agents_hosting_1 = require("@microsoft/agents-hosting");
|
|
13
|
+
const package_json_1 = require("@microsoft/agents-hosting/package.json");
|
|
46
14
|
/**
|
|
47
15
|
* Starts an Express server for handling Agent requests.
|
|
48
16
|
*
|
|
@@ -85,8 +53,7 @@ const startServer = (agent, authConfiguration) => {
|
|
|
85
53
|
server.post('/api/messages', (req, res) => adapter.process(req, res, (context) => agent.run(context)));
|
|
86
54
|
const port = process.env.PORT || 3978;
|
|
87
55
|
server.listen(port, async () => {
|
|
88
|
-
|
|
89
|
-
console.log(`\nServer listening to port ${port} on sdk ${version} for appId ${authConfig.clientId} debug ${process.env.DEBUG}`);
|
|
56
|
+
console.log(`\nServer listening to port ${port} on sdk ${package_json_1.version} for appId ${authConfig.clientId} debug ${process.env.DEBUG}`);
|
|
90
57
|
}).on('error', console.error);
|
|
91
58
|
};
|
|
92
59
|
exports.startServer = startServer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startServer.js","sourceRoot":"","sources":["../../src/startServer.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"startServer.js","sourceRoot":"","sources":["../../src/startServer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,sDAA2C;AAC3C,8DAAuK;AACvK,yEAAgE;AAChE;;;;;;;;;;;;;;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GED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@microsoft/agents-hosting-express",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.16-gc874f0c9d8",
|
|
5
5
|
"homepage": "https://github.com/microsoft/Agents-for-js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"main": "dist/src/index.js",
|
|
20
20
|
"types": "dist/src/index.d.ts",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@microsoft/agents-hosting": "0.6.
|
|
22
|
+
"@microsoft/agents-hosting": "0.6.16-gc874f0c9d8",
|
|
23
23
|
"express": "^5.1.0"
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
package/src/startServer.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import express, { Response } from 'express'
|
|
7
7
|
import { ActivityHandler, AgentApplication, AuthConfiguration, authorizeJWT, CloudAdapter, loadAuthConfigFromEnv, Request, TurnState } from '@microsoft/agents-hosting'
|
|
8
|
-
|
|
8
|
+
import { version } from '@microsoft/agents-hosting/package.json'
|
|
9
9
|
/**
|
|
10
10
|
* Starts an Express server for handling Agent requests.
|
|
11
11
|
*
|
|
@@ -53,7 +53,6 @@ export const startServer = (agent: AgentApplication<TurnState<any, any>> | Activ
|
|
|
53
53
|
|
|
54
54
|
const port = process.env.PORT || 3978
|
|
55
55
|
server.listen(port, async () => {
|
|
56
|
-
const version = (await import('@microsoft/agents-hosting/package.json')).version
|
|
57
56
|
console.log(`\nServer listening to port ${port} on sdk ${version} for appId ${authConfig.clientId} debug ${process.env.DEBUG}`)
|
|
58
57
|
}).on('error', console.error)
|
|
59
58
|
}
|