@@ -299,6 +299,40 @@ enum GlobalOption<V> implements OptionDefinition<V> {
299299 fromDefault: _getDefaultStorageDir,
300300 ),
301301 ),
302+ projectDir (
303+ DirOption (
304+ argName: 'project-dir' ,
305+ argAbbrev: 'd' ,
306+ envName: 'SERVERPOD_CLOUD_PROJECT_DIR' ,
307+ helpText: 'The path to the Serverpod Cloud project server directory.' ,
308+ // (no general default value since significant whether explicitly specified)
309+ mode: PathExistMode .mustExist,
310+ ),
311+ ),
312+ projectConfigFile (
313+ FileOption (
314+ argName: 'project-config-file' ,
315+ envName: 'SERVERPOD_CLOUD_PROJECT_CONFIG_FILE' ,
316+ fromCustom: _projectConfigFileFinder,
317+ helpText: 'The path to the Serverpod Cloud project configuration file.' ,
318+ ),
319+ ),
320+ projectConfigContent (
321+ StringOption (
322+ argName: 'project-config-content' ,
323+ envName: 'SERVERPOD_CLOUD_PROJECT_CONFIG_CONTENT' ,
324+ helpText: 'Override the scloud project configuration with a YAML string.' ,
325+ ),
326+ ),
327+ connectionTimeout (
328+ DurationOption (
329+ argName: 'connection-timeout' ,
330+ envName: 'SERVERPOD_CLOUD_CONNECTION_TIMEOUT' ,
331+ defaultsTo: Duration (seconds: 60 ),
332+ helpText: 'The timeout for the connection to the Serverpod Cloud API.' ,
333+ ),
334+ ),
335+
302336 // Developer options and flags
303337 apiServer (
304338 StringOption (
@@ -326,32 +360,6 @@ enum GlobalOption<V> implements OptionDefinition<V> {
326360 hide: true ,
327361 defaultsTo: false ,
328362 ),
329- ),
330-
331- projectDir (
332- DirOption (
333- argName: 'project-dir' ,
334- argAbbrev: 'd' ,
335- envName: 'SERVERPOD_CLOUD_PROJECT_DIR' ,
336- helpText: 'The path to the Serverpod Cloud project server directory.' ,
337- // (no general default value since significant whether explicitly specified)
338- mode: PathExistMode .mustExist,
339- ),
340- ),
341- projectConfigFile (
342- FileOption (
343- argName: 'project-config-file' ,
344- envName: 'SERVERPOD_CLOUD_PROJECT_CONFIG_FILE' ,
345- fromCustom: _projectConfigFileFinder,
346- helpText: 'The path to the Serverpod Cloud project configuration file.' ,
347- ),
348- ),
349- projectConfigContent (
350- StringOption (
351- argName: 'project-config-content' ,
352- envName: 'SERVERPOD_CLOUD_PROJECT_CONFIG_CONTENT' ,
353- helpText: 'Override the scloud project configuration with a YAML string.' ,
354- ),
355363 );
356364
357365 const GlobalOption (this .option);
@@ -393,16 +401,18 @@ class GlobalConfiguration extends Configuration<GlobalOption> {
393401
394402 Directory get scloudDir => value (GlobalOption .scloudDir);
395403
396- String get apiServer => value (GlobalOption .apiServer);
397-
398- String get consoleServer => value (GlobalOption .consoleServer);
399-
400- bool get skipConfirmation => value (GlobalOption .skipConfirmation);
401-
402404 Directory ? get projectDir => optionalValue (GlobalOption .projectDir);
403405
404406 File ? get projectConfigFile => optionalValue (GlobalOption .projectConfigFile);
405407
406408 String ? get projectConfigContent =>
407409 optionalValue (GlobalOption .projectConfigContent);
410+
411+ Duration get connectionTimeout => value (GlobalOption .connectionTimeout);
412+
413+ String get apiServer => value (GlobalOption .apiServer);
414+
415+ String get consoleServer => value (GlobalOption .consoleServer);
416+
417+ bool get skipConfirmation => value (GlobalOption .skipConfirmation);
408418}
0 commit comments