@gkalpak/aliases 0.10.8 → 0.12.0
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 +11 -0
- package/bin/git/gcod.js +11 -0
- package/bin/git/gdefb.js +1 -1
- package/bin/git/gprod.js +11 -0
- package/bin/git/gprud.js +11 -0
- package/bin/git/grbd.js +11 -0
- package/bin/git/gstk.js +1 -1
- package/bin/git/{gcom.js → gstm.js} +1 -1
- package/bin/git/gsync.js +1 -1
- package/bin/misc/alv.js +1 -1
- package/bin/node/nvmup.win32.js +1 -1
- package/lib/constants.js +24 -12
- package/package.json +8 -7
- package/bin/git/gbcm.js +0 -11
- package/bin/git/gprom.js +0 -11
- package/bin/git/gprum.js +0 -11
- package/bin/git/grbm.js +0 -11
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.
|
|
5
|
+
### [Generated by: @gkalpak/aliases v0.12.0]
|
|
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.
|
|
5
|
+
### [Generated by: @gkalpak/aliases v0.12.0]
|
|
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.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.12.0]
|
|
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.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.12.0]
|
|
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.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.12.0]
|
|
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.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.12.0]
|
|
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.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.12.0]
|
|
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.
|
|
5
|
+
console.log('""" [Generated by: @gkalpak/aliases v0.12.0]');
|
|
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.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.12.0]
|
|
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.
|
|
17
|
+
### [Generated by: @gkalpak/aliases v0.12.0]
|
|
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
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
|
+
import {isMain, onError} from '../../lib/utils.js';
|
|
4
|
+
// eslint-disable-next-line max-len
|
|
5
|
+
const cmd = 'git checkout ${0:::node --print "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); try { exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').slice(rem.length + 1); } catch { exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\'); }"} -b $1 && git config branch.$1.remote origin && git config branch.$1.merge refs/heads/$1';
|
|
6
|
+
export default cmd;
|
|
7
|
+
if (isMain(import.meta.url)) {
|
|
8
|
+
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line quotes
|
|
10
|
+
commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
|
|
11
|
+
}
|
package/bin/git/gcod.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
|
+
import {isMain, onError} from '../../lib/utils.js';
|
|
4
|
+
// eslint-disable-next-line max-len
|
|
5
|
+
const cmd = 'git checkout ${0:::node --print "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); try { exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').slice(rem.length + 1); } catch { exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\'); }"} $*';
|
|
6
|
+
export default cmd;
|
|
7
|
+
if (isMain(import.meta.url)) {
|
|
8
|
+
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line quotes
|
|
10
|
+
commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
|
|
11
|
+
}
|
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 = '(git
|
|
5
|
+
const cmd = 'node --print "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); try { exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').slice(rem.length + 1); } catch { exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\'); }"';
|
|
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
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
|
+
import {isMain, onError} from '../../lib/utils.js';
|
|
4
|
+
// eslint-disable-next-line max-len
|
|
5
|
+
const cmd = 'git pull --rebase origin ${0:::node --print "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); try { exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').slice(rem.length + 1); } catch { exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\'); }"} $*';
|
|
6
|
+
export default cmd;
|
|
7
|
+
if (isMain(import.meta.url)) {
|
|
8
|
+
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line quotes
|
|
10
|
+
commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
|
|
11
|
+
}
|
package/bin/git/gprud.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
|
+
import {isMain, onError} from '../../lib/utils.js';
|
|
4
|
+
// eslint-disable-next-line max-len
|
|
5
|
+
const cmd = 'git pull --rebase upstream ${0:::node --print "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); try { exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').slice(rem.length + 1); } catch { exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\'); }"} $*';
|
|
6
|
+
export default cmd;
|
|
7
|
+
if (isMain(import.meta.url)) {
|
|
8
|
+
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line quotes
|
|
10
|
+
commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
|
|
11
|
+
}
|
package/bin/git/grbd.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
|
+
import {isMain, onError} from '../../lib/utils.js';
|
|
4
|
+
// eslint-disable-next-line max-len
|
|
5
|
+
const cmd = 'git rebase --ignore-date ${0:::node --print "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); try { exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').slice(rem.length + 1); } catch { exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\'); }"} $*';
|
|
6
|
+
export default cmd;
|
|
7
|
+
if (isMain(import.meta.url)) {
|
|
8
|
+
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line quotes
|
|
10
|
+
commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
|
|
11
|
+
}
|
package/bin/git/gstk.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 stash
|
|
5
|
+
const cmd = 'git stash push --keep-index $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
@@ -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
|
|
5
|
+
const cmd = 'git stash push --message $1 $2*';
|
|
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:::(git
|
|
5
|
+
const cmd = 'git checkout ${1:::node --print "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); try { exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').slice(rem.length + 1); } catch { exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\'); }"} && git pull upstream ${1:::node --print "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); try { exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').slice(rem.length + 1); } catch { exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\'); }"} && git push origin ${1:::node --print "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); try { exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').slice(rem.length + 1); } catch { exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\'); }"}';
|
|
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.
|
|
2
|
+
console.log('@gkalpak/aliases v0.12.0');
|
package/bin/node/nvmup.win32.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 --eval "/* NVM update instructions */ (async () => { try { const currentVersion = require(\'child_process\').execSync(\'nvm version\', {encoding: \'utf8\', shell: true}).trim(); const latestVersion = await new Promise((resolve, reject) => require(\'https\').get(\'https://api.github.com/repos/coreybutler/nvm-windows/tags?per_page=1\', {headers: {\'User-Agent\': \'Node.js\'}}, res => { let responseText = \'\'; res.on(\'data\', d => responseText += d).on(\'error\', reject).on(\'end\', () => resolve(JSON.parse(responseText)[0].name.replace(/^v/, \'\'))); }).on(\'error\', reject).end()); const message = (currentVersion === latestVersion) ? \'Already up to date.\' : \'Update available.\'; const escapedInstructionsTmpl = \'Download
|
|
5
|
+
const cmd = 'node --eval "/* NVM update instructions */ (async () => { try { const currentVersion = require(\'child_process\').execSync(\'nvm version\', {encoding: \'utf8\', shell: true}).trim(); const latestVersion = await new Promise((resolve, reject) => require(\'https\').get(\'https://api.github.com/repos/coreybutler/nvm-windows/tags?per_page=1\', {headers: {\'User-Agent\': \'Node.js\'}}, res => { let responseText = \'\'; res.on(\'data\', d => responseText += d).on(\'error\', reject).on(\'end\', () => resolve(JSON.parse(responseText)[0].name.replace(/^v/, \'\'))); }).on(\'error\', reject).end()); const message = (currentVersion === latestVersion) ? \'Already up to date.\' : \'Update available.\'; const escapedInstructionsTmpl = \'Download and run: https://github.com/coreybutler/nvm-windows/releases/download/{{version}}/nvm-setup.exe\'; console.log(\'Current version: \' + currentVersion); console.log(\'Latest version: \' + latestVersion); console.log(\'\\n \' + message); console.log(\'\\nUpdate instructions (https://github.com/coreybutler/nvm-windows#installation--upgrades):\'); console.log(\' \' + escapedInstructionsTmpl.split(\'{{version}}\').join(latestVersion)); } catch (err) { console.error(\'ERROR:\', err); process.exit(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/lib/constants.js
CHANGED
|
@@ -19,8 +19,19 @@ const PR_LOCAL_BRANCH_PREFIX = 'gcoghpr';
|
|
|
19
19
|
|
|
20
20
|
const SOURCE_NVM_CMD = '. $NVM_DIR/nvm.sh';
|
|
21
21
|
const GIT_GET_DEFAULT_BRANCH_CMD =
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
stripIndentation(`
|
|
23
|
+
node --print "
|
|
24
|
+
const rem = 'origin';
|
|
25
|
+
const exec = cmd => child_process.execSync(cmd, {encoding: 'utf8', stdio: 'pipe'});
|
|
26
|
+
try {
|
|
27
|
+
exec('git rev-parse --abbrev-ref ' + rem + '/HEAD').slice(rem.length + 1);
|
|
28
|
+
} catch {
|
|
29
|
+
exec(['main', 'master'].
|
|
30
|
+
map(b => '(git show-ref --heads --quiet ' + b + ' && echo ' + b + ')').
|
|
31
|
+
join(' || ') +
|
|
32
|
+
' || echo unknown-branch');
|
|
33
|
+
}"
|
|
34
|
+
`).replace(/([;{+])(\n)/g, '$1 $2').replace(/\n\s*/g, '');
|
|
24
35
|
const GLOBAL_NPM_PACKAGES = [
|
|
25
36
|
'@angular/cli',
|
|
26
37
|
'@gkalpak/aliases',
|
|
@@ -257,13 +268,14 @@ const ALIASES = {
|
|
|
257
268
|
|
|
258
269
|
// STASH
|
|
259
270
|
gst: new AliasDefault('git stash $*'),
|
|
260
|
-
|
|
271
|
+
gstm: new AliasDefault('git stash push --message $1 $2*'),
|
|
272
|
+
gstk: new AliasDefault('git stash push --keep-index $*'),
|
|
261
273
|
gstl: new AliasDefault('git stash list $*'),
|
|
262
274
|
gstp: new AliasDefault('git stash pop --index $*'),
|
|
263
275
|
|
|
264
276
|
// CHECKOUT
|
|
265
277
|
gco: new AliasDefault('git checkout ${*:::__g-pick-branch --gkcu-returnOutput=1}'),
|
|
266
|
-
|
|
278
|
+
gcod: new AliasDefault(`git checkout \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} $*`),
|
|
267
279
|
gcopr: new AliasDefault('git fetch upstream pull/$1/head && git checkout FETCH_HEAD'),
|
|
268
280
|
gcoghpr: SCRIPT_BACKED_ALIAS('gcoghpr', 'Check out a GitHub pull request as a local branch.'),
|
|
269
281
|
'gcoghpr-cleanup': new AliasDefault(
|
|
@@ -299,16 +311,16 @@ const ALIASES = {
|
|
|
299
311
|
// BRANCH
|
|
300
312
|
gb: new AliasDefault('git branch $*'),
|
|
301
313
|
gbc: new AliasDefault(GIT_CREATE_BRANCH_CMD('${2:HEAD}')),
|
|
302
|
-
|
|
314
|
+
gbcd: new AliasDefault(GIT_CREATE_BRANCH_CMD(`\${0:::${GIT_GET_DEFAULT_BRANCH_CMD}}`)),
|
|
303
315
|
gbco: new AliasDefault(`git fetch origin $1 && ${GIT_CREATE_BRANCH_CMD('origin/$1')}`),
|
|
304
316
|
gbd: new AliasDefault('git branch --delete --force ${*:::__g-pick-branch --gkcu-returnOutput=1}'),
|
|
305
317
|
|
|
306
318
|
// PULL(-REBASE)
|
|
307
319
|
gpr: new AliasDefault('git pull --rebase $*'),
|
|
308
320
|
gpro: new AliasDefault('git pull --rebase origin ${*:::git rev-parse --abbrev-ref HEAD}'),
|
|
309
|
-
|
|
321
|
+
gprod: new AliasDefault(`git pull --rebase origin \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} $*`),
|
|
310
322
|
gpru: new AliasDefault('git pull --rebase upstream ${*:::git rev-parse --abbrev-ref HEAD}'),
|
|
311
|
-
|
|
323
|
+
gprud: new AliasDefault(`git pull --rebase upstream \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} $*`),
|
|
312
324
|
|
|
313
325
|
// SYNC DEFAULT BRANCH
|
|
314
326
|
gsync: new AliasDefault(
|
|
@@ -319,12 +331,12 @@ const ALIASES = {
|
|
|
319
331
|
|
|
320
332
|
// REBASE
|
|
321
333
|
grb: new AliasDefault('git rebase ${*:::__g-pick-branch --gkcu-returnOutput=1}'),
|
|
322
|
-
|
|
334
|
+
grba: new AliasDefault('git rebase --abort'),
|
|
335
|
+
grbc: new AliasDefault('git rebase --continue'),
|
|
336
|
+
grbd: new AliasDefault(`git rebase --ignore-date \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} $*`),
|
|
323
337
|
grbi: new AliasDefault('git rebase --interactive HEAD~$1'),
|
|
324
338
|
grbia: new AliasDefault('git rebase --autosquash --interactive HEAD~$1'),
|
|
325
339
|
grbin: new AliasDefault('git rebase --no-autosquash --interactive HEAD~$1'),
|
|
326
|
-
grbc: new AliasDefault('git rebase --continue'),
|
|
327
|
-
grba: new AliasDefault('git rebase --abort'),
|
|
328
340
|
gmt: new AliasDefault('git mergetool'),
|
|
329
341
|
gcl: new AliasDefault('git clean --interactive "${0:::git rev-parse --show-toplevel}"'),
|
|
330
342
|
|
|
@@ -402,8 +414,8 @@ const ALIASES = {
|
|
|
402
414
|
'nvm version',
|
|
403
415
|
'coreybutler/nvm-windows',
|
|
404
416
|
'installation--upgrades',
|
|
405
|
-
'Download
|
|
406
|
-
'https://github.com/coreybutler/nvm-windows/releases/download/{{version}}/nvm-setup.
|
|
417
|
+
'Download and run: ' +
|
|
418
|
+
'https://github.com/coreybutler/nvm-windows/releases/download/{{version}}/nvm-setup.exe',
|
|
407
419
|
),
|
|
408
420
|
),
|
|
409
421
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gkalpak/aliases",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "My global aliases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Utility"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"gaa": "./bin/git/gaa.js",
|
|
55
55
|
"gb": "./bin/git/gb.js",
|
|
56
56
|
"gbc": "./bin/git/gbc.js",
|
|
57
|
-
"
|
|
57
|
+
"gbcd": "./bin/git/gbcd.js",
|
|
58
58
|
"gbco": "./bin/git/gbco.js",
|
|
59
59
|
"gbd": "./bin/git/gbd.js",
|
|
60
60
|
"gcl": "./bin/git/gcl.js",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
"gcmifc": "./bin/git/gcmifc.js",
|
|
72
72
|
"gcmifs": "./bin/git/gcmifs.js",
|
|
73
73
|
"gco": "./bin/git/gco.js",
|
|
74
|
+
"gcod": "./bin/git/gcod.js",
|
|
74
75
|
"gcoghpr": "./bin/git/gcoghpr.js",
|
|
75
76
|
"gcoghpr-cleanup": "./bin/git/gcoghpr-cleanup.js",
|
|
76
|
-
"gcom": "./bin/git/gcom.js",
|
|
77
77
|
"gcopr": "./bin/git/gcopr.js",
|
|
78
78
|
"gcp": "./bin/git/gcp.js",
|
|
79
79
|
"gcpa": "./bin/git/gcpa.js",
|
|
@@ -98,16 +98,16 @@
|
|
|
98
98
|
"gpf": "./bin/git/gpf.js",
|
|
99
99
|
"gpr": "./bin/git/gpr.js",
|
|
100
100
|
"gpro": "./bin/git/gpro.js",
|
|
101
|
-
"
|
|
101
|
+
"gprod": "./bin/git/gprod.js",
|
|
102
102
|
"gpru": "./bin/git/gpru.js",
|
|
103
|
-
"
|
|
103
|
+
"gprud": "./bin/git/gprud.js",
|
|
104
104
|
"grb": "./bin/git/grb.js",
|
|
105
105
|
"grba": "./bin/git/grba.js",
|
|
106
106
|
"grbc": "./bin/git/grbc.js",
|
|
107
|
+
"grbd": "./bin/git/grbd.js",
|
|
107
108
|
"grbi": "./bin/git/grbi.js",
|
|
108
109
|
"grbia": "./bin/git/grbia.js",
|
|
109
110
|
"grbin": "./bin/git/grbin.js",
|
|
110
|
-
"grbm": "./bin/git/grbm.js",
|
|
111
111
|
"grs": "./bin/git/grs.js",
|
|
112
112
|
"grs1": "./bin/git/grs1.js",
|
|
113
113
|
"gs": "./bin/git/gs.js",
|
|
@@ -116,6 +116,7 @@
|
|
|
116
116
|
"gst": "./bin/git/gst.js",
|
|
117
117
|
"gstk": "./bin/git/gstk.js",
|
|
118
118
|
"gstl": "./bin/git/gstl.js",
|
|
119
|
+
"gstm": "./bin/git/gstm.js",
|
|
119
120
|
"gstp": "./bin/git/gstp.js",
|
|
120
121
|
"gsync": "./bin/git/gsync.js",
|
|
121
122
|
"halp": "./bin/misc/halp.js",
|
|
@@ -194,7 +195,7 @@
|
|
|
194
195
|
"dependencies": {
|
|
195
196
|
"@gkalpak/cli-utils": "^0.1.10",
|
|
196
197
|
"chalk": "^5.3.0",
|
|
197
|
-
"inquirer": "^9.2.
|
|
198
|
+
"inquirer": "^9.2.20",
|
|
198
199
|
"is-wsl": "^3.1.0"
|
|
199
200
|
},
|
|
200
201
|
"devDependencies": {
|
package/bin/git/gbcm.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
|
-
import {isMain, onError} from '../../lib/utils.js';
|
|
4
|
-
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'git checkout ${0:::(git show-ref --heads --quiet master && echo master) || (git show-ref --heads --quiet main && echo main) || echo unknown-branch} -b $1 && git config branch.$1.remote origin && git config branch.$1.merge refs/heads/$1';
|
|
6
|
-
export default cmd;
|
|
7
|
-
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
|
|
11
|
-
}
|
package/bin/git/gprom.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
|
-
import {isMain, onError} from '../../lib/utils.js';
|
|
4
|
-
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'git pull --rebase origin ${0:::(git show-ref --heads --quiet master && echo master) || (git show-ref --heads --quiet main && echo main) || echo unknown-branch} $*';
|
|
6
|
-
export default cmd;
|
|
7
|
-
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
|
|
11
|
-
}
|
package/bin/git/gprum.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
|
-
import {isMain, onError} from '../../lib/utils.js';
|
|
4
|
-
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'git pull --rebase upstream ${0:::(git show-ref --heads --quiet master && echo master) || (git show-ref --heads --quiet main && echo main) || echo unknown-branch} $*';
|
|
6
|
-
export default cmd;
|
|
7
|
-
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
|
|
11
|
-
}
|
package/bin/git/grbm.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
|
-
import {isMain, onError} from '../../lib/utils.js';
|
|
4
|
-
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'git rebase --ignore-date ${0:::(git show-ref --heads --quiet master && echo master) || (git show-ref --heads --quiet main && echo main) || echo unknown-branch} $*';
|
|
6
|
-
export default cmd;
|
|
7
|
-
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
|
|
11
|
-
}
|