@friggframework/devtools 2.0.0--canary.461.41c835a.0 → 2.0.0--canary.461.5fd8136.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.
|
@@ -525,6 +525,39 @@ describe('AuroraBuilder', () => {
|
|
|
525
525
|
// Should use string concatenation instead
|
|
526
526
|
expect(zipFileCode).toContain("'Successfully rotated password for cluster: ' + ClusterIdentifier");
|
|
527
527
|
});
|
|
528
|
+
|
|
529
|
+
it('should properly escape ExcludeCharacters for valid JSON in CloudFormation template', async () => {
|
|
530
|
+
const appDefinition = {
|
|
531
|
+
database: {
|
|
532
|
+
postgres: {
|
|
533
|
+
enable: true,
|
|
534
|
+
management: 'discover',
|
|
535
|
+
autoCreateCredentials: true,
|
|
536
|
+
},
|
|
537
|
+
},
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
const discoveredResources = {
|
|
541
|
+
auroraClusterEndpoint: 'cluster.abc.us-east-1.rds.amazonaws.com',
|
|
542
|
+
auroraPort: 5432,
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
const result = await auroraBuilder.build(appDefinition, discoveredResources);
|
|
546
|
+
|
|
547
|
+
const excludeChars = result.resources.FriggDBSecret.Properties.GenerateSecretString.ExcludeCharacters;
|
|
548
|
+
|
|
549
|
+
// Should properly escape the backslash so it's valid JSON
|
|
550
|
+
// In JavaScript string: '"@/\\' represents the string: "@/\
|
|
551
|
+
// When serialized to JSON, backslash must be doubled: '"@/\\'
|
|
552
|
+
expect(excludeChars).toBe('"@/\\\\');
|
|
553
|
+
|
|
554
|
+
// Verify it can be JSON-stringified without errors
|
|
555
|
+
expect(() => JSON.stringify(result.resources.FriggDBSecret)).not.toThrow();
|
|
556
|
+
|
|
557
|
+
// Verify the JSON output has the correct escape sequence
|
|
558
|
+
const jsonOutput = JSON.stringify(result.resources.FriggDBSecret);
|
|
559
|
+
expect(jsonOutput).toContain('\\"@/\\\\\\\\'); // In JSON string: "\"@/\\\\"
|
|
560
|
+
});
|
|
528
561
|
});
|
|
529
562
|
});
|
|
530
563
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/devtools",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.461.
|
|
4
|
+
"version": "2.0.0--canary.461.5fd8136.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@aws-sdk/client-ec2": "^3.835.0",
|
|
7
7
|
"@aws-sdk/client-kms": "^3.835.0",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"@babel/eslint-parser": "^7.18.9",
|
|
12
12
|
"@babel/parser": "^7.25.3",
|
|
13
13
|
"@babel/traverse": "^7.25.3",
|
|
14
|
-
"@friggframework/schemas": "2.0.0--canary.461.
|
|
15
|
-
"@friggframework/test": "2.0.0--canary.461.
|
|
14
|
+
"@friggframework/schemas": "2.0.0--canary.461.5fd8136.0",
|
|
15
|
+
"@friggframework/test": "2.0.0--canary.461.5fd8136.0",
|
|
16
16
|
"@hapi/boom": "^10.0.1",
|
|
17
17
|
"@inquirer/prompts": "^5.3.8",
|
|
18
18
|
"axios": "^1.7.2",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"serverless-http": "^2.7.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@friggframework/eslint-config": "2.0.0--canary.461.
|
|
38
|
-
"@friggframework/prettier-config": "2.0.0--canary.461.
|
|
37
|
+
"@friggframework/eslint-config": "2.0.0--canary.461.5fd8136.0",
|
|
38
|
+
"@friggframework/prettier-config": "2.0.0--canary.461.5fd8136.0",
|
|
39
39
|
"aws-sdk-client-mock": "^4.1.0",
|
|
40
40
|
"aws-sdk-client-mock-jest": "^4.1.0",
|
|
41
41
|
"jest": "^30.1.3",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "5fd8136c7179570f39ae5ebf4c6c195eb217caa5"
|
|
74
74
|
}
|