Skip to content

Commit c2b4a16

Browse files
committed
style(parser): address SonarCloud issues
1 parent 660dca3 commit c2b4a16

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

packages/parser/src/envelopes/sns-sqs.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ export const SnsSqsEnvelope = {
150150
}>(
151151
(acc, record, index) => {
152152
const parsed = parseRecord(record, index);
153-
if (!parsed.success) {
153+
if (parsed.success) {
154+
acc.records.push(parsed.data);
155+
} else {
154156
acc.success = false;
155157
acc.errors[index] = parsed.error;
156-
} else {
157-
acc.records.push(parsed.data);
158158
}
159159
return acc;
160160
},

packages/parser/src/schemas/appsync-events.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,14 @@ const AppSyncEventsSubscribeSchema = AppSyncEventsBaseSchema.extend({
169169

170170
export {
171171
AppSyncEventsBaseSchema,
172-
AppSyncCognitoIdentity,
173-
AppSyncIamIdentity,
174172
AppSyncLambdaAuthIdentity,
175-
AppSyncOidcIdentity,
176173
AppSyncEventsRequestSchema,
177174
AppSyncEventsInfoSchema,
178175
AppSyncEventsPublishSchema,
179176
AppSyncEventsSubscribeSchema,
180177
};
178+
export {
179+
AppSyncCognitoIdentity,
180+
AppSyncIamIdentity,
181+
AppSyncOidcIdentity,
182+
} from './appsync-shared.js';

packages/parser/src/schemas/appsync.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,10 @@ const AppSyncBatchResolverSchema = z.array(AppSyncResolverSchema);
236236
export {
237237
AppSyncResolverSchema,
238238
AppSyncBatchResolverSchema,
239+
AppSyncLambdaIdentity,
240+
};
241+
export {
239242
AppSyncCognitoIdentity,
240243
AppSyncIamIdentity,
241244
AppSyncOidcIdentity,
242-
AppSyncLambdaIdentity,
243-
};
245+
} from './appsync-shared.js';

packages/parser/src/schemas/kafka.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const KafkaRecordSchema = z.object({
2323
z.record(
2424
z.string(),
2525
z.array(z.number()).transform((value) => {
26-
return String.fromCharCode(...value);
26+
return String.fromCodePoint(...value);
2727
})
2828
)
2929
),

0 commit comments

Comments
 (0)