uniwind-pro 1.0.0-beta.5 ā 1.0.0-beta.6
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/package.json +1 -1
- package/pre/cli/commands.js +3 -3
- package/pre/cli/index.js +11 -11
- package/pre/postinstall/index.js +2 -2
- package/pre/postinstall/install.js +1 -1
package/package.json
CHANGED
package/pre/cli/commands.js
CHANGED
|
@@ -17,7 +17,7 @@ export const login = async () => {
|
|
|
17
17
|
|
|
18
18
|
open(authUrl)
|
|
19
19
|
|
|
20
|
-
console.log(chalk.
|
|
20
|
+
console.log(chalk.gray('\nWaiting for authorization response...'))
|
|
21
21
|
|
|
22
22
|
const { token, handle } = await getTokenSSE(sessionId)
|
|
23
23
|
|
|
@@ -58,7 +58,7 @@ export const logout = async () => {
|
|
|
58
58
|
const maybeCredentials = await keyring.findCredentials(SERVICE)
|
|
59
59
|
|
|
60
60
|
if (maybeCredentials.length === 0) {
|
|
61
|
-
console.log(chalk.
|
|
61
|
+
console.log(chalk.yellowBright('No credentials found.'))
|
|
62
62
|
|
|
63
63
|
return Promise.resolve()
|
|
64
64
|
}
|
|
@@ -67,5 +67,5 @@ export const logout = async () => {
|
|
|
67
67
|
await keyring.deletePassword(SERVICE, account)
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
console.log(chalk.
|
|
70
|
+
console.log(chalk.yellowBright('\nš Signed out'))
|
|
71
71
|
}
|
package/pre/cli/index.js
CHANGED
|
@@ -20,21 +20,21 @@ async function interactiveMode() {
|
|
|
20
20
|
new inquirer.Separator(
|
|
21
21
|
chalk.green(` Your session is valid for the next ${session.expiresAt}`)
|
|
22
22
|
),
|
|
23
|
-
new inquirer.Separator(chalk.
|
|
24
|
-
{ name:
|
|
25
|
-
{ name:
|
|
26
|
-
{ name:
|
|
27
|
-
{ name: chalk.
|
|
23
|
+
new inquirer.Separator(chalk.gray('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā')),
|
|
24
|
+
{ name: 'Manage your account', value: 'account' },
|
|
25
|
+
{ name: 'Install Uniwind Pro', value: 'postinstall' },
|
|
26
|
+
{ name: 'Logout', value: 'logout' },
|
|
27
|
+
{ name: chalk.gray('Exit'), value: 'exit' },
|
|
28
28
|
]
|
|
29
29
|
: [
|
|
30
|
-
{ name:
|
|
31
|
-
{ name:
|
|
32
|
-
{ name: chalk.
|
|
30
|
+
{ name: 'Login with Github', value: 'login' },
|
|
31
|
+
{ name: 'Buy Uniwind Pro', value: 'buy' },
|
|
32
|
+
{ name: chalk.gray('Exit'), value: 'exit' },
|
|
33
33
|
]
|
|
34
34
|
|
|
35
35
|
const message = session
|
|
36
|
-
?
|
|
37
|
-
:
|
|
36
|
+
? `Hello @${session.handle}, what would you like to do?`
|
|
37
|
+
: 'What would you like to do?'
|
|
38
38
|
|
|
39
39
|
const { action } = await inquirer.prompt([
|
|
40
40
|
{
|
|
@@ -63,7 +63,7 @@ async function interactiveMode() {
|
|
|
63
63
|
break
|
|
64
64
|
case 'exit':
|
|
65
65
|
shouldExit = true
|
|
66
|
-
console.log(chalk.
|
|
66
|
+
console.log(chalk.gray('\nSession closed\n'))
|
|
67
67
|
break
|
|
68
68
|
}
|
|
69
69
|
|
package/pre/postinstall/index.js
CHANGED
|
@@ -62,7 +62,7 @@ const main = async () => {
|
|
|
62
62
|
main().catch((error) => {
|
|
63
63
|
console.log(chalk.red.bold("Access denied: You don't have permission to install this package.\n"))
|
|
64
64
|
console.log(
|
|
65
|
-
chalk.
|
|
65
|
+
chalk.red(
|
|
66
66
|
`To get a license, visit ${chalk.bold.underline(UNIWIND_WEB_URL)}.\n` +
|
|
67
67
|
`If you already have one, run cli via:\n\n` +
|
|
68
68
|
`${chalk.bold('uniwind-pro')}\n\n` +
|
|
@@ -71,7 +71,7 @@ main().catch((error) => {
|
|
|
71
71
|
)
|
|
72
72
|
)
|
|
73
73
|
|
|
74
|
-
console.log(chalk.
|
|
74
|
+
console.log(chalk.gray(error.message))
|
|
75
75
|
|
|
76
76
|
process.exit(1)
|
|
77
77
|
})
|
|
@@ -112,7 +112,7 @@ export const downloadFromCLI = async ({ account: handle, password: token }) => {
|
|
|
112
112
|
const packageVersion = getVersion()
|
|
113
113
|
const projectName = getProjectName()
|
|
114
114
|
|
|
115
|
-
console.log(chalk.
|
|
115
|
+
console.log(chalk.gray(`Fetching v${packageVersion} for project "${projectName}"...\n`))
|
|
116
116
|
|
|
117
117
|
const cdnUrl = `${INSTALLATION_URL}/cli/${handle}/${encodeURIComponent(projectName)}/${packageVersion}/${token}`
|
|
118
118
|
const response = await fetch(cdnUrl)
|