@affinidi/cli 1.31.2 → 1.31.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/README.md +1 -1
- package/package.json +2 -2
- package/scripts/autocomplete.cjs +3 -8
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@affinidi/cli",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.3",
|
|
4
4
|
"description": "Affinidi Elements command-line-interface",
|
|
5
5
|
"author": "affinidi.com",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"prepare": "node -e \"process.exit(process.env.NODE_ENV === 'production' ? 0 : 1)\" || npm run prepare:dev",
|
|
34
34
|
"remove:dist": "shx rm -rf dist",
|
|
35
35
|
"generate:api": "node scripts/generate-api.cjs",
|
|
36
|
-
"postinstall": "node scripts/autocomplete.cjs"
|
|
36
|
+
"postinstall": "node -e \"process.exit(process.env.NODE_ENV === 'production' ? 1 : 0)\" || node scripts/autocomplete.cjs"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"registry": "https://registry.npmjs.org/",
|
package/scripts/autocomplete.cjs
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
const { exec } = require('child_process')
|
|
2
|
-
const {CliUx} = require('@oclif/core')
|
|
3
2
|
|
|
4
|
-
exec('echo $SHELL',
|
|
3
|
+
exec('echo $SHELL', (err, stdout, stderr) => {
|
|
5
4
|
if (err) {
|
|
6
5
|
// node couldn't execute the command
|
|
7
6
|
return
|
|
8
7
|
}
|
|
9
|
-
|
|
10
|
-
default: 'n',
|
|
11
|
-
})
|
|
12
|
-
if (answers.toLowerCase() === 'y'){
|
|
8
|
+
|
|
13
9
|
if(stdout.includes('zsh')){
|
|
14
10
|
execEnvVarCommand('zsh')
|
|
15
11
|
return
|
|
@@ -18,8 +14,7 @@ exec('echo $SHELL', async (err, stdout, stderr) => {
|
|
|
18
14
|
execEnvVarCommand('bash')
|
|
19
15
|
return
|
|
20
16
|
}
|
|
21
|
-
console.log('Auto-completion supports only zsh or bash shells.')
|
|
22
|
-
console.log('Auto-completion not activated. To activate in future run npm install')
|
|
17
|
+
console.log('Auto-completion supports only zsh or bash shells.')
|
|
23
18
|
})
|
|
24
19
|
|
|
25
20
|
const execEnvVarCommand = (shell) => {
|