Skip to content

Commit 22f9f30

Browse files
[codex] Rebrand T3 Cloud as T3 Connect (#3011)
Co-authored-by: codex <[email protected]>
1 parent 983a8c7 commit 22f9f30

41 files changed

Lines changed: 494 additions & 558 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.env.example‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Optional: T3 Cloud source builds
2-
# Leave these unset to disable optional T3 Cloud features in local source builds.
1+
# Optional: T3 Connect source builds
2+
# Leave these unset to disable optional T3 Connect features in local source builds.
33
# Release builds inject their public values at build time. Do not add server-side
44
# secrets to this file.
55

‎.github/workflows/deploy-relay.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy T3 Cloud relay
1+
name: Deploy T3 Connect relay
22

33
on:
44
push:

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
--github-output
168168
169169
relay_public_config:
170-
name: Resolve T3 Cloud public config
170+
name: Resolve T3 Connect public config
171171
needs: preflight
172172
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' }}
173173
runs-on: blacksmith-8vcpu-ubuntu-2404

‎apps/desktop/src/window/DesktopWindow.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ describe("DesktopWindow", () => {
165165
assert.isTrue(
166166
DesktopWindow.isSameOriginRendererNavigation({
167167
applicationUrl: "http://127.0.0.1:3773/",
168-
navigationUrl: "http://127.0.0.1:3773/settings/cloud",
168+
navigationUrl: "http://127.0.0.1:3773/settings/connections",
169169
}),
170170
);
171171
assert.isFalse(

‎apps/mobile/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This app has three variants:
1616

1717
Run commands from `apps/mobile`.
1818

19-
T3 Cloud is optional and disabled in a fresh clone. Public configuration belongs in the
19+
T3 Connect is optional and disabled in a fresh clone. Public configuration belongs in the
2020
repository-root `.env` or `.env.local`, not an `apps/mobile/.env` file. See
2121
[`../../.env.example`](../../.env.example).
2222

‎apps/mobile/src/features/cloud/linkEnvironment.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ describe("mobile cloud link environment client", () => {
572572
if (String(url).endsWith("/v1/client/environment-link-challenges")) {
573573
return Promise.resolve(Response.json(validLinkChallengeResponse()));
574574
}
575-
if (String(url).endsWith("/api/cloud/link-proof")) {
575+
if (String(url).endsWith("/api/connect/link-proof")) {
576576
return Promise.resolve(Response.json(validLinkProof()));
577577
}
578578
return Promise.resolve(Response.json(validLinkResponse("env-other")));
@@ -631,7 +631,7 @@ describe("mobile cloud link environment client", () => {
631631
if (String(url).endsWith("/v1/client/environment-link-challenges")) {
632632
return Promise.resolve(Response.json(validLinkChallengeResponse()));
633633
}
634-
if (String(url).endsWith("/api/cloud/link-proof")) {
634+
if (String(url).endsWith("/api/connect/link-proof")) {
635635
return Promise.resolve(Response.json(validLinkProof()));
636636
}
637637
return Promise.resolve(
@@ -669,7 +669,7 @@ describe("mobile cloud link environment client", () => {
669669
if (String(url).endsWith("/v1/client/environment-link-challenges")) {
670670
return Promise.resolve(Response.json(validLinkChallengeResponse()));
671671
}
672-
if (String(url).endsWith("/api/cloud/link-proof")) {
672+
if (String(url).endsWith("/api/connect/link-proof")) {
673673
return Promise.resolve(Response.json(validLinkProof()));
674674
}
675675
return Promise.resolve(
@@ -713,7 +713,7 @@ describe("mobile cloud link environment client", () => {
713713
if (String(url).endsWith("/v1/client/environment-link-challenges")) {
714714
return Promise.resolve(Response.json(validLinkChallengeResponse()));
715715
}
716-
if (String(url).endsWith("/api/cloud/link-proof")) {
716+
if (String(url).endsWith("/api/connect/link-proof")) {
717717
return Promise.resolve(Response.json(validLinkProof()));
718718
}
719719
if (String(url).endsWith("/v1/client/environment-links")) {

‎apps/mobile/src/features/cloud/linkEnvironment.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ export function linkEnvironmentToCloud(input: {
301301
),
302302
);
303303
const environmentClient = yield* makeEnvironmentHttpApiClient(input.connection.httpBaseUrl);
304-
const proof = yield* environmentClient.cloud
304+
const proof = yield* environmentClient.connect
305305
.linkProof({
306306
headers: { authorization: `Bearer ${localBearerToken}` },
307307
payload: {
@@ -336,7 +336,7 @@ export function linkEnvironmentToCloud(input: {
336336
link,
337337
});
338338

339-
yield* environmentClient.cloud
339+
yield* environmentClient.connect
340340
.relayConfig({
341341
headers: { authorization: `Bearer ${localBearerToken}` },
342342
payload: {

‎apps/server/src/bin.test.ts‎

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ import { environmentAuthenticatedAuthLayer } from "./auth/http.ts";
3838
const CliRuntimeLayer = Layer.mergeAll(NodeServices.layer, NetService.layer);
3939
class 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 });
4343
const 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);
4646
const 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
);

‎apps/server/src/bin.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,31 @@ import * as CliError from "effect/unstable/cli/CliError";
88
import * as NetService from "@t3tools/shared/Net";
99
import packageJson from "../package.json" with { type: "json" };
1010
import { authCommand } from "./cli/auth.ts";
11-
import { cloudCommand } from "./cli/cloud.ts";
11+
import { connectCommand } from "./cli/connect.ts";
1212
import { hasCloudPublicConfig } from "./cloud/publicConfig.ts";
1313
import { sharedServerCommandFlags } from "./cli/config.ts";
1414
import { projectCommand } from "./cli/project.ts";
1515
import { runServerCommand, serveCommand, startCommand } from "./cli/server.ts";
1616

1717
const CliRuntimeLayer = Layer.mergeAll(NodeServices.layer, NetService.layer);
1818

19-
const cloudPublicConfigMissingMessage =
20-
"T3 Cloud commands are unavailable: this build is missing T3 Cloud public configuration.";
19+
const connectPublicConfigMissingMessage =
20+
"T3 Connect commands are unavailable: this build is missing T3 Connect public configuration.";
2121

22-
class CloudPublicConfigMissingError extends CliError.UserError {
22+
class ConnectPublicConfigMissingError extends CliError.UserError {
2323
override get message() {
24-
return cloudPublicConfigMissingMessage;
24+
return connectPublicConfigMissingMessage;
2525
}
2626
}
2727

28-
const cloudUnavailableCommand = Command.make("cloud").pipe(
29-
Command.withDescription("T3 Cloud is unavailable in builds without public cloud configuration."),
28+
const connectUnavailableCommand = Command.make("connect").pipe(
29+
Command.withDescription("T3 Connect is unavailable in builds without public configuration."),
3030
Command.withHidden,
3131
Command.withHandler(() =>
3232
Effect.fail(
3333
new CliError.ShowHelp({
34-
commandPath: ["t3", "cloud"],
35-
errors: [new CloudPublicConfigMissingError({ cause: cloudPublicConfigMissingMessage })],
34+
commandPath: ["t3", "connect"],
35+
errors: [new ConnectPublicConfigMissingError({ cause: connectPublicConfigMissingMessage })],
3636
}),
3737
),
3838
),
@@ -47,7 +47,7 @@ export const makeCli = ({ cloudEnabled = hasCloudPublicConfig } = {}) =>
4747
serveCommand,
4848
authCommand,
4949
projectCommand,
50-
cloudEnabled ? cloudCommand : cloudUnavailableCommand,
50+
cloudEnabled ? connectCommand : connectUnavailableCommand,
5151
]),
5252
);
5353

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { assert, it } from "@effect/vitest";
33
import * as Effect from "effect/Effect";
44
import * as Option from "effect/Option";
55

6-
import { acquireRelayClientForLink } from "./cloud.ts";
6+
import { acquireRelayClientForLink } from "./connect.ts";
77

88
const managedExecutable = {
99
status: "available",

0 commit comments

Comments
 (0)