@@ -455,7 +455,7 @@ export async function main(argv: string[]): Promise<void> {
455
455
describe : "Protocol to listen to requests on, defaults to http." ,
456
456
choices : [ "http" , "https" ] ,
457
457
} )
458
- . option ( "public" , {
458
+ . option ( "experimental- public" , {
459
459
describe : "Static assets to be served" ,
460
460
type : "string" ,
461
461
} )
@@ -482,6 +482,18 @@ export async function main(argv: string[]): Promise<void> {
482
482
const { filename, format } = args ;
483
483
const config = args . config as Config ;
484
484
485
+ if ( args [ "experimental-public" ] ) {
486
+ console . warn (
487
+ "🚨 The --experimental-public field is experimental and will change in the future."
488
+ ) ;
489
+ }
490
+
491
+ if ( args . public ) {
492
+ console . error (
493
+ "🚨 The --public field has been renamed to --experimental-public, and will change behaviour in the future."
494
+ ) ;
495
+ }
496
+
485
497
// -- snip, extract --
486
498
487
499
if ( ! args . local ) {
@@ -526,7 +538,7 @@ export async function main(argv: string[]): Promise<void> {
526
538
accountId = { config . account_id }
527
539
site = { args . site || config . site ?. bucket }
528
540
port = { args . port || config . dev ?. port }
529
- public = { args . public }
541
+ public = { args [ "experimental- public" ] }
530
542
compatibilityDate = { config . compatibility_date }
531
543
compatibilityFlags = { config . compatibility_flags }
532
544
usageModel = { config . usage_model }
@@ -580,7 +592,7 @@ export async function main(argv: string[]): Promise<void> {
580
592
describe : "name to use when uploading" ,
581
593
type : "string" ,
582
594
} )
583
- . option ( "public" , {
595
+ . option ( "experimental- public" , {
584
596
describe : "Static assets to be served" ,
585
597
type : "string" ,
586
598
} )
@@ -619,6 +631,18 @@ export async function main(argv: string[]): Promise<void> {
619
631
"🚫 Local publishing is not yet supported"
620
632
) ;
621
633
}
634
+
635
+ if ( args [ "experimental-public" ] ) {
636
+ console . warn (
637
+ "🚨 The --experimental-public field is experimental and will change in the future."
638
+ ) ;
639
+ }
640
+ if ( args . public ) {
641
+ console . error (
642
+ "🚨 The --public field has been renamed to --experimental-public, and will change behaviour in the future."
643
+ ) ;
644
+ }
645
+
622
646
const config = args . config as Config ;
623
647
624
648
// -- snip, extract --
@@ -648,7 +672,7 @@ export async function main(argv: string[]): Promise<void> {
648
672
jsxFactory : args [ "jsx-factory" ] ,
649
673
jsxFragment : args [ "jsx-fragment" ] ,
650
674
routes : args . routes ,
651
- public : args . public ,
675
+ public : args [ "experimental- public" ] ,
652
676
site : args . site ,
653
677
} ) ;
654
678
}
0 commit comments