@sixb/cli 0.1.26 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/dev-runner.d.ts.map +1 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/env.d.ts +31 -0
- package/dist/commands/env.d.ts.map +1 -0
- package/dist/lib/command-line.d.ts +26 -1
- package/dist/lib/command-line.d.ts.map +1 -1
- package/dist/lib/deploy-release.d.ts +2 -0
- package/dist/lib/deploy-release.d.ts.map +1 -1
- package/dist/lib/deploy-source.d.ts +2 -0
- package/dist/lib/deploy-source.d.ts.map +1 -1
- package/dist/lib/env-config.d.ts +17 -0
- package/dist/lib/env-config.d.ts.map +1 -0
- package/dist/lib/env-file.d.ts +16 -0
- package/dist/lib/env-file.d.ts.map +1 -0
- package/dist/lib/hidden-prompt.d.ts +19 -0
- package/dist/lib/hidden-prompt.d.ts.map +1 -0
- package/dist/tui/app.d.ts +8 -0
- package/dist/tui/app.d.ts.map +1 -1
- package/dist/tui/computer.d.ts +5 -0
- package/dist/tui/computer.d.ts.map +1 -1
- package/dist/tui/context.d.ts +13 -0
- package/dist/tui/context.d.ts.map +1 -0
- package/dist/tui/format.d.ts +85 -0
- package/dist/tui/format.d.ts.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/markdown.d.ts +18 -0
- package/dist/tui/markdown.d.ts.map +1 -0
- package/dist/tui/parts.d.ts +8 -0
- package/dist/tui/parts.d.ts.map +1 -1
- package/dist/tui/runner.d.ts +37 -14
- package/dist/tui/runner.d.ts.map +1 -1
- package/dist/tui/settings.d.ts +13 -1
- package/dist/tui/settings.d.ts.map +1 -1
- package/dist/tui/transcript.d.ts +1 -1
- package/dist/tui/transcript.d.ts.map +1 -1
- package/dist/tui/ui.d.ts +7 -0
- package/dist/tui/ui.d.ts.map +1 -1
- package/dist/ui/deploy-screens.d.ts +3 -1
- package/dist/ui/deploy-screens.d.ts.map +1 -1
- package/dist/ui/env-screens.d.ts +37 -0
- package/dist/ui/env-screens.d.ts.map +1 -0
- package/package.json +19 -19
- package/src/commands/agent.ts +17 -10
- package/src/commands/api.ts +2 -1
- package/src/commands/check.ts +5 -1
- package/src/commands/deploy.ts +29 -3
- package/src/commands/dev-runner.ts +3 -1
- package/src/commands/dev.ts +3 -0
- package/src/commands/env.ts +422 -0
- package/src/index.tsx +39 -1
- package/src/lib/command-line.ts +59 -1
- package/src/lib/deploy-release.ts +3 -0
- package/src/lib/deploy-source.ts +10 -0
- package/src/lib/env-config.ts +96 -0
- package/src/lib/env-file.ts +104 -0
- package/src/lib/hidden-prompt.ts +97 -0
- package/src/tui/app.tsx +315 -179
- package/src/tui/computer.ts +37 -0
- package/src/tui/context.tsx +149 -0
- package/src/tui/format.ts +218 -1
- package/src/tui/index.tsx +13 -2
- package/src/tui/markdown.ts +91 -0
- package/src/tui/parts.ts +23 -3
- package/src/tui/runner.ts +113 -30
- package/src/tui/settings.ts +54 -5
- package/src/tui/transcript.tsx +90 -8
- package/src/tui/ui.tsx +40 -11
- package/src/ui/deploy-screens.ts +12 -1
- package/src/ui/env-screens.ts +81 -0
- package/dist/tui/folders.d.ts +0 -7
- package/dist/tui/folders.d.ts.map +0 -1
- package/src/tui/folders.ts +0 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/tui/settings.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAGvD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,cAAc,GAAG,MAAM,CAAA;AAC7D,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG,OAAO,CAAA;AACxC,MAAM,MAAM,aAAa,GAAG,mBAAmB,CAA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KAAE,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,cAAc,CAAA;CAAE,CAiBjG"}
|
package/dist/tui/transcript.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsxImportSource @opentui/react */
|
|
2
|
-
import type
|
|
2
|
+
import { type SyntaxStyle } from "@opentui/core";
|
|
3
3
|
import type { ListAgentThreadApprovalsResponses, ListAgentThreadRunsResponses } from "@sixb/client";
|
|
4
4
|
import { type LiveRun, type ShownMessage } from "./parts";
|
|
5
5
|
import type { TuiColors } from "./theme";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../src/tui/transcript.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../src/tui/transcript.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAwC,KAAK,WAAW,EAAE,MAAM,eAAe,CAAA;AAEtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAA;AAInG,OAAO,EAGL,KAAK,OAAO,EAEZ,KAAK,YAAY,EAClB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGxC,MAAM,MAAM,GAAG,GAAG,4BAA4B,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AACnE,MAAM,MAAM,QAAQ,GAAG,iCAAiC,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AAElF,mFAAmF;AACnF,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAIpD,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,SAA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+
* The focused composer's clear: ctrl+c empties a draft before it quits, and says whether there
|
|
6
|
+
* was one. The app's keys run before the composer's, so the app asks it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ComposerDraft: import("react").Context<{
|
|
9
|
+
current: (() => boolean) | null;
|
|
10
|
+
}>;
|
|
4
11
|
/** One piece of the line under the composer, such as `This Mac` or `Ask first`. */
|
|
5
12
|
export interface StatusItem {
|
|
6
13
|
readonly text: string;
|
package/dist/tui/ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/tui/ui.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,eAAO,MAAM,IAAI,QAAuC,CAAA;AACxD,eAAO,MAAM,MAAM,QAAyC,CAAA;
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/tui/ui.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,eAAO,MAAM,IAAI,QAAuC,CAAA;AACxD,eAAO,MAAM,MAAM,QAAyC,CAAA;AAa5D;;;GAGG;AACH,eAAO,MAAM,aAAa;aAA4B,CAAC,MAAM,OAAO,CAAC,GAAG,IAAI;EAAsB,CAAA;AAElG,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,WAAW,EACX,MAAM,EACN,OAAO,EACP,MAAM,EACN,UAAkB,EAClB,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;IACtC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,mEAAmE;IACnE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAC/D,+BAA+B;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3C,6BA4EA;AAED,sEAAsE;AACtE,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,KAAK,GACN,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE,CAAA;CACnE,6BAYA;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAQlD;AAED,yDAAyD;AACzD,wBAAgB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,UAAO,GAAG,MAAM,CAQxD"}
|
|
@@ -6,9 +6,11 @@ export declare function deployReleaseView({ release, configPath, }: {
|
|
|
6
6
|
/** The plain line a finished step prints where there is no live view, and in CI logs. */
|
|
7
7
|
export declare function deployStepLine(label: string, seconds: string): string;
|
|
8
8
|
/** How a deploy ended. What was deployed, and where, opened the deploy's output already. */
|
|
9
|
-
export declare function deployCompleteView({ release, seconds, }: {
|
|
9
|
+
export declare function deployCompleteView({ release, seconds, keptEnv, }: {
|
|
10
10
|
release: DeployRelease;
|
|
11
11
|
seconds?: number;
|
|
12
|
+
/** The deploy couldn't update the server's `.env`, so this release runs on its current values. */
|
|
13
|
+
keptEnv?: boolean;
|
|
12
14
|
}): string;
|
|
13
15
|
export declare function deployStatusView({ name, location, status, }: {
|
|
14
16
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-screens.d.ts","sourceRoot":"","sources":["../../src/ui/deploy-screens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EAEX,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAA;AAmB1B,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,UAAU,GACX,EAAE;IACD,OAAO,EAAE,aAAa,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;CACnB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"deploy-screens.d.ts","sourceRoot":"","sources":["../../src/ui/deploy-screens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EAEX,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAA;AAmB1B,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,UAAU,GACX,EAAE;IACD,OAAO,EAAE,aAAa,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;CACnB,GAAG,MAAM,CAkET;AAED,yFAAyF;AACzF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,4FAA4F;AAC5F,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,OAAO,EACP,OAAe,GAChB,EAAE;IACD,OAAO,EAAE,aAAa,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,kGAAkG;IAClG,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,MAAM,CAmBT;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,MAAM,GACP,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ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A;CACjC,GAAG,MAAM,CAcT"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { EnvName } from "@sixb/core/env";
|
|
2
|
+
export declare function envPulledView(input: {
|
|
3
|
+
readonly count: number;
|
|
4
|
+
readonly env: EnvName;
|
|
5
|
+
}): string;
|
|
6
|
+
/** What a pull says when it leaves `.env` as it was. A deploy watches its output for this. */
|
|
7
|
+
export declare const ENV_KEPT_MESSAGE = "Kept the current .env";
|
|
8
|
+
/** A deploy kept the server's `.env`, because the source was down or the commit has none. */
|
|
9
|
+
export declare function envKeptView(input: {
|
|
10
|
+
readonly env: EnvName;
|
|
11
|
+
readonly reason: string;
|
|
12
|
+
}): string;
|
|
13
|
+
export declare function envSetView(input: {
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly env: EnvName;
|
|
16
|
+
readonly declared: boolean;
|
|
17
|
+
}): string;
|
|
18
|
+
export declare function envInitView(input: {
|
|
19
|
+
readonly uploaded: readonly {
|
|
20
|
+
readonly env: EnvName;
|
|
21
|
+
readonly count: number;
|
|
22
|
+
}[];
|
|
23
|
+
readonly names: number;
|
|
24
|
+
}): string;
|
|
25
|
+
export interface EnvStatusRow {
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly dev: EnvStatusCell;
|
|
28
|
+
readonly prod: EnvStatusCell;
|
|
29
|
+
readonly declared: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** `set` has a value; `missing` must have one; `unneeded` needs none; `unknown` can't be read. */
|
|
32
|
+
export type EnvStatusCell = "set" | "missing" | "unneeded" | "unknown";
|
|
33
|
+
export declare function envStatusView(input: {
|
|
34
|
+
readonly rows: readonly EnvStatusRow[];
|
|
35
|
+
readonly missing: number;
|
|
36
|
+
}): string;
|
|
37
|
+
//# sourceMappingURL=env-screens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-screens.d.ts","sourceRoot":"","sources":["../../src/ui/env-screens.ts"],"names":[],"mappings":"AAAA,OAAO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SAAS,YAAY,EAAE,CAAA;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB,GAAG,MAAM,CAkBT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sixb/cli",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Command-line interface for Sixb projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sixb",
|
|
@@ -31,27 +31,27 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@opentui/core": "0.6.6",
|
|
33
33
|
"@opentui/react": "0.6.6",
|
|
34
|
-
"@sixb/agent": "0.1
|
|
35
|
-
"@sixb/agent-worker": "0.1
|
|
36
|
-
"@sixb/app": "^0.
|
|
37
|
-
"@sixb/client": "^0.
|
|
38
|
-
"@sixb/core": "0.1
|
|
39
|
-
"@sixb/cli-core": "^0.
|
|
40
|
-
"@sixb/orchestrator": "0.1
|
|
41
|
-
"@sixb/pipeline-worker": "0.1
|
|
42
|
-
"@sixb/projection-worker": "0.1
|
|
43
|
-
"@sixb/rules-worker": "0.1
|
|
44
|
-
"@sixb/sandboxes-local": "^0.
|
|
45
|
-
"@sixb/server": "0.1
|
|
46
|
-
"@sixb/sync-worker": "0.1
|
|
47
|
-
"@sixb/workflow-worker": "0.1
|
|
48
|
-
"create-sixb": "^0.
|
|
34
|
+
"@sixb/agent": "0.2.1",
|
|
35
|
+
"@sixb/agent-worker": "0.2.1",
|
|
36
|
+
"@sixb/app": "^0.2.0",
|
|
37
|
+
"@sixb/client": "^0.2.0",
|
|
38
|
+
"@sixb/core": "0.2.1",
|
|
39
|
+
"@sixb/cli-core": "^0.2.0",
|
|
40
|
+
"@sixb/orchestrator": "0.2.1",
|
|
41
|
+
"@sixb/pipeline-worker": "0.2.1",
|
|
42
|
+
"@sixb/projection-worker": "0.2.1",
|
|
43
|
+
"@sixb/rules-worker": "0.2.1",
|
|
44
|
+
"@sixb/sandboxes-local": "^0.2.0",
|
|
45
|
+
"@sixb/server": "0.2.1",
|
|
46
|
+
"@sixb/sync-worker": "0.2.1",
|
|
47
|
+
"@sixb/workflow-worker": "0.2.1",
|
|
48
|
+
"create-sixb": "^0.2.0",
|
|
49
49
|
"react": "^19.2.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@sixb/deploy-ssh": "0.
|
|
53
|
-
"@sixb/desktop": "0.
|
|
54
|
-
"@sixb/ducklake": "0.1
|
|
52
|
+
"@sixb/deploy-ssh": "0.2.0",
|
|
53
|
+
"@sixb/desktop": "0.2.0",
|
|
54
|
+
"@sixb/ducklake": "0.2.1",
|
|
55
55
|
"@types/bun": "latest",
|
|
56
56
|
"@types/react": "^19.0.0",
|
|
57
57
|
"typescript": "^5.7.0"
|
package/src/commands/agent.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { realpath } from "node:fs/promises"
|
|
1
2
|
import { createInterface } from "node:readline/promises"
|
|
2
3
|
import {
|
|
3
4
|
type AgentRunStreamEvent,
|
|
@@ -11,8 +12,8 @@ import {
|
|
|
11
12
|
listModels,
|
|
12
13
|
postAgentThreadMessage,
|
|
13
14
|
} from "@sixb/client"
|
|
15
|
+
import { thisComputer, thisComputerId } from "../tui/computer"
|
|
14
16
|
import { type Connection, connect } from "../tui/connection"
|
|
15
|
-
import { folderOf, rememberFolder } from "../tui/folders"
|
|
16
17
|
import { toolLine } from "../tui/format"
|
|
17
18
|
import { liveRun, reduceLive, shownMessage } from "../tui/parts"
|
|
18
19
|
import { LocalRunner } from "../tui/runner"
|
|
@@ -57,7 +58,9 @@ export async function runAgent(options: {
|
|
|
57
58
|
)
|
|
58
59
|
}
|
|
59
60
|
const { client } = connection
|
|
60
|
-
const settings = await loadSettings()
|
|
61
|
+
const settings = await loadSettings(process.cwd())
|
|
62
|
+
// As the project keeps it, and the local sandbox compares it: its real path.
|
|
63
|
+
const folder = await realpath(process.cwd())
|
|
61
64
|
const models = (await listModels({ client })).data?.language ?? []
|
|
62
65
|
|
|
63
66
|
const threadId =
|
|
@@ -67,7 +70,9 @@ export async function runAgent(options: {
|
|
|
67
70
|
client,
|
|
68
71
|
body: {
|
|
69
72
|
title: text.split("\n")[0]?.slice(0, 72) ?? "Conversation",
|
|
70
|
-
...(options.cloud
|
|
73
|
+
...(options.cloud
|
|
74
|
+
? {}
|
|
75
|
+
: { runsOn: "computer" as const, computer: { ...(await thisComputer()), folder } }),
|
|
71
76
|
},
|
|
72
77
|
throwOnError: true,
|
|
73
78
|
})
|
|
@@ -76,18 +81,20 @@ export async function runAgent(options: {
|
|
|
76
81
|
const { data: thread } = await getAgentThread({ client, path: { threadId }, throwOnError: true })
|
|
77
82
|
const onComputer = thread.runsOn === "computer"
|
|
78
83
|
if (onComputer) {
|
|
79
|
-
const
|
|
80
|
-
|
|
84
|
+
const place = thread.computer
|
|
85
|
+
const computerId = await thisComputerId()
|
|
86
|
+
if (place?.id !== computerId || place.folder !== folder) {
|
|
81
87
|
throw new Error(
|
|
82
|
-
|
|
83
|
-
?
|
|
84
|
-
:
|
|
88
|
+
!place
|
|
89
|
+
? "[SixbCLI] This conversation has no folder yet: open it with sixb in its folder, and press ctrl+f."
|
|
90
|
+
: place.id === computerId
|
|
91
|
+
? `[SixbCLI] This conversation works in ${place.folder}: run sixb agent there.`
|
|
92
|
+
: `[SixbCLI] This conversation runs on ${place.name}: run sixb agent there.`
|
|
85
93
|
)
|
|
86
94
|
}
|
|
87
|
-
if (!options.thread) await rememberFolder(thread.id, process.cwd())
|
|
88
95
|
}
|
|
89
96
|
const runner = onComputer
|
|
90
|
-
? new LocalRunner(connection,
|
|
97
|
+
? new LocalRunner(connection, folder, (error) => step(tone.fail(errorText(error))))
|
|
91
98
|
: null
|
|
92
99
|
if (!options.json) {
|
|
93
100
|
const mode = approvalMode ?? thread.approvalMode
|
package/src/commands/api.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { stat } from "node:fs/promises"
|
|
2
2
|
import { resolve } from "node:path"
|
|
3
|
-
import { createSixbServer, type SixbServer } from "@sixb/server"
|
|
3
|
+
import { createSixbServer, requestTimingOptionsFromEnv, type SixbServer } from "@sixb/server"
|
|
4
4
|
import { apiDocsUrl, apiEventsUrl, apiUrl, resolveBrowserTopology } from "../lib/browser-topology"
|
|
5
5
|
import type { LoadedSixbHost } from "../lib/loadSixb"
|
|
6
6
|
import { builtAppOutdir, loadProductionSixb } from "../lib/production"
|
|
@@ -70,6 +70,7 @@ export async function runApi(options: ApiOptions = {}) {
|
|
|
70
70
|
},
|
|
71
71
|
...(hasAuthExperience ? { authExperience: { outdir: authExperienceOutdir } } : {}),
|
|
72
72
|
...(trustedProxies.length > 0 ? { trustedProxies } : {}),
|
|
73
|
+
timing: requestTimingOptionsFromEnv(),
|
|
73
74
|
})
|
|
74
75
|
await server.start()
|
|
75
76
|
|
package/src/commands/check.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { resolve } from "node:path"
|
|
1
|
+
import { dirname, resolve } from "node:path"
|
|
2
|
+
import { assertDeclaredEnv } from "../lib/env-config"
|
|
2
3
|
import { errorMessage } from "../lib/errors"
|
|
3
4
|
import { checkRuntimeHealth } from "../lib/health"
|
|
4
5
|
import { type LoadedSixbHost, loadSixbFromEntry } from "../lib/loadSixb"
|
|
@@ -16,6 +17,9 @@ export interface CheckOptions {
|
|
|
16
17
|
|
|
17
18
|
export async function runCheck(options: CheckOptions = {}) {
|
|
18
19
|
const entry = resolve(options.entry ?? "sixb.config.ts")
|
|
20
|
+
// First, so a missing variable is named instead of surfacing as whatever reading it breaks.
|
|
21
|
+
await assertDeclaredEnv(dirname(entry))
|
|
22
|
+
|
|
19
23
|
const sixb = await withTask("check", "Generating types", async (task) => {
|
|
20
24
|
await generateProjectTypes({ entry })
|
|
21
25
|
task.step("Loading project")
|
package/src/commands/deploy.ts
CHANGED
|
@@ -12,12 +12,14 @@ import type {
|
|
|
12
12
|
import { loadDeployConfig } from "../lib/deploy-config"
|
|
13
13
|
import { buildDeployRelease } from "../lib/deploy-release"
|
|
14
14
|
import {
|
|
15
|
+
commitHasProjectFile,
|
|
15
16
|
deployer,
|
|
16
17
|
packSource,
|
|
17
18
|
projectPathOf,
|
|
18
19
|
repoRootOf,
|
|
19
20
|
resolveBunVersion,
|
|
20
21
|
} from "../lib/deploy-source"
|
|
22
|
+
import { ENV_CONFIG_FILE, loadEnvConfig } from "../lib/env-config"
|
|
21
23
|
import { SixbCliError } from "../lib/errors"
|
|
22
24
|
import {
|
|
23
25
|
bunVersionFile,
|
|
@@ -45,6 +47,7 @@ import {
|
|
|
45
47
|
renderStatic,
|
|
46
48
|
withTask,
|
|
47
49
|
} from "../ui"
|
|
50
|
+
import { ENV_KEPT_MESSAGE } from "../ui/env-screens"
|
|
48
51
|
import { canRunLive } from "../ui/live/can-run-live"
|
|
49
52
|
|
|
50
53
|
export interface DeployOptions {
|
|
@@ -57,9 +60,13 @@ export interface DeployOptions {
|
|
|
57
60
|
export async function runDeploy(options: DeployOptions = {}): Promise<void> {
|
|
58
61
|
const cwd = options.cwd ?? process.cwd()
|
|
59
62
|
const { path, config } = await loadDeployConfig(cwd)
|
|
63
|
+
const envFromSource = Boolean((await loadEnvConfig(cwd))?.source)
|
|
60
64
|
|
|
61
65
|
if (options.dryRun) {
|
|
62
|
-
const release = buildDeployRelease(config, {
|
|
66
|
+
const release = buildDeployRelease(config, {
|
|
67
|
+
bunVersion: await resolveBunVersion(cwd),
|
|
68
|
+
envFromSource,
|
|
69
|
+
})
|
|
63
70
|
if (options.json) return writeJson(release)
|
|
64
71
|
await renderStatic(deployReleaseView({ release, configPath: relative(cwd, path) || path }))
|
|
65
72
|
return
|
|
@@ -70,6 +77,8 @@ export async function runDeploy(options: DeployOptions = {}): Promise<void> {
|
|
|
70
77
|
const source = await packSource(cwd, options.ref)
|
|
71
78
|
const release = buildDeployRelease(config, {
|
|
72
79
|
bunVersion: await resolveBunVersion(cwd, source),
|
|
80
|
+
// `--ref` can name a commit from before the project had one, which can't run the pull.
|
|
81
|
+
envFromSource: envFromSource && (await commitHasProjectFile(cwd, source, ENV_CONFIG_FILE)),
|
|
73
82
|
})
|
|
74
83
|
// Stop before uploading anything when the target already says the deploy cannot work.
|
|
75
84
|
task.step(`Checking ${location(config)}`)
|
|
@@ -108,6 +117,7 @@ export async function runDeploy(options: DeployOptions = {}): Promise<void> {
|
|
|
108
117
|
deployCompleteView({
|
|
109
118
|
release,
|
|
110
119
|
seconds: (Date.now() - deployStartedAt) / 1000,
|
|
120
|
+
keptEnv: progress.state.keptEnv,
|
|
111
121
|
})
|
|
112
122
|
)
|
|
113
123
|
}
|
|
@@ -115,7 +125,10 @@ export async function runDeploy(options: DeployOptions = {}): Promise<void> {
|
|
|
115
125
|
export async function runDeployCheck(options: { readonly json?: boolean; readonly cwd?: string }) {
|
|
116
126
|
const cwd = options.cwd ?? process.cwd()
|
|
117
127
|
const { config } = await loadDeployConfig(cwd)
|
|
118
|
-
const release = buildDeployRelease(config, {
|
|
128
|
+
const release = buildDeployRelease(config, {
|
|
129
|
+
bunVersion: await resolveBunVersion(cwd),
|
|
130
|
+
envFromSource: Boolean((await loadEnvConfig(cwd))?.source),
|
|
131
|
+
})
|
|
119
132
|
const projectPath = await projectPathOf(cwd)
|
|
120
133
|
const checks = await withTask("deploy check", `Checking ${location(config)}`, () =>
|
|
121
134
|
config.target.check(release, { name: config.name, projectPath })
|
|
@@ -133,7 +146,11 @@ export async function runDeploySetup(options: {
|
|
|
133
146
|
}) {
|
|
134
147
|
const cwd = options.cwd ?? process.cwd()
|
|
135
148
|
const { config } = await loadDeployConfig(cwd)
|
|
136
|
-
const
|
|
149
|
+
const source = (await loadEnvConfig(cwd))?.source
|
|
150
|
+
const release = buildDeployRelease(config, {
|
|
151
|
+
bunVersion: await resolveBunVersion(cwd),
|
|
152
|
+
envFromSource: Boolean(source),
|
|
153
|
+
})
|
|
137
154
|
const context = { name: config.name, projectPath: await projectPathOf(cwd) }
|
|
138
155
|
|
|
139
156
|
if (!config.target.setup) {
|
|
@@ -143,6 +160,12 @@ export async function runDeploySetup(options: {
|
|
|
143
160
|
...context,
|
|
144
161
|
...(options.admin ? { admin: options.admin } : {}),
|
|
145
162
|
...(options.key ? { key: options.key } : {}),
|
|
163
|
+
...(source
|
|
164
|
+
? {
|
|
165
|
+
createEnvToken: () =>
|
|
166
|
+
source.createServerToken("prod", `sixb-${config.name}-${new Date().toISOString()}`),
|
|
167
|
+
}
|
|
168
|
+
: {}),
|
|
146
169
|
write: (line) => console.log(line),
|
|
147
170
|
})
|
|
148
171
|
}
|
|
@@ -348,6 +371,8 @@ async function createProgress(
|
|
|
348
371
|
current: null as number | null,
|
|
349
372
|
/** The latest output lines of the step running now, kept when it fails. */
|
|
350
373
|
output: [] as string[],
|
|
374
|
+
/** The pull left `.env` as it was. A live view clears step output, so the result has to say. */
|
|
375
|
+
keptEnv: false,
|
|
351
376
|
}
|
|
352
377
|
const live = canRunLive()
|
|
353
378
|
? await (await import("../ui/live/deploy")).startLiveDeploy({
|
|
@@ -386,6 +411,7 @@ async function createProgress(
|
|
|
386
411
|
}
|
|
387
412
|
if (event.type === "output") {
|
|
388
413
|
state.output = [...state.output, event.line].slice(-12)
|
|
414
|
+
if (event.line.includes(ENV_KEPT_MESSAGE)) state.keptEnv = true
|
|
389
415
|
if (live) live.output(event.line)
|
|
390
416
|
else console.log(` ${event.line}`)
|
|
391
417
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
type CustomAppDevServer,
|
|
6
6
|
createCustomApp,
|
|
7
7
|
} from "@sixb/app/server"
|
|
8
|
-
import { createSixbServer } from "@sixb/server"
|
|
8
|
+
import { createSixbServer, requestTimingOptionsFromEnv } from "@sixb/server"
|
|
9
9
|
import {
|
|
10
10
|
apiDocsUrl,
|
|
11
11
|
apiEventsUrl,
|
|
@@ -118,6 +118,8 @@ export async function runDevRuntime(options: DevOptions = {}) {
|
|
|
118
118
|
allowedOrigins: topology.allowedBrowserOrigins,
|
|
119
119
|
},
|
|
120
120
|
authExperience,
|
|
121
|
+
// Always on while developing, so a slow request can be read from the Network tab.
|
|
122
|
+
timing: { ...requestTimingOptionsFromEnv(), header: true },
|
|
121
123
|
})
|
|
122
124
|
runtimeOwnsProviders = true
|
|
123
125
|
// The runtime owns the server's lifecycle so agent turns run only while it listens.
|
package/src/commands/dev.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { dirname, resolve } from "node:path"
|
|
1
2
|
import { runDevSupervisor } from "../lib/dev-supervisor"
|
|
2
3
|
import type { DevOptions } from "./dev-runner"
|
|
4
|
+
import { assertDevEnv } from "./env"
|
|
3
5
|
|
|
4
6
|
export type { DevOptions } from "./dev-runner"
|
|
5
7
|
|
|
@@ -29,5 +31,6 @@ export async function runDev(options: DevOptions = {}) {
|
|
|
29
31
|
}
|
|
30
32
|
process.exit(process.exitCode ?? 0)
|
|
31
33
|
}
|
|
34
|
+
await assertDevEnv(dirname(resolve(options.entry ?? "sixb.config.ts")))
|
|
32
35
|
await runDevSupervisor(options)
|
|
33
36
|
}
|