@gkalpak/aliases 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/config/cfgbash.js +1 -1
- package/bin/config/cfgbash.wsl.js +1 -1
- package/bin/config/cfggit.js +1 -1
- package/bin/config/cfggit.win32.js +1 -1
- package/bin/config/cfggit.wsl.js +1 -1
- package/bin/config/cfggpg.js +1 -1
- package/bin/config/cfgssh.js +1 -1
- package/bin/config/cfgvim.js +1 -1
- package/bin/config/cfgwsl.wsl.js +2 -2
- package/bin/git/gbcd.js +1 -1
- package/bin/git/gcod.js +1 -1
- package/bin/git/gdefb.js +1 -1
- package/bin/git/gprod.js +1 -1
- package/bin/git/gprud.js +1 -1
- package/bin/git/grbd.js +1 -1
- package/bin/git/gsync.js +1 -1
- package/bin/misc/alv.js +1 -1
- package/lib/constants.js +5 -4
- package/package.json +1 -1
package/bin/config/cfgbash.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
/* eslint-disable max-len */
|
|
4
4
|
console.log(stripIndentation(`
|
|
5
|
-
### [Generated by: @gkalpak/aliases v0.12.
|
|
5
|
+
### [Generated by: @gkalpak/aliases v0.12.1]
|
|
6
6
|
### Copy the following into '~/.bashrc':
|
|
7
7
|
|
|
8
8
|
# Set up prompt.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
/* eslint-disable max-len */
|
|
4
4
|
console.log(stripIndentation(`
|
|
5
|
-
### [Generated by: @gkalpak/aliases v0.12.
|
|
5
|
+
### [Generated by: @gkalpak/aliases v0.12.1]
|
|
6
6
|
### Copy the following into '~/.bashrc':
|
|
7
7
|
|
|
8
8
|
# Set up prompt.
|
package/bin/config/cfggit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.12.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.12.1]
|
|
5
5
|
### Run the following commands:
|
|
6
6
|
|
|
7
7
|
git config --global commit.gpgSign true
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.12.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.12.1]
|
|
5
5
|
### Run the following commands:
|
|
6
6
|
|
|
7
7
|
git config --global commit.gpgSign true
|
package/bin/config/cfggit.wsl.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.12.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.12.1]
|
|
5
5
|
### Run the following commands:
|
|
6
6
|
|
|
7
7
|
git config --global commit.gpgSign true
|
package/bin/config/cfggpg.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.12.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.12.1]
|
|
5
5
|
### Copy the following into '~/.gnupg/gpg-agent.conf':
|
|
6
6
|
|
|
7
7
|
default-cache-ttl 86400
|
package/bin/config/cfgssh.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.12.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.12.1]
|
|
5
5
|
### Copy the following into '~/.ssh/config':
|
|
6
6
|
|
|
7
7
|
IdentityFile ~/.ssh/id-rsa-gkalpak.ppk
|
package/bin/config/cfgvim.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import {readFileSync} from 'node:fs';
|
|
3
3
|
import {fileURLToPath} from 'node:url';
|
|
4
4
|
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
5
|
-
console.log('""" [Generated by: @gkalpak/aliases v0.12.
|
|
5
|
+
console.log('""" [Generated by: @gkalpak/aliases v0.12.1]');
|
|
6
6
|
console.log('""" Copy the following into \'~/.vimrc\':\n');
|
|
7
7
|
console.log(readFileSync(`${__dirname}/../../lib/assets/vimrc.txt`, 'utf8').trim() + '\n');
|
package/bin/config/cfgwsl.wsl.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.12.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.12.1]
|
|
5
5
|
### Copy the following into a root-owned, 600-mode '/etc/resolv.conf' file:
|
|
6
6
|
|
|
7
7
|
# Cloudflare
|
|
@@ -14,7 +14,7 @@ console.log(stripIndentation(`
|
|
|
14
14
|
|
|
15
15
|
-----
|
|
16
16
|
|
|
17
|
-
### [Generated by: @gkalpak/aliases v0.12.
|
|
17
|
+
### [Generated by: @gkalpak/aliases v0.12.1]
|
|
18
18
|
### Copy the following into a root-owned, 600-mode '/etc/wsl.conf' file:
|
|
19
19
|
|
|
20
20
|
[network]
|
package/bin/git/gbcd.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'git checkout ${0:::node --
|
|
5
|
+
const cmd = 'git checkout ${0:::node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} -b $1 && git config branch.$1.remote origin && git config branch.$1.merge refs/heads/$1';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/bin/git/gcod.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'git checkout ${0:::node --
|
|
5
|
+
const cmd = 'git checkout ${0:::node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/bin/git/gdefb.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'node --
|
|
5
|
+
const cmd = 'node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/bin/git/gprod.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'git pull --rebase origin ${0:::node --
|
|
5
|
+
const cmd = 'git pull --rebase origin ${0:::node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/bin/git/gprud.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'git pull --rebase upstream ${0:::node --
|
|
5
|
+
const cmd = 'git pull --rebase upstream ${0:::node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/bin/git/grbd.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'git rebase --ignore-date ${0:::node --
|
|
5
|
+
const cmd = 'git rebase --ignore-date ${0:::node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/bin/git/gsync.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'git checkout ${1:::node --
|
|
5
|
+
const cmd = 'git checkout ${1:::node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} && git pull upstream ${1:::node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} && git push origin ${1:::node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"}';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/bin/misc/alv.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
console.log('@gkalpak/aliases v0.12.
|
|
2
|
+
console.log('@gkalpak/aliases v0.12.1');
|
package/lib/constants.js
CHANGED
|
@@ -20,16 +20,17 @@ const PR_LOCAL_BRANCH_PREFIX = 'gcoghpr';
|
|
|
20
20
|
const SOURCE_NVM_CMD = '. $NVM_DIR/nvm.sh';
|
|
21
21
|
const GIT_GET_DEFAULT_BRANCH_CMD =
|
|
22
22
|
stripIndentation(`
|
|
23
|
-
node --
|
|
23
|
+
node --eval "
|
|
24
24
|
const rem = 'origin';
|
|
25
25
|
const exec = cmd => child_process.execSync(cmd, {encoding: 'utf8', stdio: 'pipe'});
|
|
26
|
+
const print = msg => process.stdout.write(msg);
|
|
26
27
|
try {
|
|
27
|
-
exec('git rev-parse --abbrev-ref ' + rem + '/HEAD').slice(rem.length + 1);
|
|
28
|
+
print(exec('git rev-parse --abbrev-ref ' + rem + '/HEAD').trim().slice(rem.length + 1));
|
|
28
29
|
} catch {
|
|
29
|
-
exec(['main', 'master'].
|
|
30
|
+
print(exec(['main', 'master'].
|
|
30
31
|
map(b => '(git show-ref --heads --quiet ' + b + ' && echo ' + b + ')').
|
|
31
32
|
join(' || ') +
|
|
32
|
-
' || echo unknown-branch');
|
|
33
|
+
' || echo unknown-branch').trim());
|
|
33
34
|
}"
|
|
34
35
|
`).replace(/([;{+])(\n)/g, '$1 $2').replace(/\n\s*/g, '');
|
|
35
36
|
const GLOBAL_NPM_PACKAGES = [
|