@fjall/components-infrastructure 21.0.0 → 21.1.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.
|
@@ -24,8 +24,8 @@ export const DATABASE_ENGINE_CONFIG = Object.freeze({
|
|
|
24
24
|
sslParameters: { "rds.force_ssl": "1" }
|
|
25
25
|
},
|
|
26
26
|
mysql: {
|
|
27
|
-
// majorVersion must be Aurora version (3.
|
|
28
|
-
aurora: { version: "8.0.mysql_aurora.3.
|
|
27
|
+
// majorVersion must be Aurora version (3.13.0), NOT MySQL version (8.0)
|
|
28
|
+
aurora: { version: "8.0.mysql_aurora.3.13.0", majorVersion: "3.13.0" },
|
|
29
29
|
instance: { version: "8.4.9", majorVersion: "8.4" },
|
|
30
30
|
defaultUsername: "admin",
|
|
31
31
|
sslParameters: { require_secure_transport: "ON" }
|
|
@@ -4,20 +4,29 @@
|
|
|
4
4
|
* Also writes to JSONL file for debugging and support.
|
|
5
5
|
*/
|
|
6
6
|
import { appendFileSync, existsSync, mkdirSync } from "fs";
|
|
7
|
-
import { homedir } from "os";
|
|
8
7
|
import { join } from "path";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import { fjallLogDir } from "@fjall/util";
|
|
9
|
+
import { FileRotator, LOG_ROTATION_DEFAULTS } from "@fjall/util/logRotation";
|
|
10
|
+
const LOG_FILENAME = "infrastructure.jsonl";
|
|
11
|
+
/**
|
|
12
|
+
* Shared with the CLI's own logs, so this file cannot outgrow the budget
|
|
13
|
+
* the rest of Fjall's logging keeps to. Without it this log had no bound of
|
|
14
|
+
* any kind: it is appended to on every CDK synth, and one developer machine
|
|
15
|
+
* reached 267MB of it inside a single release cycle.
|
|
16
|
+
*/
|
|
17
|
+
const rotator = new FileRotator({
|
|
18
|
+
maxFiles: LOG_ROTATION_DEFAULTS.MAX_FILES
|
|
19
|
+
});
|
|
14
20
|
/**
|
|
15
21
|
* Write a log entry to the infrastructure JSONL file
|
|
16
22
|
*/
|
|
17
23
|
function writeToLog(level, message) {
|
|
18
24
|
try {
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
// Resolved per write, not at module load: the log dir is an env var and
|
|
26
|
+
// CDK imports this module long before a command has read its environment.
|
|
27
|
+
const logDir = fjallLogDir();
|
|
28
|
+
if (!existsSync(logDir)) {
|
|
29
|
+
mkdirSync(logDir, { recursive: true });
|
|
21
30
|
}
|
|
22
31
|
const entry = JSON.stringify({
|
|
23
32
|
timestamp: new Date().toISOString(),
|
|
@@ -26,7 +35,9 @@ function writeToLog(level, message) {
|
|
|
26
35
|
message,
|
|
27
36
|
source: "cdk-subprocess"
|
|
28
37
|
});
|
|
29
|
-
|
|
38
|
+
const logPath = join(logDir, LOG_FILENAME);
|
|
39
|
+
rotator.rotateIfNeeded(logPath, LOG_ROTATION_DEFAULTS.MAX_FILE_SIZE);
|
|
40
|
+
appendFileSync(logPath, entry + "\n");
|
|
30
41
|
}
|
|
31
42
|
catch (err) {
|
|
32
43
|
console.debug("[Fjall] writeToLog failed:", err instanceof Error ? err.message : String(err));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjall/components-infrastructure",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.1.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/fjall-tech/fjall.git",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@aws-sdk/client-organizations": "^3.1098.0",
|
|
83
|
-
"@fjall/generator": "^21.
|
|
84
|
-
"@fjall/util": "^21.
|
|
83
|
+
"@fjall/generator": "^21.1.0",
|
|
84
|
+
"@fjall/util": "^21.1.0",
|
|
85
85
|
"constructs": "^10.7.2"
|
|
86
86
|
},
|
|
87
87
|
"overrides": {
|