@sixb/cli 0.1.14 → 0.1.16
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/check.d.ts.map +1 -1
- package/dist/commands/deploy.d.ts +48 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/lib/agent-turn-timeout.d.ts +2 -0
- package/dist/lib/agent-turn-timeout.d.ts.map +1 -1
- package/dist/lib/command-line.d.ts +34 -4
- package/dist/lib/command-line.d.ts.map +1 -1
- package/dist/lib/deploy-config.d.ts +9 -0
- package/dist/lib/deploy-config.d.ts.map +1 -0
- package/dist/lib/deploy-release.d.ts +7 -0
- package/dist/lib/deploy-release.d.ts.map +1 -0
- package/dist/lib/deploy-source.d.ts +23 -0
- package/dist/lib/deploy-source.d.ts.map +1 -0
- package/dist/lib/github-ci.d.ts +49 -0
- package/dist/lib/github-ci.d.ts.map +1 -0
- package/dist/ui/index.d.ts +62 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/package.json +14 -13
- package/src/commands/check.tsx +23 -1
- package/src/commands/deploy.tsx +403 -0
- package/src/index.tsx +63 -0
- package/src/lib/agent-turn-timeout.ts +10 -4
- package/src/lib/command-line.ts +114 -5
- package/src/lib/deploy-config.ts +32 -0
- package/src/lib/deploy-release.ts +250 -0
- package/src/lib/deploy-source.ts +189 -0
- package/src/lib/github-ci.ts +246 -0
- package/src/ui/index.tsx +468 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAsB,QAAQ,CAAC,OAAO,GAAE,YAAiB,
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAsB,QAAQ,CAAC,OAAO,GAAE,YAAiB,iBAsDxD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { DeployControlAction } from "@sixb/core/deploy";
|
|
2
|
+
export interface DeployOptions {
|
|
3
|
+
readonly dryRun?: boolean;
|
|
4
|
+
readonly json?: boolean;
|
|
5
|
+
readonly ref?: string;
|
|
6
|
+
readonly cwd?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function runDeploy(options?: DeployOptions): Promise<void>;
|
|
9
|
+
export declare function runDeployCheck(options: {
|
|
10
|
+
readonly json?: boolean;
|
|
11
|
+
readonly cwd?: string;
|
|
12
|
+
}): Promise<void>;
|
|
13
|
+
export declare function runDeploySetup(options: {
|
|
14
|
+
readonly admin?: string;
|
|
15
|
+
readonly key?: string;
|
|
16
|
+
readonly cwd?: string;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
export declare function runDeployAccess(options: {
|
|
19
|
+
readonly action: "list" | "add" | "remove";
|
|
20
|
+
readonly value?: string;
|
|
21
|
+
readonly json?: boolean;
|
|
22
|
+
readonly cwd?: string;
|
|
23
|
+
}): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Sets up deploys from GitHub Actions: a key for the job, authorized on the target and stored as
|
|
26
|
+
* secrets of the repository's `production` environment, and the workflow that uses it. Running it
|
|
27
|
+
* again rotates the key: the new one is stored before the old one is revoked.
|
|
28
|
+
*/
|
|
29
|
+
export declare function runDeployCi(options: {
|
|
30
|
+
readonly branch?: string;
|
|
31
|
+
readonly cwd?: string;
|
|
32
|
+
}): Promise<void>;
|
|
33
|
+
export declare function runDeployStatus(options: {
|
|
34
|
+
readonly json?: boolean;
|
|
35
|
+
readonly cwd?: string;
|
|
36
|
+
}): Promise<void>;
|
|
37
|
+
export declare function runDeployLogs(options: {
|
|
38
|
+
readonly service?: string;
|
|
39
|
+
readonly follow?: boolean;
|
|
40
|
+
readonly tail?: string;
|
|
41
|
+
readonly cwd?: string;
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
export declare function runDeployControl(options: {
|
|
44
|
+
readonly action: DeployControlAction;
|
|
45
|
+
readonly service?: string;
|
|
46
|
+
readonly cwd?: string;
|
|
47
|
+
}): Promise<void>;
|
|
48
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,mBAAmB,EAGpB,MAAM,mBAAmB,CAAA;AAuC1B,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,wBAAsB,SAAS,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmD1E;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,iBAc/F;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE;IAC5C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CACtB,iBAoBA;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAA;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CACtB,iBAqBA;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,iBAyE7F;AA8BD,wBAAsB,eAAe,CAAC,OAAO,EAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,iBAOhG;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAC3C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CACtB,iBAeA;AAED,wBAAsB,gBAAgB,CAAC,OAAO,EAAE;IAC9C,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAA;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CACtB,iBAUA"}
|
|
@@ -3,4 +3,6 @@
|
|
|
3
3
|
* built-in default in authority.
|
|
4
4
|
*/
|
|
5
5
|
export declare function resolveAgentTurnTimeoutMs(value: string | undefined): number | undefined;
|
|
6
|
+
/** A duration such as `30s`, `10m`, or `1h` in milliseconds, or `null` when it is not one. */
|
|
7
|
+
export declare function parseAgentTurnTimeoutMs(value: string): number | null;
|
|
6
8
|
//# sourceMappingURL=agent-turn-timeout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-turn-timeout.d.ts","sourceRoot":"","sources":["../../src/lib/agent-turn-timeout.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"agent-turn-timeout.d.ts","sourceRoot":"","sources":["../../src/lib/agent-turn-timeout.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAOvF;AAED,8FAA8F;AAC9F,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkBpE"}
|
|
@@ -111,7 +111,7 @@ export declare const CLI_OPTION_DEFINITIONS: {
|
|
|
111
111
|
};
|
|
112
112
|
readonly json: {
|
|
113
113
|
readonly syntax: "--json";
|
|
114
|
-
readonly summary: "Print JSON
|
|
114
|
+
readonly summary: "Print JSON instead of formatted output";
|
|
115
115
|
readonly kind: "boolean";
|
|
116
116
|
};
|
|
117
117
|
readonly outdir: {
|
|
@@ -119,9 +119,39 @@ export declare const CLI_OPTION_DEFINITIONS: {
|
|
|
119
119
|
readonly summary: "Build output directory";
|
|
120
120
|
readonly kind: "string";
|
|
121
121
|
};
|
|
122
|
+
readonly ref: {
|
|
123
|
+
readonly syntax: "--ref <ref>";
|
|
124
|
+
readonly summary: "Branch, tag, or commit to deploy (default: HEAD)";
|
|
125
|
+
readonly kind: "string";
|
|
126
|
+
};
|
|
127
|
+
readonly follow: {
|
|
128
|
+
readonly syntax: "--follow";
|
|
129
|
+
readonly summary: "Keep printing new log lines";
|
|
130
|
+
readonly kind: "boolean";
|
|
131
|
+
};
|
|
132
|
+
readonly admin: {
|
|
133
|
+
readonly syntax: "--admin <login>";
|
|
134
|
+
readonly summary: "Login with sudo that prepares the server (default: root)";
|
|
135
|
+
readonly kind: "string";
|
|
136
|
+
};
|
|
137
|
+
readonly key: {
|
|
138
|
+
readonly syntax: "--key <path>";
|
|
139
|
+
readonly summary: "Public key to authorize for deploys (default: the one SSH uses)";
|
|
140
|
+
readonly kind: "string";
|
|
141
|
+
};
|
|
142
|
+
readonly branch: {
|
|
143
|
+
readonly syntax: "--branch <name>";
|
|
144
|
+
readonly summary: "Branch whose pushes deploy (default: the repository's default branch)";
|
|
145
|
+
readonly kind: "string";
|
|
146
|
+
};
|
|
147
|
+
readonly tail: {
|
|
148
|
+
readonly syntax: "--tail <lines>";
|
|
149
|
+
readonly summary: "Recent log lines to print (default: 100)";
|
|
150
|
+
readonly kind: "string";
|
|
151
|
+
};
|
|
122
152
|
readonly "dry-run": {
|
|
123
153
|
readonly syntax: "--dry-run";
|
|
124
|
-
readonly summary: "
|
|
154
|
+
readonly summary: "Show what would change without changing it";
|
|
125
155
|
readonly kind: "boolean";
|
|
126
156
|
};
|
|
127
157
|
readonly "expire-older-than": {
|
|
@@ -136,7 +166,7 @@ export declare const CLI_OPTION_DEFINITIONS: {
|
|
|
136
166
|
};
|
|
137
167
|
};
|
|
138
168
|
export type CliOptionName = keyof typeof CLI_OPTION_DEFINITIONS;
|
|
139
|
-
export type LocalCommandId = "dev" | "api" | "atlas" | "app" | "login" | "logout" | "status" | "profile:list" | "profile:show" | "profile:use" | "token:list" | "token:create" | "token:revoke" | "service-account:list" | "service-account:create" | "service-account:disable" | "service-account:token:list" | "service-account:token:create" | "service-account:token:revoke" | "scheduler" | "orchestrator" | "rules" | "worker" | "worker-group" | "check" | "typegen" | "build" | "db:migrate" | "lake:check" | "lake:cleanup" | "init";
|
|
169
|
+
export type LocalCommandId = "dev" | "api" | "atlas" | "app" | "login" | "logout" | "status" | "profile:list" | "profile:show" | "profile:use" | "token:list" | "token:create" | "token:revoke" | "service-account:list" | "service-account:create" | "service-account:disable" | "service-account:token:list" | "service-account:token:create" | "service-account:token:revoke" | "scheduler" | "orchestrator" | "rules" | "worker" | "worker-group" | "check" | "typegen" | "build" | "db:migrate" | "lake:check" | "lake:cleanup" | "deploy" | "deploy:status" | "deploy:logs" | "deploy:restart" | "deploy:start" | "deploy:stop" | "deploy:setup" | "deploy:check" | "deploy:ci" | "deploy:access:list" | "deploy:access:add" | "deploy:access:remove" | "init";
|
|
140
170
|
export interface CliHelpItem {
|
|
141
171
|
readonly label: string;
|
|
142
172
|
readonly value: string;
|
|
@@ -172,7 +202,7 @@ export declare class CliUsageError extends Error {
|
|
|
172
202
|
constructor(message: string, help: CliHelp);
|
|
173
203
|
}
|
|
174
204
|
export declare const ROOT_HELP: CliHelp;
|
|
175
|
-
export declare const CLI_EXAMPLES: readonly ["sixb dev", "sixb build", "sixb api", "sixb login http://localhost:3002 --profile local", "sixb ontology list", "sixb objects inspect Customer customer-123", "sixb token create --name 'Local CLI' --expires-in 90d", "sixb service-account create --id svc_sandbox --name 'Sandbox agent' --group agents", "sixb service-account token create svc_sandbox --name 'Sandbox token' --expires-in 30d", "sixb status", "sixb atlas", "sixb app", "sixb scheduler", "sixb orchestrator", "sixb rules", "sixb worker pipeline", "sixb worker agent --concurrency 8", "sixb worker-group sync agent --concurrency sync=2 --concurrency agent=8", "sixb dev --entry examples/mac-os/sixb.config.ts --port 8080", "sixb check", "sixb typegen", "sixb db migrate", "sixb lake check", "sixb lake cleanup --dry-run"];
|
|
205
|
+
export declare const CLI_EXAMPLES: readonly ["sixb dev", "sixb build", "sixb api", "sixb login http://localhost:3002 --profile local", "sixb ontology list", "sixb objects inspect Customer customer-123", "sixb token create --name 'Local CLI' --expires-in 90d", "sixb service-account create --id svc_sandbox --name 'Sandbox agent' --group agents", "sixb service-account token create svc_sandbox --name 'Sandbox token' --expires-in 30d", "sixb status", "sixb atlas", "sixb app", "sixb scheduler", "sixb orchestrator", "sixb rules", "sixb worker pipeline", "sixb worker agent --concurrency 8", "sixb worker-group sync agent --concurrency sync=2 --concurrency agent=8", "sixb dev --entry examples/mac-os/sixb.config.ts --port 8080", "sixb check", "sixb typegen", "sixb db migrate", "sixb lake check", "sixb lake cleanup --dry-run", "sixb deploy --dry-run", "sixb deploy", "sixb deploy logs api --follow"];
|
|
176
206
|
export declare function parseCliArgs(args: readonly string[]): ParsedCli;
|
|
177
207
|
export declare function stringOption(options: ParsedCliOptions, name: CliOptionName): string | undefined;
|
|
178
208
|
export declare function booleanOption(options: ParsedCliOptions, name: CliOptionName): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-line.d.ts","sourceRoot":"","sources":["../../src/lib/command-line.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"command-line.d.ts","sourceRoot":"","sources":["../../src/lib/command-line.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsIuD,CAAA;AAE1F,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,sBAAsB,CAAA;AAC/D,MAAM,MAAM,cAAc,GACtB,KAAK,GACL,KAAK,GACL,OAAO,GACP,KAAK,GACL,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,cAAc,GACd,cAAc,GACd,aAAa,GACb,YAAY,GACZ,cAAc,GACd,cAAc,GACd,sBAAsB,GACtB,wBAAwB,GACxB,yBAAyB,GACzB,4BAA4B,GAC5B,8BAA8B,GAC9B,8BAA8B,GAC9B,WAAW,GACX,cAAc,GACd,OAAO,GACP,QAAQ,GACR,cAAc,GACd,OAAO,GACP,SAAS,GACT,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,QAAQ,GACR,eAAe,GACf,aAAa,GACb,gBAAgB,GAChB,cAAc,GACd,aAAa,GACb,cAAc,GACd,cAAc,GACd,WAAW,GACX,oBAAoB,GACpB,mBAAmB,GACnB,sBAAsB,GACtB,MAAM,CAAA;AA6VV,MAAM,WA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AK3C;AAED,eAAO,MAAM,SAAS,EAAE,OAavB,CAAA;AAED,eAAO,MAAM,YAAY,k2BA4Bf,CAAA;AAEV,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAkB/D;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAG/F;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAErF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,SAAS,MAAM,EAAE,CAGhG;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAMpE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DeployConfig } from "@sixb/core/deploy";
|
|
2
|
+
export declare const DEPLOY_CONFIG_FILE = "sixb.deploy.ts";
|
|
3
|
+
export interface LoadedDeployConfig {
|
|
4
|
+
readonly path: string;
|
|
5
|
+
readonly config: DeployConfig;
|
|
6
|
+
}
|
|
7
|
+
/** Loads `sixb.deploy.ts` from the project directory. */
|
|
8
|
+
export declare function loadDeployConfig(cwd?: string): Promise<LoadedDeployConfig>;
|
|
9
|
+
//# sourceMappingURL=deploy-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-config.d.ts","sourceRoot":"","sources":["../../src/lib/deploy-config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIrD,eAAO,MAAM,kBAAkB,mBAAmB,CAAA;AAElD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAA;CAC9B;AAED,yDAAyD;AACzD,wBAAsB,gBAAgB,CAAC,GAAG,SAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAiBvF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DeployConfig, DeployRelease } from "@sixb/core/deploy";
|
|
2
|
+
export interface DeployReleaseOptions {
|
|
3
|
+
/** The Bun version the project runs on, from its `packageManager` or the running Bun. */
|
|
4
|
+
readonly bunVersion: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function buildDeployRelease(config: DeployConfig, options: DeployReleaseOptions): DeployRelease;
|
|
7
|
+
//# sourceMappingURL=deploy-release.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-release.d.ts","sourceRoot":"","sources":["../../src/lib/deploy-release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EAIZ,aAAa,EAOd,MAAM,mBAAmB,CAAA;AAsD1B,MAAM,WAAW,oBAAoB;IACnC,yFAAyF;IACzF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,oBAAoB,GAC5B,aAAa,CAgCf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DeploySource } from "@sixb/core/deploy";
|
|
2
|
+
export interface PackedSource extends DeploySource {
|
|
3
|
+
/** Whether the working tree has changes the deployed commit does not. */
|
|
4
|
+
readonly dirty: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The committed files at `ref`, with every submodule at the commit its parent records. Nothing
|
|
8
|
+
* uncommitted or ignored is sent, so what runs is always a commit anyone can look up.
|
|
9
|
+
*/
|
|
10
|
+
export declare function packSource(projectDir: string, ref?: string): Promise<PackedSource>;
|
|
11
|
+
/**
|
|
12
|
+
* The Bun version the project pins with `packageManager` (`"bun@1.4.2"`) in its `package.json` or
|
|
13
|
+
* the nearest one above it, up to the repository root; else the Bun running this CLI. Read from the
|
|
14
|
+
* deployed commit when there is one, and from the files on disk for a dry run.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveBunVersion(projectDir: string, source?: Pick<DeploySource, "commit" | "projectPath">): Promise<string>;
|
|
17
|
+
/** The project's directory inside its repository, `.` at its root or outside git. */
|
|
18
|
+
export declare function projectPathOf(projectDir: string): Promise<string>;
|
|
19
|
+
/** The root of the git repository the project is in. */
|
|
20
|
+
export declare function repoRootOf(projectDir: string): Promise<string>;
|
|
21
|
+
/** Who deploys, recorded with the release. */
|
|
22
|
+
export declare function deployer(projectDir: string): Promise<string>;
|
|
23
|
+
//# sourceMappingURL=deploy-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-source.d.ts","sourceRoot":"","sources":["../../src/lib/deploy-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAA;AAG1E,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAkCxF;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,aAAa,CAAC,GACpD,OAAO,CAAC,MAAM,CAAC,CAmCjB;AAED,qFAAqF;AACrF,wBAAsB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGvE;AAED,wDAAwD;AACxD,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE9D;AAED,8CAA8C;AAC9C,wBAAsB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMlE"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** The GitHub environment that holds the deploy secrets and gates the deploy job. */
|
|
2
|
+
export declare const CI_ENVIRONMENT = "production";
|
|
3
|
+
/** The secret a private submodule's checkout reads. */
|
|
4
|
+
export declare const SUBMODULE_TOKEN_SECRET = "SIXB_GITHUB_TOKEN";
|
|
5
|
+
export interface GitHubRepo {
|
|
6
|
+
/** `owner/name`. */
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly defaultBranch: string;
|
|
9
|
+
}
|
|
10
|
+
export interface Submodule {
|
|
11
|
+
readonly path: string;
|
|
12
|
+
readonly url: string;
|
|
13
|
+
/** `owner/name` when the submodule lives on GitHub. */
|
|
14
|
+
readonly repo: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface WorkflowInput {
|
|
17
|
+
/** The deployment's name. */
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly branch: string;
|
|
20
|
+
/** The project's directory relative to the repository root, `"."` at the root. */
|
|
21
|
+
readonly projectPath: string;
|
|
22
|
+
/** The `package.json` that pins Bun, relative to the repository root. */
|
|
23
|
+
readonly bunVersionFile: string | null;
|
|
24
|
+
/** GitHub secret names, by the environment variable the install lines read. */
|
|
25
|
+
readonly secrets: Readonly<Record<string, string>>;
|
|
26
|
+
readonly install: readonly string[];
|
|
27
|
+
readonly submodules: "none" | "public" | "private";
|
|
28
|
+
}
|
|
29
|
+
/** A GitHub Actions workflow that deploys on every push to `branch`. */
|
|
30
|
+
export declare function renderWorkflow(input: WorkflowInput): string;
|
|
31
|
+
/** Where the workflow for a deployment lives, relative to the repository root. */
|
|
32
|
+
export declare function workflowPath(name: string): string;
|
|
33
|
+
/** The GitHub secret for one of a deployment's variables; a repository may deploy several. */
|
|
34
|
+
export declare function secretName(deployment: string, variable: string): string;
|
|
35
|
+
/** The `package.json` that pins Bun for the project, relative to the repository root. */
|
|
36
|
+
export declare function bunVersionFile(projectDir: string, repoRoot: string): Promise<string | null>;
|
|
37
|
+
/** The submodules `.gitmodules` lists, with the GitHub repository behind each. */
|
|
38
|
+
export declare function readSubmodules(repoRoot: string, repo: GitHubRepo): Promise<Submodule[]>;
|
|
39
|
+
/** `owner/name` for a GitHub remote URL, resolving a relative one against `parent`. */
|
|
40
|
+
export declare function githubRepoOf(url: string, parent: string): string | null;
|
|
41
|
+
export declare function currentRepo(cwd: string): Promise<GitHubRepo>;
|
|
42
|
+
/** Whether CI's own token cannot read `repo`. A repository this login cannot see counts. */
|
|
43
|
+
export declare function isPrivate(repo: string): Promise<boolean>;
|
|
44
|
+
/** Creates the environment when it is missing. An existing one keeps its protection rules. */
|
|
45
|
+
export declare function ensureEnvironment(repo: GitHubRepo): Promise<void>;
|
|
46
|
+
export declare function setSecret(repo: GitHubRepo, name: string, value: string): Promise<void>;
|
|
47
|
+
/** Whether the environment or the repository has the secret. */
|
|
48
|
+
export declare function hasSecret(repo: GitHubRepo, name: string): Promise<boolean>;
|
|
49
|
+
//# sourceMappingURL=github-ci.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-ci.d.ts","sourceRoot":"","sources":["../../src/lib/github-ci.ts"],"names":[],"mappings":"AAGA,qFAAqF;AACrF,eAAO,MAAM,cAAc,eAAe,CAAA;AAE1C,uDAAuD;AACvD,eAAO,MAAM,sBAAsB,sBAAsB,CAAA;AAMzD,MAAM,WAAW,UAAU;IACzB,oBAAoB;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;CAC/B;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,uDAAuD;IACvD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,6BAA6B;IAC7B,QAAQ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AO,CAAC,CAG9D;AAED,8FAA8F;AAC9F,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAOvE;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI5F;AAED,gEAAgE;AAChE,wBAAsB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAMhF"}
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DeployAccessKey, DeployCheck, DeployRelease, DeployStatus } from "@sixb/core/deploy";
|
|
1
2
|
import type React from "react";
|
|
2
3
|
import { type CliHelp } from "../lib/command-line";
|
|
3
4
|
export declare function renderStatic(view: React.ReactNode): Promise<void>;
|
|
@@ -145,6 +146,67 @@ export declare function LakeCheckView({ projectId, status }: {
|
|
|
145
146
|
projectId: string;
|
|
146
147
|
status: "ok";
|
|
147
148
|
}): React.JSX.Element;
|
|
149
|
+
export declare function DeployReleaseView({ release, configPath, }: {
|
|
150
|
+
release: DeployRelease;
|
|
151
|
+
configPath: string;
|
|
152
|
+
}): React.JSX.Element;
|
|
153
|
+
export interface DeployProgressState {
|
|
154
|
+
readonly name: string;
|
|
155
|
+
readonly location: string;
|
|
156
|
+
readonly commit: string;
|
|
157
|
+
readonly ref: string;
|
|
158
|
+
readonly dirty: boolean;
|
|
159
|
+
readonly labels: readonly string[];
|
|
160
|
+
/** How many steps have finished, in order. */
|
|
161
|
+
readonly done: number;
|
|
162
|
+
readonly current: number | null;
|
|
163
|
+
/** The latest output lines, shown while a step runs and kept when one fails. */
|
|
164
|
+
readonly output: readonly string[];
|
|
165
|
+
readonly outcome: "running" | "done" | "failed";
|
|
166
|
+
}
|
|
167
|
+
export declare function DeployProgressView({ state }: {
|
|
168
|
+
state: DeployProgressState;
|
|
169
|
+
}): React.JSX.Element;
|
|
170
|
+
export declare function DeployCompleteView({ release, commit, ref, }: {
|
|
171
|
+
release: DeployRelease;
|
|
172
|
+
commit: string;
|
|
173
|
+
ref: string;
|
|
174
|
+
}): React.JSX.Element;
|
|
175
|
+
export declare function DeployStatusView({ name, location, status, }: {
|
|
176
|
+
name: string;
|
|
177
|
+
location: string;
|
|
178
|
+
status: DeployStatus;
|
|
179
|
+
}): React.JSX.Element;
|
|
180
|
+
export declare function DeployChecksView({ name, location, checks, }: {
|
|
181
|
+
name: string;
|
|
182
|
+
location: string;
|
|
183
|
+
checks: readonly DeployCheck[];
|
|
184
|
+
}): React.JSX.Element;
|
|
185
|
+
export declare function DeployCiView({ name, repo, environment, branch, credential, secrets, retired, workflow, token, }: {
|
|
186
|
+
name: string;
|
|
187
|
+
repo: string;
|
|
188
|
+
environment: string;
|
|
189
|
+
branch: string;
|
|
190
|
+
credential: string;
|
|
191
|
+
secrets: readonly string[];
|
|
192
|
+
retired: readonly DeployAccessKey[];
|
|
193
|
+
workflow: {
|
|
194
|
+
readonly path: string;
|
|
195
|
+
readonly state: "written" | "unchanged" | "kept";
|
|
196
|
+
};
|
|
197
|
+
token: {
|
|
198
|
+
readonly name: string;
|
|
199
|
+
readonly submodules: readonly {
|
|
200
|
+
readonly path: string;
|
|
201
|
+
readonly url: string;
|
|
202
|
+
readonly repo: string | null;
|
|
203
|
+
}[];
|
|
204
|
+
} | null;
|
|
205
|
+
}): React.JSX.Element;
|
|
206
|
+
export declare function DeployAccessView({ title, keys, }: {
|
|
207
|
+
title: string;
|
|
208
|
+
keys: readonly DeployAccessKey[];
|
|
209
|
+
}): React.JSX.Element;
|
|
148
210
|
export interface LakeCleanupReport {
|
|
149
211
|
readonly dryRun: boolean;
|
|
150
212
|
readonly expireOlderThan: string;
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EAEX,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAgB,KAAK,OAAO,EAAa,MAAM,qBAAqB,CAAA;AAK3E,wBAAsB,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,iBAOvD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,0BAErD;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,OAAO,EACd,OAAO,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAO,GAC9E,OAAO,CAAC,IAAI,CAAC,CASf;AAmBD,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAsF3D,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,KAAK,EACL,UAAoB,EACpB,OAAO,GACR,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,qBAiBA;AAED,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,YAAY,GACb,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,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|
|
1
1
|
{
|
|
2
2
|
"name": "@sixb/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Command-line interface for Sixb projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sixb",
|
|
@@ -29,26 +29,27 @@
|
|
|
29
29
|
"prepack": "bun run build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@sixb/action-worker": "0.1.
|
|
33
|
-
"@sixb/agent-worker": "0.1.
|
|
32
|
+
"@sixb/action-worker": "0.1.16",
|
|
33
|
+
"@sixb/agent-worker": "0.1.16",
|
|
34
34
|
"@sixb/app": "^0.1.9",
|
|
35
|
-
"@sixb/atlas": "^0.1.
|
|
36
|
-
"@sixb/client": "^0.1.
|
|
37
|
-
"@sixb/core": "0.1.
|
|
35
|
+
"@sixb/atlas": "^0.1.13",
|
|
36
|
+
"@sixb/client": "^0.1.16",
|
|
37
|
+
"@sixb/core": "0.1.16",
|
|
38
38
|
"@sixb/cli-core": "^0.1.6",
|
|
39
|
-
"@sixb/orchestrator": "0.1.
|
|
40
|
-
"@sixb/pipeline-worker": "0.1.
|
|
41
|
-
"@sixb/projection-worker": "0.1.
|
|
42
|
-
"@sixb/rules-worker": "0.1.
|
|
43
|
-
"@sixb/server": "0.1.
|
|
44
|
-
"@sixb/sync-worker": "0.1.
|
|
45
|
-
"@sixb/workflow-worker": "0.1.
|
|
39
|
+
"@sixb/orchestrator": "0.1.16",
|
|
40
|
+
"@sixb/pipeline-worker": "0.1.16",
|
|
41
|
+
"@sixb/projection-worker": "0.1.16",
|
|
42
|
+
"@sixb/rules-worker": "0.1.16",
|
|
43
|
+
"@sixb/server": "0.1.16",
|
|
44
|
+
"@sixb/sync-worker": "0.1.16",
|
|
45
|
+
"@sixb/workflow-worker": "0.1.16",
|
|
46
46
|
"create-sixb": "^0.1.3",
|
|
47
47
|
"ink": "^6.0.0",
|
|
48
48
|
"react": "^19.0.0",
|
|
49
49
|
"react-devtools-core": "^4.19.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
+
"@sixb/deploy-ssh": "0.1.0",
|
|
52
53
|
"@types/bun": "latest",
|
|
53
54
|
"@types/react": "^19.0.0",
|
|
54
55
|
"typescript": "^5.7.0"
|
package/src/commands/check.tsx
CHANGED
|
@@ -53,6 +53,28 @@ export async function runCheck(options: CheckOptions = {}) {
|
|
|
53
53
|
} finally {
|
|
54
54
|
// Tear down runtime providers (broker, queues, storage, connectors) so the
|
|
55
55
|
// process can exit instead of hanging on open connections. Mirrors lake-check.
|
|
56
|
-
|
|
56
|
+
// A provider that cannot reach its server may never finish closing; the report is already
|
|
57
|
+
// out, so a deploy gated on this command gets its answer instead of waiting forever.
|
|
58
|
+
if (!(await settlesWithin(stopSixbProviders(sixb), CLOSE_TIMEOUT_MS))) {
|
|
59
|
+
console.error(`[SixbCLI] Providers did not close within ${CLOSE_TIMEOUT_MS / 1000}s.`)
|
|
60
|
+
process.exit(process.exitCode ?? 1)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// A client can report itself closed and still hold the process open — one retrying a server it
|
|
64
|
+
// never reached does. The report is out and teardown ran, so finish.
|
|
65
|
+
process.exit(process.exitCode ?? 0)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const CLOSE_TIMEOUT_MS = 10_000
|
|
69
|
+
|
|
70
|
+
async function settlesWithin(work: Promise<void>, timeoutMs: number): Promise<boolean> {
|
|
71
|
+
let timer: ReturnType<typeof setTimeout> | undefined
|
|
72
|
+
const timedOut = new Promise<false>((resolveTimeout) => {
|
|
73
|
+
timer = setTimeout(() => resolveTimeout(false), timeoutMs)
|
|
74
|
+
})
|
|
75
|
+
try {
|
|
76
|
+
return await Promise.race([work.then(() => true as const), timedOut])
|
|
77
|
+
} finally {
|
|
78
|
+
clearTimeout(timer)
|
|
57
79
|
}
|
|
58
80
|
}
|