@@ -38,11 +38,11 @@ import { environmentAuthenticatedAuthLayer } from "./auth/http.ts";
3838const CliRuntimeLayer = Layer . mergeAll ( NodeServices . layer , NetService . layer ) ;
3939class ProjectCliHttpApi extends HttpApi . make ( "environment" ) . add ( EnvironmentOrchestrationHttpApi ) { }
4040
41- const cloudCli = makeCli ( { cloudEnabled : true } ) ;
42- const noCloudCli = makeCli ( { cloudEnabled : false } ) ;
41+ const connectCli = makeCli ( { cloudEnabled : true } ) ;
42+ const noConnectCli = makeCli ( { cloudEnabled : false } ) ;
4343const runCli = ( args : ReadonlyArray < string > , command = cli ) =>
4444 Command . runWith ( command , { version : "0.0.0" } ) ( args ) ;
45- const runCloudCli = ( args : ReadonlyArray < string > ) => runCli ( args , cloudCli ) ;
45+ const runConnectCli = ( args : ReadonlyArray < string > ) => runCli ( args , connectCli ) ;
4646const runCliWithRuntime = ( args : ReadonlyArray < string > ) =>
4747 runCli ( args ) . pipe ( Effect . provide ( CliRuntimeLayer ) ) ;
4848
@@ -179,30 +179,30 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {
179179 } ) ,
180180 ) ;
181181
182- it . effect ( "rejects cloud commands when public cloud configuration is missing" , ( ) =>
182+ it . effect ( "rejects connect commands when public configuration is missing" , ( ) =>
183183 Effect . gen ( function * ( ) {
184- const error = yield * runCli ( [ "cloud " , "status" ] , noCloudCli ) . pipe ( Effect . flip ) ;
184+ const error = yield * runCli ( [ "connect " , "status" ] , noConnectCli ) . pipe ( Effect . flip ) ;
185185
186186 if ( ! CliError . isCliError ( error ) ) {
187187 assert . fail ( `Expected CliError, got ${ String ( error ) } ` ) ;
188188 }
189189 if ( error . _tag !== "ShowHelp" ) {
190190 assert . fail ( `Expected ShowHelp, got ${ error . _tag } ` ) ;
191191 }
192- assert . deepEqual ( error . commandPath , [ "t3" , "cloud " ] ) ;
193- assert . include ( error . errors [ 0 ] ?. message ?? "" , "missing T3 Cloud public configuration" ) ;
192+ assert . deepEqual ( error . commandPath , [ "t3" , "connect " ] ) ;
193+ assert . include ( error . errors [ 0 ] ?. message ?? "" , "missing T3 Connect public configuration" ) ;
194194
195195 const output = ( yield * TestConsole . errorLines ) . join ( "\n" ) ;
196196 assert . include ( output , "ERROR" ) ;
197- assert . include ( output , "missing T3 Cloud public configuration" ) ;
197+ assert . include ( output , "missing T3 Connect public configuration" ) ;
198198 } ) . pipe ( Effect . provide ( Layer . mergeAll ( CliRuntimeLayer , TestConsole . layer ) ) ) ,
199199 ) ;
200200
201- it . effect ( "reports fresh headless cloud state without requiring local configuration" , ( ) =>
201+ it . effect ( "reports fresh headless connect state without requiring local configuration" , ( ) =>
202202 Effect . gen ( function * ( ) {
203203 const baseDir = mkdtempSync ( join ( tmpdir ( ) , "t3-cli-cloud-status-test-" ) ) ;
204204 const { output } = yield * captureStdout (
205- runCloudCli ( [ "cloud " , "status" , "--base-dir" , baseDir , "--json" ] ) ,
205+ runConnectCli ( [ "connect " , "status" , "--base-dir" , baseDir , "--json" ] ) ,
206206 ) ;
207207 // @effect -diagnostics-next-line preferSchemaOverJson:off - CLI JSON output is decoded as a presentation DTO.
208208 const status = JSON . parse ( output ) as {
@@ -221,21 +221,21 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {
221221 } ) ,
222222 ) ;
223223
224- it . effect ( "reports actionable human-readable headless cloud state" , ( ) =>
224+ it . effect ( "reports actionable human-readable headless connect state" , ( ) =>
225225 Effect . gen ( function * ( ) {
226226 const baseDir = mkdtempSync ( join ( tmpdir ( ) , "t3-cli-cloud-status-human-test-" ) ) ;
227227 const { output } = yield * captureStdout (
228- runCloudCli ( [ "cloud " , "status" , "--base-dir" , baseDir ] ) ,
228+ runConnectCli ( [ "connect " , "status" , "--base-dir" , baseDir ] ) ,
229229 ) ;
230230
231- assert . include ( output , "T3 Cloud \n Exposure: disabled" ) ;
231+ assert . include ( output , "T3 Connect \n Exposure: disabled" ) ;
232232 assert . include ( output , " Authorization: missing" ) ;
233233 assert . include ( output , " Environment link: not provisioned" ) ;
234- assert . include ( output , "Next: Run `t3 cloud link` to authorize and enable cloud exposure ." ) ;
234+ assert . include ( output , "Next: Run `t3 connect link` to authorize and enable T3 Connect ." ) ;
235235 } ) ,
236236 ) ;
237237
238- it . effect ( "logs in to headless cloud without enabling exposure " , ( ) =>
238+ it . effect ( "logs in to headless connect without enabling access " , ( ) =>
239239 Effect . gen ( function * ( ) {
240240 const baseDir = mkdtempSync ( join ( tmpdir ( ) , "t3-cli-cloud-login-test-" ) ) ;
241241 const { secretsDir } = yield * deriveServerPaths ( baseDir , undefined ) ;
@@ -250,34 +250,36 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {
250250 } ) ,
251251 ) ;
252252
253- const login = yield * captureStdout ( runCloudCli ( [ "cloud" , "login" , "--base-dir" , baseDir ] ) ) ;
253+ const login = yield * captureStdout (
254+ runConnectCli ( [ "connect" , "login" , "--base-dir" , baseDir ] ) ,
255+ ) ;
254256 const status = yield * captureStdout (
255- runCloudCli ( [ "cloud " , "status" , "--base-dir" , baseDir , "--json" ] ) ,
257+ runConnectCli ( [ "connect " , "status" , "--base-dir" , baseDir , "--json" ] ) ,
256258 ) ;
257259 // @effect -diagnostics-next-line preferSchemaOverJson:off - CLI JSON output is decoded as a presentation DTO.
258260 const decoded = JSON . parse ( status . output ) as {
259261 readonly desired : boolean ;
260262 readonly authenticated : boolean ;
261263 } ;
262264
263- assert . equal ( login . output , "Signed in to T3 Cloud ." ) ;
265+ assert . equal ( login . output , "Signed in to T3 Connect ." ) ;
264266 assert . isFalse ( decoded . desired ) ;
265267 assert . isTrue ( decoded . authenticated ) ;
266268 } ) ,
267269 ) ;
268270
269- it . effect ( "disables headless cloud exposure without a running server" , ( ) =>
271+ it . effect ( "disables headless connect without a running server" , ( ) =>
270272 Effect . gen ( function * ( ) {
271273 const baseDir = mkdtempSync ( join ( tmpdir ( ) , "t3-cli-cloud-unlink-test-" ) ) ;
272274 const { output } = yield * captureStdout (
273- runCloudCli ( [ "cloud " , "unlink" , "--base-dir" , baseDir ] ) ,
275+ runConnectCli ( [ "connect " , "unlink" , "--base-dir" , baseDir ] ) ,
274276 ) ;
275277
276- assert . equal ( output , "T3 Cloud exposure is disabled locally." ) ;
278+ assert . equal ( output , "T3 Connect is disabled locally." ) ;
277279 } ) ,
278280 ) ;
279281
280- it . effect ( "logs out of headless cloud and removes the stored CLI authorization" , ( ) =>
282+ it . effect ( "logs out of headless connect and removes the stored CLI authorization" , ( ) =>
281283 Effect . gen ( function * ( ) {
282284 const baseDir = mkdtempSync ( join ( tmpdir ( ) , "t3-cli-cloud-logout-test-" ) ) ;
283285 const { secretsDir } = yield * deriveServerPaths ( baseDir , undefined ) ;
@@ -286,10 +288,10 @@ it.layer(NodeServices.layer)("bin cli parsing", (it) => {
286288 writeFileSync ( tokenPath , "invalid persisted token" ) ;
287289
288290 const { output } = yield * captureStdout (
289- runCloudCli ( [ "cloud " , "logout" , "--base-dir" , baseDir ] ) ,
291+ runConnectCli ( [ "connect " , "logout" , "--base-dir" , baseDir ] ) ,
290292 ) ;
291293
292- assert . equal ( output , "Signed out of T3 Cloud locally." ) ;
294+ assert . equal ( output , "Signed out of T3 Connect locally." ) ;
293295 assert . isFalse ( existsSync ( tokenPath ) ) ;
294296 } ) ,
295297 ) ;
0 commit comments