File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 17
17
fs.writeFileSync(destination, response);
18
18
{%~ endif %}
19
19
if (parseOutput) {
20
- {%~ if methodHaveConsolePreview (method .name ,service .name ) %}
20
+ {%~ if hasConsolePreview (method .name ,service .name ) %}
21
21
if(console) {
22
22
showConsoleLink('{{service .name }}', '{{ method .name }}'
23
23
{%- for parameter in method .parameters .path -%}{%- set param = (parameter .name | caseCamel | escapeKeyword ) -%}{%- if param ends with ' Id' -%}, {{ param }} {%- endif -%}{%- endfor -%}
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ const {{ service.name | caseLower }}{{ method.name | caseUcfirst }} = async ({
70
70
{%- if ' multipart/form-data' in method .consumes -%},onProgress = () => {}{%- endif -%}
71
71
72
72
{%- if method .type == ' location' -%}, destination{%- endif -%}
73
- {% if methodHaveConsolePreview (method .name ,service .name ) %}, console{%- endif -%}
73
+ {% if hasConsolePreview (method .name ,service .name ) %}, console{%- endif -%}
74
74
}) => {
75
75
{%~ endblock %}
76
76
let client = !sdk ? await {% if service .name == " projects" %}sdkForConsole(){% else %}sdkForProject(){% endif %} :
@@ -95,7 +95,7 @@ const {{ service.name | caseLower }}{{ method.name | caseUcfirst }} = async ({
95
95
{% if method .type == ' location' %}
96
96
.requiredOption(`--destination <path >`, `output file path.`)
97
97
{% endif %}
98
- {% if methodHaveConsolePreview (method .name ,service .name ) %}
98
+ {% if hasConsolePreview (method .name ,service .name ) %}
99
99
.option(`--console`, `Get the resource console url`)
100
100
{% endif %}
101
101
{% endautoescape %}
Original file line number Diff line number Diff line change @@ -186,10 +186,10 @@ const logout = new Command("logout")
186
186
}
187
187
}
188
188
189
- const leftSessions = globalConfig.getSessions();
189
+ const remainingSessions = globalConfig.getSessions();
190
190
191
- if (leftSessions .length > 0 && leftSessions .filter(session => session.id === current).length !== 1) {
192
- const accountId = leftSessions [0].id;
191
+ if (remainingSessions .length > 0 && remainingSessions .filter(session => session.id === current).length !== 1) {
192
+ const accountId = remainingSessions [0].id;
193
193
globalConfig.setCurrentSession(accountId);
194
194
195
195
success(`Current account is ${accountId}`);
Original file line number Diff line number Diff line change 1
1
const fs = require("fs");
2
2
const path = require("path");
3
3
const { localConfig, globalConfig } = require("./config");
4
- const { success, log, error } = require('./parser')
5
- const readline = require('readline');
6
- const cp = require('child_process');
4
+ const { success } = require('./parser')
7
5
8
6
function getAllFiles(folder) {
9
7
const files = [];
You can’t perform that action at this time.
0 commit comments