bkper 4.13.7 → 4.15.0
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/README.md +7 -3
- package/lib/agent/cli-dispatch.d.ts +7 -1
- package/lib/agent/cli-dispatch.d.ts.map +1 -1
- package/lib/agent/cli-dispatch.js +23 -2
- package/lib/agent/cli-dispatch.js.map +1 -1
- package/lib/cli.js +7 -2
- package/lib/cli.js.map +1 -1
- package/lib/commands/apps/build.d.ts +1 -2
- package/lib/commands/apps/build.d.ts.map +1 -1
- package/lib/commands/apps/build.js +13 -39
- package/lib/commands/apps/build.js.map +1 -1
- package/lib/commands/apps/config.d.ts +5 -14
- package/lib/commands/apps/config.d.ts.map +1 -1
- package/lib/commands/apps/config.js +13 -45
- package/lib/commands/apps/config.js.map +1 -1
- package/lib/commands/apps/deploy.d.ts +14 -4
- package/lib/commands/apps/deploy.d.ts.map +1 -1
- package/lib/commands/apps/deploy.js +42 -58
- package/lib/commands/apps/deploy.js.map +1 -1
- package/lib/commands/apps/dev.d.ts +1 -7
- package/lib/commands/apps/dev.d.ts.map +1 -1
- package/lib/commands/apps/dev.js +43 -115
- package/lib/commands/apps/dev.js.map +1 -1
- package/lib/commands/apps/index.d.ts +1 -1
- package/lib/commands/apps/index.d.ts.map +1 -1
- package/lib/commands/apps/index.js.map +1 -1
- package/lib/commands/apps/init.d.ts +1 -1
- package/lib/commands/apps/init.d.ts.map +1 -1
- package/lib/commands/apps/init.js +6 -12
- package/lib/commands/apps/init.js.map +1 -1
- package/lib/commands/apps/logs.d.ts +3 -3
- package/lib/commands/apps/logs.d.ts.map +1 -1
- package/lib/commands/apps/logs.js +31 -25
- package/lib/commands/apps/logs.js.map +1 -1
- package/lib/commands/apps/register.d.ts.map +1 -1
- package/lib/commands/apps/register.js +8 -16
- package/lib/commands/apps/register.js.map +1 -1
- package/lib/commands/apps/types.d.ts +5 -29
- package/lib/commands/apps/types.d.ts.map +1 -1
- package/lib/dev/local-assets.d.ts +15 -0
- package/lib/dev/local-assets.d.ts.map +1 -0
- package/lib/dev/local-assets.js +43 -0
- package/lib/dev/local-assets.js.map +1 -0
- package/lib/dev/logger.d.ts +3 -7
- package/lib/dev/logger.d.ts.map +1 -1
- package/lib/dev/logger.js +3 -6
- package/lib/dev/logger.js.map +1 -1
- package/lib/dev/miniflare.d.ts +2 -0
- package/lib/dev/miniflare.d.ts.map +1 -1
- package/lib/dev/miniflare.js +83 -21
- package/lib/dev/miniflare.js.map +1 -1
- package/lib/docs/app-building.md +151 -141
- package/lib/docs/app-management.md +69 -31
- package/lib/docs/bkper-js.md +2 -0
- package/lib/docs/cli-reference.md +7 -3
- package/lib/docs/index.md +1 -1
- package/lib/platform/client.d.ts +2 -2
- package/lib/platform/client.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
A unified **interface for [Bkper](https://bkper.com)**. Use `bkper` in two complementary modes:
|
|
6
6
|
|
|
7
|
-
- **Interactive mode** — run `bkper agent` to open the Bkper Agent TUI
|
|
7
|
+
- **Interactive mode** — run `bkper` or `bkper agent` to open the Bkper Agent TUI
|
|
8
8
|
- **Command mode** — run `bkper <command>` for explicit CLI workflows, scripts, and automation
|
|
9
9
|
|
|
10
10
|
With one tool, you can build and deploy Bkper apps, and manage financial data -- books, accounts, transactions, and balances.
|
|
@@ -50,9 +50,11 @@ This is the only command that opens the browser OAuth flow. When you are done wo
|
|
|
50
50
|
### Interactive mode (recommended)
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
bkper
|
|
53
|
+
bkper
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
+
`bkper agent` starts the same interactive experience. Bare `bkper` only opens the TUI in an interactive terminal; in non-interactive contexts it prints CLI help instead.
|
|
57
|
+
|
|
56
58
|

|
|
57
59
|
|
|
58
60
|
On first launch, type `/login` and select a provider. We recommend [OpenCode Go](https://opencode.ai/go) for open-weights models and [OpenCode Zen](https://opencode.ai/zen) for frontier models — both give you access to high-quality models with no extra setup.
|
|
@@ -108,6 +110,7 @@ bkper agent <pi-args>
|
|
|
108
110
|
```
|
|
109
111
|
|
|
110
112
|
If no Pi arguments are provided, `bkper agent` starts the interactive Bkper Agent experience.
|
|
113
|
+
A bare `bkper` command is a convenience shortcut for the same TUI when run in an interactive terminal.
|
|
111
114
|
If Pi arguments are provided, everything after `bkper agent` is passed through to Pi.
|
|
112
115
|
|
|
113
116
|
Examples:
|
|
@@ -153,9 +156,10 @@ bkper app init my-app
|
|
|
153
156
|
bkper app dev
|
|
154
157
|
bkper app sync && bkper app deploy
|
|
155
158
|
bkper app logs --last 50
|
|
159
|
+
bkper app logs my-app --level error
|
|
156
160
|
```
|
|
157
161
|
|
|
158
|
-
`bkper app logs` reads recent app logs kept for 15 days. The default output is human-readable, and JSON is available with `--json`.
|
|
162
|
+
`bkper app logs` reads recent app logs kept for 15 days. Run it inside an app directory, or pass an app id like `bkper app logs my-app`. Use `--level warn` or `--level error` to focus on requests with warnings or errors. The default output is human-readable, and JSON is available with `--json`.
|
|
159
163
|
|
|
160
164
|
→ [Full App Management reference](https://github.com/bkper/bkper-cli/blob/main/docs/app-management.md)
|
|
161
165
|
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface CliDispatchEnvironment {
|
|
2
|
+
stdinIsTTY: boolean;
|
|
3
|
+
stdoutIsTTY: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function shouldRunAgentCommand(argv: string[], environment?: CliDispatchEnvironment): boolean;
|
|
6
|
+
export declare function shouldShowHelpForBareInvocation(argv: string[], environment?: CliDispatchEnvironment): boolean;
|
|
7
|
+
export declare function getAgentCommandArgs(argv: string[]): string[];
|
|
2
8
|
//# sourceMappingURL=cli-dispatch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-dispatch.d.ts","sourceRoot":"","sources":["../../src/agent/cli-dispatch.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"cli-dispatch.d.ts","sourceRoot":"","sources":["../../src/agent/cli-dispatch.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;CACxB;AAiBD,wBAAgB,qBAAqB,CACjC,IAAI,EAAE,MAAM,EAAE,EACd,WAAW,GAAE,sBAA2D,GACzE,OAAO,CAMT;AAED,wBAAgB,+BAA+B,CAC3C,IAAI,EAAE,MAAM,EAAE,EACd,WAAW,GAAE,sBAA2D,GACzE,OAAO,CAET;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAE5D"}
|
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
return
|
|
1
|
+
function getDefaultCliDispatchEnvironment() {
|
|
2
|
+
return {
|
|
3
|
+
stdinIsTTY: process.stdin.isTTY === true,
|
|
4
|
+
stdoutIsTTY: process.stdout.isTTY === true,
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
function isBareBkperInvocation(argv) {
|
|
8
|
+
return argv.length === 2;
|
|
9
|
+
}
|
|
10
|
+
function isInteractiveTerminal(environment) {
|
|
11
|
+
return environment.stdinIsTTY && environment.stdoutIsTTY;
|
|
12
|
+
}
|
|
13
|
+
export function shouldRunAgentCommand(argv, environment = getDefaultCliDispatchEnvironment()) {
|
|
14
|
+
if (argv[2] === 'agent') {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
return isBareBkperInvocation(argv) && isInteractiveTerminal(environment);
|
|
18
|
+
}
|
|
19
|
+
export function shouldShowHelpForBareInvocation(argv, environment = getDefaultCliDispatchEnvironment()) {
|
|
20
|
+
return isBareBkperInvocation(argv) && !isInteractiveTerminal(environment);
|
|
21
|
+
}
|
|
22
|
+
export function getAgentCommandArgs(argv) {
|
|
23
|
+
return argv[2] === 'agent' ? argv.slice(3) : [];
|
|
3
24
|
}
|
|
4
25
|
//# sourceMappingURL=cli-dispatch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-dispatch.js","sourceRoot":"","sources":["../../src/agent/cli-dispatch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli-dispatch.js","sourceRoot":"","sources":["../../src/agent/cli-dispatch.ts"],"names":[],"mappings":"AAKA,SAAS,gCAAgC;IACrC,OAAO;QACH,UAAU,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI;QACxC,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI;KAC7C,CAAC;AACN,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAc;IACzC,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,qBAAqB,CAAC,WAAmC;IAC9D,OAAO,WAAW,CAAC,UAAU,IAAI,WAAW,CAAC,WAAW,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,qBAAqB,CACjC,IAAc,EACd,cAAsC,gCAAgC,EAAE;IAExE,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,qBAAqB,CAAC,WAAW,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC3C,IAAc,EACd,cAAsC,gCAAgC,EAAE;IAExE,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAc;IAC9C,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACpD,CAAC"}
|
package/lib/cli.js
CHANGED
|
@@ -21,13 +21,13 @@ import { registerCollectionCommands } from './commands/collections/register.js';
|
|
|
21
21
|
import { registerFileCommands } from './commands/files/register.js';
|
|
22
22
|
import { registerUpgradeCommand } from './commands/upgrade.js';
|
|
23
23
|
import { registerAgentCommands, runAgentCommand } from './commands/agent-command.js';
|
|
24
|
-
import { shouldRunAgentCommand } from './agent/cli-dispatch.js';
|
|
24
|
+
import { getAgentCommandArgs, shouldRunAgentCommand, shouldShowHelpForBareInvocation, } from './agent/cli-dispatch.js';
|
|
25
25
|
import { VERSION, autoUpgrade } from './upgrade/index.js';
|
|
26
26
|
function main() {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
if (shouldRunAgentCommand(process.argv)) {
|
|
29
29
|
try {
|
|
30
|
-
yield runAgentCommand(process.argv
|
|
30
|
+
yield runAgentCommand(getAgentCommandArgs(process.argv));
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
catch (err) {
|
|
@@ -36,6 +36,7 @@ function main() {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
// Version
|
|
39
|
+
program.name('bkper');
|
|
39
40
|
program.version(VERSION, '-v, --version');
|
|
40
41
|
// Global output format options
|
|
41
42
|
program.option('--format <format>', 'Output format: table, json, or csv', 'table');
|
|
@@ -59,6 +60,10 @@ function main() {
|
|
|
59
60
|
if (!process.env.BKPER_DISABLE_AUTOUPDATE) {
|
|
60
61
|
autoUpgrade().catch(() => { });
|
|
61
62
|
}
|
|
63
|
+
if (shouldShowHelpForBareInvocation(process.argv)) {
|
|
64
|
+
program.outputHelp();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
62
67
|
program.parse(process.argv);
|
|
63
68
|
});
|
|
64
69
|
}
|
package/lib/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources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AC,CAAC;QACjC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC/B,2BAA2B,CAAC,OAAO,CAAC,CAAC;QACrC,uBAAuB,CAAC,OAAO,CAAC,CAAC;QACjC,0BAA0B,CAAC,OAAO,CAAC,CAAC;QACpC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAE9B,uBAAuB;QACvB,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAE/B,kBAAkB;QAClB,sBAAsB,CAAC,OAAO,CAAC,CAAC;QAEhC,4EAA4E;QAC5E,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,CAAC;YACxC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAClC,CAAC;QAED,IAAI,+BAA+B,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAChD,OAAO,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO;QACX,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IACf,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - Ensures types are up to date (generates env.d.ts)
|
|
5
5
|
* - Builds shared package if present
|
|
6
|
-
* - Builds
|
|
7
|
-
* - Builds events handler worker (esbuild) if configured
|
|
6
|
+
* - Builds the server Worker (esbuild)
|
|
8
7
|
* - Reports build results with file sizes
|
|
9
8
|
*
|
|
10
9
|
* Note: Client build (Vite) is the template's responsibility.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/apps/build.ts"],"names":[],"mappings":"AASA
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/apps/build.ts"],"names":[],"mappings":"AASA;;;;;;;;;;GAUG;AACH,wBAAsB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAwE3C"}
|
|
@@ -20,8 +20,7 @@ import path from 'path';
|
|
|
20
20
|
*
|
|
21
21
|
* - Ensures types are up to date (generates env.d.ts)
|
|
22
22
|
* - Builds shared package if present
|
|
23
|
-
* - Builds
|
|
24
|
-
* - Builds events handler worker (esbuild) if configured
|
|
23
|
+
* - Builds the server Worker (esbuild)
|
|
25
24
|
* - Reports build results with file sizes
|
|
26
25
|
*
|
|
27
26
|
* Note: Client build (Vite) is the template's responsibility.
|
|
@@ -29,7 +28,6 @@ import path from 'path';
|
|
|
29
28
|
*/
|
|
30
29
|
export function build() {
|
|
31
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
var _a, _b, _c;
|
|
33
31
|
const typesLogger = createLogger('types');
|
|
34
32
|
const buildLogger = createLogger('build');
|
|
35
33
|
const sharedLogger = createLogger('shared');
|
|
@@ -41,9 +39,8 @@ export function build() {
|
|
|
41
39
|
console.error('No deployment configuration found in bkper.yaml');
|
|
42
40
|
console.error('Expected format:');
|
|
43
41
|
console.error(' deployment:');
|
|
44
|
-
console.error('
|
|
45
|
-
console.error('
|
|
46
|
-
console.error(' client: packages/web/client');
|
|
42
|
+
console.error(' server: server/src/index.ts');
|
|
43
|
+
console.error(' client: client');
|
|
47
44
|
process.exit(1);
|
|
48
45
|
}
|
|
49
46
|
// Ensure types are up to date
|
|
@@ -51,7 +48,7 @@ export function build() {
|
|
|
51
48
|
ensureTypesUpToDate({
|
|
52
49
|
services: deployConfig.services,
|
|
53
50
|
secrets: deployConfig.secrets,
|
|
54
|
-
hasStaticAssets: !!
|
|
51
|
+
hasStaticAssets: !!deployConfig.client,
|
|
55
52
|
}, projectRoot);
|
|
56
53
|
const preflight = preflightDependencies(projectRoot);
|
|
57
54
|
if (!preflight.ok) {
|
|
@@ -75,40 +72,17 @@ export function build() {
|
|
|
75
72
|
else {
|
|
76
73
|
sharedLogger.info('No shared package found');
|
|
77
74
|
}
|
|
78
|
-
const hasWeb = !!((_b = deployConfig.web) === null || _b === void 0 ? void 0 : _b.main);
|
|
79
|
-
const hasEvents = !!((_c = deployConfig.events) === null || _c === void 0 ? void 0 : _c.main);
|
|
80
75
|
console.log('\n\uD83D\uDCE6 Building Bkper App...\n');
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const serverEntryPoint = path.resolve(projectRoot, deployConfig.web.main);
|
|
88
|
-
// Ensure output directory exists
|
|
89
|
-
if (!existsSync(serverOutDir)) {
|
|
90
|
-
mkdirSync(serverOutDir, { recursive: true });
|
|
91
|
-
}
|
|
92
|
-
yield buildWorkerToFile(serverEntryPoint, serverOutFile);
|
|
93
|
-
const serverSize = statSync(serverOutFile).size;
|
|
94
|
-
results.webServer = { path: 'dist/web/server/', size: serverSize };
|
|
95
|
-
console.log(` \u2713 Web server \u2192 dist/web/server/ (${formatSize(serverSize)})`);
|
|
96
|
-
}
|
|
97
|
-
// Build events handler (esbuild)
|
|
98
|
-
if (hasEvents) {
|
|
99
|
-
buildLogger.info('Building events handler...');
|
|
100
|
-
const eventsOutDir = path.resolve(projectRoot, 'dist/events');
|
|
101
|
-
const eventsOutFile = path.join(eventsOutDir, 'index.js');
|
|
102
|
-
const eventsEntryPoint = path.resolve(projectRoot, deployConfig.events.main);
|
|
103
|
-
// Ensure output directory exists
|
|
104
|
-
if (!existsSync(eventsOutDir)) {
|
|
105
|
-
mkdirSync(eventsOutDir, { recursive: true });
|
|
106
|
-
}
|
|
107
|
-
yield buildWorkerToFile(eventsEntryPoint, eventsOutFile);
|
|
108
|
-
const eventsSize = statSync(eventsOutFile).size;
|
|
109
|
-
results.events = { path: 'dist/events/', size: eventsSize };
|
|
110
|
-
console.log(` \u2713 Events \u2192 dist/events/ (${formatSize(eventsSize)})`);
|
|
76
|
+
buildLogger.info('Building server worker...');
|
|
77
|
+
const serverOutDir = path.resolve(projectRoot, 'dist/server');
|
|
78
|
+
const serverOutFile = path.join(serverOutDir, 'index.js');
|
|
79
|
+
const serverEntryPoint = path.resolve(projectRoot, deployConfig.server);
|
|
80
|
+
if (!existsSync(serverOutDir)) {
|
|
81
|
+
mkdirSync(serverOutDir, { recursive: true });
|
|
111
82
|
}
|
|
83
|
+
yield buildWorkerToFile(serverEntryPoint, serverOutFile);
|
|
84
|
+
const serverSize = statSync(serverOutFile).size;
|
|
85
|
+
console.log(` \u2713 Server worker \u2192 dist/server/ (${formatSize(serverSize)})`);
|
|
112
86
|
console.log('\n\u2705 Build complete\n');
|
|
113
87
|
});
|
|
114
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/commands/apps/build.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACrD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/commands/apps/build.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAA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AC;QAExE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;YAC5B,SAAS,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACjD,CAAC;QAED,MAAM,iBAAiB,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;QAEzD,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,sDAAsD,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAE7F,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IAC7C,CAAC;CAAA"}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
import { App } from 'bkper-js';
|
|
2
|
-
import type { ErrorResponse,
|
|
2
|
+
import type { ErrorResponse, SourceDeploymentConfig } from './types.js';
|
|
3
3
|
/**
|
|
4
|
-
* Loads app configuration from bkper.json
|
|
5
|
-
* Checks files in priority order: bkper.json → bkper.yaml
|
|
4
|
+
* Loads app configuration from bkper.json or bkper.yaml in current directory.
|
|
5
|
+
* Checks files in priority order: bkper.json → bkper.yaml
|
|
6
6
|
*
|
|
7
7
|
* @returns App configuration object
|
|
8
8
|
* @throws Error if no config file is found
|
|
9
9
|
*/
|
|
10
10
|
export declare function loadAppConfig(): bkper.App;
|
|
11
|
-
/**
|
|
12
|
-
* Loads deployment configuration from bkper.yaml or bkperapp.yaml.
|
|
13
|
-
* Checks in priority order: bkper.yaml → bkperapp.yaml
|
|
14
|
-
*
|
|
15
|
-
* @returns Deployment configuration or undefined if not configured
|
|
16
|
-
*/
|
|
17
|
-
export declare function loadDeploymentConfig(): DeploymentConfig | undefined;
|
|
18
11
|
/**
|
|
19
12
|
* Checks if deployment config uses new source-based format.
|
|
20
|
-
* Source format:
|
|
21
|
-
* Legacy format: paths are directories (no extension)
|
|
13
|
+
* Source format: deployment.server ends with .ts
|
|
22
14
|
*
|
|
23
15
|
* @param deployment - The deployment configuration object to check
|
|
24
16
|
* @returns true if the deployment uses source-based format, false otherwise
|
|
@@ -27,7 +19,6 @@ export declare function isSourceConfig(deployment: unknown): boolean;
|
|
|
27
19
|
/**
|
|
28
20
|
* Loads source-based deployment configuration from bkper.yaml.
|
|
29
21
|
* Maps snake_case YAML keys to camelCase TypeScript properties.
|
|
30
|
-
* Checks in priority order: bkper.yaml → bkperapp.yaml
|
|
31
22
|
*
|
|
32
23
|
* @returns Source deployment configuration or undefined if not configured
|
|
33
24
|
*/
|
|
@@ -39,7 +30,7 @@ export declare function loadSourceDeploymentConfig(): SourceDeploymentConfig | u
|
|
|
39
30
|
*/
|
|
40
31
|
export declare function loadReadme(): string | undefined;
|
|
41
32
|
/**
|
|
42
|
-
* Creates an App instance configured from bkper.yaml
|
|
33
|
+
* Creates an App instance configured from bkper.yaml and environment variables.
|
|
43
34
|
*
|
|
44
35
|
* @returns Configured App instance
|
|
45
36
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/commands/apps/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAI/B,OAAO,KAAK,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/commands/apps/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAI/B,OAAO,KAAK,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAMxE;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,KAAK,CAAC,GAAG,CAWzC;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,OAAO,GAAG,OAAO,CAO3D;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,sBAAsB,GAAG,SAAS,CA8B/E;AAED;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,MAAM,GAAG,SAAS,CAK/C;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,GAAG,CAUzC;AAMD;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,GAAG,KAAK,CAGjE"}
|
|
@@ -6,20 +6,14 @@ import { getErrorMessage } from '../../auth/auth-errors.js';
|
|
|
6
6
|
// App Config Loading
|
|
7
7
|
// =============================================================================
|
|
8
8
|
/**
|
|
9
|
-
* Loads app configuration from bkper.json
|
|
10
|
-
* Checks files in priority order: bkper.json → bkper.yaml
|
|
9
|
+
* Loads app configuration from bkper.json or bkper.yaml in current directory.
|
|
10
|
+
* Checks files in priority order: bkper.json → bkper.yaml
|
|
11
11
|
*
|
|
12
12
|
* @returns App configuration object
|
|
13
13
|
* @throws Error if no config file is found
|
|
14
14
|
*/
|
|
15
15
|
export function loadAppConfig() {
|
|
16
|
-
|
|
17
|
-
const configPaths = [
|
|
18
|
-
'./bkper.json',
|
|
19
|
-
'./bkper.yaml',
|
|
20
|
-
'./bkperapp.json', // Legacy
|
|
21
|
-
'./bkperapp.yaml', // Legacy
|
|
22
|
-
];
|
|
16
|
+
const configPaths = ['./bkper.json', './bkper.yaml'];
|
|
23
17
|
for (const path of configPaths) {
|
|
24
18
|
if (fs.existsSync(path)) {
|
|
25
19
|
const content = fs.readFileSync(path, 'utf8');
|
|
@@ -28,64 +22,38 @@ export function loadAppConfig() {
|
|
|
28
22
|
}
|
|
29
23
|
throw new Error('bkper.yaml or bkper.json not found');
|
|
30
24
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Loads deployment configuration from bkper.yaml or bkperapp.yaml.
|
|
33
|
-
* Checks in priority order: bkper.yaml → bkperapp.yaml
|
|
34
|
-
*
|
|
35
|
-
* @returns Deployment configuration or undefined if not configured
|
|
36
|
-
*/
|
|
37
|
-
export function loadDeploymentConfig() {
|
|
38
|
-
// Priority order: new filename first, legacy as fallback
|
|
39
|
-
const yamlPaths = ['./bkper.yaml', './bkperapp.yaml'];
|
|
40
|
-
for (const path of yamlPaths) {
|
|
41
|
-
if (fs.existsSync(path)) {
|
|
42
|
-
const config = YAML.parse(fs.readFileSync(path, 'utf8'));
|
|
43
|
-
if (config.deployment) {
|
|
44
|
-
return {
|
|
45
|
-
web: config.deployment.web,
|
|
46
|
-
events: config.deployment.events,
|
|
47
|
-
services: config.deployment.services,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
25
|
/**
|
|
55
26
|
* Checks if deployment config uses new source-based format.
|
|
56
|
-
* Source format:
|
|
57
|
-
* Legacy format: paths are directories (no extension)
|
|
27
|
+
* Source format: deployment.server ends with .ts
|
|
58
28
|
*
|
|
59
29
|
* @param deployment - The deployment configuration object to check
|
|
60
30
|
* @returns true if the deployment uses source-based format, false otherwise
|
|
61
31
|
*/
|
|
62
32
|
export function isSourceConfig(deployment) {
|
|
63
|
-
var _a, _b;
|
|
64
33
|
if (!deployment || typeof deployment !== 'object')
|
|
65
34
|
return false;
|
|
66
35
|
const d = deployment;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const eventsMain = (_b = d.events) === null || _b === void 0 ? void 0 : _b.main;
|
|
70
|
-
return ((typeof webMain === 'string' && webMain.endsWith('.ts')) ||
|
|
71
|
-
(typeof eventsMain === 'string' && eventsMain.endsWith('.ts')));
|
|
36
|
+
const server = d.server;
|
|
37
|
+
return typeof server === 'string' && server.endsWith('.ts');
|
|
72
38
|
}
|
|
73
39
|
/**
|
|
74
40
|
* Loads source-based deployment configuration from bkper.yaml.
|
|
75
41
|
* Maps snake_case YAML keys to camelCase TypeScript properties.
|
|
76
|
-
* Checks in priority order: bkper.yaml → bkperapp.yaml
|
|
77
42
|
*
|
|
78
43
|
* @returns Source deployment configuration or undefined if not configured
|
|
79
44
|
*/
|
|
80
45
|
export function loadSourceDeploymentConfig() {
|
|
81
|
-
const yamlPaths = ['./bkper.yaml'
|
|
46
|
+
const yamlPaths = ['./bkper.yaml'];
|
|
82
47
|
for (const path of yamlPaths) {
|
|
83
48
|
if (fs.existsSync(path)) {
|
|
84
49
|
const config = YAML.parse(fs.readFileSync(path, 'utf8'));
|
|
85
50
|
if (config.deployment && isSourceConfig(config.deployment)) {
|
|
51
|
+
if (!config.deployment.server) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
86
54
|
return {
|
|
87
|
-
|
|
88
|
-
|
|
55
|
+
server: config.deployment.server,
|
|
56
|
+
client: config.deployment.client,
|
|
89
57
|
services: config.deployment.services,
|
|
90
58
|
secrets: config.deployment.secrets,
|
|
91
59
|
// Map snake_case to camelCase
|
|
@@ -108,7 +76,7 @@ export function loadReadme() {
|
|
|
108
76
|
return undefined;
|
|
109
77
|
}
|
|
110
78
|
/**
|
|
111
|
-
* Creates an App instance configured from bkper.yaml
|
|
79
|
+
* Creates an App instance configured from bkper.yaml and environment variables.
|
|
112
80
|
*
|
|
113
81
|
* @returns Configured App instance
|
|
114
82
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/commands/apps/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG5D,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAEhF;;;;;;GAMG;AACH,MAAM,UAAU,aAAa;IACzB,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/commands/apps/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC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AU,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"}
|
|
@@ -1,23 +1,33 @@
|
|
|
1
|
-
import type { DeployOptions,
|
|
1
|
+
import type { DeployOptions, SourceDeploymentConfig } from './types.js';
|
|
2
|
+
interface PlatformDeployMetadata {
|
|
3
|
+
bindings?: {
|
|
4
|
+
kv_namespaces?: Array<{
|
|
5
|
+
binding: string;
|
|
6
|
+
}>;
|
|
7
|
+
};
|
|
8
|
+
compatibility_date?: string;
|
|
9
|
+
}
|
|
2
10
|
/**
|
|
3
11
|
* Deploys the app to the Bkper Platform.
|
|
4
12
|
*
|
|
5
|
-
* @param options Deploy options
|
|
13
|
+
* @param options Deploy options
|
|
6
14
|
*/
|
|
7
15
|
export declare function deployApp(options?: DeployOptions): Promise<void>;
|
|
8
|
-
export declare function resolveSourceDeployPaths(
|
|
16
|
+
export declare function resolveSourceDeployPaths(deploymentConfig: SourceDeploymentConfig): {
|
|
9
17
|
bundleDir: string;
|
|
10
18
|
bundlePath: string;
|
|
11
19
|
assetsDir?: string;
|
|
12
20
|
};
|
|
21
|
+
export declare function buildPlatformDeployMetadata(deploymentConfig: SourceDeploymentConfig): PlatformDeployMetadata | undefined;
|
|
13
22
|
/**
|
|
14
23
|
* Removes the app from the Bkper Platform.
|
|
15
24
|
*
|
|
16
|
-
* @param options Undeploy options
|
|
25
|
+
* @param options Undeploy options
|
|
17
26
|
*/
|
|
18
27
|
export declare function undeployApp(options?: DeployOptions): Promise<void>;
|
|
19
28
|
/**
|
|
20
29
|
* Shows the deployment status for the app.
|
|
21
30
|
*/
|
|
22
31
|
export declare function statusApp(): Promise<void>;
|
|
32
|
+
export {};
|
|
23
33
|
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/apps/deploy.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAe,
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/apps/deploy.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAe,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAErF,UAAU,sBAAsB;IAC5B,QAAQ,CAAC,EAAE;QACP,aAAa,CAAC,EAAE,KAAK,CAAC;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAC9C,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAMD;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8H1E;AAED,wBAAgB,wBAAwB,CACpC,gBAAgB,EAAE,sBAAsB,GACzC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAU/D;AAED,wBAAgB,2BAA2B,CACvC,gBAAgB,EAAE,sBAAsB,GACzC,sBAAsB,GAAG,SAAS,CAepC;AA6BD;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6D5E;AAMD;;GAEG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAsD/C"}
|