Skip to content

Commit

Permalink
chore: Fix build check (#36)
Browse files Browse the repository at this point in the history
* Replace build:changes with typecheck

* fix typing
  • Loading branch information
averyyip authored Dec 5, 2023
1 parent 2c665e1 commit 3a5574e
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-composite
- run: pnpm format:check
- run: pnpm build:changes
- run: pnpm typecheck
verify-env-vars:
name: Verify environment variables are on dev and prod
runs-on: ubuntu-latest
Expand Down
3 changes: 1 addition & 2 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"@vessel/prettier-config": "workspace:^0.1.0",
"@vessel/types": "workspace:^0.1.0",
"@vessel/tsconfig": "workspace:^0.1.0",
"aws-cdk-lib": "2.101.1",
"constructs": "10.2.69",
"aws-cdk-lib": "2.110.1",
"dotenv-cli": "^7.3.0",
"eslint": "^8.53.0",
"prettier": "^3.0.3",
Expand Down
1 change: 0 additions & 1 deletion apps/backend/src/stacks/CoreStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export function CoreStack({ stack }: StackContext) {
},
});

// Step function for alerting oncall
const alertPageWaitTask = new Wait(stack, 'AlertPageWaitTask', {
time: WaitTime.secondsPath('$.waitSeconds'),
});
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"packageManager": "[email protected]",
"scripts": {
"build": "turbo build",
"build:changes": "turbo run build --filter=\"...[origin/main]\"",
"clean": "git clean -xdf node_modules",
"clean:workspaces": "turbo clean",
"postinstall": "pnpm lint:ws",
Expand Down
3 changes: 3 additions & 0 deletions packages/api/src/router/alert/alert-by-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ export const alertById = trpc
.input(input)
.query(async ({ ctx, input }) => {
const dbAlert = await ctx.db.alerts.find(input.id);
if (!dbAlert) {
return null;
}
return createAlertView(dbAlert);
});
4 changes: 1 addition & 3 deletions packages/api/src/router/alert/alert.view.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { Alert } from '@vessel/db/schema/alert';

export const createAlertView = (dbAlert: Alert | null) => {
if (!dbAlert) return dbAlert;

export const createAlertView = (dbAlert: Alert) => {
return {
...dbAlert,
summary: `Alert '${dbAlert.title}' triggered by ${dbAlert.source}`,
Expand Down
3 changes: 2 additions & 1 deletion packages/api/src/services/user-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export const makeUserManager = () => {
const put = async ({ id, url }: { id: UserId; url: string }) => {
const key = PROFILE_PIC_S3_PATH(id);
const res = await fetch(url);
await blobStore.put({ key, data: await res.arrayBuffer() });
const buf = Buffer.from(new Uint8Array(await res.arrayBuffer()));
await blobStore.put({ key, data: buf });
return { key };
};
const addToUser = async (user: User) => {
Expand Down
75 changes: 8 additions & 67 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3a5574e

Please sign in to comment.