Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Jan 13, 2024
2 parents 97ece32 + 20b2734 commit 4e98dc2
Show file tree
Hide file tree
Showing 32 changed files with 1,242 additions and 160 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-artifact-linux-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Install dependencies
run: npm i
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-e2e-win.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Test end-to-end [WINDOWS]
name: Test end-to-end

on:
push:
branches:
- master
- develop

jobs:
release:
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Install dependencies
run: npm i
Expand Down
9 changes: 0 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@
"sourceMaps": true,
"type": "chrome",
"webRoot": "${workspaceFolder}"
},
{
"name": "Electron: Worker",
"cwd": "${workspaceFolder}",
"port": 9224,
"request": "attach",
"sourceMaps": true,
"type": "node",
"timeout": 1000000
}
],
"compounds": [
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.7.21-beta.1](https://github.com/antares-sql/antares/compare/v0.7.21-beta.0...v0.7.21-beta.1) (2024-01-06)


### Bug Fixes

* **PostgreSQL:** error adding MONEY fields to a table ([0f8d2cb](https://github.com/antares-sql/antares/commit/0f8d2cb4ef5c327f96f788179be0b309689b4ce8))
* **PostgreSQL:** exception deleting a table with one or less tabs open ([23946ff](https://github.com/antares-sql/antares/commit/23946ff2cef6d63e1529e2c8c4357d7fdedc3284))
* **PostgreSQL:** unhandled error on connection lost, fixes [#740](https://github.com/antares-sql/antares/issues/740) ([cdd2a11](https://github.com/antares-sql/antares/commit/cdd2a11f8e33d6607337989723774d60c7c1a030))

### [0.7.21-beta.0](https://github.com/antares-sql/antares/compare/v0.7.20...v0.7.21-beta.0) (2023-12-25)


### Features

* ability to edit notes ([08e5a13](https://github.com/antares-sql/antares/commit/08e5a13f723bc3ae95b0f529b79f0b558bc2a377))
* buttons to save and access to saved queryes from query tab ([a52fc3f](https://github.com/antares-sql/antares/commit/a52fc3fd923fec30cfdd3d804554e6fe4534c400))
* highlithg sql in notes, history and console ([bfa3924](https://github.com/antares-sql/antares/commit/bfa3924d57c2ea2cc2857006d6bd6279865dbc99))
* new notes system ([eaaf1b7](https://github.com/antares-sql/antares/commit/eaaf1b756a6b5ffb77f7f07f3e4c0971822d48c3))
* open saved queries in a tab ([9a732ea](https://github.com/antares-sql/antares/commit/9a732ea1971d223f3278ad02d3dd77837fecb377))


### Bug Fixes

* JavaScript error at first startup, fixes [#736](https://github.com/antares-sql/antares/issues/736) ([b734b24](https://github.com/antares-sql/antares/commit/b734b246795fb240f6728714be68c22cc221bbe9))

### [0.7.20](https://github.com/antares-sql/antares/compare/v0.7.20-beta.2...v0.7.20) (2023-12-08)


Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Antares SQL Client

![GitHub package.json version](https://img.shields.io/github/package-json/v/fabio286/antares) ![GitHub](https://img.shields.io/github/license/fabio286/antares) [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Ffabio286%2Fantares%2Fbadge&style=flat)](https://actions-badge.atrox.dev/fabio286/antares/goto) ![Mastodon Follow](https://img.shields.io/mastodon/follow/%20110860460902482117?domain=https%3A%2F%2Ffosstodon.org&style=social) [![Twitter Follow](https://img.shields.io/twitter/follow/AntaresSQL?style=social)](https://twitter.com/AntaresSQL) [![Plant a Tree](https://raw.githubusercontent.com/Fabio286/treedom-badge/master/svg/plant-a-tree.svg)](https://www.treedom.net/en/user/fabio-di-stasio/event/antares-for-the-planet)
![GitHub package.json version](https://img.shields.io/github/package-json/v/fabio286/antares) ![GitHub](https://img.shields.io/github/license/fabio286/antares) ![Test e2e](https://github.com/antares-sql/antares/actions/workflows/test-e2e-win.yml/badge.svg?branch=develop) ![Mastodon Follow](https://img.shields.io/mastodon/follow/%20110860460902482117?domain=https%3A%2F%2Ffosstodon.org&style=social) [![Plant a Tree](https://raw.githubusercontent.com/Fabio286/treedom-badge/master/svg/plant-a-tree.svg)](https://www.treedom.net/en/user/fabio-di-stasio/event/antares-for-the-planet)

Antares is an SQL client based on [Electron.js](https://github.com/electron/electron) and [Vue.js](https://github.com/vuejs/vue) that aims to become a useful tool, especially for developers.
Our target is to support as many databases as possible, and all major operating systems, including the ARM versions.
Expand All @@ -17,7 +17,7 @@ However, there are all the features necessary to have a pleasant database manage
We are actively working on it, hoping to provide new cool features, improvements and fixes as soon as possible.

🔗 If you are curious to try Antares you can download and install the [latest release](https://github.com/Fabio286/antares/releases/latest).
👁 To stay tuned for new releases follow Antares SQL on [Mastodon](https://fosstodon.org/@AntaresSQL) or [Twitter](https://twitter.com/AntaresSQL).
👁 To stay tuned for new releases follow Antares SQL on [Mastodon](https://fosstodon.org/@AntaresSQL).
🌟 Don't forget to **leave a star** if you appreciate this project.

🗳️ Polls:
Expand All @@ -35,6 +35,7 @@ We are actively working on it, hoping to provide new cool features, improvements
- Fake table data filler to generate tons of data for test purpose.
- Query suggestions and auto complete.
- Query history: search through the last 1000 queries.
- Save queries, notes or todo.
- SSH tunnel support.
- Manual commit mode.
- Import and export database dumps.
Expand Down
43 changes: 32 additions & 11 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "antares",
"productName": "Antares",
"version": "0.7.20",
"version": "0.7.21-beta.1",
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
"license": "MIT",
"repository": "https://github.com/antares-sql/antares.git",
Expand Down Expand Up @@ -126,7 +126,7 @@
"@turf/helpers": "~6.5.0",
"@vueuse/core": "~10.4.1",
"ace-builds": "~1.24.1",
"better-sqlite3": "~9.1.1",
"better-sqlite3": "^8.0.1",
"electron-log": "~5.0.1",
"electron-store": "~8.1.0",
"electron-updater": "~4.6.5",
Expand All @@ -147,6 +147,7 @@
"source-map-support": "~0.5.20",
"spectre.css": "~0.5.9",
"sql-formatter": "~13.0.0",
"sql-highlight": "~4.4.0",
"v-mask": "~2.3.0",
"vue": "~3.3.4",
"vue-i18n": "~9.2.2",
Expand Down
1 change: 1 addition & 0 deletions scripts/devRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ function startRenderer (callback) {

const server = new WebpackDevServer(compiler, {
port: 9080,
hot: true,
client: {
overlay: true,
logging: 'warn'
Expand Down
2 changes: 1 addition & 1 deletion src/common/data-types/postgresql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default [
group: 'monetary',
types: [
{
name: 'money',
name: 'MONEY',
length: false,
unsigned: true
}
Expand Down
12 changes: 9 additions & 3 deletions src/main/ipc-handlers/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ export default () => {
name: 'session',
fileExtension: ''
});
const encrypted = sessionStore.get('key') as string;
const key = safeStorage.decryptString(Buffer.from(encrypted, 'utf-8'));
event.returnValue = key;

try {
const encrypted = sessionStore.get('key') as string;
const key = safeStorage.decryptString(Buffer.from(encrypted, 'utf-8'));
event.returnValue = key;
}
catch (error) {
event.returnValue = false;
}
});

ipcMain.handle('show-open-dialog', (event, options) => {
Expand Down
4 changes: 4 additions & 0 deletions src/main/libs/clients/PostgreSQLClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ export class PostgreSQLClient extends BaseClient {
await this.keepAlive();
}, this._keepaliveMs);

connection.on('error', err => { // Intercepts errors and converts to rejections
Promise.reject(err);
});

return connection;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/libs/clients/SQLiteClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class SQLiteClient extends BaseClient {
type: type.trim(),
schema: schema,
table: table,
numPrecision: [...NUMBER, ...FLOAT].includes(type) ? length : null,
numLength: [...NUMBER, ...FLOAT].includes(type) ? length : null,
datePrecision: null,
charLength: ![...NUMBER, ...FLOAT].includes(type) ? length : null,
nullable: !field.notnull,
Expand Down
1 change: 0 additions & 1 deletion src/renderer/components/BaseSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ export default defineComponent({
if (props.searchable)
searchInput.value.focus();
else
el.value.focus();
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/BaseVirtualScroll.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const updateWindow = () => {
const totalScrollHeight = props.items.length * props.itemHeight;
const offset = 50;
const scrollTop = localScrollElement.value.scrollTop;
const scrollTop = localScrollElement.value?.scrollTop;
const firstVisibleIndex = Math.floor(scrollTop / props.itemHeight);
const lastVisibleIndex = firstVisibleIndex + visibleItemsCount;
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/components/ModalAllConnections.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@
/>
SSH
</div>
<div v-if="connection.readonly" class="chip bg-success mt-2">
<BaseIcon
icon-name="mdiLock"
class="mr-1"
:size="18"
/>
Read-only
</div>
</div>
</div>
</div>
Expand Down
18 changes: 15 additions & 3 deletions src/renderer/components/ModalHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<code
class="cut-text"
:title="query.sql"
v-html="highlightWord(query.sql)"
v-html="highlight(highlightWord(query.sql), {html: true})"
/>
</div>
<div class="tile-bottom-content">
Expand Down Expand Up @@ -126,7 +126,19 @@

<script setup lang="ts">
import { ConnectionParams } from 'common/interfaces/antares';
import { Component, computed, ComputedRef, onBeforeUnmount, onMounted, onUpdated, Prop, Ref, ref, watch } from 'vue';
import { highlight } from 'sql-highlight';
import {
Component,
computed,
ComputedRef,
onBeforeUnmount,
onMounted,
onUpdated,
Prop,
Ref,
ref,
watch
} from 'vue';
import { useI18n } from 'vue-i18n';
import BaseIcon from '@/components/BaseIcon.vue';
Expand Down Expand Up @@ -163,7 +175,7 @@ const localSearchTerm = ref('');
const connectionName = computed(() => getConnectionName(props.connection.uid));
const history: ComputedRef<HistoryRecord[]> = computed(() => (getHistoryByWorkspace(props.connection.uid) || []));
const filteredHistory = computed(() => history.value.filter(q => q.sql.toLowerCase().search(searchTerm.value.toLowerCase()) >= 0));
const filteredHistory = computed(() => history.value.filter(q => q.sql.toLowerCase().search(localSearchTerm.value.toLowerCase()) >= 0));
watch(searchTerm, () => {
clearTimeout(searchTermInterval.value);
Expand Down
Loading

0 comments on commit 4e98dc2

Please sign in to comment.