@microsoft/agents-hosting-express 0.6.22 → 1.0.0

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/package.json CHANGED
@@ -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.22",
4
+ "version": "1.0.0",
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",
22
+ "@microsoft/agents-hosting": "1.0.0",
23
23
  "express": "^5.1.0"
24
24
  },
25
25
  "license": "MIT",
@@ -48,10 +48,11 @@ const startServer = (agent, authConfiguration) => {
48
48
  else {
49
49
  adapter = agent.adapter;
50
50
  }
51
+ const headerPropagation = agent === null || agent === void 0 ? void 0 : agent.options.headerPropagation;
51
52
  const server = (0, express_1.default)();
52
53
  server.use(express_1.default.json());
53
54
  server.use((0, agents_hosting_1.authorizeJWT)(authConfig));
54
- server.post('/api/messages', (req, res) => adapter.process(req, res, (context) => agent.run(context)));
55
+ server.post('/api/messages', (req, res) => adapter.process(req, res, (context) => agent.run(context), headerPropagation));
55
56
  const port = process.env.PORT || 3978;
56
57
  server.listen(port, async () => {
57
58
  console.log(`\nServer listening to port ${port} on sdk ${package_json_1.version} for appId ${authConfig.clientId} debug ${process.env.DEBUG}`);
@@ -1 +1 @@
1
- {"version":3,"file":"startServer.js","sourceRoot":"","sources":["../../src/startServer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,sDAA2C;AAC3C,8DAAuK;AACvK,yEAAgE;AAChE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACI,MAAM,WAAW,GAAG,CAAC,KAA8D,EAAE,iBAAqC,EAAE,EAAE;IACnI,M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jI,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;AAC/B,CAAC,CAAA;AAzBY,QAAA,WAAW,eAyBvB"}
package/package.json CHANGED
@@ -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.22",
4
+ "version": "1.0.0",
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",
22
+ "@microsoft/agents-hosting": "1.0.0",
23
23
  "express": "^5.1.0"
24
24
  },
25
25
  "license": "MIT",
@@ -42,6 +42,9 @@ export const startServer = (agent: AgentApplication<TurnState<any, any>> | Activ
42
42
  } else {
43
43
  adapter = agent.adapter as CloudAdapter
44
44
  }
45
+
46
+ const headerPropagation = (agent as AgentApplication<TurnState<any, any>>)?.options.headerPropagation
47
+
45
48
  const server = express()
46
49
  server.use(express.json())
47
50
  server.use(authorizeJWT(authConfig))
@@ -49,7 +52,7 @@ export const startServer = (agent: AgentApplication<TurnState<any, any>> | Activ
49
52
  server.post('/api/messages', (req: Request, res: Response) =>
50
53
  adapter.process(req, res, (context) =>
51
54
  agent.run(context)
52
- )
55
+ , headerPropagation)
53
56
  )
54
57
 
55
58
  const port = process.env.PORT || 3978