@jaypie/constructs 1.2.64 → 1.2.66
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/cjs/index.cjs +10 -7
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +10 -7
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -329,7 +329,7 @@ function addDatadogLayers(lambdaFunction, options = {}) {
|
|
|
329
329
|
extensionLayerVersion: CDK$2.DATADOG.LAYER.EXTENSION,
|
|
330
330
|
env: process.env.PROJECT_ENV,
|
|
331
331
|
service: resolvedService,
|
|
332
|
-
version: process.env.PROJECT_VERSION,
|
|
332
|
+
version: process.env.DD_VERSION || process.env.PROJECT_VERSION,
|
|
333
333
|
});
|
|
334
334
|
datadogLambda.addLambdaFunctions([lambdaFunction]);
|
|
335
335
|
return true;
|
|
@@ -776,6 +776,7 @@ function jaypieLambdaEnv(options = {}) {
|
|
|
776
776
|
// Default environment variables from process.env if present
|
|
777
777
|
const defaultEnvVars = [
|
|
778
778
|
"DATADOG_API_KEY_ARN",
|
|
779
|
+
"DD_VERSION",
|
|
779
780
|
"LOG_LEVEL",
|
|
780
781
|
"MODULE_LOGGER",
|
|
781
782
|
"MODULE_LOG_LEVEL",
|
|
@@ -1158,16 +1159,18 @@ class JaypieEnvSecret extends JaypieSecret {
|
|
|
1158
1159
|
super(scope, idOrEnvKey, props);
|
|
1159
1160
|
}
|
|
1160
1161
|
buildSecret(context) {
|
|
1161
|
-
const { envKey, id
|
|
1162
|
+
const { envKey, id } = context;
|
|
1162
1163
|
const props = context.props;
|
|
1163
1164
|
const { consumer = checkEnvIsConsumer$1(), export: exportParam, generateSecretString, provider = checkEnvIsProvider$1(), removalPolicy, roleTag, vendorTag, value, } = props;
|
|
1164
1165
|
let exportName;
|
|
1165
1166
|
if (!exportParam) {
|
|
1166
|
-
//
|
|
1167
|
-
//
|
|
1168
|
-
//
|
|
1169
|
-
//
|
|
1170
|
-
|
|
1167
|
+
// Always derive the export name from the construct id so the name is
|
|
1168
|
+
// stable across both call forms. For shorthand detection the id carries
|
|
1169
|
+
// the "EnvSecret_" prefix; for the explicit (id, { envKey }) form the id
|
|
1170
|
+
// is the caller's construct id. Deriving from envKey instead would change
|
|
1171
|
+
// the export name for an unchanged explicit-form call site across a
|
|
1172
|
+
// version bump and break existing cross-stack imports (issues #347, #365).
|
|
1173
|
+
const exportSource = id;
|
|
1171
1174
|
exportName = exportEnvName$1(exportSource, process.env, consumer);
|
|
1172
1175
|
}
|
|
1173
1176
|
else {
|