@@ -20,6 +20,7 @@ import ExternalCI from '@/commands/externalCi/CLI.js';
2020import { confOptions , projectOptions } from '@/common/promptOptions.js' ;
2121import { CommandPrune } from '@/commands/common/prune.js' ;
2222import { CommandInspect } from '@/commands/common/inspect.js' ;
23+ import { pushStuccoJson } from '@/commands/cloud/pushStuccoJson.js' ;
2324
2425welcome ( ) . then ( ( ) => {
2526 new Configuration ( ) ;
@@ -51,15 +52,15 @@ welcome().then(() => {
5152 . command (
5253 'login' ,
5354 'Login to GraphQL Editor' ,
54- async ( yargs ) => { } ,
55+ async ( yargs ) => { } ,
5556 async ( argv ) => {
5657 await Auth . login ( ) . then ( Config . setTokenOptions ) ;
5758 } ,
5859 )
5960 . command (
6061 'logout' ,
6162 'Logout from GraphQL Editor' ,
62- async ( yargs ) => { } ,
63+ async ( yargs ) => { } ,
6364 ( argv ) => {
6465 Auth . logout ( ) ;
6566 } ,
@@ -92,15 +93,15 @@ welcome().then(() => {
9293 . command (
9394 'prune' ,
9495 'Get information about redundant resolvers that do not exist in schema now.' ,
95- async ( yargs ) => { } ,
96+ async ( yargs ) => { } ,
9697 async ( argv ) => {
9798 await CommandPrune ( ) ;
9899 } ,
99100 )
100101 . command (
101102 'inspect' ,
102103 'Get information about non-scalar resolvers that are not implemented in stucco.json' ,
103- async ( yargs ) => { } ,
104+ async ( yargs ) => { } ,
104105 async ( argv ) => {
105106 await CommandInspect ( ) ;
106107 } ,
@@ -113,14 +114,24 @@ welcome().then(() => {
113114 . command (
114115 'dev' ,
115116 'Start Typescript server and stucco server with hot reload.' ,
116- async ( yargs ) => { } ,
117+ async ( yargs ) => { } ,
117118 async ( argv ) => {
118119 CommandDev ( ) ;
119120 } ,
120121 )
121122 . command ( 'token' , 'Get CI token' , async ( argv ) => {
122123 await CommandGetCIToken ( ) ;
123124 } )
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+ )
124135 . showHelpOnFail ( true )
125136 . demandCommand ( )
126137 . version ( )
0 commit comments