Skip to content

Commit 0b40e5d

Browse files
committed
fix: convert * to _ for passing schema validation
1 parent 93afac1 commit 0b40e5d

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/common/iacHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const formatRosId = (id: string): string => {
115115
result = result.toLowerCase();
116116

117117
// Replace special characters with underscores
118-
result = result.replace(/[/#,-]/g, '_');
118+
result = result.replace(/[/*,/#,-]/g, '_');
119119

120120
// Remove any number of underscores to single one
121121
result = result.replace(/_+/g, '_');

src/common/rosAssets.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export const publishAssets = async (assets: Array<ConstructedAsset> | undefined)
128128
accessKeyId: context.accessKeyId,
129129
accessKeySecret: context.accessKeySecret,
130130
bucket: bucketName,
131+
timeout: 600000, // 10 minutes
131132
});
132133

133134
await ensureBucketExits(bucketName, client);

tests/common/iacHelper.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ describe('Unit test for iacHelper', () => {
143143
});
144144

145145
it('should convert camelCase and replace special characters', () => {
146-
const result = formatRosId('helloWorld/withSpecial#Chars');
147-
expect(result).toEqual('hello_world_with_special_chars');
146+
const result = formatRosId('helloWorld/withSpecial#Chars*And');
147+
expect(result).toEqual('hello_world_with_special_chars_and');
148148
});
149149

150150
it('should not modify already snake_case strings without special chars', () => {

0 commit comments

Comments
 (0)