Skip to content

Commit 564d815

Browse files
authored
fix!: Correct database resolver logic and general refactor (#204)
* Initial refactor for types * Refactored attachment resolver function into its own class and added tests * Initial refactor for database functions, added tests * Refactored config var functions, added tests * Refactored mocked data to fixture files * Initial refactor for bastion functions * Deps and index.ts updated for refactors * Refactored database functions into a class. Finished adding tests. * Replaced nyc with c8, because nyc doesn't support ESM * Adding tests for parsePostgresConnectionString function * Adding initial tests for bastion functions. * Refactored psql functions into class PsqlService to ease testability. * Added tests for getPsqlConfigs bastion function. * Adding initial tests for PsqlService.execQuery function (no tunnel). * Lots of ESlint errors and warnings fixed. * Added tests for sshTunnel bastion function. * Added final tests for PsqlService execQuery (tunnel required).
1 parent 7477358 commit 564d815

25 files changed

+3432
-1908
lines changed

.c8rc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"all": true,
3+
"include": [
4+
"src/**/*.ts"
5+
],
6+
"exclude": [
7+
"dist/**/*",
8+
"src/types/**/*"
9+
]
10+
}

.gitignore

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1-
/.nyc_output
1+
*-debug.log
2+
*-error.log
3+
**/.DS_Store
4+
/.idea
25
/dist
6+
/tmp
37
/node_modules
8+
oclif.manifest.json
9+
10+
pnpm-lock.yaml
11+
.pnp.*
12+
.yarn/*
13+
yarn.lock
14+
15+
.jshint*
16+
coverage
17+
.nyc_output
18+
.editorconfig

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ try {
102102

103103
// PG types (for TypeScript)
104104
/**
105-
* types.pg.AddOnAttachmentWithConfigVarsAndPlan
105+
* types.pg.ExtendedAddonAttachment
106106
* types.pg.AddOnWithRelatedData
107107
* types.pg.ConnectionDetails
108108
* types.pg.ConnectionDetailsWithAttachment

0 commit comments

Comments
 (0)