@@ -20,6 +20,7 @@ import ExternalCI from '@/commands/externalCi/CLI.js';
20
20
import { confOptions , projectOptions } from '@/common/promptOptions.js' ;
21
21
import { CommandPrune } from '@/commands/common/prune.js' ;
22
22
import { CommandInspect } from '@/commands/common/inspect.js' ;
23
+ import { pushStuccoJson } from '@/commands/cloud/pushStuccoJson.js' ;
23
24
24
25
welcome ( ) . then ( ( ) => {
25
26
new Configuration ( ) ;
@@ -51,15 +52,15 @@ welcome().then(() => {
51
52
. command (
52
53
'login' ,
53
54
'Login to GraphQL Editor' ,
54
- async ( yargs ) => { } ,
55
+ async ( yargs ) => { } ,
55
56
async ( argv ) => {
56
57
await Auth . login ( ) . then ( Config . setTokenOptions ) ;
57
58
} ,
58
59
)
59
60
. command (
60
61
'logout' ,
61
62
'Logout from GraphQL Editor' ,
62
- async ( yargs ) => { } ,
63
+ async ( yargs ) => { } ,
63
64
( argv ) => {
64
65
Auth . logout ( ) ;
65
66
} ,
@@ -92,15 +93,15 @@ welcome().then(() => {
92
93
. command (
93
94
'prune' ,
94
95
'Get information about redundant resolvers that do not exist in schema now.' ,
95
- async ( yargs ) => { } ,
96
+ async ( yargs ) => { } ,
96
97
async ( argv ) => {
97
98
await CommandPrune ( ) ;
98
99
} ,
99
100
)
100
101
. command (
101
102
'inspect' ,
102
103
'Get information about non-scalar resolvers that are not implemented in stucco.json' ,
103
- async ( yargs ) => { } ,
104
+ async ( yargs ) => { } ,
104
105
async ( argv ) => {
105
106
await CommandInspect ( ) ;
106
107
} ,
@@ -113,14 +114,24 @@ welcome().then(() => {
113
114
. command (
114
115
'dev' ,
115
116
'Start Typescript server and stucco server with hot reload.' ,
116
- async ( yargs ) => { } ,
117
+ async ( yargs ) => { } ,
117
118
async ( argv ) => {
118
119
CommandDev ( ) ;
119
120
} ,
120
121
)
121
122
. command ( 'token' , 'Get CI token' , async ( argv ) => {
122
123
await CommandGetCIToken ( ) ;
123
124
} )
125
+ . command (
126
+ 'stucco' ,
127
+ 'Update your stucco file to cloud for synchronizing resolvers' ,
128
+ async ( yargs ) => { } ,
129
+ async ( argv ) => {
130
+ await pushStuccoJson (
131
+ argv as Pick < ConfigurationOptions , 'project' | 'namespace' > ,
132
+ ) ;
133
+ } ,
134
+ )
124
135
. showHelpOnFail ( true )
125
136
. demandCommand ( )
126
137
. version ( )
0 commit comments