@glash/cli 0.2.24 → 0.2.25

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.
@@ -63,8 +63,9 @@ async function resolveProjectId(flags) {
63
63
  throw err;
64
64
  }
65
65
  }
66
- } else if (confirm.toLowerCase() === 'n') {
67
- throw new Error('Deployment aborted.');
66
+ } else if (['n', 'no'].includes(confirm.toLowerCase())) {
67
+ info('Okay, let\'s create a new project instead.');
68
+ return createNewProjectFromCurrentDirectory();
68
69
  } else {
69
70
  // If they chose 'select' / 's', let them pick from existing projects
70
71
  const list = await apiGet('/projects');
@@ -108,7 +109,11 @@ async function resolveProjectId(flags) {
108
109
  }
109
110
  }
110
111
 
111
- // CREATE NEW PROJECT
112
+ return createNewProjectFromCurrentDirectory();
113
+ }
114
+
115
+ async function createNewProjectFromCurrentDirectory() {
116
+ const dirName = basename(process.cwd());
112
117
  const name = (await prompt(`What's your project's name? [${dirName}] `)) || dirName;
113
118
  const slug = name.toLowerCase().replace(/[^a-z0-9-]+/g, '-').replace(/^-+|-+$/g, '');
114
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glash/cli",
3
- "version": "0.2.24",
3
+ "version": "0.2.25",
4
4
  "description": "glashDB command-line interface — deploy projects, pull source + env, manage env vars.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://glashdb.com",