Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Paxa/postbird
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.8.4
Choose a base ref
...
head repository: Paxa/postbird
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jan 7, 2020

  1. Fix #95

    Connection error with Heroku
    Can confirm this fixes the issue on Windows.
    evangallup authored Jan 7, 2020
    Copy the full SHA
    ad1afae View commit details
  2. Fix #95

    Fix connection issue with Heroku.
    Can confirm this resolves the issue on Windows only.
    evangallup authored Jan 7, 2020
    Copy the full SHA
    5652ba8 View commit details
  3. Fix non-ssl connection

    Now confirmed to work for both ssl and non-ssl connections.
    evangallup authored Jan 7, 2020
    Copy the full SHA
    227ccfb View commit details

Commits on Jan 9, 2020

  1. Update connection.js

    Better use of the connection-string.
    vitaly-t authored Jan 9, 2020
    Copy the full SHA
    ea9929f View commit details
  2. Update connection.js

    vitaly-t authored Jan 9, 2020
    Copy the full SHA
    9598e2c View commit details

Commits on Jan 19, 2020

  1. Copy the full SHA
    1020bfa View commit details

Commits on Jun 2, 2020

  1. Copy the full SHA
    6eea21b View commit details

Commits on Jul 31, 2020

  1. fixed broken link (see issue 114)

    Marco Stazi authored Jul 31, 2020
    Copy the full SHA
    49ad01c View commit details

Commits on Sep 26, 2020

  1. Update to postgres 13

    Paxa committed Sep 26, 2020
    Copy the full SHA
    aa4a5d1 View commit details
  2. Update to electron 10.1.2

    Paxa committed Sep 26, 2020
    Copy the full SHA
    1f6d3ee View commit details
  3. Update more dependencies

    Paxa committed Sep 26, 2020
    Copy the full SHA
    a1c88bb View commit details
  4. Try GitHub actions

    Paxa committed Sep 26, 2020
    Copy the full SHA
    1891bd5 View commit details
  5. Merge pull request #117 from mastazi/master

    Fixed broken link to Win Installer (see issue 114)
    Paxa authored Sep 26, 2020
    Copy the full SHA
    72e484d View commit details
  6. Merge pull request #100 from vitaly-t/patch-1

    Update connection.js
    Paxa authored Sep 26, 2020
    Copy the full SHA
    a03cbec View commit details

Commits on Sep 27, 2020

  1. Fixing travis-ci

    Paxa committed Sep 27, 2020
    Copy the full SHA
    f6432df View commit details
  2. Fixing github actions

    Paxa committed Sep 27, 2020
    Copy the full SHA
    0068a18 View commit details
  3. Fixing tests

    Paxa committed Sep 27, 2020
    Copy the full SHA
    8365bb4 View commit details

Commits on Oct 11, 2020

  1. Update app.js

    Marco Stazi authored and Paxa committed Oct 11, 2020
    Copy the full SHA
    aec5f08 View commit details

Commits on Oct 12, 2020

  1. Try to fix type checking

    Paxa committed Oct 12, 2020
    Copy the full SHA
    bc53845 View commit details

Commits on Oct 17, 2020

  1. Copy the full SHA
    c27da86 View commit details
  2. Copy the full SHA
    c8c1669 View commit details

Commits on Apr 1, 2021

  1. Ordered Schema Names

    nikolasp authored and Paxa committed Apr 1, 2021
    Copy the full SHA
    b83d81a View commit details

Commits on Jun 3, 2021

  1. BUGFIX: makes jsonb[] viewable and editable

    jzwood authored and Paxa committed Jun 3, 2021
    Copy the full SHA
    3b7a7e9 View commit details
  2. BUGFIX: makes json[] viewable and editable

    jzwood authored and Paxa committed Jun 3, 2021
    Copy the full SHA
    9f6e224 View commit details
  3. makes editor view for json[] prettier

    jzwood authored and Paxa committed Jun 3, 2021
    Copy the full SHA
    2164c8f View commit details
  4. Debounced tables filtering

    nikolasp authored and Paxa committed Jun 3, 2021
    Copy the full SHA
    cae0242 View commit details

