Skip to content

Commit

Permalink
chore(deps): update all non-major dependencies (#86)
Browse files Browse the repository at this point in the history
* chore(deps): update all non-major dependencies

* address possible nulls

---------

Co-authored-by: Andrew Hammond <445764+ahammond@users.noreply.github.com>
  • Loading branch information
cu-infra-svc-git and ahammond authored Feb 20, 2024
1 parent f5d7e33 commit 64c6e47
Show file tree
Hide file tree
Showing 4 changed files with 1,332 additions and 1,366 deletions.
34 changes: 17 additions & 17 deletions package.json

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

4 changes: 2 additions & 2 deletions src/aurora.provision-database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ export class Methods {
public async createRole(client: Client, role: string): Promise<void> {
try {
const res = await client.query(`SELECT 1 FROM pg_catalog.pg_roles WHERE rolname = $1`, [role]);
if (res.rowCount > 0) {
if (res.rowCount ?? 0 > 0) {
console.log(`Role ${role} already exists. Skipping creation.`);
} else {
const sql = format('CREATE ROLE %I', role);
Expand All @@ -407,7 +407,7 @@ export class Methods {
try {
// Does the db already exist?
const res = await client.query('SELECT 1 FROM pg_database WHERE datname = $1', [databaseName]);
if (res.rowCount > 0) {
if (res.rowCount ?? 0 > 0) {
console.log(`Database ${databaseName} already exists.`);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/aurora.provision-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export class Methods {
public async createUser(client: Client, username: string): Promise<void> {
try {
const res = await client.query(`SELECT 1 FROM pg_catalog.pg_roles WHERE rolname = $1`, [username]);
if (res.rowCount > 0) {
if (res.rowCount ?? 0 > 0) {
console.log(`User ${username} already exists. Skipping creation.`);
} else {
const sql = format('CREATE USER %I PASSWORD NULL', username);
Expand Down
Loading

0 comments on commit 64c6e47

Please sign in to comment.