Skip to content

Commit

Permalink
Bump @types/pg from 8.10.3 to 8.10.5 (#1056)
Browse files Browse the repository at this point in the history
* Bump @types/pg from 8.10.3 to 8.10.5

Bumps [@types/pg](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/pg) from 8.10.3 to 8.10.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/pg)

---
updated-dependencies:
- dependency-name: "@types/pg"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* fixed ts issues

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Deepak Prabhakara <[email protected]>
  • Loading branch information
dependabot[bot] and deepakprabhakara authored Oct 10, 2023
1 parent 3fe3627 commit bc54d98
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 5 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@types/mocha": "10.0.2",
"@types/node": "20.6.3",
"@types/nodemailer": "6.4.11",
"@types/pg": "8.10.3",
"@types/pg": "8.10.5",
"@types/sinon": "10.0.17",
"@types/statsd-client": "0.4.3",
"@types/swagger-jsdoc": "6.0.1",
Expand Down
6 changes: 6 additions & 0 deletions src/_db/commands/up/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ export const handler = () => {
console.log(picocolors.red(util.inspect(err)));
process.exit(1);
}
if (!pg) {
notifyError(new Error("Couldn't connect to postgres"));
console.log(picocolors.red("Couldn't connect to postgres"));
process.exit(1);
}

const walker = walk.walk(getSchemaPath(), {
followLinks: false,
});
Expand Down
15 changes: 15 additions & 0 deletions src/_db/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ const common = {
return;
}

if (!pg) {
reject(new Error("Couldn't connect to postgres"));
return;
}

const q = "select * from actor where id = $1";
const v = [id];
pg.query(q, v, (qerr, result) => {
Expand Down Expand Up @@ -57,6 +62,11 @@ const common = {
return;
}

if (!pg) {
reject(new Error("Couldn't connect to postgres"));
return;
}

const q = "select * from target where id = $1";
const v = [id];
pg.query(q, v, (qerr, result) => {
Expand Down Expand Up @@ -91,6 +101,11 @@ const common = {
return;
}

if (!pg) {
reject(new Error("Couldn't connect to postgres"));
return;
}

const q = "select * from group_detail where group_id = $1";
const v = [id];
pg.query(q, v, (qerr, result) => {
Expand Down
5 changes: 5 additions & 0 deletions src/models/project/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ export default function createProject(opts) {
return;
}

if (!pg) {
reject(new Error("Couldn't connect to postgres"));
return;
}

const project = {
id: opts.id || uuid.v4().replace(/-/g, ""),
name: opts.name,
Expand Down
5 changes: 5 additions & 0 deletions src/models/project/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export default function getProject(projectId): Promise<any> {
return;
}

if (!pg) {
reject(new Error("Couldn't connect to postgres"));
return;
}

const q = "select * from project where id = $1";
const v = [projectId];
pg.query(q, v, (qerr, result) => {
Expand Down
5 changes: 5 additions & 0 deletions src/models/team/listTeamMembers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export default function listTeamMembers(opts) {
return;
}

if (!pg) {
reject(new Error("Couldn't connect to postgres"));
return;
}

const q = `
select
retraceduser.id, retraceduser.created, retraceduser.email, retraceduser.last_login,
Expand Down

0 comments on commit bc54d98

Please sign in to comment.