Commits on Aug 15, 2021

  1. Add support for SSH tunnel

    Paxa committed Aug 15, 2021
    Copy the full SHA
    efc0297 View commit details

Commits on Aug 21, 2021

  1. Copy the full SHA
    d11fcb4 View commit details
  2. Copy the full SHA
    9130142 View commit details
  3. Update some dependencies

    Paxa committed Aug 21, 2021
    Copy the full SHA
    8fab4c6 View commit details
  4. Update node version in workflow

    Paxa committed Aug 21, 2021
    Copy the full SHA
    8db44d6 View commit details
  5. Update to electron 13

    Paxa committed Aug 21, 2021
    Copy the full SHA
    deef0bb View commit details

Commits on Aug 29, 2021

  1. Copy the full SHA
    5a87d8e View commit details
  2. Copy the full SHA
    5bb3d09 View commit details
  3. Copy the full SHA
    bfd842a View commit details
  4. Add feature to copy row as SQL

    Paxa committed Aug 29, 2021
    Copy the full SHA
    de58d71 View commit details
  5. Adjust colors for new MacOS UI

    Paxa committed Aug 29, 2021
    Copy the full SHA
    1f31434 View commit details
  6. Fix open deeplink on windows

    Paxa committed Aug 29, 2021
    Copy the full SHA
    a1cbaa6 View commit details
  7. Update deps

    Paxa committed Aug 29, 2021
    Copy the full SHA
    d8a5e71 View commit details

Commits on Aug 30, 2021

  1. Copy the full SHA
    7d8175f View commit details
  2. Resize content tab sidebar

    Paxa committed Aug 30, 2021
    Copy the full SHA
    2453e8c View commit details
  3. Copy the full SHA
    792a8a1 View commit details

Commits on Nov 13, 2021

  1. Copy the full SHA
    6cd7767 View commit details
  2. Use pg-pool, add timeout to fetching total number of rows in content …

    …tab, update to electron 15
    Paxa committed Nov 13, 2021
    Copy the full SHA
    12b725c View commit details
  3. Copy the full SHA
    d65306b View commit details

Commits on Nov 14, 2021

  1. Copy the full SHA
    3f552c4 View commit details

Commits on Dec 29, 2021

  1. Fix connecting to heroku

    Paxa committed Dec 29, 2021
    Copy the full SHA
    fad468d View commit details
  2. Copy the full SHA
    777d58f View commit details
  3. Add portable package for windows

    Paxa committed Dec 29, 2021
    Copy the full SHA
    252cae2 View commit details

Commits on Mar 25, 2022

  1. BUGFIX: enables updating character varying []

    jzwood authored and Paxa committed Mar 25, 2022
    Copy the full SHA
    cef04f3 View commit details
