@gkalpak/aliases 0.14.1 → 0.14.2
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/aio/aioall.js +4 -3
- package/bin/aio/aioatt.js +4 -3
- package/bin/aio/aiobd.js +4 -3
- package/bin/aio/aiord.js +4 -3
- package/bin/aio/aiorm.js +4 -3
- 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.js +4 -3
- package/bin/config/cfgwsl.wsl.js +2 -2
- package/bin/docker/dkrall.js +4 -3
- package/bin/docker/dkratt.js +4 -3
- package/bin/docker/dkrbd.js +4 -3
- package/bin/docker/dkrrd.js +4 -3
- package/bin/docker/dkrrm.js +4 -3
- package/bin/git/gaa.js +4 -3
- package/bin/git/gb.js +4 -3
- package/bin/git/gba.js +4 -3
- package/bin/git/gbc.js +4 -3
- package/bin/git/gbcd.js +4 -3
- package/bin/git/gbco.js +4 -3
- package/bin/git/gbd.js +4 -3
- package/bin/git/gbdio.js +4 -3
- package/bin/git/gbdr.js +4 -3
- package/bin/git/gcl.js +4 -3
- package/bin/git/gcm.js +4 -3
- package/bin/git/gcma.js +4 -3
- package/bin/git/gcmane.js +4 -3
- package/bin/git/gcmf.js +4 -3
- package/bin/git/gcmfc.js +4 -3
- package/bin/git/gcmfs.js +4 -3
- package/bin/git/gcmi.js +4 -3
- package/bin/git/gcmia.js +4 -3
- package/bin/git/gcmiane.js +4 -3
- package/bin/git/gcmif.js +4 -3
- package/bin/git/gcmifc.js +4 -3
- package/bin/git/gcmifs.js +4 -3
- package/bin/git/gco.js +4 -3
- package/bin/git/gcod.js +4 -3
- package/bin/git/gcoghpr-cleanup.js +4 -3
- package/bin/git/gcopr.js +4 -3
- package/bin/git/gcp.js +4 -3
- package/bin/git/gcpa.js +4 -3
- package/bin/git/gcpc.js +4 -3
- package/bin/git/gcpx.js +4 -3
- package/bin/git/gcpxl.js +4 -3
- package/bin/git/gd.js +4 -3
- package/bin/git/gd1.js +4 -3
- package/bin/git/gdefb.js +4 -3
- package/bin/git/gdh.js +4 -3
- package/bin/git/gdn.js +4 -3
- package/bin/git/gdn1.js +4 -3
- package/bin/git/gdnh.js +4 -3
- package/bin/git/gl.js +4 -3
- package/bin/git/gl1.js +4 -3
- package/bin/git/gl1g.js +4 -3
- package/bin/git/gmt.js +4 -3
- package/bin/git/gngprh.js +4 -3
- package/bin/git/gngprm.js +4 -3
- package/bin/git/gp.js +4 -3
- package/bin/git/gp1.js +4 -3
- package/bin/git/gpf.js +4 -3
- package/bin/git/gpr.js +4 -3
- package/bin/git/gpro.js +4 -3
- package/bin/git/gprod.js +4 -3
- package/bin/git/gpru.js +4 -3
- package/bin/git/gprud.js +4 -3
- package/bin/git/grb.js +4 -3
- package/bin/git/grba.js +4 -3
- package/bin/git/grbc.js +4 -3
- package/bin/git/grbd.js +4 -3
- package/bin/git/grbi.js +4 -3
- package/bin/git/grbia.js +4 -3
- package/bin/git/grbin.js +4 -3
- package/bin/git/grs.js +4 -3
- package/bin/git/grs1.js +4 -3
- package/bin/git/gs.js +4 -3
- package/bin/git/gsh.js +4 -3
- package/bin/git/gshg.js +4 -3
- package/bin/git/gshn.js +4 -3
- package/bin/git/gshng.js +4 -3
- package/bin/git/gst.js +4 -3
- package/bin/git/gstk.js +4 -3
- package/bin/git/gstl.js +4 -3
- package/bin/git/gstm.js +4 -3
- package/bin/git/gstp.js +4 -3
- package/bin/git/gsync.js +4 -3
- package/bin/misc/alv.js +1 -1
- package/bin/misc/ll.darwin.js +4 -3
- package/bin/misc/ll.js +4 -3
- package/bin/misc/lla.darwin.js +4 -3
- package/bin/misc/lla.js +4 -3
- package/bin/misc/osv.darwin.js +4 -3
- package/bin/misc/osv.js +4 -3
- package/bin/misc/osv.win32.js +4 -3
- package/bin/misc/salfup.js +4 -3
- package/bin/node/nad.js +4 -3
- package/bin/node/naga.js +4 -3
- package/bin/node/nap.js +4 -3
- package/bin/node/niin.js +4 -3
- package/bin/node/nls.js +4 -3
- package/bin/node/nls1.js +4 -3
- package/bin/node/nlsg.js +4 -3
- package/bin/node/nlsg1.js +4 -3
- package/bin/node/nr.js +4 -3
- package/bin/node/nrd.js +4 -3
- package/bin/node/nrin.js +4 -3
- package/bin/node/nrp.js +4 -3
- package/bin/node/nrx.js +4 -3
- package/bin/node/ns.js +4 -3
- package/bin/node/nsin.js +4 -3
- package/bin/node/nsx.js +4 -3
- package/bin/node/nt.js +4 -3
- package/bin/node/ntin.js +4 -3
- package/bin/node/ntx.js +4 -3
- package/bin/node/nua.js +4 -3
- package/bin/node/nud.js +4 -3
- package/bin/node/nup.js +4 -3
- package/bin/node/nv.js +4 -3
- package/bin/node/nvls.js +4 -3
- package/bin/node/nvls.win32.js +4 -3
- package/bin/node/nvlsa.js +4 -3
- package/bin/node/nvlsa.win32.js +4 -3
- package/bin/node/nvmup.js +4 -3
- package/bin/node/nvmup.win32.js +4 -3
- package/bin/node/srv.js +4 -3
- package/bin/node/srvw.js +4 -3
- package/bin/node/yad.js +4 -3
- package/bin/node/yaga.js +4 -3
- package/bin/node/yap.js +4 -3
- package/bin/node/yiin.js +4 -3
- package/bin/node/yls.js +4 -3
- package/bin/node/yls1.js +4 -3
- package/bin/node/ylsg.js +4 -3
- package/bin/node/ylsg1.js +4 -3
- package/bin/node/yr.js +4 -3
- package/bin/node/yrd.js +4 -3
- package/bin/node/yrin.js +4 -3
- package/bin/node/yrp.js +4 -3
- package/bin/node/yrx.js +4 -3
- package/bin/node/ys.js +4 -3
- package/bin/node/ysin.js +4 -3
- package/bin/node/ysx.js +4 -3
- package/bin/node/yt.js +4 -3
- package/bin/node/ytin.js +4 -3
- package/bin/node/ytx.js +4 -3
- package/bin/node/yua.js +4 -3
- package/bin/node/yud.js +4 -3
- package/bin/node/yup.js +4 -3
- package/lib/alias-scripts/g-pick-branch.js +4 -2
- package/lib/alias-scripts/g-pick-commit.js +4 -2
- package/lib/alias-scripts/gcoghpr.js +5 -2
- package/lib/alias-scripts/nvu.js +19 -17
- package/lib/alias.js +1 -2
- package/lib/constants.js +8 -4
- package/lib/helper.js +2 -2
- package/package.json +2 -2
package/bin/node/yls1.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn list --depth=1 $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/ylsg.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn global list --depth=0 $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/ylsg1.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn global list --depth=1 $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/yr.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn run $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/yrd.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn remove $* --dev';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/yrin.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn --cwd=$1 run $2*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/yrp.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn remove $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/yrx.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn run $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {"suppressTbj":true}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/ys.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn start $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/ysin.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn --cwd=$1 start $2*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/ysx.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn start $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {"suppressTbj":true}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/yt.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn test $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/ytin.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn --cwd=$1 test $2*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/ytx.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'yarn test $*';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {"suppressTbj":true}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/yua.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'node --eval "/* Update dependencies. */ const deps = Object.keys(require(\'./package.json\').dependencies || {}).map(x => x + \'@latest\'); const cmd = \'yap \' + deps.join(\' \'); console.log(\'\\nUpdating \' + deps.length + \' dependencies...\'); console.log(\' Command: \' + cmd); deps.length && child_process.execSync(cmd, {shell: true, stdio: \'inherit\'});" && node --eval "/* Update devDependencies. */ const deps = Object.keys(require(\'./package.json\').devDependencies || {}).map(x => x + \'@latest\'); const cmd = \'yad \' + deps.join(\' \'); console.log(\'\\nUpdating \' + deps.length + \' devDependencies...\'); console.log(\' Command: \' + cmd); deps.length && child_process.execSync(cmd, {shell: true, stdio: \'inherit\'});"';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/yud.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'node --eval "/* Update devDependencies. */ const deps = Object.keys(require(\'./package.json\').devDependencies || {}).map(x => x + \'@latest\'); const cmd = \'yad \' + deps.join(\' \'); console.log(\'\\nUpdating \' + deps.length + \' devDependencies...\'); console.log(\' Command: \' + cmd); deps.length && child_process.execSync(cmd, {shell: true, stdio: \'inherit\'});"';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
package/bin/node/yup.js
CHANGED
|
@@ -5,7 +5,8 @@ import {isMain, onError} from '../../lib/utils.js';
|
|
|
5
5
|
const cmd = 'node --eval "/* Update dependencies. */ const deps = Object.keys(require(\'./package.json\').dependencies || {}).map(x => x + \'@latest\'); const cmd = \'yap \' + deps.join(\' \'); console.log(\'\\nUpdating \' + deps.length + \' dependencies...\'); console.log(\' Command: \' + cmd); deps.length && child_process.execSync(cmd, {shell: true, stdio: \'inherit\'});"';
|
|
6
6
|
export default cmd;
|
|
7
7
|
if (isMain(import.meta.url)) {
|
|
8
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
-
// eslint-disable-next-line quotes
|
|
10
|
-
|
|
8
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
9
|
+
// eslint-disable-next-line max-len, quotes
|
|
10
|
+
const config = Object.assign({sapVersion: 2}, {}, runtimeConfig);
|
|
11
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
11
12
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Imports
|
|
2
2
|
import {commandUtils, processUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
|
|
4
|
+
import {DEF_SAP_VERSION} from '../constants.js';
|
|
4
5
|
import {importWithEnv} from '../utils.js';
|
|
5
6
|
|
|
6
7
|
|
|
@@ -41,7 +42,7 @@ export {
|
|
|
41
42
|
|
|
42
43
|
// Helpers
|
|
43
44
|
async function _gPickBranch(runtimeArgs = [], config = {}) {
|
|
44
|
-
const gbConfig = Object.assign({}, config, {returnOutput: true});
|
|
45
|
+
const gbConfig = Object.assign({sapVersion: DEF_SAP_VERSION}, config, {returnOutput: true});
|
|
45
46
|
const branchType = runtimeArgs.includes('--remote') ? 'remote' : 'local';
|
|
46
47
|
|
|
47
48
|
if (config.dryrun) {
|
|
@@ -70,7 +71,7 @@ function main(runtimeArgs, config) {
|
|
|
70
71
|
|
|
71
72
|
async function pickBranch(branchType, branches) {
|
|
72
73
|
// Ensure colors are always used (even when running with `returnOutput: <number>`).
|
|
73
|
-
const {default: select, Separator} = await importWithEnv(() => import('@inquirer/select'), {FORCE_COLOR: '
|
|
74
|
+
const {default: select, Separator} = await importWithEnv(() => import('@inquirer/select'), {FORCE_COLOR: '3'});
|
|
74
75
|
|
|
75
76
|
const currentBranchIdx = Math.max(0, branches.findIndex(({name}) => name.endsWith(branchNameSuffices['*'])));
|
|
76
77
|
|
|
@@ -98,6 +99,7 @@ async function pickBranch(branchType, branches) {
|
|
|
98
99
|
err.message.startsWith('User force closed the prompt')
|
|
99
100
|
) {
|
|
100
101
|
process.stderr.write('Aborted by user.\n');
|
|
102
|
+
process.exit(1);
|
|
101
103
|
} else {
|
|
102
104
|
throw err;
|
|
103
105
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Imports
|
|
2
2
|
import {commandUtils, processUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
|
|
4
|
+
import {DEF_SAP_VERSION} from '../constants.js';
|
|
4
5
|
import {importWithEnv} from '../utils.js';
|
|
5
6
|
|
|
6
7
|
|
|
@@ -36,7 +37,7 @@ export {
|
|
|
36
37
|
// Helpers
|
|
37
38
|
async function _gPickCommit(runtimeArgs = [], config = {}) {
|
|
38
39
|
const maxCommits = 50;
|
|
39
|
-
const glConfig = Object.assign({}, config, {returnOutput: true});
|
|
40
|
+
const glConfig = Object.assign({sapVersion: DEF_SAP_VERSION}, config, {returnOutput: true});
|
|
40
41
|
let glCmd = 'git log --oneline';
|
|
41
42
|
|
|
42
43
|
const filterCommitsPattern =
|
|
@@ -76,7 +77,7 @@ function main(runtimeArgs, config) {
|
|
|
76
77
|
|
|
77
78
|
async function pickCommit(commitsStr) {
|
|
78
79
|
// Ensure colors are always used (even when running with `returnOutput: <number>`).
|
|
79
|
-
const {default: select, Separator} = await importWithEnv(() => import('@inquirer/select'), {FORCE_COLOR: '
|
|
80
|
+
const {default: select, Separator} = await importWithEnv(() => import('@inquirer/select'), {FORCE_COLOR: '3'});
|
|
80
81
|
|
|
81
82
|
const commits = commitsStr.
|
|
82
83
|
split('\n').
|
|
@@ -109,6 +110,7 @@ async function pickCommit(commitsStr) {
|
|
|
109
110
|
err.message.startsWith('User force closed the prompt')
|
|
110
111
|
) {
|
|
111
112
|
process.stderr.write('Aborted by user.\n');
|
|
113
|
+
process.exit(1);
|
|
112
114
|
} else {
|
|
113
115
|
throw err;
|
|
114
116
|
}
|
|
@@ -7,7 +7,7 @@ import {createInterface} from 'node:readline';
|
|
|
7
7
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
8
8
|
import chalk from 'chalk';
|
|
9
9
|
|
|
10
|
-
import {ALIASES, PR_LOCAL_BRANCH_PREFIX, PR_REMOTE_ALIAS_PREFIX, VERSION_STAMP} from '../constants.js';
|
|
10
|
+
import {ALIASES, DEF_SAP_VERSION, PR_LOCAL_BRANCH_PREFIX, PR_REMOTE_ALIAS_PREFIX, VERSION_STAMP} from '../constants.js';
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
// Constants
|
|
@@ -121,7 +121,10 @@ class Gcoghpr {
|
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
const executor = new internal._Executor(
|
|
124
|
+
const executor = new internal._Executor(
|
|
125
|
+
this._logger,
|
|
126
|
+
Object.assign({sapVersion: DEF_SAP_VERSION}, config),
|
|
127
|
+
config.debug);
|
|
125
128
|
const {prId = null} = this._validateInput(runtimeArgs);
|
|
126
129
|
|
|
127
130
|
if (prId === null) {
|
package/lib/alias-scripts/nvu.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
|
|
5
|
-
import {ALIASES} from '../constants.js';
|
|
5
|
+
import {ALIASES, DEF_SAP_VERSION} from '../constants.js';
|
|
6
6
|
import {getPlatform, stripIndentation} from '../utils.js';
|
|
7
7
|
|
|
8
8
|
|
|
@@ -55,25 +55,27 @@ export {
|
|
|
55
55
|
|
|
56
56
|
// Helpers
|
|
57
57
|
async function _nvu(runtimeArgs, config) {
|
|
58
|
-
const
|
|
59
|
-
const nvmRuntimeArgs = runtimeArgs.slice(1);
|
|
60
|
-
const buildCmd = getBuildCmdFn(getPlatform(), config.dryrun);
|
|
58
|
+
const cmdConfig = Object.assign({sapVersion: DEF_SAP_VERSION}, config);
|
|
61
59
|
|
|
62
|
-
const
|
|
60
|
+
const nodeBranch = runtimeArgs[0];
|
|
61
|
+
const cmdRuntimeArgs = runtimeArgs.slice(1);
|
|
62
|
+
const buildCmd = getBuildCmdFn(getPlatform(), cmdConfig.dryrun);
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
const cmd = await buildCmd(nodeBranch, cmdRuntimeArgs, cmdConfig);
|
|
65
|
+
|
|
66
|
+
if (cmdConfig.dryrun) {
|
|
65
67
|
console.log(cmd);
|
|
66
68
|
return;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
return commandUtils.run(cmd,
|
|
71
|
+
return commandUtils.run(cmd, cmdRuntimeArgs, cmdConfig);
|
|
70
72
|
}
|
|
71
73
|
|
|
72
|
-
async function buildCmdDefault(
|
|
74
|
+
async function buildCmdDefault(nodeBranch, runtimeArgs) {
|
|
73
75
|
const hasChainedCmd = runtimeArgs.indexOf('&&') !== -1;
|
|
74
76
|
|
|
75
|
-
const nvuCmd = `nvu ${
|
|
76
|
-
const nvmCmd = `nvm use ${
|
|
77
|
+
const nvuCmd = `nvu ${nodeBranch} "&&" <some-command>`;
|
|
78
|
+
const nvmCmd = `nvm use ${nodeBranch}`;
|
|
77
79
|
let warnCmd = '';
|
|
78
80
|
|
|
79
81
|
if (!hasChainedCmd) {
|
|
@@ -96,21 +98,21 @@ async function buildCmdDefault(branch, runtimeArgs) {
|
|
|
96
98
|
return `${warnCmd}. $NVM_DIR/nvm.sh && ${nvmCmd} $*`;
|
|
97
99
|
}
|
|
98
100
|
|
|
99
|
-
async function buildCmdDryrun(platform,
|
|
100
|
-
const getVersionArgs = (platform === PLATFORM_WINDOWS) ? `${
|
|
101
|
+
async function buildCmdDryrun(platform, nodeBranch, runtimeArgs) {
|
|
102
|
+
const getVersionArgs = (platform === PLATFORM_WINDOWS) ? `${nodeBranch}, {{nvls}}` : nodeBranch;
|
|
101
103
|
const getVersionSubCmd = `getVersion(${getVersionArgs})`;
|
|
102
104
|
|
|
103
|
-
return `nvm use {{${getVersionSubCmd}}} ${
|
|
105
|
+
return `nvm use {{${getVersionSubCmd}}} ${runtimeArgs.join(' ')}`.trim();
|
|
104
106
|
}
|
|
105
107
|
|
|
106
|
-
async function buildCmdForWindows(
|
|
108
|
+
async function buildCmdForWindows(nodeBranch, _runtimeArgs, config) {
|
|
107
109
|
const nvlsCmd = ALIASES.node.nvls.getSpec().command;
|
|
108
110
|
const nvlsConfig = Object.assign({}, config, {returnOutput: true});
|
|
109
111
|
|
|
110
112
|
const nvlsOutput = await commandUtils.run(nvlsCmd, [], nvlsConfig);
|
|
111
113
|
|
|
112
|
-
const subVersionCount = 3 -
|
|
113
|
-
const versionRe = new RegExp(`(?:^|\\D)(${
|
|
114
|
+
const subVersionCount = 3 - nodeBranch.split('.').length;
|
|
115
|
+
const versionRe = new RegExp(`(?:^|\\D)(${nodeBranch}(?:\\.\\d+){${subVersionCount}})`);
|
|
114
116
|
const versionArr = nvlsOutput.
|
|
115
117
|
split('\n').
|
|
116
118
|
map(line => versionRe.exec(line)).
|
|
@@ -120,7 +122,7 @@ async function buildCmdForWindows(branch, _runtimeArgs, config) {
|
|
|
120
122
|
pop();
|
|
121
123
|
|
|
122
124
|
if (!versionArr) {
|
|
123
|
-
throw new Error(`No installed Node.js version found for '${
|
|
125
|
+
throw new Error(`No installed Node.js version found for '${nodeBranch}'.`);
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
return `nvm use ${versionArr.join('.')} $*`;
|
package/lib/alias.js
CHANGED
|
@@ -69,8 +69,7 @@ class AliasSpecDefault extends AliasSpec {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
constructor(command/* string */, config/*? IRunConfig */) {
|
|
72
|
-
const
|
|
73
|
-
const code = AliasSpecDefault.DEF_CODE(command, augmentedConfig);
|
|
72
|
+
const code = AliasSpecDefault.DEF_CODE(command, config);
|
|
74
73
|
|
|
75
74
|
super(code, command);
|
|
76
75
|
this.command = command;
|
package/lib/constants.js
CHANGED
|
@@ -14,6 +14,8 @@ const BIN_DIR = join(ROOT_DIR, 'bin');
|
|
|
14
14
|
const __pkg = loadJson(join(ROOT_DIR, 'package.json'));
|
|
15
15
|
const VERSION_STAMP = `${__pkg.name} v${__pkg.version}`;
|
|
16
16
|
|
|
17
|
+
const DEF_SAP_VERSION = 2;
|
|
18
|
+
|
|
17
19
|
const PR_REMOTE_ALIAS_PREFIX = 'gcoghpr';
|
|
18
20
|
const PR_LOCAL_BRANCH_PREFIX = 'gcoghpr';
|
|
19
21
|
|
|
@@ -44,7 +46,7 @@ const DESC_REPLACEMENTS = {
|
|
|
44
46
|
'::__g-pick-commit --filter-commits="$1" --gkcu-returnOutput=1': '(interactively pick a filtered commit)',
|
|
45
47
|
};
|
|
46
48
|
|
|
47
|
-
const DEF_CODE = AliasSpecDefault.DEF_CODE = (cmd,
|
|
49
|
+
const DEF_CODE = AliasSpecDefault.DEF_CODE = (cmd, preConfig = {}) => stripIndentation(`
|
|
48
50
|
#!/usr/bin/env node
|
|
49
51
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
50
52
|
import {isMain, onError} from '../../lib/utils.js';
|
|
@@ -52,9 +54,10 @@ const DEF_CODE = AliasSpecDefault.DEF_CODE = (cmd, cfg = {}) => stripIndentation
|
|
|
52
54
|
const cmd = '${cmd.replace(/'/g, '\\\'')}';
|
|
53
55
|
export default cmd;
|
|
54
56
|
if (isMain(import.meta.url)) {
|
|
55
|
-
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
56
|
-
// eslint-disable-next-line quotes
|
|
57
|
-
|
|
57
|
+
const {args, config: runtimeConfig} = commandUtils.preprocessArgs(process.argv.slice(2));
|
|
58
|
+
// eslint-disable-next-line max-len, quotes
|
|
59
|
+
const config = Object.assign({sapVersion: ${DEF_SAP_VERSION}}, ${JSON.stringify(preConfig)}, runtimeConfig);
|
|
60
|
+
commandUtils.run(cmd, args, config).catch(onError);
|
|
58
61
|
}
|
|
59
62
|
`);
|
|
60
63
|
|
|
@@ -686,6 +689,7 @@ export {
|
|
|
686
689
|
ALIASES,
|
|
687
690
|
BIN_DIR,
|
|
688
691
|
DEF_CODE,
|
|
692
|
+
DEF_SAP_VERSION,
|
|
689
693
|
PR_REMOTE_ALIAS_PREFIX,
|
|
690
694
|
PR_LOCAL_BRANCH_PREFIX,
|
|
691
695
|
ROOT_DIR,
|
package/lib/helper.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
|
|
4
4
|
import {AliasUnknown} from './alias.js';
|
|
5
|
-
import {ALIASES, getDescReplacements, VERSION_STAMP} from './constants.js';
|
|
5
|
+
import {ALIASES, DEF_SAP_VERSION, getDescReplacements, VERSION_STAMP} from './constants.js';
|
|
6
6
|
import {capitalize, hasOwnProperty, onError, padRight, wrapLine} from './utils.js';
|
|
7
7
|
|
|
8
8
|
|
|
@@ -158,7 +158,7 @@ async function help(...names) {
|
|
|
158
158
|
'All aliases also accept the following arguments:',
|
|
159
159
|
'--gkcu-debug: Produce verbose, debug-friendly output.',
|
|
160
160
|
'--gkcu-dryrun: Print the command instead of actually running it. (Still experimental.)',
|
|
161
|
-
|
|
161
|
+
`--gkcu-sapVersion: Choose a different implementation for the command runner. (Default: ${DEF_SAP_VERSION})`,
|
|
162
162
|
'--gkcu-suppressTbj: Suppress the "Terminate batch job (Y/N)?" confirmation on Windows. (Still experimental.)',
|
|
163
163
|
' Does not work with certain types of commands (e.g. `vim`).',
|
|
164
164
|
'',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gkalpak/aliases",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "My global aliases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Utility"
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
}
|
|
200
200
|
},
|
|
201
201
|
"dependencies": {
|
|
202
|
-
"@gkalpak/cli-utils": "^0.3.
|
|
202
|
+
"@gkalpak/cli-utils": "^0.3.2",
|
|
203
203
|
"@inquirer/select": "^5.1.0",
|
|
204
204
|
"chalk": "^5.6.2",
|
|
205
205
|
"is-wsl": "^3.1.1"
|