File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " wrangler " : patch
3+ ---
4+
5+ Deprecate 'wrangler cloudchamber apply' in favor of 'wrangler deploy'
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ function mockModifyApplication(
8585describe ( "cloudchamber apply" , ( ) => {
8686 const { setIsTTY } = useMockIsTTY ( ) ;
8787 const std = mockCLIOutput ( ) ;
88- mockConsoleMethods ( ) ;
88+ const console = mockConsoleMethods ( ) ;
8989
9090 mockAccountId ( ) ;
9191 mockApiToken ( ) ;
@@ -96,6 +96,30 @@ describe("cloudchamber apply", () => {
9696 msw . resetHandlers ( ) ;
9797 } ) ;
9898
99+ test ( "should show deprecation warning when running cloudchamber apply" , async ( ) => {
100+ setIsTTY ( false ) ;
101+ mockGetApplications ( [ ] ) ;
102+ mockCreateApplication ( { id : "test-abc" } ) ;
103+
104+ await writeWranglerConfig ( {
105+ name : "test-container" ,
106+ containers : [
107+ {
108+ name : "test-app" ,
109+ class_name : "TestDurableObject" ,
110+ image : "registry.cloudflare.com/test:latest" ,
111+ instances : 1 ,
112+ } ,
113+ ] ,
114+ } ) ;
115+
116+ await runWrangler ( "cloudchamber apply" ) ;
117+
118+ expect ( console . warn ) . toContain ( "deprecated" ) ;
119+ expect ( console . warn ) . toContain ( "wrangler deploy" ) ;
120+ expect ( console . warn ) . toContain ( "next major version" ) ;
121+ } ) ;
122+
99123 test ( "can apply a simple application" , async ( ) => {
100124 setIsTTY ( false ) ;
101125 writeWranglerConfig ( {
Original file line number Diff line number Diff line change @@ -678,7 +678,11 @@ export const cloudchamberApplyCommand = createCommand({
678678 description : "Apply the changes in the container applications to deploy" ,
679679 status : "alpha" ,
680680 owner : "Product: Cloudchamber" ,
681- hidden : false ,
681+ hidden : true ,
682+ deprecated : true ,
683+ deprecatedMessage :
684+ "`wrangler cloudchamber apply` is deprecated and will be removed in the next major version.\n" +
685+ "Please use `wrangler deploy` instead." ,
682686 } ,
683687 args : {
684688 "skip-defaults" : {
You can’t perform that action at this time.
0 commit comments