1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

Compare commits

..

5 Commits

Author SHA1 Message Date
dependabot[bot]
70bffb8406 build(deps): bump css-loader from 6.5.1 to 7.1.2
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 6.5.1 to 7.1.2.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v6.5.1...v7.1.2)

---
updated-dependencies:
- dependency-name: css-loader
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-05 14:35:35 +00:00
7af44d4a2c refactor: add ciaplu for pattern matching in language detection and MIME type resolution 2025-02-05 15:34:01 +01:00
0479e5307c fix(Linux): restored AppImage auto updates 2025-02-03 18:14:38 +01:00
d03c1b90ce chore(release): 0.7.31-beta.4 2025-01-31 18:06:58 +01:00
d34e56a517 fix(Linux): missing window management icons 2025-01-31 18:06:16 +01:00
7 changed files with 165 additions and 111 deletions

View File

@@ -2,6 +2,13 @@
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. 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.31-beta.4](https://github.com/antares-sql/antares/compare/v0.7.31-beta.3...v0.7.31-beta.4) (2025-01-31)
### Bug Fixes
* **Linux:** missing window management icons ([d34e56a](https://github.com/antares-sql/antares/commit/d34e56a517784dea16a7a53bc2249072a3b96596))
### [0.7.31-beta.3](https://github.com/antares-sql/antares/compare/v0.7.31-beta.2...v0.7.31-beta.3) (2025-01-31) ### [0.7.31-beta.3](https://github.com/antares-sql/antares/compare/v0.7.31-beta.2...v0.7.31-beta.3) (2025-01-31)

145
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "antares", "name": "antares",
"version": "0.7.31-beta.3", "version": "0.7.31-beta.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "antares", "name": "antares",
"version": "0.7.31-beta.3", "version": "0.7.31-beta.4",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -22,9 +22,10 @@
"babel-loader": "~8.2.3", "babel-loader": "~8.2.3",
"better-sqlite3": "~10.0.0", "better-sqlite3": "~10.0.0",
"chalk": "~4.1.2", "chalk": "~4.1.2",
"ciaplu": "^2.2.0",
"cpu-features": "^0.0.10", "cpu-features": "^0.0.10",
"cross-env": "~7.0.2", "cross-env": "~7.0.2",
"css-loader": "~6.5.0", "css-loader": "~7.1.2",
"electron-log": "~5.0.1", "electron-log": "~5.0.1",
"electron-store": "~8.1.0", "electron-store": "~8.1.0",
"electron-updater": "~4.6.5", "electron-updater": "~4.6.5",
@@ -5608,6 +5609,12 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/ciaplu": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/ciaplu/-/ciaplu-2.2.0.tgz",
"integrity": "sha512-7y8s0GMFpIKqX2kwiOEYbaX3P9tPIbX4x41uw8GZjkZ+y0QZrpY3PFjE2Ed6BOeFxcCWi7b85MYHeiRrVrlSOQ==",
"license": "MIT"
},
"node_modules/clean-css": { "node_modules/clean-css": {
"version": "5.3.2", "version": "5.3.2",
"license": "MIT", "license": "MIT",
@@ -6402,27 +6409,38 @@
} }
}, },
"node_modules/css-loader": { "node_modules/css-loader": {
"version": "6.5.1", "version": "7.1.2",
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.2.tgz",
"integrity": "sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"icss-utils": "^5.1.0", "icss-utils": "^5.1.0",
"postcss": "^8.2.15", "postcss": "^8.4.33",
"postcss-modules-extract-imports": "^3.0.0", "postcss-modules-extract-imports": "^3.1.0",
"postcss-modules-local-by-default": "^4.0.0", "postcss-modules-local-by-default": "^4.0.5",
"postcss-modules-scope": "^3.0.0", "postcss-modules-scope": "^3.2.0",
"postcss-modules-values": "^4.0.0", "postcss-modules-values": "^4.0.0",
"postcss-value-parser": "^4.1.0", "postcss-value-parser": "^4.2.0",
"semver": "^7.3.5" "semver": "^7.5.4"
}, },
"engines": { "engines": {
"node": ">= 12.13.0" "node": ">= 18.12.0"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
"url": "https://opencollective.com/webpack" "url": "https://opencollective.com/webpack"
}, },
"peerDependencies": { "peerDependencies": {
"webpack": "^5.0.0" "@rspack/core": "0.x || 1.x",
"webpack": "^5.27.0"
},
"peerDependenciesMeta": {
"@rspack/core": {
"optional": true
},
"webpack": {
"optional": true
}
} }
}, },
"node_modules/css-loader/node_modules/lru-cache": { "node_modules/css-loader/node_modules/lru-cache": {
@@ -12500,7 +12518,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/postcss-modules-extract-imports": { "node_modules/postcss-modules-extract-imports": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz",
"integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==",
"license": "ISC", "license": "ISC",
"engines": { "engines": {
"node": "^10 || ^12 || >= 14" "node": "^10 || ^12 || >= 14"
@@ -12510,11 +12530,13 @@
} }
}, },
"node_modules/postcss-modules-local-by-default": { "node_modules/postcss-modules-local-by-default": {
"version": "4.0.3", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.2.0.tgz",
"integrity": "sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"icss-utils": "^5.0.0", "icss-utils": "^5.0.0",
"postcss-selector-parser": "^6.0.2", "postcss-selector-parser": "^7.0.0",
"postcss-value-parser": "^4.1.0" "postcss-value-parser": "^4.1.0"
}, },
"engines": { "engines": {
@@ -12524,11 +12546,26 @@
"postcss": "^8.1.0" "postcss": "^8.1.0"
} }
}, },
"node_modules/postcss-modules-local-by-default/node_modules/postcss-selector-parser": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz",
"integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==",
"license": "MIT",
"dependencies": {
"cssesc": "^3.0.0",
"util-deprecate": "^1.0.2"
},
"engines": {
"node": ">=4"
}
},
"node_modules/postcss-modules-scope": { "node_modules/postcss-modules-scope": {
"version": "3.0.0", "version": "3.2.1",
"resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz",
"integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"postcss-selector-parser": "^6.0.4" "postcss-selector-parser": "^7.0.0"
}, },
"engines": { "engines": {
"node": "^10 || ^12 || >= 14" "node": "^10 || ^12 || >= 14"
@@ -12537,6 +12574,19 @@
"postcss": "^8.1.0" "postcss": "^8.1.0"
} }
}, },
"node_modules/postcss-modules-scope/node_modules/postcss-selector-parser": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz",
"integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==",
"license": "MIT",
"dependencies": {
"cssesc": "^3.0.0",
"util-deprecate": "^1.0.2"
},
"engines": {
"node": ">=4"
}
},
"node_modules/postcss-modules-values": { "node_modules/postcss-modules-values": {
"version": "4.0.0", "version": "4.0.0",
"license": "ISC", "license": "ISC",
@@ -12571,6 +12621,7 @@
}, },
"node_modules/postcss-selector-parser": { "node_modules/postcss-selector-parser": {
"version": "6.0.13", "version": "6.0.13",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"cssesc": "^3.0.0", "cssesc": "^3.0.0",
@@ -20345,6 +20396,11 @@
"version": "3.9.0", "version": "3.9.0",
"dev": true "dev": true
}, },
"ciaplu": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/ciaplu/-/ciaplu-2.2.0.tgz",
"integrity": "sha512-7y8s0GMFpIKqX2kwiOEYbaX3P9tPIbX4x41uw8GZjkZ+y0QZrpY3PFjE2Ed6BOeFxcCWi7b85MYHeiRrVrlSOQ=="
},
"clean-css": { "clean-css": {
"version": "5.3.2", "version": "5.3.2",
"requires": { "requires": {
@@ -20877,16 +20933,18 @@
"dev": true "dev": true
}, },
"css-loader": { "css-loader": {
"version": "6.5.1", "version": "7.1.2",
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.2.tgz",
"integrity": "sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA==",
"requires": { "requires": {
"icss-utils": "^5.1.0", "icss-utils": "^5.1.0",
"postcss": "^8.2.15", "postcss": "^8.4.33",
"postcss-modules-extract-imports": "^3.0.0", "postcss-modules-extract-imports": "^3.1.0",
"postcss-modules-local-by-default": "^4.0.0", "postcss-modules-local-by-default": "^4.0.5",
"postcss-modules-scope": "^3.0.0", "postcss-modules-scope": "^3.2.0",
"postcss-modules-values": "^4.0.0", "postcss-modules-values": "^4.0.0",
"postcss-value-parser": "^4.1.0", "postcss-value-parser": "^4.2.0",
"semver": "^7.3.5" "semver": "^7.5.4"
}, },
"dependencies": { "dependencies": {
"lru-cache": { "lru-cache": {
@@ -24696,21 +24754,49 @@
"dev": true "dev": true
}, },
"postcss-modules-extract-imports": { "postcss-modules-extract-imports": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz",
"integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==",
"requires": {} "requires": {}
}, },
"postcss-modules-local-by-default": { "postcss-modules-local-by-default": {
"version": "4.0.3", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.2.0.tgz",
"integrity": "sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw==",
"requires": { "requires": {
"icss-utils": "^5.0.0", "icss-utils": "^5.0.0",
"postcss-selector-parser": "^6.0.2", "postcss-selector-parser": "^7.0.0",
"postcss-value-parser": "^4.1.0" "postcss-value-parser": "^4.1.0"
},
"dependencies": {
"postcss-selector-parser": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz",
"integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==",
"requires": {
"cssesc": "^3.0.0",
"util-deprecate": "^1.0.2"
}
}
} }
}, },
"postcss-modules-scope": { "postcss-modules-scope": {
"version": "3.0.0", "version": "3.2.1",
"resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz",
"integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==",
"requires": { "requires": {
"postcss-selector-parser": "^6.0.4" "postcss-selector-parser": "^7.0.0"
},
"dependencies": {
"postcss-selector-parser": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz",
"integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==",
"requires": {
"cssesc": "^3.0.0",
"util-deprecate": "^1.0.2"
}
}
} }
}, },
"postcss-modules-values": { "postcss-modules-values": {
@@ -24729,6 +24815,7 @@
}, },
"postcss-selector-parser": { "postcss-selector-parser": {
"version": "6.0.13", "version": "6.0.13",
"dev": true,
"requires": { "requires": {
"cssesc": "^3.0.0", "cssesc": "^3.0.0",
"util-deprecate": "^1.0.2" "util-deprecate": "^1.0.2"

View File

@@ -1,7 +1,7 @@
{ {
"name": "antares", "name": "antares",
"productName": "Antares", "productName": "Antares",
"version": "0.7.31-beta.3", "version": "0.7.31-beta.4",
"description": "A modern, fast and productivity driven SQL client with a focus in UX.", "description": "A modern, fast and productivity driven SQL client with a focus in UX.",
"license": "MIT", "license": "MIT",
"repository": "https://github.com/antares-sql/antares.git", "repository": "https://github.com/antares-sql/antares.git",
@@ -131,9 +131,10 @@
"babel-loader": "~8.2.3", "babel-loader": "~8.2.3",
"better-sqlite3": "~10.0.0", "better-sqlite3": "~10.0.0",
"chalk": "~4.1.2", "chalk": "~4.1.2",
"ciaplu": "^2.2.0",
"cpu-features": "^0.0.10", "cpu-features": "^0.0.10",
"cross-env": "~7.0.2", "cross-env": "~7.0.2",
"css-loader": "~6.5.0", "css-loader": "~7.1.2",
"electron-log": "~5.0.1", "electron-log": "~5.0.1",
"electron-store": "~8.1.0", "electron-store": "~8.1.0",
"electron-updater": "~4.6.5", "electron-updater": "~4.6.5",

View File

@@ -1,3 +1,5 @@
import { match } from 'ciaplu';
function isJSON (str: string) { function isJSON (str: string) {
try { try {
if (!['{', '['].includes(str.trim()[0])) if (!['{', '['].includes(str.trim()[0]))
@@ -176,17 +178,13 @@ function isMD (str: string) {
} }
export function langDetector (str: string) { export function langDetector (str: string) {
if (!str || !str.trim().length) return match(str)
return 'text'; .when(() => !str || !str.trim().length, () => 'text')
if (isJSON(str)) .when(isJSON, () => 'json')
return 'json'; .when(isHTML, () => 'html')
if (isHTML(str)) .when(isSVG, () => 'svg')
return 'html'; .when(isXML, () => 'xml')
if (isSVG(str)) .when(isMD, () => 'markdown')
return 'svg'; .otherwise(() => 'text')
if (isXML(str)) .return();
return 'xml';
if (isMD(str))
return 'markdown';
return 'text';
} }

View File

@@ -1,45 +1,25 @@
import { match } from 'ciaplu';
export function mimeFromHex (hex: string) { export function mimeFromHex (hex: string) {
switch (hex.substring(0, 4)) { // 2 bytes return match(hex.substring(0, 4)) // 2 bytes
case '424D': .with('424D', () => ({ ext: 'bmp', mime: 'image/bmp' }))
return { ext: 'bmp', mime: 'image/bmp' }; .with('1F8B', () => ({ ext: 'tar.gz', mime: 'application/gzip' }))
case '1F8B': .with('0B77', () => ({ ext: 'ac3', mime: 'audio/vnd.dolby.dd-raw' }))
return { ext: 'tar.gz', mime: 'application/gzip' }; .with('7801', () => ({ ext: 'dmg', mime: 'application/x-apple-diskimage' }))
case '0B77': .with('4D5A', () => ({ ext: 'exe', mime: 'application/x-msdownload' }))
return { ext: 'ac3', mime: 'audio/vnd.dolby.dd-raw' }; .when((val) => ['1FA0', '1F9D'].includes(val), () => ({ ext: 'Z', mime: 'application/x-compress' }))
case '7801': .extracting(() => hex.substring(0, 6)) // 3 bytes
return { ext: 'dmg', mime: 'application/x-apple-diskimage' }; .with('FFD8FF', () => ({ ext: 'jpg', mime: 'image/jpeg' }))
case '4D5A': .with('4949BC', () => ({ ext: 'jxr', mime: 'image/vnd.ms-photo' }))
return { ext: 'exe', mime: 'application/x-msdownload' }; .with('425A68', () => ({ ext: 'bz2', mime: 'application/x-bzip2' }))
case '1FA0': .extracting(() => hex) // 4 bytes
case '1F9D': .with('89504E47', () => ({ ext: 'png', mime: 'image/png' }))
return { ext: 'Z', mime: 'application/x-compress' }; .with('47494638', () => ({ ext: 'gif', mime: 'image/gif' }))
default: .with('25504446', () => ({ ext: 'pdf', mime: 'application/pdf' }))
switch (hex.substring(0, 6)) { // 3 bytes .with('504B0304', () => ({ ext: 'zip', mime: 'application/zip' }))
case 'FFD8FF': .with('425047FB', () => ({ ext: 'bpg', mime: 'image/bpg' }))
return { ext: 'jpg', mime: 'image/jpeg' }; .with('4D4D002A', () => ({ ext: 'tif', mime: 'image/tiff' }))
case '4949BC': .with('00000100', () => ({ ext: 'ico', mime: 'image/x-icon' }))
return { ext: 'jxr', mime: 'image/vnd.ms-photo' }; .otherwise(() => ({ ext: '', mime: 'unknown ' + hex }))
case '425A68': .return();
return { ext: 'bz2', mime: 'application/x-bzip2' };
default:
switch (hex) { // 4 bites
case '89504E47':
return { ext: 'png', mime: 'image/png' };
case '47494638':
return { ext: 'gif', mime: 'image/gif' };
case '25504446':
return { ext: 'pdf', mime: 'application/pdf' };
case '504B0304':
return { ext: 'zip', mime: 'application/zip' };
case '425047FB':
return { ext: 'bpg', mime: 'image/bpg' };
case '4D4D002A':
return { ext: 'tif', mime: 'image/tiff' };
case '00000100':
return { ext: 'ico', mime: 'image/x-icon' };
default:
return { ext: '', mime: 'unknown ' + hex };
}
}
}
} }

View File

@@ -31,25 +31,13 @@
</div> </div>
<div v-if="isWindows" :style="'width: 140px;'" /> <div v-if="isWindows" :style="'width: 140px;'" />
<div v-if="isLinux" class="d-flex"> <div v-if="isLinux" class="d-flex">
<div <div class="titlebar-element" @click="minimize">
v-if="isDevelopment"
class="titlebar-element"
@click="minimize"
>
<BaseIcon icon-name="mdiWindowMinimize" :size="18" /> <BaseIcon icon-name="mdiWindowMinimize" :size="18" />
</div> </div>
<div <div class="titlebar-element" @click="toggleFullScreen">
v-if="isDevelopment"
class="titlebar-element"
@click="toggleFullScreen"
>
<BaseIcon :icon-name="isMaximized ? 'mdiWindowRestore' : 'mdiWindowMaximize'" :size="18" /> <BaseIcon :icon-name="isMaximized ? 'mdiWindowRestore' : 'mdiWindowMaximize'" :size="18" />
</div> </div>
<div <div class="titlebar-element" @click="closeApp">
v-if="isDevelopment"
class="titlebar-element"
@click="closeApp"
>
<BaseIcon icon-name="mdiClose" :size="18" /> <BaseIcon icon-name="mdiClose" :size="18" />
</div> </div>
</div> </div>

View File

@@ -1,8 +1,7 @@
const path = require('path'); const path = require('path');
const webpack = require('webpack');
const ProgressPlugin = require('progress-webpack-plugin'); const ProgressPlugin = require('progress-webpack-plugin');
const { dependencies, devDependencies, version } = require('./package.json'); const { dependencies, devDependencies } = require('./package.json');
const externals = Object.keys(dependencies).concat(Object.keys(devDependencies)); const externals = Object.keys(dependencies).concat(Object.keys(devDependencies));
const isDevMode = process.env.NODE_ENV === 'development'; const isDevMode = process.env.NODE_ENV === 'development';
@@ -48,13 +47,7 @@ module.exports = { // Main
} }
}, },
plugins: [ plugins: [
new ProgressPlugin(true), new ProgressPlugin(true)
new webpack.DefinePlugin({
'process.env': {
PACKAGE_VERSION: `"${version}"`,
DISTRIBUTION: `"${process.env.DISTRIBUTION || 'none'}"`
}
})
], ],
module: { module: {
rules: [ rules: [