You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -8,129 +8,135 @@ import parseOpenApi3Documentation from "@api-platform/api-doc-parser/lib/openapi
8
8
import{version}from"../package.json";
9
9
importgeneratorsfrom"./generators";
10
10
11
-
program
12
-
.version(version)
13
-
.description(
14
-
"Generate apps built with Next, Nuxt, Quasar, React, React Native, Vue or Vuetify for any API documented using Hydra or OpenAPI"
15
-
)
16
-
.usage("entrypoint outputDirectory")
17
-
.option(
18
-
"-r, --resource [resourceName]",
19
-
"Generate CRUD for the given resource"
20
-
)
21
-
.option(
22
-
"-p, --hydra-prefix [hydraPrefix]",
23
-
"The hydra prefix used by the API",
24
-
"hydra:"
25
-
)
26
-
.option("--username [username]","Username for basic auth (Hydra only)")
27
-
.option("--password [password]","Password for basic auth (Hydra only)")
28
-
.option("--bearer [bearer]","Token for bearer auth (Hydra only)")
29
-
.option(
30
-
"-g, --generator [generator]",
31
-
'The generator to use, one of "next", "nuxt", "quasar", "react", "react-native", "typescript", "vue", "vuetify"',
32
-
"next"
33
-
)
34
-
.option(
35
-
"-t, --template-directory [templateDirectory]",
36
-
"The templates directory base to use. Final directory will be ${templateDirectory}/${generator}",
37
-
`${__dirname}/../templates/`
38
-
)
39
-
.option(
40
-
"-f, --format [hydra|openapi3|openapi2]",
41
-
'"hydra", "openapi3" or "openapi2"',
42
-
"hydra"
43
-
)
44
-
.option(
45
-
"-s, --server-path [serverPath]",
46
-
"Path to express server file to allow route dynamic addition (Next.js generator only)"
47
-
)
48
-
.parse(process.argv);
11
+
asyncfunctionmain(){
12
+
program
13
+
.version(version)
14
+
.description(
15
+
"Generate apps built with Next, Nuxt, Quasar, React, React Native, Vue or Vuetify for any API documented using Hydra or OpenAPI"
16
+
)
17
+
.usage("entrypoint outputDirectory")
18
+
.option(
19
+
"-r, --resource [resourceName]",
20
+
"Generate CRUD for the given resource"
21
+
)
22
+
.option(
23
+
"-p, --hydra-prefix [hydraPrefix]",
24
+
"The hydra prefix used by the API",
25
+
"hydra:"
26
+
)
27
+
.option("--username [username]","Username for basic auth (Hydra only)")
28
+
.option("--password [password]","Password for basic auth (Hydra only)")
29
+
.option("--bearer [bearer]","Token for bearer auth (Hydra only)")
30
+
.option(
31
+
"-g, --generator [generator]",
32
+
'The generator to use, one of "next", "nuxt", "quasar", "react", "react-native", "typescript", "vue", "vuetify" or a path to a custom generator of your choice',
33
+
"next"
34
+
)
35
+
.option(
36
+
"-t, --template-directory [templateDirectory]",
37
+
"The templates directory base to use. Final directory will be ${templateDirectory}/${generator}",
38
+
`${__dirname}/../templates/`
39
+
)
40
+
.option(
41
+
"-f, --format [hydra|openapi3|openapi2]",
42
+
'"hydra", "openapi3" or "openapi2"',
43
+
"hydra"
44
+
)
45
+
.option(
46
+
"-s, --server-path [serverPath]",
47
+
"Path to express server file to allow route dynamic addition (Next.js generator only)"
0 commit comments