@gkalpak/aliases 0.13.7 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/config/cfgbash.js +1 -1
- package/bin/config/cfgbash.wsl.js +1 -1
- package/bin/config/cfggit.js +1 -1
- package/bin/config/cfggit.win32.js +1 -1
- package/bin/config/cfggit.wsl.js +1 -1
- package/bin/config/cfggpg.js +1 -1
- package/bin/config/cfgssh.js +1 -1
- package/bin/config/cfgvim.js +1 -1
- package/bin/config/cfgwsl.wsl.js +2 -2
- package/bin/misc/alv.js +1 -1
- package/bin/node/nua.js +1 -1
- package/bin/node/nud.js +1 -1
- package/bin/node/nup.js +1 -1
- package/bin/node/yua.js +1 -1
- package/bin/node/yud.js +1 -1
- package/bin/node/yup.js +1 -1
- package/lib/constants.js +4 -2
- package/package.json +8 -18
- package/scripts/run-npm-script.js +8 -0
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ Here is the list of all global dependencies with associated min. version (older
|
|
|
68
68
|
- `ls`: [ls] >=8 (could come through a bash emulation environment on Windows, such as [git for Windows][git-win]' `Git BASH`)
|
|
69
69
|
- `ngm-diff-wh`: `ngm-diff-wh` >=0.0.4 (part of the [ng-maintain] suite)
|
|
70
70
|
- `ngm-pr-merge`: `ngm-pr-merge` >=0.0.4 (part of the [ng-maintain] suite)
|
|
71
|
-
- `node`: [Node.js][node] >=
|
|
71
|
+
- `node`: [Node.js][node] >=20
|
|
72
72
|
- `npm`: [npm] >=3 (comes bundled with Node.js)
|
|
73
73
|
- `nvm`: [nvm] >=0.30 (on *nix) / [nvm-windows][nvm-win] >=1 (on Windows)
|
|
74
74
|
- `yarn`: [yarn] >=0.24
|
package/bin/config/cfgbash.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
/* eslint-disable max-len */
|
|
4
4
|
console.log(stripIndentation(`
|
|
5
|
-
### [Generated by: @gkalpak/aliases v0.
|
|
5
|
+
### [Generated by: @gkalpak/aliases v0.14.0]
|
|
6
6
|
### Copy the following into '~/.bashrc':
|
|
7
7
|
|
|
8
8
|
# Set up prompt.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
/* eslint-disable max-len */
|
|
4
4
|
console.log(stripIndentation(`
|
|
5
|
-
### [Generated by: @gkalpak/aliases v0.
|
|
5
|
+
### [Generated by: @gkalpak/aliases v0.14.0]
|
|
6
6
|
### Copy the following into '~/.bashrc':
|
|
7
7
|
|
|
8
8
|
# Set up prompt.
|
package/bin/config/cfggit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.14.0]
|
|
5
5
|
### Run the following commands:
|
|
6
6
|
|
|
7
7
|
git config --global commit.gpgSign "true"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.14.0]
|
|
5
5
|
### Run the following commands:
|
|
6
6
|
|
|
7
7
|
git config --global commit.gpgSign "true"
|
package/bin/config/cfggit.wsl.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.14.0]
|
|
5
5
|
### Run the following commands:
|
|
6
6
|
|
|
7
7
|
git config --global commit.gpgSign "true"
|
package/bin/config/cfggpg.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.14.0]
|
|
5
5
|
### Copy the following into '~/.gnupg/gpg-agent.conf':
|
|
6
6
|
|
|
7
7
|
default-cache-ttl 86400
|
package/bin/config/cfgssh.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.14.0]
|
|
5
5
|
### Copy the following into '~/.ssh/config':
|
|
6
6
|
|
|
7
7
|
IdentityFile ~/.ssh/id-rsa-gkalpak.priv
|
package/bin/config/cfgvim.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import {readFileSync} from 'node:fs';
|
|
3
3
|
import {fileURLToPath} from 'node:url';
|
|
4
4
|
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
5
|
-
console.log('""" [Generated by: @gkalpak/aliases v0.
|
|
5
|
+
console.log('""" [Generated by: @gkalpak/aliases v0.14.0]');
|
|
6
6
|
console.log('""" Copy the following into \'~/.vimrc\':\n');
|
|
7
7
|
console.log(readFileSync(`${__dirname}/../../lib/assets/vimrc.txt`, 'utf8').trim() + '\n');
|
package/bin/config/cfgwsl.wsl.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {stripIndentation} from '../../lib/utils.js';
|
|
3
3
|
console.log(stripIndentation(`
|
|
4
|
-
### [Generated by: @gkalpak/aliases v0.
|
|
4
|
+
### [Generated by: @gkalpak/aliases v0.14.0]
|
|
5
5
|
### Copy the following into a root-owned, 600-mode '/etc/resolv.conf' file:
|
|
6
6
|
|
|
7
7
|
# Cloudflare
|
|
@@ -14,7 +14,7 @@ console.log(stripIndentation(`
|
|
|
14
14
|
|
|
15
15
|
-----
|
|
16
16
|
|
|
17
|
-
### [Generated by: @gkalpak/aliases v0.
|
|
17
|
+
### [Generated by: @gkalpak/aliases v0.14.0]
|
|
18
18
|
### Copy the following into a root-owned, 600-mode '/etc/wsl.conf' file:
|
|
19
19
|
|
|
20
20
|
[network]
|
package/bin/misc/alv.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
console.log('@gkalpak/aliases v0.
|
|
2
|
+
console.log('@gkalpak/aliases v0.14.0');
|
package/bin/node/nua.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'node --eval "/* Update dependencies. */ const deps = Object.keys(require(\'./package.json\').dependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' dependencies...\'); deps.length && child_process.
|
|
5
|
+
const cmd = 'node --eval "/* Update dependencies. */ const deps = Object.keys(require(\'./package.json\').dependencies || {}).map(x => x + \'@latest\'); const cmd = \'nap \' + 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 = \'nad \' + 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
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/bin/node/nud.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'node --eval "/* Update devDependencies. */ const deps = Object.keys(require(\'./package.json\').devDependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' devDependencies...\'); deps.length && child_process.
|
|
5
|
+
const cmd = 'node --eval "/* Update devDependencies. */ const deps = Object.keys(require(\'./package.json\').devDependencies || {}).map(x => x + \'@latest\'); const cmd = \'nad \' + 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
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/bin/node/nup.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'node --eval "/* Update dependencies. */ const deps = Object.keys(require(\'./package.json\').dependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' dependencies...\'); deps.length && child_process.
|
|
5
|
+
const cmd = 'node --eval "/* Update dependencies. */ const deps = Object.keys(require(\'./package.json\').dependencies || {}).map(x => x + \'@latest\'); const cmd = \'nap \' + 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
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/bin/node/yua.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'node --eval "/* Update dependencies. */ const deps = Object.keys(require(\'./package.json\').dependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' dependencies...\'); deps.length && child_process.
|
|
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
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/bin/node/yud.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'node --eval "/* Update devDependencies. */ const deps = Object.keys(require(\'./package.json\').devDependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' devDependencies...\'); deps.length && child_process.
|
|
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
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/bin/node/yup.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {commandUtils} from '@gkalpak/cli-utils';
|
|
3
3
|
import {isMain, onError} from '../../lib/utils.js';
|
|
4
4
|
// eslint-disable-next-line max-len
|
|
5
|
-
const cmd = 'node --eval "/* Update dependencies. */ const deps = Object.keys(require(\'./package.json\').dependencies || {}).map(x => x + \'@latest\'); console.log(\'\\nUpdating \' + deps.length + \' dependencies...\'); deps.length && child_process.
|
|
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
8
|
const {args, config} = commandUtils.preprocessArgs(process.argv.slice(2));
|
package/lib/constants.js
CHANGED
|
@@ -238,13 +238,15 @@ const PRINT_NVM_UPDATE_INSTRUCTIONS_CODE = (currentVersionCmd, repoSlug, fullIns
|
|
|
238
238
|
|
|
239
239
|
// NOTE 1: Node.js commands that are directly evaluated in a *nix shell should not contain backticks (`` ` ``).
|
|
240
240
|
// NOTE 2: Node.js commands that are directly evaluated in a *nix shell should have any dollar-signs (`$`) excaped.
|
|
241
|
-
// NOTE 3: Due to how
|
|
241
|
+
// NOTE 3: Due to how this code is used, escaped characters need to be double-escaped (`\\\\`).
|
|
242
242
|
// NOTE 4: The above notes should be also taken into account for the passed in strings used directly in the command.
|
|
243
243
|
const UPDATE_DEPS_CODE = (updateCmd, depsProp) =>
|
|
244
244
|
`node --eval "/* Update ${depsProp}. */ ` +
|
|
245
245
|
`const deps = Object.keys(require('./package.json').${depsProp} || {}).map(x => x + '@latest'); ` +
|
|
246
|
+
`const cmd = '${updateCmd} ' + deps.join(' '); ` +
|
|
246
247
|
`console.log('\\\\nUpdating ' + deps.length + ' ${depsProp}...'); ` +
|
|
247
|
-
|
|
248
|
+
'console.log(\' Command: \' + cmd); ' +
|
|
249
|
+
'deps.length && child_process.execSync(cmd, {shell: true, stdio: \'inherit\'});' +
|
|
248
250
|
'"';
|
|
249
251
|
let nupCode, nudCode, yupCode, yudCode;
|
|
250
252
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gkalpak/aliases",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "My global aliases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Utility"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"start": "run-s dev",
|
|
10
10
|
"build": "node scripts/build",
|
|
11
|
-
"dev": "watch
|
|
11
|
+
"dev": "node --watch-path=lib/ --watch-path=test/ scripts/run-npm-script ~~dev",
|
|
12
12
|
"postinstall": "npm run ~~platformize-bin",
|
|
13
13
|
"prelint": "npm run prepare-bin-local",
|
|
14
14
|
"lint": "npm run ~~lint",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"pretest-unit": "npm run prepare-bin-local",
|
|
25
25
|
"test-unit": "npm run ~~test-unit",
|
|
26
26
|
"postversion": "git push && git push --tags",
|
|
27
|
+
"~~dev": "run-s ~~lint ~~test-unit",
|
|
27
28
|
"~~lint": "eslint ./",
|
|
28
29
|
"~~platformize-bin": "node scripts/platformize-bin",
|
|
29
30
|
"~~test-e2e": "jasmine test/e2e/**/*.spec.js",
|
|
@@ -198,29 +199,18 @@
|
|
|
198
199
|
}
|
|
199
200
|
},
|
|
200
201
|
"dependencies": {
|
|
201
|
-
"@gkalpak/cli-utils": "^0.
|
|
202
|
+
"@gkalpak/cli-utils": "^0.3.0",
|
|
202
203
|
"chalk": "^5.6.2",
|
|
203
|
-
"inquirer": "^
|
|
204
|
-
"is-wsl": "^3.1.
|
|
204
|
+
"inquirer": "^13.3.0",
|
|
205
|
+
"is-wsl": "^3.1.1"
|
|
205
206
|
},
|
|
206
207
|
"devDependencies": {
|
|
207
208
|
"eslint": "^8.57.1",
|
|
208
209
|
"eslint-plugin-import": "^2.32.0",
|
|
209
210
|
"eslint-plugin-jasmine": "^4.2.2",
|
|
210
|
-
"jasmine": "^
|
|
211
|
+
"jasmine": "^6.1.0",
|
|
211
212
|
"npm-run-all": "^4.1.5",
|
|
212
213
|
"shelljs": "^0.10.0",
|
|
213
|
-
"strip-ansi": "^7.
|
|
214
|
-
"watch": "^1.0.2"
|
|
215
|
-
},
|
|
216
|
-
"overrides-comments": {
|
|
217
|
-
"watch": {
|
|
218
|
-
"exec-sh": "Fix vulnerability in transitive dependency `merge` (see https://github.com/gkalpak/aliases/security/dependabot/1)."
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
"overrides": {
|
|
222
|
-
"watch": {
|
|
223
|
-
"exec-sh": "0.4.0"
|
|
224
|
-
}
|
|
214
|
+
"strip-ansi": "^7.2.0"
|
|
225
215
|
}
|
|
226
216
|
}
|