@jaypie/express 1.2.23 → 1.2.25

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/README.md CHANGED
@@ -1,18 +1,9 @@
1
- # Jaypie Express 🐦‍⬛🧋
1
+ # Jaypie Express 🐦‍⬛
2
2
 
3
- Express Jaypie handler for AWS Lambda
3
+ Express.js handler utilities for Jaypie applications.
4
4
 
5
- See [Jaypie](https://github.com/finlaysonstudio/jaypie) for usage.
6
-
7
- ## 📝 Changelog
8
-
9
- | Date | Version | Summary |
10
- | ---------- | ------- | -------------- |
11
- | 1/23/2026 | 1.2.5 | Fix array query params with bracket notation in API Gateway v1 |
12
- | 5/21/2024 | 1.0.0 | Initial release |
13
- | 5/19/2024 | 0.1.0 | Initial deploy |
14
- | 5/12/2024 | 0.0.1 | Initial commit |
5
+ See [jaypie.net](https://jaypie.net) for documentation.
15
6
 
16
7
  ## 📜 License
17
8
 
18
- [MIT License](./LICENSE.txt). Published by Finlayson Studio
9
+ [MIT License](./LICENSE.txt). Published by Finlayson Studio.
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var datadog = require('@jaypie/datadog');
3
4
  var node_stream = require('node:stream');
4
5
  var node_http = require('node:http');
5
6
  var errors = require('@jaypie/errors');
@@ -7,7 +8,6 @@ var kit = require('@jaypie/kit');
7
8
  var expressCors = require('cors');
8
9
  var aws = require('@jaypie/aws');
9
10
  var logger$2 = require('@jaypie/logger');
10
- var datadog = require('@jaypie/datadog');
11
11
 
12
12
  //
13
13
  //
@@ -1101,6 +1101,9 @@ function createLambdaHandler(app, _options) {
1101
1101
  finally {
1102
1102
  // Clear current invoke context
1103
1103
  clearCurrentInvoke();
1104
+ // Flush buffered LLM Observability spans before the Lambda freezes.
1105
+ // No-op unless DD_LLMOBS_ENABLED; never throws.
1106
+ datadog.flushLlmObs();
1104
1107
  }
1105
1108
  };
1106
1109
  }
@@ -1144,6 +1147,9 @@ function createLambdaStreamHandler(app, _options) {
1144
1147
  finally {
1145
1148
  // Clear current invoke context
1146
1149
  clearCurrentInvoke();
1150
+ // Flush buffered LLM Observability spans before the Lambda freezes.
1151
+ // No-op unless DD_LLMOBS_ENABLED; never throws.
1152
+ datadog.flushLlmObs();
1147
1153
  }
1148
1154
  });
1149
1155
  }
@@ -1865,6 +1871,10 @@ function expressHandler(handlerOrOptions, optionsOrHandler) {
1865
1871
  //
1866
1872
  // Build a request-local setup list to avoid mutating the shared array
1867
1873
  const requestSetup = [];
1874
+ // Load the Datadog LLM Observability API key into the environment when enabled
1875
+ requestSetup.push(async () => {
1876
+ await datadog.loadDatadogApiKey();
1877
+ });
1868
1878
  // Load secrets into process.env if configured
1869
1879
  if (secrets && secrets.length > 0) {
1870
1880
  const secretsToLoad = secrets;