@gkalpak/aliases 0.9.4 → 0.10.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.
Files changed (162) hide show
  1. package/README.md +4 -4
  2. package/bin/aio/__a-builds-dir.js +5 -7
  3. package/bin/aio/aioall.js +5 -5
  4. package/bin/aio/aioatt.js +5 -5
  5. package/bin/aio/aiobd.js +5 -5
  6. package/bin/aio/aiord.js +5 -5
  7. package/bin/aio/aiorm.js +5 -5
  8. package/bin/config/cfgbash.js +3 -4
  9. package/bin/config/cfgbash.wsl.js +3 -4
  10. package/bin/config/cfggit.js +3 -4
  11. package/bin/config/cfggit.wsl.js +4 -5
  12. package/bin/config/cfgvim.js +5 -3
  13. package/bin/docker/dkrall.js +5 -5
  14. package/bin/docker/dkratt.js +5 -5
  15. package/bin/docker/dkrbd.js +5 -5
  16. package/bin/docker/dkrrd.js +5 -5
  17. package/bin/docker/dkrrm.js +5 -5
  18. package/bin/git/__g-pick-branch.js +5 -7
  19. package/bin/git/__g-pick-commit.js +5 -7
  20. package/bin/git/gaa.js +5 -5
  21. package/bin/git/gb.js +5 -5
  22. package/bin/git/gbc.js +5 -5
  23. package/bin/git/gbcm.js +5 -5
  24. package/bin/git/gbd.js +5 -5
  25. package/bin/git/gcl.js +5 -5
  26. package/bin/git/gcm.js +5 -5
  27. package/bin/git/gcma.js +5 -5
  28. package/bin/git/gcmane.js +5 -5
  29. package/bin/git/gcmf.js +5 -5
  30. package/bin/git/gcmfc.js +5 -5
  31. package/bin/git/gcmfs.js +5 -5
  32. package/bin/git/gcmi.js +5 -5
  33. package/bin/git/gcmia.js +5 -5
  34. package/bin/git/gcmiane.js +5 -5
  35. package/bin/git/gcmif.js +5 -5
  36. package/bin/git/gcmifc.js +5 -5
  37. package/bin/git/gcmifs.js +5 -5
  38. package/bin/git/gco.js +5 -5
  39. package/bin/git/gcoghpr-cleanup.js +5 -5
  40. package/bin/git/gcoghpr.js +5 -7
  41. package/bin/git/gcom.js +5 -5
  42. package/bin/git/gcopr.js +5 -5
  43. package/bin/git/gcp.js +5 -5
  44. package/bin/git/gcpa.js +5 -5
  45. package/bin/git/gcpc.js +5 -5
  46. package/bin/git/gcpx.js +5 -5
  47. package/bin/git/gcpxl.js +5 -5
  48. package/bin/git/gd.js +5 -5
  49. package/bin/git/gd1.js +5 -5
  50. package/bin/git/gdefb.js +5 -5
  51. package/bin/git/gdh.js +5 -5
  52. package/bin/git/gdn.js +5 -5
  53. package/bin/git/gdn1.js +5 -5
  54. package/bin/git/gdnh.js +5 -5
  55. package/bin/git/gl.js +5 -5
  56. package/bin/git/gl1.js +5 -5
  57. package/bin/git/gl1g.js +5 -5
  58. package/bin/git/gmt.js +5 -5
  59. package/bin/git/gngprh.js +5 -5
  60. package/bin/git/gngprm.js +5 -5
  61. package/bin/git/gp.js +5 -5
  62. package/bin/git/gp1.js +5 -5
  63. package/bin/git/gpf.js +5 -5
  64. package/bin/git/gpr.js +5 -5
  65. package/bin/git/gpro.js +5 -5
  66. package/bin/git/gprom.js +5 -5
  67. package/bin/git/gpru.js +5 -5
  68. package/bin/git/gprum.js +5 -5
  69. package/bin/git/grb.js +5 -5
  70. package/bin/git/grba.js +5 -5
  71. package/bin/git/grbc.js +5 -5
  72. package/bin/git/grbi.js +5 -5
  73. package/bin/git/grbia.js +5 -5
  74. package/bin/git/grbin.js +5 -5
  75. package/bin/git/grbm.js +5 -5
  76. package/bin/git/grs.js +5 -5
  77. package/bin/git/grs1.js +5 -5
  78. package/bin/git/gs.js +5 -5
  79. package/bin/git/gsh.js +5 -5
  80. package/bin/git/gshn.js +5 -5
  81. package/bin/git/gst.js +5 -5
  82. package/bin/git/gstk.js +5 -5
  83. package/bin/git/gstl.js +5 -5
  84. package/bin/git/gstp.js +5 -5
  85. package/bin/git/gsync.js +5 -5
  86. package/bin/misc/alv.js +1 -2
  87. package/bin/misc/halp.js +2 -2
  88. package/bin/misc/ll.darwin.js +5 -5
  89. package/bin/misc/ll.js +5 -5
  90. package/bin/misc/lla.darwin.js +5 -5
  91. package/bin/misc/lla.js +5 -5
  92. package/bin/misc/osv.darwin.js +5 -5
  93. package/bin/misc/osv.js +5 -5
  94. package/bin/misc/osv.win32.js +5 -5
  95. package/bin/misc/salfup.js +5 -5
  96. package/bin/node/nad.js +5 -5
  97. package/bin/node/naga.js +5 -5
  98. package/bin/node/nap.js +5 -5
  99. package/bin/node/niin.js +5 -5
  100. package/bin/node/nls.js +5 -5
  101. package/bin/node/nls1.js +5 -5
  102. package/bin/node/nlsg.js +5 -5
  103. package/bin/node/nlsg1.js +5 -5
  104. package/bin/node/nr.js +5 -5
  105. package/bin/node/nrd.js +5 -5
  106. package/bin/node/nrin.js +5 -5
  107. package/bin/node/nrp.js +5 -5
  108. package/bin/node/nrx.js +5 -5
  109. package/bin/node/ns.js +5 -5
  110. package/bin/node/nsin.js +5 -5
  111. package/bin/node/nsx.js +5 -5
  112. package/bin/node/nt.js +5 -5
  113. package/bin/node/ntin.js +5 -5
  114. package/bin/node/ntx.js +5 -5
  115. package/bin/node/nua.js +5 -5
  116. package/bin/node/nud.js +5 -5
  117. package/bin/node/nup.js +5 -5
  118. package/bin/node/nv.js +5 -5
  119. package/bin/node/nvls.js +5 -5
  120. package/bin/node/nvls.win32.js +5 -5
  121. package/bin/node/nvlsa.js +5 -5
  122. package/bin/node/nvlsa.win32.js +5 -5
  123. package/bin/node/nvmup.js +5 -5
  124. package/bin/node/nvmup.win32.js +5 -5
  125. package/bin/node/nvu.js +5 -7
  126. package/bin/node/srv.js +5 -5
  127. package/bin/node/srvw.js +5 -5
  128. package/bin/node/yad.js +5 -5
  129. package/bin/node/yaga.js +5 -5
  130. package/bin/node/yap.js +5 -5
  131. package/bin/node/yiin.js +5 -5
  132. package/bin/node/yls.js +5 -5
  133. package/bin/node/yls1.js +5 -5
  134. package/bin/node/ylsg.js +5 -5
  135. package/bin/node/ylsg1.js +5 -5
  136. package/bin/node/yr.js +5 -5
  137. package/bin/node/yrd.js +5 -5
  138. package/bin/node/yrin.js +5 -5
  139. package/bin/node/yrp.js +5 -5
  140. package/bin/node/yrx.js +5 -5
  141. package/bin/node/ys.js +5 -5
  142. package/bin/node/ysin.js +5 -5
  143. package/bin/node/ysx.js +5 -5
  144. package/bin/node/yt.js +5 -5
  145. package/bin/node/ytin.js +5 -5
  146. package/bin/node/ytx.js +5 -5
  147. package/bin/node/yua.js +5 -5
  148. package/bin/node/yud.js +5 -5
  149. package/bin/node/yup.js +5 -5
  150. package/lib/alias-scripts/a-builds-dir.js +65 -45
  151. package/lib/alias-scripts/g-pick-branch.js +44 -25
  152. package/lib/alias-scripts/g-pick-commit.js +44 -25
  153. package/lib/alias-scripts/gcoghpr.js +182 -195
  154. package/lib/alias-scripts/nvu.js +57 -49
  155. package/lib/alias.js +4 -5
  156. package/lib/constants.js +68 -47
  157. package/lib/helper.js +96 -88
  158. package/lib/utils.js +113 -58
  159. package/package.json +8 -6
  160. package/scripts/build.js +11 -10
  161. package/scripts/platformize-bin.js +7 -7
  162. package/scripts/test-pkg.js +14 -12
