@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.
- package/commands/deploy.mjs +8 -3
- package/package.json +1 -1
package/commands/deploy.mjs
CHANGED
|
@@ -63,8 +63,9 @@ async function resolveProjectId(flags) {
|
|
|
63
63
|
throw err;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
} else if (confirm.toLowerCase()
|
|
67
|
-
|
|
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
|
-
|
|
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