sparse-intern-71089
08/03/2023, 10:05 PMfull-dress-10026
08/03/2023, 10:06 PMconst AlarmEventSchema = z.object({
AlarmName: z.string(),
AWSAccountId: z.string(),
NewStateValue: z.enum(['ALARM', 'OK']),
NewStateReason: z.string(),
StateChangeTime: z.string(),
Region: z.string(),
OldStateValue: z.enum(['ALARM', 'OK']),
Trigger: z.object({
MetricName: z.string(),
Namespace: z.string(),
}),
});
const alarmTopic = new aws.sns.Topic(`${name}-alarm-topic`, {}, { provider, parent: this });
alarmTopic.onEvent(
`${name}-handle-event`,
async (ev) => {
const proms = ev.Records.map(async (record) => {
const alarmEvent = AlarmEventSchema.parse(JSON.parse(record.Sns.Message));
});
await Promise.all(proms);
},
undefined,
{ provider, parent: this },
)
full-dress-10026
08/03/2023, 10:07 PMerror: Error serializing '(ev) => __awaiter(this, void 0, void ...': slack-alerts.ts(57,51)
'(ev) => __awaiter(this, void 0, void ...': slack-alerts.ts(57,51): captured
variable 'AlarmEventSchema' which indirectly referenced
function 'bound parse': which could not be serialized because
it was a native code function.
Function code:
function () { [native code] }
full-dress-10026
08/03/2023, 10:08 PMerror: Running program '/Users/kenny/work/kwllc/deeporigin/infrastructure/stacks/environment/cur-changes-processor/' failed with an unhandled exception:
<ref *1> Error: package.json export path for ".pnpm/zod@3.21.4/node_modules/zod/lib/index.js" not found
at ModuleMap.get (/Users/kenny/work/kwllc/deeporigin/infrastructure/common/temp/node_modules/.pnpm/@pulumi+pulumi@3.72.2/node_modules/@pulumi/runtime/closure/package.ts:220:19)
at Object.getModuleFromPath (/Users/kenny/work/kwllc/deeporigin/infrastructure/common/temp/node_modules/.pnpm/@pulumi+pulumi@3.72.2/node_modules/@pulumi/runtime/closure/package.ts:273:35)
at /Users/kenny/work/kwllc/deeporigin/infrastructure/common/temp/node_modules/.pnpm/@pulumi+pulumi@3.72.2/node_modules/@pulumi/runtime/closure/createClosure.ts:1242:19
at Generator.next (<anonymous>)
at /Users/kenny/work/kwllc/deeporigin/infrastructure/common/temp/node_modules/.pnpm/@pulumi+pulumi@3.72.2/node_modules/@pulumi/pulumi/runtime/closure/createClosure.js:21:71
at new Promise (<anonymous>)
at __awaiter (/Users/kenny/work/kwllc/deeporigin/infrastructure/common/temp/node_modules/.pnpm/@pulumi+pulumi@3.72.2/node_modules/@pulumi/pulumi/runtime/closure/createClosure.js:17:12)
at captureModuleAsync (/Users/kenny/work/kwllc/deeporigin/infrastructure/common/temp/node_modules/.pnpm/@pulumi+pulumi@3.72.2/node_modules/@pulumi/pulumi/runtime/closure/createClosure.js:882:20)
at /Users/kenny/work/kwllc/deeporigin/infrastructure/common/temp/node_modules/.pnpm/@pulumi+pulumi@3.72.2/node_modules/@pulumi/runtime/closure/createClosure.ts:935:19
at Generator.next (<anonymous>) {
promise: Promise { <rejected> [Circular *1] }
}
elegant-window-55250
08/04/2023, 7:51 AM