Showing with 5,265 additions and 3,433 deletions.
  1. +94 −0 .github/workflows/build.yml
  2. +1 −0 .gitignore
  3. +1 −1 .travis.yml
  4. +13 −7 BUILDING_DEPS.md
  5. +8 −0 CHANGELOG.md
  6. +2 −3 README.md
  7. +36 −13 app.js
  8. +22 −14 app/components/render_view.js
  9. +143 −69 app/connection.js
  10. +3 −0 app/controllers/export_controller.js
  11. +11 −0 app/controllers/server_controller.js
  12. +1 −1 app/controllers/updates_controller.js
  13. +24 −6 app/db_screen.js
  14. +3 −1 app/help_screen.js
  15. +4 −3 app/logger.js
  16. +3 −2 app/login_components/heroku_client.js
  17. +25 −5 app/login_components/login_postgres_url_form.js
  18. +11 −4 app/login_components/login_standard_form.js
  19. +38 −21 app/login_screen.js
  20. +2 −2 app/models/procedure.js
  21. +6 −0 app/models/server.js
  22. +70 −10 app/models/table.js
  23. +2 −2 app/models/trigger.js
  24. +20 −7 app/top_menu.js
  25. +26 −11 app/utils.js
  26. +235 −0 app/view_cell_helpers.js
  27. +3 −167 app/view_helpers.js
  28. +11 −4 app/views/db_screen_view.js
  29. +1 −0 app/views/dialogs/all.js
  30. +3 −1 app/views/dialogs/base.js
  31. +27 −0 app/views/dialogs/connection_list.js
  32. +4 −2 app/views/dialogs/export_file.js
  33. +2 −1 app/views/dialogs/new_snippet.js
  34. +6 −3 app/views/history_window.js
  35. +2 −1 app/views/panes/base.js
  36. +135 −13 app/views/panes/content.js
  37. +3 −2 app/views/panes/query.js
  38. +3 −1 app/views/panes/users.js
  39. +6 −3 app/views/snippets.js
  40. +1 −1 app/window_handlers/history_window_loader.js
  41. +2 −2 app/window_handlers/snippets_window_loader.js
  42. +8 −4 assets/styles/_unfocused.scss
  43. +0 −8 assets/styles/elements/_alertify.core.scss
  44. +30 −34 assets/styles/elements/_alertify.default.scss
  45. +10 −12 assets/styles/elements/_custom-dialog-window.scss
  46. +34 −0 assets/styles/elements/_dialogs.scss
  47. +7 −3 assets/styles/elements/_sidebar.scss
  48. +26 −14 assets/styles/elements/_tabs.scss
  49. +7 −7 assets/styles/extras/_mac-native-elements.scss
  50. +35 −1 assets/styles/screens/_login.scss
  51. +2 −2 assets/styles/screens/_main.scss
  52. +0 −4 assets/styles/screens/main-tabs/_content.scss
  53. +2 −1 build_package.js
  54. +2 −2 index.html
  55. +7 −5 index.js
  56. +43 −68 lib/error_reporter.js
  57. +8 −1 lib/pg_dump_runner.js
  58. +5 −0 lib/sidebar_resize.js
  59. +22 −5 lib/sql_exporter.js
  60. +3 −1 lib/sql_importer.js
  61. +263 −0 lib/ssh_connect.js
  62. +22 −4 main.js
  63. +26 −23 package.json
  64. +129 −144 public/style.css
  65. +2 −2 run
  66. +47 −37 ts.js
  67. +10 −4 ts_libs/globals.d.ts
  68. +6 −0 ts_libs/pg_extra.d.ts
  69. BIN vendor/darwin/libcrypto.1.1.dylib
  70. BIN vendor/darwin/libpq.5.12.dylib
  71. BIN vendor/darwin/libpq.5.14.dylib
  72. BIN vendor/darwin/libssl.1.1.dylib
  73. BIN vendor/darwin/pg_dump
  74. BIN vendor/darwin/psql
  75. +6 −2 vendor/datasets/different_types.sql
  76. BIN vendor/win32/intl.dll
  77. BIN vendor/win32/libeay32.dll
  78. BIN vendor/win32/libintl-9.dll
  79. BIN vendor/win32/libpq.dll
  80. BIN vendor/win32/msvcr120.dll
  81. BIN vendor/win32/pg_dump.exe
  82. BIN vendor/win32/psql.exe
  83. BIN vendor/win32/ssleay32.dll
  84. BIN vendor/win32/zlib1.dll
  85. +648 −260 views/cache.js
  86. +32 −0 views/dialogs/connection_list.jade
  87. +1 −1 views/dialogs/edit_value.jade
  88. +33 −8 views/login_screen.jade
  89. +2,776 −2,393 yarn.lock
94 changes: 94 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Build/release

on: push

jobs:
release:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- name: Check out Git repository
uses: actions/checkout@v1

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Build/release app
uses: samuelmeuli/action-electron-builder@v1
with:
github_token: ${{ secrets.github_token }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}

