@gkalpak/aliases 0.10.1 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/config/cfgbash.js +1 -1
- package/bin/config/cfgbash.wsl.js +1 -1
- package/bin/config/cfggit.js +1 -1
- package/bin/config/cfggit.win32.js +20 -0
- package/bin/config/cfggit.wsl.js +3 -3
- package/bin/config/cfgvim.js +1 -1
- package/bin/git/gbco.js +11 -0
- package/bin/misc/alv.js +1 -1
- package/bin/node/naga.js +1 -1
- package/bin/node/yaga.js +1 -1
- package/lib/constants.js +15 -13
- package/package.json +8 -7
package/bin/config/cfgbash.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
/* eslint-disable max-len */
|
|
4
4
|
console.log(stripIndentation(`
|
|
5
|
-
### [Generated by: @gkalpak/aliases v0.10.
|
|
5
|
+
### [Generated by: @gkalpak/aliases v0.10.3]
|
|
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.10.
|
|
5
|
+
### [Generated by: @gkalpak/aliases v0.10.3]
|
|
6
6
|
### Copy the following into '~/.bashrc':
|
|
7
7
|
|
|
8
8
|
# Set up prompt.
|
package/bin/config/cfggit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.10.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.10.3]
|
|
5
5
|
### Run the following commands:
|
|
6
6
|
|
|
7
7
|
git config --global commit.gpgSign true
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {stripIndentation} from '../../lib/utils.js';
|
|
3
|
+
console.log(stripIndentation(`
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.10.3]
|
|
5
|
+
### Run the following commands:
|
|
6
|
+
|
|
7
|
+
git config --global commit.gpgSign true
|
|
8
|
+
git config --global core.editor "vim"
|
|
9
|
+
git config --global credential.helper "manager"
|
|
10
|
+
git config --global merge.tool "kdiff3"
|
|
11
|
+
git config --global mergetool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"
|
|
12
|
+
git config --global mergetool.kdiff3.trustExitCode "false"
|
|
13
|
+
git config --global push.default "upstream"
|
|
14
|
+
git config --global rebase.autosquash "true"
|
|
15
|
+
git config --global rebase.autostash "true"
|
|
16
|
+
git config --global tag.gpgSign true
|
|
17
|
+
git config --global user.email "kalpakas.g@gmail.com"
|
|
18
|
+
git config --global user.name "George Kalpakas"
|
|
19
|
+
git config --global user.signingKey "0FF21FC44ECE9F07"
|
|
20
|
+
`));
|
package/bin/config/cfggit.wsl.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.10.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.10.3]
|
|
5
5
|
### Run the following commands:
|
|
6
6
|
|
|
7
7
|
git config --global commit.gpgSign true
|
|
8
8
|
git config --global core.editor "vim"
|
|
9
|
-
git config --global credential.helper "/mnt/c/Program
|
|
9
|
+
git config --global credential.helper "/mnt/c/Program Files/Git/mingw64/bin/git-credential-manager.exe"
|
|
10
10
|
git config --global merge.tool "kdiff3"
|
|
11
|
-
git config --global mergetool.kdiff3.path "/
|
|
11
|
+
git config --global mergetool.kdiff3.path "/mnt/c/Program Files/KDiff3/kdiff3.exe"
|
|
12
12
|
git config --global mergetool.kdiff3.trustExitCode "false"
|
|
13
13
|
git config --global push.default "upstream"
|
|
14
14
|
git config --global rebase.autosquash "true"
|
package/bin/config/cfgvim.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import {readFileSync} from 'node:fs';
|
|
3
3
|
import {fileURLToPath} from 'node:url';
|
|
4
4
|
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
5
|
-
console.log('""" [Generated by: @gkalpak/aliases v0.10.
|
|
5
|
+
console.log('""" [Generated by: @gkalpak/aliases v0.10.3]');
|
|
6
6
|
console.log('""" Copy the following into \'~/.vimrc\':\n');
|
|
7
7
|
console.log(readFileSync(`${__dirname}/../../lib/assets/vimrc.txt`, 'utf8').trim() + '\n');
|
package/bin/git/gbco.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
|
+
import {isMain, onError} from '../../lib/utils.js';
|
|
4
|
+
// eslint-disable-next-line max-len
|
|
5
|
+
const cmd = 'git fetch origin $1 && git checkout origin/$1 -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/misc/alv.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
console.log('@gkalpak/aliases v0.10.
|
|
2
|
+
console.log('@gkalpak/aliases v0.10.3');
|
package/bin/node/naga.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 = 'npm install --global @angular/cli @gkalpak/aliases @gkalpak/cli-utils @gkalpak/ng-maintain
|
|
5
|
+
const cmd = 'npm install --global @angular/cli @gkalpak/aliases @gkalpak/cli-utils @gkalpak/ng-maintain eslint firebase-tools http-server light-server shx typescript typescript-run watch yarn $*';
|
|
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/node/yaga.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 = 'yarn global add @angular/cli @gkalpak/aliases @gkalpak/cli-utils @gkalpak/ng-maintain
|
|
5
|
+
const cmd = 'yarn global add @angular/cli @gkalpak/aliases @gkalpak/cli-utils @gkalpak/ng-maintain eslint firebase-tools http-server light-server shx typescript typescript-run watch $*';
|
|
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
|
@@ -26,11 +26,8 @@ const GLOBAL_NPM_PACKAGES = [
|
|
|
26
26
|
'@gkalpak/aliases',
|
|
27
27
|
'@gkalpak/cli-utils',
|
|
28
28
|
'@gkalpak/ng-maintain',
|
|
29
|
-
'csslint',
|
|
30
29
|
'eslint',
|
|
31
30
|
'firebase-tools',
|
|
32
|
-
'grunt-cli',
|
|
33
|
-
'gulp-cli',
|
|
34
31
|
'http-server',
|
|
35
32
|
'light-server',
|
|
36
33
|
'shx',
|
|
@@ -90,7 +87,7 @@ const CFGBASH_SPEC = isWsl => new AliasSpec(
|
|
|
90
87
|
/* eslint-enable max-len */
|
|
91
88
|
'Show configuration instructions for `bash`.');
|
|
92
89
|
|
|
93
|
-
const CFGGIT_SPEC_WITH_CRED_HELPER = credHelper => new AliasSpec(
|
|
90
|
+
const CFGGIT_SPEC_WITH_CRED_HELPER = (credHelper, kdiff3Path) => new AliasSpec(
|
|
94
91
|
stripIndentation(`
|
|
95
92
|
#!/usr/bin/env node
|
|
96
93
|
import {stripIndentation} from '../../lib/utils.js';
|
|
@@ -102,7 +99,7 @@ const CFGGIT_SPEC_WITH_CRED_HELPER = credHelper => new AliasSpec(
|
|
|
102
99
|
git config --global core.editor "vim"
|
|
103
100
|
git config --global credential.helper "${credHelper}"
|
|
104
101
|
git config --global merge.tool "kdiff3"
|
|
105
|
-
git config --global mergetool.kdiff3.path "
|
|
102
|
+
git config --global mergetool.kdiff3.path "${kdiff3Path}"
|
|
106
103
|
git config --global mergetool.kdiff3.trustExitCode "false"
|
|
107
104
|
git config --global push.default "upstream"
|
|
108
105
|
git config --global rebase.autosquash "true"
|
|
@@ -115,6 +112,10 @@ const CFGGIT_SPEC_WITH_CRED_HELPER = credHelper => new AliasSpec(
|
|
|
115
112
|
`),
|
|
116
113
|
'Show configuration instructions for `git`.');
|
|
117
114
|
|
|
115
|
+
const GIT_CREATE_BRANCH_CMD = srcBranchArg =>
|
|
116
|
+
`git checkout ${srcBranchArg} -b $1 && git config branch.$1.remote origin && ` +
|
|
117
|
+
'git config branch.$1.merge refs/heads/$1';
|
|
118
|
+
|
|
118
119
|
const SCRIPT_BACKED_CODE = (scriptName, desc) => stripIndentation(`
|
|
119
120
|
#!/usr/bin/env node
|
|
120
121
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
@@ -262,12 +263,9 @@ const ALIASES = {
|
|
|
262
263
|
|
|
263
264
|
// BRANCH
|
|
264
265
|
gb: new AliasDefault('git branch $*'),
|
|
265
|
-
gbc: new AliasDefault(
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
gbcm: new AliasDefault(
|
|
269
|
-
`git checkout \${0:::${GIT_GET_DEFAULT_BRANCH_CMD}} -b $1 && git config branch.$1.remote origin && ` +
|
|
270
|
-
'git config branch.$1.merge refs/heads/$1'),
|
|
266
|
+
gbc: new AliasDefault(GIT_CREATE_BRANCH_CMD('${2:HEAD}')),
|
|
267
|
+
gbcm: new AliasDefault(GIT_CREATE_BRANCH_CMD(`\${0:::${GIT_GET_DEFAULT_BRANCH_CMD}}`)),
|
|
268
|
+
gbco: new AliasDefault(`git fetch origin $1 && ${GIT_CREATE_BRANCH_CMD('origin/$1')}`),
|
|
271
269
|
gbd: new AliasDefault('git branch --delete --force ${*:::__g-pick-branch --gkcu-returnOutput=1}'),
|
|
272
270
|
|
|
273
271
|
// PULL(-REBASE)
|
|
@@ -471,9 +469,13 @@ const ALIASES = {
|
|
|
471
469
|
|
|
472
470
|
// GIT
|
|
473
471
|
cfggit: new Alias({
|
|
474
|
-
default: CFGGIT_SPEC_WITH_CRED_HELPER('manager'),
|
|
472
|
+
default: CFGGIT_SPEC_WITH_CRED_HELPER('manager', '/path/to/kdiff3'),
|
|
473
|
+
win32: CFGGIT_SPEC_WITH_CRED_HELPER(
|
|
474
|
+
'manager',
|
|
475
|
+
'C:/Program Files/KDiff3/kdiff3.exe'),
|
|
475
476
|
wsl: CFGGIT_SPEC_WITH_CRED_HELPER(
|
|
476
|
-
'/mnt/c/Program
|
|
477
|
+
'/mnt/c/Program Files/Git/mingw64/bin/git-credential-manager.exe',
|
|
478
|
+
'/mnt/c/Program Files/KDiff3/kdiff3.exe'),
|
|
477
479
|
}),
|
|
478
480
|
|
|
479
481
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gkalpak/aliases",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"description": "My global aliases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Utility"
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"gb": "./bin/git/gb.js",
|
|
53
53
|
"gbc": "./bin/git/gbc.js",
|
|
54
54
|
"gbcm": "./bin/git/gbcm.js",
|
|
55
|
+
"gbco": "./bin/git/gbco.js",
|
|
55
56
|
"gbd": "./bin/git/gbd.js",
|
|
56
57
|
"gcl": "./bin/git/gcl.js",
|
|
57
58
|
"gcm": "./bin/git/gcm.js",
|
|
@@ -189,18 +190,18 @@
|
|
|
189
190
|
},
|
|
190
191
|
"dependencies": {
|
|
191
192
|
"@gkalpak/cli-utils": "^0.1.10",
|
|
192
|
-
"chalk": "^5.
|
|
193
|
-
"inquirer": "^9.
|
|
194
|
-
"is-wsl": "^
|
|
193
|
+
"chalk": "^5.3.0",
|
|
194
|
+
"inquirer": "^9.2.10",
|
|
195
|
+
"is-wsl": "^3.0.0"
|
|
195
196
|
},
|
|
196
197
|
"devDependencies": {
|
|
197
|
-
"eslint": "^8.
|
|
198
|
+
"eslint": "^8.47.0",
|
|
198
199
|
"eslint-plugin-jasmine": "^4.1.3",
|
|
199
200
|
"eslint-plugin-ordered-imports": "^0.6.0",
|
|
200
|
-
"jasmine": "^
|
|
201
|
+
"jasmine": "^5.1.0",
|
|
201
202
|
"npm-run-all": "^4.1.5",
|
|
202
203
|
"shelljs": "^0.8.5",
|
|
203
|
-
"strip-ansi": "^7.0
|
|
204
|
+
"strip-ansi": "^7.1.0",
|
|
204
205
|
"watch": "^1.0.2"
|
|
205
206
|
}
|
|
206
207
|
}
|