3 Commits

4 changed files with 54 additions and 63 deletions

View File

@@ -3,7 +3,6 @@
LIBDIR=${LIBDIR:-'/usr/share/artools/lib'} LIBDIR=${LIBDIR:-'/usr/share/artools/lib'}
_artixpkg_pkgbase() { _artixpkg_pkgbase() {
source "${LIBDIR}"/pkg/git/config.sh
source "${LIBDIR}"/pkg/util.sh source "${LIBDIR}"/pkg/util.sh
ls -1 "${TREE_DIR_ARTIX}" | tr '\n' ' ' ls -1 "${TREE_DIR_ARTIX}" | tr '\n' ' '
} }

76
package-lock.json generated
View File

@@ -1,19 +1,19 @@
{ {
"name": "artix-metro", "name": "artix-metro",
"version": "3.1.2", "version": "3.1.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "artix-metro", "name": "artix-metro",
"version": "3.1.2", "version": "3.1.4",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"artix-checkupdates": "1.0.2", "artix-checkupdates": "1.0.2",
"cli-color": "2.0.4", "cli-color": "2.0.4",
"glob": "11.0.1", "glob": "11.0.2",
"json5": "2.2.3", "json5": "2.2.3",
"ky": "1.7.5" "ky": "1.8.1"
}, },
"bin": { "bin": {
"artix-metro": "bin/artix-metro.mjs" "artix-metro": "bin/artix-metro.mjs"
@@ -21,8 +21,8 @@
"devDependencies": { "devDependencies": {
"@sindresorhus/tsconfig": "7.0.0", "@sindresorhus/tsconfig": "7.0.0",
"@types/cli-color": "2.0.6", "@types/cli-color": "2.0.6",
"@types/node": "22.13.10", "@types/node": "22.15.14",
"typescript": "5.8.2" "typescript": "5.8.3"
} }
}, },
"node_modules/@isaacs/cliui": { "node_modules/@isaacs/cliui": {
@@ -63,13 +63,13 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "22.13.10", "version": "22.15.14",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.14.tgz",
"integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==", "integrity": "sha512-BL1eyu/XWsFGTtDWOYULQEs4KR0qdtYfCxYAUYRoB7JP7h9ETYLgQTww6kH8Sj2C0pFGgrpM0XKv6/kbIzYJ1g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~6.20.0" "undici-types": "~6.21.0"
} }
}, },
"node_modules/ansi-regex": { "node_modules/ansi-regex": {
@@ -288,9 +288,9 @@
} }
}, },
"node_modules/glob": { "node_modules/glob": {
"version": "11.0.1", "version": "11.0.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-11.0.1.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.2.tgz",
"integrity": "sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw==", "integrity": "sha512-YT7U7Vye+t5fZ/QMkBFrTJ7ZQxInIUjwyAjVj84CYXqgBdv30MFUPGnBR6sQaVq6Is15wYJUsnzTuWaGRBhBAQ==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"foreground-child": "^3.1.0", "foreground-child": "^3.1.0",
@@ -357,9 +357,9 @@
} }
}, },
"node_modules/ky": { "node_modules/ky": {
"version": "1.7.5", "version": "1.8.1",
"resolved": "https://registry.npmjs.org/ky/-/ky-1.7.5.tgz", "resolved": "https://registry.npmjs.org/ky/-/ky-1.8.1.tgz",
"integrity": "sha512-HzhziW6sc5m0pwi5M196+7cEBtbt0lCYi67wNsiwMUmz833wloE0gbzJPWKs1gliFKQb34huItDQX97LyOdPdA==", "integrity": "sha512-7Bp3TpsE+L+TARSnnDpk3xg8Idi8RwSLdj6CMbNWoOARIrGrbuLGusV0dYwbZOm4bB3jHNxSw8Wk/ByDqJEnDw==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=18" "node": ">=18"
@@ -604,9 +604,9 @@
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "5.8.2", "version": "5.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
"integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"dev": true, "dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"bin": { "bin": {
@@ -618,9 +618,9 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "6.20.0", "version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
@@ -758,12 +758,12 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "22.13.10", "version": "22.15.14",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.14.tgz",
"integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==", "integrity": "sha512-BL1eyu/XWsFGTtDWOYULQEs4KR0qdtYfCxYAUYRoB7JP7h9ETYLgQTww6kH8Sj2C0pFGgrpM0XKv6/kbIzYJ1g==",
"dev": true, "dev": true,
"requires": { "requires": {
"undici-types": "~6.20.0" "undici-types": "~6.21.0"
} }
}, },
"ansi-regex": { "ansi-regex": {
@@ -941,9 +941,9 @@
} }
}, },
"glob": { "glob": {
"version": "11.0.1", "version": "11.0.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-11.0.1.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.2.tgz",
"integrity": "sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw==", "integrity": "sha512-YT7U7Vye+t5fZ/QMkBFrTJ7ZQxInIUjwyAjVj84CYXqgBdv30MFUPGnBR6sQaVq6Is15wYJUsnzTuWaGRBhBAQ==",
"requires": { "requires": {
"foreground-child": "^3.1.0", "foreground-child": "^3.1.0",
"jackspeak": "^4.0.1", "jackspeak": "^4.0.1",
@@ -982,9 +982,9 @@
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="
}, },
"ky": { "ky": {
"version": "1.7.5", "version": "1.8.1",
"resolved": "https://registry.npmjs.org/ky/-/ky-1.7.5.tgz", "resolved": "https://registry.npmjs.org/ky/-/ky-1.8.1.tgz",
"integrity": "sha512-HzhziW6sc5m0pwi5M196+7cEBtbt0lCYi67wNsiwMUmz833wloE0gbzJPWKs1gliFKQb34huItDQX97LyOdPdA==" "integrity": "sha512-7Bp3TpsE+L+TARSnnDpk3xg8Idi8RwSLdj6CMbNWoOARIrGrbuLGusV0dYwbZOm4bB3jHNxSw8Wk/ByDqJEnDw=="
}, },
"lru-cache": { "lru-cache": {
"version": "11.0.2", "version": "11.0.2",
@@ -1147,15 +1147,15 @@
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
}, },
"typescript": { "typescript": {
"version": "5.8.2", "version": "5.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
"integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"dev": true "dev": true
}, },
"undici-types": { "undici-types": {
"version": "6.20.0", "version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
"dev": true "dev": true
}, },
"which": { "which": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "artix-metro", "name": "artix-metro",
"version": "3.1.2", "version": "3.1.4",
"description": "Automate pushing packages to Artix", "description": "Automate pushing packages to Artix",
"keywords": [ "keywords": [
"artix", "artix",
@@ -33,14 +33,14 @@
"dependencies": { "dependencies": {
"artix-checkupdates": "1.0.2", "artix-checkupdates": "1.0.2",
"cli-color": "2.0.4", "cli-color": "2.0.4",
"ky": "1.7.5", "ky": "1.8.1",
"json5": "2.2.3", "json5": "2.2.3",
"glob": "11.0.1" "glob": "11.0.2"
}, },
"devDependencies": { "devDependencies": {
"typescript": "5.8.2", "typescript": "5.8.3",
"@sindresorhus/tsconfig": "7.0.0", "@sindresorhus/tsconfig": "7.0.0",
"@types/cli-color": "2.0.6", "@types/cli-color": "2.0.6",
"@types/node": "22.13.10" "@types/node": "22.15.14"
} }
} }

View File

@@ -55,25 +55,17 @@ class Pusher {
} }
async refreshGpg() { async refreshGpg() {
if (await isPasswordRequired()) { const sshSignMode = 'SSHKEYSIGN' in process.env;
if (sshSignMode || await isPasswordRequired()) {
console.log(clc.cyan('Refreshing signature...')); console.log(clc.cyan('Refreshing signature...'));
this._createdSignfile ||= await runCommand('touch', [SIGNFILE]); this._createdSignfile ||= await runCommand('touch', [SIGNFILE]);
if ('SSHKEYSIGN' in process.env) if (sshSignMode) {
{
await runCommand('ssh-keygen', ['-Y', 'sign', '-f', path.resolve(process.env['SSHKEYSIGN'] as string), '-n', ' git', SIGNFILE]); await runCommand('ssh-keygen', ['-Y', 'sign', '-f', path.resolve(process.env['SSHKEYSIGN'] as string), '-n', ' git', SIGNFILE]);
} }
else else {
{
await runCommand('gpg', ['-a', '--passphrase', escapeCommandParam(this._config.gpgpass || ''), '--batch', '--pinentry-mode', 'loopback', '--detach-sign', SIGNFILE]); await runCommand('gpg', ['-a', '--passphrase', escapeCommandParam(this._config.gpgpass || ''), '--batch', '--pinentry-mode', 'loopback', '--detach-sign', SIGNFILE]);
} }
if ('SSHKEYSIGN' in process.env) await fsp.rm(`${SIGNFILE}.${sshSignMode ? 'sig' : 'asc'}`)
{
await fsp.rm(`${SIGNFILE}.sig`)
}
else
{
await fsp.rm(`${SIGNFILE}.asc`)
}
} }
} }