@@ -18,12 +18,11 @@ const {
18
18
questionsCreateCollection,
19
19
questionsInitProject
20
20
} = require("../questions");
21
- const { success, log, error, actionRunner, commandDescriptions } = require("../parser");
21
+ const { success, log, error, actionRunner } = require("../parser");
22
22
const { accountGet } = require("./account");
23
- const { loginCommand } = require("./generic");
24
23
const { sdkForConsole } = require("../sdks");
25
24
26
- const initProject = async ({ organizationId, projectId, projectName, selfHosted } = {}) => {
25
+ const initProject = async ({ organizationId, projectId, projectName } = {}) => {
27
26
let response = {};
28
27
29
28
try {
@@ -37,8 +36,8 @@ const initProject = async ({ organizationId, projectId, projectName, selfHosted
37
36
sdk: client
38
37
});
39
38
} catch (e) {
40
- log('You must login first')
41
- await loginCommand({selfHosted} );
39
+ error('Error Session not found. Please run `appwrite login` to create a session');
40
+ process.exit(1 );
42
41
}
43
42
44
43
let answers = {};
@@ -269,7 +268,6 @@ const init = new Command("init")
269
268
.option("--organizationId <organizationId >", "{{ spec .title | caseUcfirst }} organization ID")
270
269
.option("--projectId <projectId >", "{{ spec .title | caseUcfirst }} project ID")
271
270
.option("--projectName <projectName >", "{{ spec .title | caseUcfirst }} project ID")
272
- .option(`-sh, --self-hosted`, `Flag for enabling custom endpoint for self hosted instances for non-logged in users`)
273
271
.action(actionRunner(initProject));
274
272
275
273
init
0 commit comments