Shorty Diary #10: Enable non-dev deployments

To sanity check my work so far, I tried deploying a new non-development stage, but I hit a few errors:

npx sst deploy --stage test

Luckily, these errors were pretty small! I just need to JSON-ify the output values for a few lambdas I had missed:

// functions/link/get.ts
const result = await Link.get(uid!);
return {
  body: JSON.stringify({
    link: result,
  },
})
// functions/link/list.ts
const result = await Link.list();
return {
  body: JSON.stringify({
    links: result,
  },
})

For good measure, I also added eslint-config-next to package.json and upgraded SST to 2.11. These changes fixed my build issues, and I was able to deploy a prod-ish version of my code to AWS!

You can view these changes in the Enable non-dev deployments PR.