package/bin/node/nrx.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'npm run $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'npm run $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2,"suppressTbj":true}, config)).catch(onError);
package/bin/node/ns.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'npm start $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'npm start $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/nsin.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'npm --prefix=$1 start $2*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'npm --prefix=$1 start $2*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/nsx.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'npm start $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'npm start $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2,"suppressTbj":true}, config)).catch(onError);
package/bin/node/nt.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'npm test $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'npm test $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/ntin.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'npm --prefix=$1 test $2*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'npm --prefix=$1 test $2*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/ntx.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'npm test $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'npm test $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2,"suppressTbj":true}, config)).catch(onError);
package/bin/node/nua.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'node --eval "/* Update dependencies. */ const deps = Object.keys(require(\'./package.json\').dependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' dependencies...\'); deps.length && child_process.spawnSync(\'nap\', deps, {shell: true, stdio: \'inherit\'});" && node --eval "/* Update devDependencies. */ const deps = Object.keys(require(\'./package.json\').devDependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' devDependencies...\'); deps.length && child_process.spawnSync(\'nad\', deps, {shell: true, stdio: \'inherit\'});"';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'node --eval "/* Update dependencies. */ const deps = Object.keys(require(\'./package.json\').dependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' dependencies...\'); deps.length && child_process.spawnSync(\'nap\', deps, {shell: true, stdio: \'inherit\'});" && node --eval "/* Update devDependencies. */ const deps = Object.keys(require(\'./package.json\').devDependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' devDependencies...\'); deps.length && child_process.spawnSync(\'nad\', deps, {shell: true, stdio: \'inherit\'});"';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/nud.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'node --eval "/* Update devDependencies. */ const deps = Object.keys(require(\'./package.json\').devDependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' devDependencies...\'); deps.length && child_process.spawnSync(\'nad\', deps, {shell: true, stdio: \'inherit\'});"';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'node --eval "/* Update devDependencies. */ const deps = Object.keys(require(\'./package.json\').devDependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' devDependencies...\'); deps.length && child_process.spawnSync(\'nad\', deps, {shell: true, stdio: \'inherit\'});"';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/nup.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'node --eval "/* Update dependencies. */ const deps = Object.keys(require(\'./package.json\').dependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' dependencies...\'); deps.length && child_process.spawnSync(\'nap\', deps, {shell: true, stdio: \'inherit\'});"';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'node --eval "/* Update dependencies. */ const deps = Object.keys(require(\'./package.json\').dependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' dependencies...\'); deps.length && child_process.spawnSync(\'nap\', deps, {shell: true, stdio: \'inherit\'});"';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/nv.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'node --version';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'node --version';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/nvls.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = '. $NVM_DIR/nvm.sh && nvm use ${0:::node --version} --silent && nvm list $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = '. $NVM_DIR/nvm.sh && nvm use ${0:::node --version} --silent && nvm list $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'nvm list $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'nvm list $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/nvlsa.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = '. $NVM_DIR/nvm.sh && nvm use ${0:::node --version} --silent && nvm list-remote $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = '. $NVM_DIR/nvm.sh && nvm use ${0:::node --version} --silent && nvm list-remote $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'nvm list available $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'nvm list available $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/nvmup.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'node --eval "/* NVM update instructions */ (async () => { try { const currentVersion = require(\'child_process\').execSync(\'. $NVM_DIR/nvm.sh && nvm --version\', {encoding: \'utf8\', shell: true}).trim(); const latestVersion = await new Promise((resolve, reject) => require(\'https\').get(\'https://api.github.com/repos/nvm-sh/nvm/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 = \'Run: \\\'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v{{version}}/install.sh | bash\\\' (or \\\'wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v{{version}}/install.sh | bash\\\')\'; console.log(\'Current version: \' + currentVersion); console.log(\'Latest version: \' + latestVersion); console.log(\'\\n \' + message); console.log(\'\\nUpdate instructions (https://github.com/nvm-sh/nvm#install--update-script):\'); console.log(\' \' + escapedInstructionsTmpl.split(\'{{version}}\').join(latestVersion)); } catch (err) { console.error(\'ERROR:\', err); process.exit(1); } })();"';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'node --eval "/* NVM update instructions */ (async () => { try { const currentVersion = require(\'child_process\').execSync(\'. $NVM_DIR/nvm.sh && nvm --version\', {encoding: \'utf8\', shell: true}).trim(); const latestVersion = await new Promise((resolve, reject) => require(\'https\').get(\'https://api.github.com/repos/nvm-sh/nvm/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 = \'Run: \\\'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v{{version}}/install.sh | bash\\\' (or \\\'wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v{{version}}/install.sh | bash\\\')\'; console.log(\'Current version: \' + currentVersion); console.log(\'Latest version: \' + latestVersion); console.log(\'\\n \' + message); console.log(\'\\nUpdate instructions (https://github.com/nvm-sh/nvm#install--update-script):\'); console.log(\' \' + escapedInstructionsTmpl.split(\'{{version}}\').join(latestVersion)); } catch (err) { console.error(\'ERROR:\', err); process.exit(1); } })();"';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = '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, unzip and run: https://github.com/coreybutler/nvm-windows/releases/download/{{version}}/nvm-setup.zip\'; 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); } })();"';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
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, unzip and run: https://github.com/coreybutler/nvm-windows/releases/download/{{version}}/nvm-setup.zip\'; 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
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/nvu.js CHANGED
@@ -1,11 +1,9 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
3
- module.exports = 'nvm use $*';
4
- if (require.main === module) {
5
- const {commandUtils} = require('@gkalpak/cli-utils');
6
- const {onError} = require('../../lib/utils');
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {main} from '../../lib/alias-scripts/nvu.js';
4
+ import {isMain, onError} from '../../lib/utils.js';
5
+ export default 'nvm use $*';
6
+ if (isMain(import.meta.url)) {
7
7
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
8
-
9
- const {main} = require('../../lib/alias-scripts/nvu');
10
8
  main(args, config).catch(onError);
11
9
  }
package/bin/node/srv.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'http-server "${1:.}" --port="4000" $2*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'http-server "${1:.}" --port="4000" $2*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/srvw.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'light-server --bind="localhost" --historyindex="/index.html" --serve="${1:.}" --watchexp="${1:.}/**" $2*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'light-server --bind="localhost" --historyindex="/index.html" --serve="${1:.}" --watchexp="${1:.}/**" $2*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2,"suppressTbj":true}, config)).catch(onError);
package/bin/node/yad.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn add $* --dev';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn add $* --dev';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/yaga.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn global add @angular/cli @gkalpak/aliases @gkalpak/cli-utils @gkalpak/ng-maintain csslint eslint firebase-tools grunt-cli gulp-cli http-server light-server shx typescript typescript-run watch $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn global add @angular/cli @gkalpak/aliases @gkalpak/cli-utils @gkalpak/ng-maintain csslint eslint firebase-tools grunt-cli gulp-cli http-server light-server shx typescript typescript-run watch $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/yap.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn add $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn add $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/yiin.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn --cwd=$1 install $2*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn --cwd=$1 install $2*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/yls.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn list --depth=0 $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn list --depth=0 $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/yls1.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn list --depth=1 $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn list --depth=1 $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/ylsg.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn global list --depth=0 $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn global list --depth=0 $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/ylsg1.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn global list --depth=1 $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn global list --depth=1 $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/yr.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn run $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn run $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/yrd.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn remove $* --dev';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn remove $* --dev';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/yrin.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn --cwd=$1 run $2*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn --cwd=$1 run $2*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/yrp.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn remove $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn remove $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);
package/bin/node/yrx.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn run $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn run $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2,"suppressTbj":true}, config)).catch(onError);
package/bin/node/ys.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
2
+ import {commandUtils} from '@gkalpak/cli-utils';
3
+ import {isMain, onError} from '../../lib/utils.js';
3
4
  // eslint-disable-next-line max-len
4
- const cmd = module.exports = 'yarn start $*';
5
- if (require.main === module) {
6
- const {commandUtils} = require('@gkalpak/cli-utils');
7
- const {onError} = require('../../lib/utils');
5
+ const cmd = 'yarn start $*';
6
+ export default cmd;
7
+ if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
9
9
  // eslint-disable-next-line quotes
10
10
  commandUtils.run(cmd, args, Object.assign({"sapVersion":2}, config)).catch(onError);