-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathgraphcdn.ts
77 lines (75 loc) · 1.56 KB
/
graphcdn.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
const helpOption: Fig.Option = {
name: ["--help", "-h"],
};
const completionSpec: Fig.Spec = {
name: "graphcdn",
description: "GraphCDN CLI",
subcommands: [
{
name: "login",
description: "Authenticate the CLI",
options: [
{
name: "--token",
args: {
name: "token",
},
},
helpOption,
],
},
{
name: "init",
description: "Create a new GraphCDN service",
options: [
{
name: ["-y", "--yes"],
description: "Skip all the questions and just init",
},
helpOption,
],
},
{
name: "pull",
description: "Pull the latest service configuration",
options: [
{
name: "--service",
description:
"Name of the service to pull from (only required without graphcdn.yml)",
args: {
name: "service",
description: "Name of the environment to pull from",
},
},
{
name: "--env",
args: {
name: "env",
},
},
helpOption,
],
},
{
name: "push",
description: "Push and deploy the latest app configuration",
options: [
{
name: "--env",
args: {
name: "env",
},
},
helpOption,
],
args: {
name: "field",
isOptional: true,
suggestions: ["schema", "rules"],
},
},
],
options: [helpOption],
};
export default completionSpec;