@gkalpak/aliases 0.11.1 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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.11.1]
5
+ ### [Generated by: @gkalpak/aliases v0.12.1]
6
6
  ### Copy the following into '~/.bashrc':
7
7
 
8
8
  # Set up prompt.
@@ -2,7 +2,7 @@
2
2
  import {stripIndentation} from '../../lib/utils.js';
3
3
  /* eslint-disable max-len */
4
4
  console.log(stripIndentation(`
5
- ### [Generated by: @gkalpak/aliases v0.11.1]
5
+ ### [Generated by: @gkalpak/aliases v0.12.1]
6
6
  ### Copy the following into '~/.bashrc':
7
7
 
8
8
  # Set up prompt.
@@ -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.11.1]
4
+ ### [Generated by: @gkalpak/aliases v0.12.1]
5
5
  ### Run the following commands:
6
6
 
7
7
  git config --global commit.gpgSign true
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {stripIndentation} from '../../lib/utils.js';
3
3
  console.log(stripIndentation(`
4
- ### [Generated by: @gkalpak/aliases v0.11.1]
4
+ ### [Generated by: @gkalpak/aliases v0.12.1]
5
5
  ### Run the following commands:
6
6
 
7
7
  git config --global commit.gpgSign true
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {stripIndentation} from '../../lib/utils.js';
3
3
  console.log(stripIndentation(`
4
- ### [Generated by: @gkalpak/aliases v0.11.1]
4
+ ### [Generated by: @gkalpak/aliases v0.12.1]
5
5
  ### Run the following commands:
6
6
 
7
7
  git config --global commit.gpgSign true
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {stripIndentation} from '../../lib/utils.js';
3
3
  console.log(stripIndentation(`
4
- ### [Generated by: @gkalpak/aliases v0.11.1]
4
+ ### [Generated by: @gkalpak/aliases v0.12.1]
5
5
  ### Copy the following into '~/.gnupg/gpg-agent.conf':
6
6
 
7
7
  default-cache-ttl 86400
@@ -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.11.1]
4
+ ### [Generated by: @gkalpak/aliases v0.12.1]
5
5
  ### Copy the following into '~/.ssh/config':
6
6
 
7
7
  IdentityFile ~/.ssh/id-rsa-gkalpak.ppk
@@ -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.11.1]');
5
+ console.log('""" [Generated by: @gkalpak/aliases v0.12.1]');
6
6
  console.log('""" Copy the following into \'~/.vimrc\':\n');
7
7
  console.log(readFileSync(`${__dirname}/../../lib/assets/vimrc.txt`, 'utf8').trim() + '\n');
@@ -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.11.1]
4
+ ### [Generated by: @gkalpak/aliases v0.12.1]
5
5
  ### Copy the following into a root-owned, 600-mode '/etc/resolv.conf' file:
6
6
 
7
7
  # Cloudflare
@@ -14,7 +14,7 @@ console.log(stripIndentation(`
14
14
 
15
15
  -----
16
16
 
17
- ### [Generated by: @gkalpak/aliases v0.11.1]
17
+ ### [Generated by: @gkalpak/aliases v0.12.1]
18
18
  ### Copy the following into a root-owned, 600-mode '/etc/wsl.conf' file:
19
19
 
20
20
  [network]
@@ -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 --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} -b $1 && git config branch.$1.remote origin && git config branch.$1.merge refs/heads/$1';
6
+ 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
+ }
@@ -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 --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} $*';
6
+ 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 show-ref --heads --quiet master && echo master) || (git show-ref --heads --quiet main && echo main) || echo unknown-branch';
5
+ const cmd = 'node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"';
6
6
  export default cmd;
7
7
  if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
@@ -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 --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} $*';
6
+ 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
+ }
@@ -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 --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} $*';
6
+ 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
+ }
@@ -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 --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} $*';
6
+ 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/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 show-ref --heads --quiet master && echo master) || (git show-ref --heads --quiet main && echo main) || echo unknown-branch} && git pull upstream ${1:::(git show-ref --heads --quiet master && echo master) || (git show-ref --heads --quiet main && echo main) || echo unknown-branch} && git push origin ${1:::(git show-ref --heads --quiet master && echo master) || (git show-ref --heads --quiet main && echo main) || echo unknown-branch}';
5
+ const cmd = 'git checkout ${1:::node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} && git pull upstream ${1:::node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"} && git push origin ${1:::node --eval "const rem = \'origin\'; const exec = cmd => child_process.execSync(cmd, {encoding: \'utf8\', stdio: \'pipe\'}); const print = msg => process.stdout.write(msg); try { print(exec(\'git rev-parse --abbrev-ref \' + rem + \'/HEAD\').trim().slice(rem.length + 1)); } catch { print(exec([\'main\', \'master\'].map(b => \'(git show-ref --heads --quiet \' + b + \' && echo \' + b + \')\').join(\' || \') + \' || echo unknown-branch\').trim()); }"}';
6
6
  export default cmd;
7
7
  if (isMain(import.meta.url)) {
8
8
  const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
package/bin/misc/alv.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- console.log('@gkalpak/aliases v0.11.1');
2
+ console.log('@gkalpak/aliases v0.12.1');
@@ -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, 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
+ 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,20 @@ 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
- `${['master', 'main'].map(b => `(git show-ref --heads --quiet ${b} && echo ${b})`).join(' || ')} || ` +
23
- 'echo unknown-branch';
22
+ stripIndentation(`
23
+ node --eval "
24
+ const rem = 'origin';
25
+ const exec = cmd => child_process.execSync(cmd, {encoding: 'utf8', stdio: 'pipe'});
26
+ const print = msg => process.stdout.write(msg);
27
+ try {
28
+ print(exec('git rev-parse --abbrev-ref ' + rem + '/HEAD').trim().slice(rem.length + 1));
29
+ } catch {
30
+ print(exec(['main', 'master'].
31
+ map(b => '(git show-ref --heads --quiet ' + b + ' && echo ' + b + ')').
32
+ join(' || ') +
33
+ ' || echo unknown-branch').trim());
34
+ }"
35
+ `).replace(/([;{+])(\n)/g, '$1 $2').replace(/\n\s*/g, '');
24
36
  const GLOBAL_NPM_PACKAGES = [
25
37
  '@angular/cli',
26
38
  '@gkalpak/aliases',
@@ -264,7 +276,7 @@ const ALIASES = {
264
276
 
265
277
  // CHECKOUT
266
278
  gco: new AliasDefault('git checkout ${*:::__g-pick-branch --gkcu-returnOutput=1}'),
267
- gcom: new AliasDefault(`git checkout \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} $*`),
279
+ gcod: new AliasDefault(`git checkout \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} $*`),
268
280
  gcopr: new AliasDefault('git fetch upstream pull/$1/head && git checkout FETCH_HEAD'),
269
281
  gcoghpr: SCRIPT_BACKED_ALIAS('gcoghpr', 'Check out a GitHub pull request as a local branch.'),
270
282
  'gcoghpr-cleanup': new AliasDefault(
@@ -300,16 +312,16 @@ const ALIASES = {
300
312
  // BRANCH
301
313
  gb: new AliasDefault('git branch $*'),
302
314
  gbc: new AliasDefault(GIT_CREATE_BRANCH_CMD('${2:HEAD}')),
303
- gbcm: new AliasDefault(GIT_CREATE_BRANCH_CMD(`\${0:::${GIT_GET_DEFAULT_BRANCH_CMD}}`)),
315
+ gbcd: new AliasDefault(GIT_CREATE_BRANCH_CMD(`\${0:::${GIT_GET_DEFAULT_BRANCH_CMD}}`)),
304
316
  gbco: new AliasDefault(`git fetch origin $1 && ${GIT_CREATE_BRANCH_CMD('origin/$1')}`),
305
317
  gbd: new AliasDefault('git branch --delete --force ${*:::__g-pick-branch --gkcu-returnOutput=1}'),
306
318
 
307
319
  // PULL(-REBASE)
308
320
  gpr: new AliasDefault('git pull --rebase $*'),
309
321
  gpro: new AliasDefault('git pull --rebase origin ${*:::git rev-parse --abbrev-ref HEAD}'),
310
- gprom: new AliasDefault(`git pull --rebase origin \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} $*`),
322
+ gprod: new AliasDefault(`git pull --rebase origin \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} $*`),
311
323
  gpru: new AliasDefault('git pull --rebase upstream ${*:::git rev-parse --abbrev-ref HEAD}'),
312
- gprum: new AliasDefault(`git pull --rebase upstream \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} $*`),
324
+ gprud: new AliasDefault(`git pull --rebase upstream \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} $*`),
313
325
 
314
326
  // SYNC DEFAULT BRANCH
315
327
  gsync: new AliasDefault(
@@ -320,12 +332,12 @@ const ALIASES = {
320
332
 
321
333
  // REBASE
322
334
  grb: new AliasDefault('git rebase ${*:::__g-pick-branch --gkcu-returnOutput=1}'),
323
- grbm: new AliasDefault(`git rebase --ignore-date \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} $*`),
335
+ grba: new AliasDefault('git rebase --abort'),
336
+ grbc: new AliasDefault('git rebase --continue'),
337
+ grbd: new AliasDefault(`git rebase --ignore-date \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} $*`),
324
338
  grbi: new AliasDefault('git rebase --interactive HEAD~$1'),
325
339
  grbia: new AliasDefault('git rebase --autosquash --interactive HEAD~$1'),
326
340
  grbin: new AliasDefault('git rebase --no-autosquash --interactive HEAD~$1'),
327
- grbc: new AliasDefault('git rebase --continue'),
328
- grba: new AliasDefault('git rebase --abort'),
329
341
  gmt: new AliasDefault('git mergetool'),
330
342
  gcl: new AliasDefault('git clean --interactive "${0:::git rev-parse --show-toplevel}"'),
331
343
 
@@ -403,8 +415,8 @@ const ALIASES = {
403
415
  'nvm version',
404
416
  'coreybutler/nvm-windows',
405
417
  'installation--upgrades',
406
- 'Download, unzip and run: ' +
407
- 'https://github.com/coreybutler/nvm-windows/releases/download/{{version}}/nvm-setup.zip',
418
+ 'Download and run: ' +
419
+ 'https://github.com/coreybutler/nvm-windows/releases/download/{{version}}/nvm-setup.exe',
408
420
  ),
409
421
  ),
410
422
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gkalpak/aliases",
3
- "version": "0.11.1",
3
+ "version": "0.12.1",
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
- "gbcm": "./bin/git/gbcm.js",
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
- "gprom": "./bin/git/gprom.js",
101
+ "gprod": "./bin/git/gprod.js",
102
102
  "gpru": "./bin/git/gpru.js",
103
- "gprum": "./bin/git/gprum.js",
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",
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/gcom.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} $*';
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
- }