- name: List Files
shell: bash
run: ls -lah dist

- name: Upload Postbird.dmg
uses: actions/upload-artifact@v2
with:
name: Postbird.dmg
path: dist/*.dmg
if: ${{ runner.os == 'macOS' }}

- name: Upload Postbird_setup.exe
uses: actions/upload-artifact@v2
with:
name: Postbird_setup.exe
path: dist/*.exe
if: ${{ runner.os == 'Windows' }}

- name: Upload Postbird-win.zip
uses: actions/upload-artifact@v2
with:
name: Postbird_win.zip
path: dist/*.zip
if: ${{ runner.os == 'Windows' }}

- name: Upload Postbird.snap
uses: actions/upload-artifact@v2
with:
name: Postbird.snap
path: dist/*.snap
if: ${{ runner.os == 'Linux' }}

- name: Upload Postbird.AppImage
uses: actions/upload-artifact@v2
with:
name: Postbird.AppImage
path: dist/Postbird*.AppImage
if: ${{ runner.os == 'Linux' }}

- name: Upload Postbird.deb
uses: actions/upload-artifact@v2
with:
name: Postbird.deb
path: dist/*.deb
if: ${{ runner.os == 'Linux' }}

- name: Upload Postbird.rpm
uses: actions/upload-artifact@v2
with:
name: Postbird.rpm
path: dist/*.rpm
if: ${{ runner.os == 'Linux' }}

- name: Upload Postbird.pacman
uses: actions/upload-artifact@v2
with:
name: Postbird.pacman
path: dist/*.pacman
if: ${{ runner.os == 'Linux' }}

- name: Upload Postbird.apk
uses: actions/upload-artifact@v2
with:
name: Postbird.apk
path: dist/*.apk
if: ${{ runner.os == 'Linux' }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -3,3 +3,4 @@ libudev.so.0
node_modules/
.ruby-version
dist/
.DS_Store
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- '11'
- '12'

os:
- osx
20 changes: 13 additions & 7 deletions BUILDING_DEPS.md
Original file line number Diff line number Diff line change
@@ -4,32 +4,38 @@ Download `Postgres.app` and make sure you have command line tools installed
```
# Copy postgres libs
cp /Applications/Postgres.app/Contents/Versions/latest/lib/libpq.5.12.dylib ./vendor/darwin/
cp /Applications/Postgres.app/Contents/Versions/latest/lib/libpq.5.14.dylib ./vendor/darwin/
cp /Applications/Postgres.app/Contents/Versions/latest/lib/libssl.1.1.dylib ./vendor/darwin/
cp /Applications/Postgres.app/Contents/Versions/latest/lib/libcrypto.1.1.dylib ./vendor/darwin/
install_name_tool -change /Applications/Postgres.app/Contents/Versions/12/lib/libssl.1.1.dylib @loader_path/libssl.1.1.dylib ./vendor/darwin/libpq.5.12.dylib
install_name_tool -change /Applications/Postgres.app/Contents/Versions/12/lib/libcrypto.1.1.dylib @loader_path/libcrypto.1.1.dylib ./vendor/darwin/libpq.5.12.dylib
install_name_tool -change /Applications/Postgres.app/Contents/Versions/12/lib/libcrypto.1.1.dylib @loader_path/libcrypto.1.1.dylib ./vendor/darwin/libssl.1.1.dylib
install_name_tool -change /Applications/Postgres.app/Contents/Versions/14/lib/libssl.1.1.dylib @loader_path/libssl.1.1.dylib ./vendor/darwin/libpq.5.14.dylib
install_name_tool -change /Applications/Postgres.app/Contents/Versions/14/lib/libcrypto.1.1.dylib @loader_path/libcrypto.1.1.dylib ./vendor/darwin/libpq.5.14.dylib
install_name_tool -change /Applications/Postgres.app/Contents/Versions/14/lib/libcrypto.1.1.dylib @loader_path/libcrypto.1.1.dylib ./vendor/darwin/libssl.1.1.dylib
## check with otool
otool -L vendor/darwin/libpq.5.12.dylib
otool -L vendor/darwin/libpq.5.14.dylib
otool -L vendor/darwin/libssl.1.1.dylib
otool -L vendor/darwin/libcrypto.1.1.dylib
# Copy postgres psql & pg_dump
cp /Applications/Postgres.app/Contents/Versions/latest/bin/psql ./vendor/darwin/
cp /Applications/Postgres.app/Contents/Versions/latest/bin/pg_dump ./vendor/darwin/
install_name_tool -change /Applications/Postgres.app/Contents/Versions/12/lib/libpq.5.dylib @loader_path/libpq.5.12.dylib ./vendor/darwin/psql
install_name_tool -change /Applications/Postgres.app/Contents/Versions/12/lib/libpq.5.dylib @loader_path/libpq.5.12.dylib ./vendor/darwin/pg_dump
install_name_tool -change /Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib @loader_path/libpq.5.14.dylib ./vendor/darwin/psql
install_name_tool -change /Applications/Postgres.app/Contents/Versions/14/lib/libpq.5.dylib @loader_path/libpq.5.14.dylib ./vendor/darwin/pg_dump
## check with otool
otool -L vendor/darwin/psql
otool -L vendor/darwin/pg_dump
# make it run on catalina
xattr -d com.apple.quarantine vendor/darwin/*
spctl --assess vendor/darwin/*
codesign --remove-signature vendor/darwin/*
# Build libpq package
PATH=/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH ./node_modules/.bin/electron-rebuild -n 59
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### Version 0.9.0

* Fix ssl connection & heroku connection (Thanks to [https://github.com/egallup02360](@egallup02360) #95)
* Postgres 12 support
* Update to electron 10.1.2
* Fix "Snippets" and "See History" on windows (Thanks to [https://github.com/mastazi](@mastazi) #118)
* Allow to cancel loader window when connecting to server

### Version 0.8.4 (20-nov-2019)

* Fix `electron.systemPreferences.subscribeNotification` is not a function
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -28,10 +28,10 @@ sudo snap install postbird
```
Snap page: https://snapcraft.io/postbird

Windows installer: [Postbird.Setup.0.8.4.exe](https://github.com/Paxa/postbird/releases/download/0.8.4/Postbird.Setup.0.8.4.exe)<br>
Windows installer: [Postbird.Setup.0.8.4.exe](https://github.com/Paxa/postbird/releases/download/0.8.4/Postbird-Setup-0.8.4.exe)<br>
Windows portable: [Postbird-0.8.4-win.zip](https://github.com/Paxa/postbird/releases/download/0.8.4/Postbird-0.8.4-win.zip)

Latest artifacts: https://postbird.paxa.kuber.host/
Latest artifacts: https://nightly.link/Paxa/postbird/workflows/build/master

## Development

@@ -47,7 +47,6 @@ To run newest version, simply:
git clone git@github.com:Paxa/postbird.git
cd postbird
yarn
yarn rebuild_ext
yarn start
```

49 changes: 36 additions & 13 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var remote = require('electron').remote;
var remote = require('@electron/remote');
var events = require('events');
var path = require('path');

@@ -44,7 +44,7 @@ interface App {
addConnectionTab: () => any;
addDbScreen: (connection: Connection, connectionName: any, options: any) => void;
addHelpScreen: () => void;
helpScreenOpen: () => void;
helpScreenOpen: () => boolean;
renderView: (viewName: string, options?: any) => JQuery<HTMLElement>;
setSizes: () => void;
startLoading: (message: string, timeout?: number, options?: any) => void;
@@ -76,11 +76,11 @@ interface App {
*/

