Skip to content

Commit 1cb732a

Browse files
committed
Merge branch 'release/v0.5.2'
2 parents 6d57caa + fbb1c57 commit 1cb732a

6 files changed

Lines changed: 20 additions & 17 deletions

File tree

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ marketplace
66
.env
77
.nyc_output
88
extensionsToTest/dist
9-
test/beyondCredentials.json
9+
test/beyondCredentials.json
10+
quoti-cli*tgz

‎README.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $ npm install -g quoti-cli
1414
$ qt COMMAND
1515
running command...
1616
$ qt (-v|--version|version)
17-
quoti-cli/0.5.0 linux-x64 node-v14.19.0
17+
quoti-cli/0.5.2 linux-x64 node-v14.19.0
1818
$ qt --help [COMMAND]
1919
USAGE
2020
$ qt COMMAND
@@ -68,7 +68,7 @@ ARGUMENTS
6868
ENTRYPOINTPATH Endereço do entry point (arquivo principal) da extensão
6969
```
7070

71-
_See code: [src/commands/deploy.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.0/src/commands/deploy.js)_
71+
_See code: [src/commands/deploy.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.2/src/commands/deploy.js)_
7272

7373
## `qt download-current-version [FILEPATH]`
7474

@@ -85,7 +85,7 @@ DESCRIPTION
8585
...
8686
```
8787

88-
_See code: [src/commands/download-current-version.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.0/src/commands/download-current-version.js)_
88+
_See code: [src/commands/download-current-version.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.2/src/commands/download-current-version.js)_
8989

9090
## `qt help [COMMAND]`
9191

@@ -123,7 +123,7 @@ ALIASES
123123
$ qt select-extension
124124
```
125125

126-
_See code: [src/commands/link-extension.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.0/src/commands/link-extension.js)_
126+
_See code: [src/commands/link-extension.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.2/src/commands/link-extension.js)_
127127

128128
## `qt login`
129129

@@ -134,7 +134,7 @@ USAGE
134134
$ qt login
135135
```
136136

137-
_See code: [src/commands/login.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.0/src/commands/login.js)_
137+
_See code: [src/commands/login.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.2/src/commands/login.js)_
138138

139139
## `qt logout`
140140

@@ -145,7 +145,7 @@ USAGE
145145
$ qt logout
146146
```
147147

148-
_See code: [src/commands/logout.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.0/src/commands/logout.js)_
148+
_See code: [src/commands/logout.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.2/src/commands/logout.js)_
149149

150150
## `qt publish [ENTRYPOINTPATH]`
151151

@@ -165,7 +165,7 @@ OPTIONS
165165
-v, --version=version Versão da extensão
166166
```
167167

168-
_See code: [src/commands/publish.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.0/src/commands/publish.js)_
168+
_See code: [src/commands/publish.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.2/src/commands/publish.js)_
169169

170170
## `qt serve [ENTRYPOINTPATH]`
171171

@@ -186,5 +186,5 @@ DESCRIPTION
186186
Cria um serve local e realiza upload automaticamente para o Quoti
187187
```
188188

189-
_See code: [src/commands/serve.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.0/src/commands/serve.js)_
189+
_See code: [src/commands/serve.js](https://github.com/byndcloud/quoti-cli/blob/v0.5.2/src/commands/serve.js)_
190190
<!-- commandsstop -->

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "quoti-cli",
33
"description": "A Quoti Extensions CLI",
4-
"version": "0.5.0",
4+
"version": "0.5.2",
55
"author": "Nathan @nmf2",
66
"preferGlobal": true,
77
"bin": {

‎src/commands/serve.js‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,11 @@ class ServeCommand extends Command {
9898
let distPath = entryPoint
9999
const manifest = manifests[entryPoint]
100100
const extensionService = new ExtensionService(manifest)
101-
101+
const extension = await extensionService.getExtension(
102+
manifest.extensionId
103+
)
102104
if (manifest.type === 'build') {
103105
if (!manifest.extensionUUID) {
104-
const extension = await extensionService.getExtension(
105-
manifest.extensionId
106-
)
107106
if (extension?.extensionUUID) {
108107
manifest.extensionUUID = extension.extensionUUID
109108
manifest.save()
@@ -122,12 +121,14 @@ class ServeCommand extends Command {
122121
}
123122
return {
124123
extensionInfo: manifests[entryPoint],
124+
extensionPath: extension.path,
125125
code: extensionCode
126126
}
127127
})
128128
)
129129
return extensionsData
130130
}
131+
131132
async sendCodeToQuotiBySocket (extensionsData, sessionId) {
132133
extensionsData.forEach(async extensionData => {
133134
this.spinner.start('Enviando código para o Quoti...')
@@ -144,7 +145,7 @@ class ServeCommand extends Command {
144145
})
145146

146147
if (!err) {
147-
const urlExtension = `${getFrontBaseURL()}/${credentials.institution}/develop/${extensionData.extensionInfo.name}?devSessionId=${sessionId}`
148+
const urlExtension = `${getFrontBaseURL()}/${credentials.institution}/develop/${extensionData.extensionPath}?devSessionId=${sessionId}`
148149
await this.spinner.succeed('Disponível em ' + urlExtension)
149150
return
150151
}
@@ -155,6 +156,7 @@ class ServeCommand extends Command {
155156
}
156157
})
157158
}
159+
158160
chokidarOnChange (args, sessionId) {
159161
return async changedFilePath => {
160162
const extensionsToUpdate = this.getDependentExtensionPath({

‎src/services/extension.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class ExtensionService {
116116
'inline-vue': true
117117
})
118118
this.logger.info(`⇨ Extensão: ${this.manifest.name}\n`)
119-
this.spinner.succeed(`Build finalizado`)
119+
this.spinner.succeed('Build finalizado')
120120
return path.join(getProjectRootPath(), dest, `${name}.umd.min.js`)
121121
} catch (error) {
122122
this.spinner.fail('Erro durante o build')

‎src/utils/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ async function getEntryPointFromUser ({ extensionsPaths, message = 'Selecione um
8686
}
8787
function getFrontBaseURL () {
8888
if (process.env.API_BASE_URL) {
89-
return process.env.QUOTI_FRONT_BASE_URL || 'http://localhost:8081'
89+
return process.env.QUOTI_FRONT_BASE_URL || 'http://localhost:8080'
9090
} else {
9191
return 'https://quoti.cloud'
9292
}

0 commit comments

Comments
 (0)