Skip to content

Commit 2e503d6

Browse files
Merge pull request #908 from appwrite/feat-custom-debounces
feat(cli): Custom debounce limit
2 parents 16142d8 + d47bc69 commit 2e503d6

File tree

5 files changed

+135
-60
lines changed

5 files changed

+135
-60
lines changed

templates/cli/lib/commands/generic.js.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ const logout = new Command("logout")
188188
const sessions = globalConfig.getSessions();
189189
const current = globalConfig.getCurrentSession();
190190

191-
if (current === '') {
191+
if (current === '' || !sessions.length) {
192+
log('No active sessions found.');
192193
return;
193194
}
194195
if (sessions.length === 1) {

templates/cli/lib/commands/pull.js.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const pullResources = async () => {
2727
if (cliConfig.all) {
2828
for (let action of Object.values(actions)) {
2929
cliConfig.all = true;
30-
await action();
30+
await action({});
3131
}
3232
} else {
3333
const answers = await inquirer.prompt(questionsPullResources[0]);
@@ -92,7 +92,7 @@ const pullFunctions = async ({ code }) => {
9292
if (!fs.existsSync(func['path'])) {
9393
fs.mkdirSync(func['path'], { recursive: true });
9494
}
95-
95+
9696
if(code === false) {
9797
warn("Source code download skipped.");
9898
} else if(!func['deployment']) {
@@ -114,14 +114,14 @@ const pullFunctions = async ({ code }) => {
114114
overrideForCli: true,
115115
parseOutput: false
116116
});
117-
117+
118118
tar.extract({
119119
sync: true,
120120
cwd: func['path'],
121121
file: compressedFileName,
122122
strict: false,
123123
});
124-
124+
125125
fs.rmSync(compressedFileName);
126126
}
127127
}

0 commit comments

Comments
 (0)