global.App = {
root: process.mainModule.filename.replace(/\/index.html/, ''),
root: remote.app.getAppPath(),
// used for running binaries inside asar package
vendorPath: process.mainModule.filename.includes('app.asar') ?
path.join(process.mainModule.filename, `../../../vendor/${process.platform}`) :
path.join(process.mainModule.filename.replace('node_modules/electron-mocha/lib/main.js', 'index.html'), `../vendor/${process.platform}`),
vendorPath: remote.app.MainFilename.includes('app.asar') ?
path.join(remote.app.MainFilename, `../../../vendor/${process.platform}`) :
path.join(remote.app.MainFilename.replace('node_modules/electron-mocha/lib/main.js', 'index.html'), `../vendor/${process.platform}`),

activeTab: null,
tabs: [], // {name, content, is_active}
@@ -306,28 +306,51 @@ global.App = {
},

openConnection: function (options, connectionName, callback) {
this.startLoading("Connecting...");
var showConnectionError = true;
var runCallback = true;

this.startLoading("Connecting...", 500, {
cancel() {
App.stopRunningQuery();
App.stopLoading();
showConnectionError = false
if (callback) callback(false);
runCallback = false
}
});
//this.startLoading("Connecting...");

if (typeof options == 'string') {
options = Connection.parseConnectionString(options);
if (!connectionName) {
connectionName = options.host;
if (options.tab_name && options.tab_name != "") {
connectionName = options.tab_name;
} else {
connectionName = options.host;
}
}
}

var conn = new Connection();
conn.connectToServer(options, (status, error) => {
this.stopLoading();
if (status) {
if (conn.options.tab_name) {
connectionName = conn.options.tab_name;
}
var tab = this.addDbScreen(conn, connectionName, options);
tab.activate();
if (callback) callback(tab);
if (callback && runCallback) callback(tab);
} else {
$u.alertError("Connection error", {
detail: this.humanErrorMessage(error)
});
if (showConnectionError) {
$u.alertError("Connection error", {
detail: this.humanErrorMessage(error)
});
} else {
console.error(error)
}
//window.alertify.alert(this.humanErrorMessage(message));
if (callback) callback(false);
if (callback && runCallback) callback(false);
}
});
},
36 changes: 22 additions & 14 deletions app/components/render_view.js
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ var slash = require('slash');
var fs = require('fs');

require(__dirname + '/../view_helpers');
require(__dirname + '/../view_cell_helpers');

var dirname = process.platform === "win32"? slash(__dirname): __dirname;

@@ -13,23 +14,12 @@ var RenderView = {
pugFn: {},

renderView: function (file, options) {
var html;
var new_options = {};
var i;

for (i in ViewHelpers) {
if (typeof ViewHelpers[i] == 'function') {
new_options[i] = ViewHelpers[i].bind(ViewHelpers);
}
}

if (options) {
for (i in options) new_options[i] = options[i];
}
var newOptions = options ? {...this.getViewHelpers(), ...options} : this.getViewHelpers();

var html;
try {
//var st = Date.now();
html = this.compileJade(file)(pugRuntime, new_options);
html = this.compileJade(file)(pugRuntime, newOptions);
//console.log('pug render ' + file + ' in ' + (Date.now() - st) + 'ms');
} catch (error) {
console.log("Error compiling '" + RenderView.root + '/views/' + file + '.jade');
@@ -44,6 +34,24 @@ var RenderView = {
return res;
},

getViewHelpers() {
if (!this._viewHelpers) {
this._viewHelpers = {};
var i;
for (i in ViewHelpers) {
if (typeof ViewHelpers[i] == 'function') {
this._viewHelpers[i] = ViewHelpers[i].bind(ViewHelpers);
}
}
for (i in ViewCellHelpers) {
if (typeof ViewCellHelpers[i] == 'function') {
this._viewHelpers[i] = ViewCellHelpers[i].bind(ViewCellHelpers);
}
}
}
return this._viewHelpers;
},

compileJade: function (file) {
var filepath = RenderView.root + '/views/' + file + '.jade';
var content = fs.readFileSync(filepath, 'utf-8');
Loading