bkper 3.8.1 → 4.0.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/CHANGELOG.md +20 -1
- package/README.md +217 -183
- package/lib/auth/auth-page.d.ts +14 -0
- package/lib/auth/auth-page.d.ts.map +1 -0
- package/lib/auth/auth-page.js +110 -0
- package/lib/auth/auth-page.js.map +1 -0
- package/lib/auth/local-auth-service.d.ts.map +1 -1
- package/lib/auth/local-auth-service.js +135 -17
- package/lib/auth/local-auth-service.js.map +1 -1
- package/lib/bkper-factory.d.ts.map +1 -0
- package/lib/{mcp/bkper-factory.js → bkper-factory.js} +5 -2
- package/lib/bkper-factory.js.map +1 -0
- package/lib/cli.d.ts +1 -1
- package/lib/cli.d.ts.map +1 -1
- package/lib/cli.js +851 -47
- package/lib/cli.js.map +1 -1
- package/lib/commands/accounts/create.d.ts +10 -0
- package/lib/commands/accounts/create.d.ts.map +1 -0
- package/lib/commands/accounts/create.js +42 -0
- package/lib/commands/accounts/create.js.map +1 -0
- package/lib/commands/accounts/delete.d.ts +3 -0
- package/lib/commands/accounts/delete.d.ts.map +1 -0
- package/lib/commands/accounts/delete.js +22 -0
- package/lib/commands/accounts/delete.js.map +1 -0
- package/lib/commands/accounts/get.d.ts +3 -0
- package/lib/commands/accounts/get.d.ts.map +1 -0
- package/lib/commands/accounts/get.js +22 -0
- package/lib/commands/accounts/get.js.map +1 -0
- package/lib/commands/accounts/index.d.ts +6 -0
- package/lib/commands/accounts/index.d.ts.map +1 -0
- package/lib/commands/accounts/index.js +6 -0
- package/lib/commands/accounts/index.js.map +1 -0
- package/lib/commands/accounts/list.d.ts +3 -0
- package/lib/commands/accounts/list.d.ts.map +1 -0
- package/lib/commands/accounts/list.js +19 -0
- package/lib/commands/accounts/list.js.map +1 -0
- package/lib/commands/accounts/update.d.ts +9 -0
- package/lib/commands/accounts/update.d.ts.map +1 -0
- package/lib/commands/accounts/update.js +40 -0
- package/lib/commands/accounts/update.js.map +1 -0
- package/lib/commands/apps/build.d.ts +11 -0
- package/lib/commands/apps/build.d.ts.map +1 -0
- package/lib/commands/apps/build.js +144 -0
- package/lib/commands/apps/build.js.map +1 -0
- package/lib/commands/apps/bundler.d.ts +34 -0
- package/lib/commands/apps/bundler.d.ts.map +1 -0
- package/lib/commands/apps/bundler.js +112 -0
- package/lib/commands/apps/bundler.js.map +1 -0
- package/lib/commands/apps/config.d.ts +51 -0
- package/lib/commands/apps/config.d.ts.map +1 -0
- package/lib/commands/apps/config.js +146 -0
- package/lib/commands/apps/config.js.map +1 -0
- package/lib/commands/apps/deploy.d.ts +23 -0
- package/lib/commands/apps/deploy.d.ts.map +1 -0
- package/lib/commands/apps/deploy.js +344 -0
- package/lib/commands/apps/deploy.js.map +1 -0
- package/lib/commands/apps/dev.d.ts +28 -0
- package/lib/commands/apps/dev.d.ts.map +1 -0
- package/lib/commands/apps/dev.js +393 -0
- package/lib/commands/apps/dev.js.map +1 -0
- package/lib/commands/apps/index.d.ts +12 -0
- package/lib/commands/apps/index.d.ts.map +1 -0
- package/lib/commands/apps/index.js +24 -0
- package/lib/commands/apps/index.js.map +1 -0
- package/lib/commands/apps/init.d.ts +7 -0
- package/lib/commands/apps/init.d.ts.map +1 -0
- package/lib/commands/apps/init.js +249 -0
- package/lib/commands/apps/init.js.map +1 -0
- package/lib/commands/apps/install.d.ts +3 -0
- package/lib/commands/apps/install.d.ts.map +1 -0
- package/lib/commands/apps/install.js +18 -0
- package/lib/commands/apps/install.js.map +1 -0
- package/lib/commands/apps/list.d.ts +7 -0
- package/lib/commands/apps/list.d.ts.map +1 -0
- package/lib/commands/apps/list.js +23 -0
- package/lib/commands/apps/list.js.map +1 -0
- package/lib/commands/apps/secrets.d.ts +22 -0
- package/lib/commands/apps/secrets.d.ts.map +1 -0
- package/lib/commands/apps/secrets.js +209 -0
- package/lib/commands/apps/secrets.js.map +1 -0
- package/lib/commands/{apps.d.ts → apps/sync.d.ts} +8 -7
- package/lib/commands/apps/sync.d.ts.map +1 -0
- package/lib/commands/apps/sync.js +76 -0
- package/lib/commands/apps/sync.js.map +1 -0
- package/lib/commands/apps/types.d.ts +54 -0
- package/lib/commands/apps/types.d.ts.map +1 -0
- package/lib/commands/apps/types.js +2 -0
- package/lib/commands/apps/types.js.map +1 -0
- package/lib/commands/apps/uninstall.d.ts +3 -0
- package/lib/commands/apps/uninstall.d.ts.map +1 -0
- package/lib/commands/apps/uninstall.js +23 -0
- package/lib/commands/apps/uninstall.js.map +1 -0
- package/lib/commands/balances/get.d.ts +12 -0
- package/lib/commands/balances/get.d.ts.map +1 -0
- package/lib/commands/balances/get.js +32 -0
- package/lib/commands/balances/get.js.map +1 -0
- package/lib/commands/balances/index.d.ts +2 -0
- package/lib/commands/balances/index.d.ts.map +1 -0
- package/lib/commands/balances/index.js +2 -0
- package/lib/commands/balances/index.js.map +1 -0
- package/lib/commands/books/create.d.ts +12 -0
- package/lib/commands/books/create.d.ts.map +1 -0
- package/lib/commands/books/create.js +37 -0
- package/lib/commands/books/create.js.map +1 -0
- package/lib/commands/books/get.d.ts +3 -0
- package/lib/commands/books/get.d.ts.map +1 -0
- package/lib/commands/books/get.js +17 -0
- package/lib/commands/books/get.js.map +1 -0
- package/lib/commands/books/index.d.ts +5 -0
- package/lib/commands/books/index.d.ts.map +1 -0
- package/lib/commands/books/index.js +5 -0
- package/lib/commands/books/index.js.map +1 -0
- package/lib/commands/books/list.d.ts +3 -0
- package/lib/commands/books/list.d.ts.map +1 -0
- package/lib/commands/books/list.js +17 -0
- package/lib/commands/books/list.js.map +1 -0
- package/lib/commands/books/update.d.ts +14 -0
- package/lib/commands/books/update.d.ts.map +1 -0
- package/lib/commands/books/update.js +46 -0
- package/lib/commands/books/update.js.map +1 -0
- package/lib/commands/collections/add-book.d.ts +3 -0
- package/lib/commands/collections/add-book.d.ts.map +1 -0
- package/lib/commands/collections/add-book.js +27 -0
- package/lib/commands/collections/add-book.js.map +1 -0
- package/lib/commands/collections/create.d.ts +6 -0
- package/lib/commands/collections/create.d.ts.map +1 -0
- package/lib/commands/collections/create.js +19 -0
- package/lib/commands/collections/create.js.map +1 -0
- package/lib/commands/collections/delete.d.ts +3 -0
- package/lib/commands/collections/delete.d.ts.map +1 -0
- package/lib/commands/collections/delete.js +22 -0
- package/lib/commands/collections/delete.js.map +1 -0
- package/lib/commands/collections/get.d.ts +3 -0
- package/lib/commands/collections/get.d.ts.map +1 -0
- package/lib/commands/collections/get.js +22 -0
- package/lib/commands/collections/get.js.map +1 -0
- package/lib/commands/collections/index.d.ts +8 -0
- package/lib/commands/collections/index.d.ts.map +1 -0
- package/lib/commands/collections/index.js +8 -0
- package/lib/commands/collections/index.js.map +1 -0
- package/lib/commands/collections/list.d.ts +3 -0
- package/lib/commands/collections/list.d.ts.map +1 -0
- package/lib/commands/collections/list.js +18 -0
- package/lib/commands/collections/list.js.map +1 -0
- package/lib/commands/collections/remove-book.d.ts +3 -0
- package/lib/commands/collections/remove-book.d.ts.map +1 -0
- package/lib/commands/collections/remove-book.js +27 -0
- package/lib/commands/collections/remove-book.js.map +1 -0
- package/lib/commands/collections/update.d.ts +6 -0
- package/lib/commands/collections/update.d.ts.map +1 -0
- package/lib/commands/collections/update.js +24 -0
- package/lib/commands/collections/update.js.map +1 -0
- package/lib/commands/groups/create.d.ts +9 -0
- package/lib/commands/groups/create.d.ts.map +1 -0
- package/lib/commands/groups/create.js +40 -0
- package/lib/commands/groups/create.js.map +1 -0
- package/lib/commands/groups/delete.d.ts +3 -0
- package/lib/commands/groups/delete.d.ts.map +1 -0
- package/lib/commands/groups/delete.js +22 -0
- package/lib/commands/groups/delete.js.map +1 -0
- package/lib/commands/groups/get.d.ts +3 -0
- package/lib/commands/groups/get.d.ts.map +1 -0
- package/lib/commands/groups/get.js +22 -0
- package/lib/commands/groups/get.js.map +1 -0
- package/lib/commands/groups/index.d.ts +6 -0
- package/lib/commands/groups/index.d.ts.map +1 -0
- package/lib/commands/groups/index.js +6 -0
- package/lib/commands/groups/index.js.map +1 -0
- package/lib/commands/groups/list.d.ts +3 -0
- package/lib/commands/groups/list.d.ts.map +1 -0
- package/lib/commands/groups/list.js +19 -0
- package/lib/commands/groups/list.js.map +1 -0
- package/lib/commands/groups/update.d.ts +8 -0
- package/lib/commands/groups/update.d.ts.map +1 -0
- package/lib/commands/groups/update.js +38 -0
- package/lib/commands/groups/update.js.map +1 -0
- package/lib/commands/skills.d.ts +17 -0
- package/lib/commands/skills.d.ts.map +1 -0
- package/lib/commands/skills.js +248 -0
- package/lib/commands/skills.js.map +1 -0
- package/lib/commands/transactions/check.d.ts +3 -0
- package/lib/commands/transactions/check.d.ts.map +1 -0
- package/lib/commands/transactions/check.js +22 -0
- package/lib/commands/transactions/check.js.map +1 -0
- package/lib/commands/transactions/create.d.ts +13 -0
- package/lib/commands/transactions/create.d.ts.map +1 -0
- package/lib/commands/transactions/create.js +55 -0
- package/lib/commands/transactions/create.js.map +1 -0
- package/lib/commands/transactions/index.d.ts +8 -0
- package/lib/commands/transactions/index.d.ts.map +1 -0
- package/lib/commands/transactions/index.js +8 -0
- package/lib/commands/transactions/index.js.map +1 -0
- package/lib/commands/transactions/list.d.ts +14 -0
- package/lib/commands/transactions/list.d.ts.map +1 -0
- package/lib/commands/transactions/list.js +26 -0
- package/lib/commands/transactions/list.js.map +1 -0
- package/lib/commands/transactions/merge.d.ts +8 -0
- package/lib/commands/transactions/merge.d.ts.map +1 -0
- package/lib/commands/transactions/merge.js +44 -0
- package/lib/commands/transactions/merge.js.map +1 -0
- package/lib/commands/transactions/post.d.ts +3 -0
- package/lib/commands/transactions/post.d.ts.map +1 -0
- package/lib/commands/transactions/post.js +22 -0
- package/lib/commands/transactions/post.js.map +1 -0
- package/lib/commands/transactions/trash.d.ts +3 -0
- package/lib/commands/transactions/trash.d.ts.map +1 -0
- package/lib/commands/transactions/trash.js +22 -0
- package/lib/commands/transactions/trash.js.map +1 -0
- package/lib/commands/transactions/update.d.ts +12 -0
- package/lib/commands/transactions/update.d.ts.map +1 -0
- package/lib/commands/transactions/update.js +53 -0
- package/lib/commands/transactions/update.js.map +1 -0
- package/lib/dev/auth-middleware.d.ts +18 -0
- package/lib/dev/auth-middleware.d.ts.map +1 -0
- package/lib/dev/auth-middleware.js +113 -0
- package/lib/dev/auth-middleware.js.map +1 -0
- package/lib/dev/cleanup.d.ts +10 -0
- package/lib/dev/cleanup.d.ts.map +1 -0
- package/lib/dev/cleanup.js +36 -0
- package/lib/dev/cleanup.js.map +1 -0
- package/lib/dev/cloudflared/constants.d.ts +35 -0
- package/lib/dev/cloudflared/constants.d.ts.map +1 -0
- package/lib/dev/cloudflared/constants.js +48 -0
- package/lib/dev/cloudflared/constants.js.map +1 -0
- package/lib/dev/cloudflared/index.d.ts +11 -0
- package/lib/dev/cloudflared/index.d.ts.map +1 -0
- package/lib/dev/cloudflared/index.js +10 -0
- package/lib/dev/cloudflared/index.js.map +1 -0
- package/lib/dev/cloudflared/install.d.ts +15 -0
- package/lib/dev/cloudflared/install.d.ts.map +1 -0
- package/lib/dev/cloudflared/install.js +140 -0
- package/lib/dev/cloudflared/install.js.map +1 -0
- package/lib/dev/cloudflared/tunnel.d.ts +64 -0
- package/lib/dev/cloudflared/tunnel.d.ts.map +1 -0
- package/lib/dev/cloudflared/tunnel.js +109 -0
- package/lib/dev/cloudflared/tunnel.js.map +1 -0
- package/lib/dev/esbuild.d.ts +28 -0
- package/lib/dev/esbuild.d.ts.map +1 -0
- package/lib/dev/esbuild.js +83 -0
- package/lib/dev/esbuild.js.map +1 -0
- package/lib/dev/logger.d.ts +51 -0
- package/lib/dev/logger.d.ts.map +1 -0
- package/lib/dev/logger.js +102 -0
- package/lib/dev/logger.js.map +1 -0
- package/lib/dev/miniflare.d.ts +32 -0
- package/lib/dev/miniflare.d.ts.map +1 -0
- package/lib/dev/miniflare.js +111 -0
- package/lib/dev/miniflare.js.map +1 -0
- package/lib/dev/preflight.d.ts +7 -0
- package/lib/dev/preflight.d.ts.map +1 -0
- package/lib/dev/preflight.js +61 -0
- package/lib/dev/preflight.js.map +1 -0
- package/lib/dev/shared.d.ts +7 -0
- package/lib/dev/shared.d.ts.map +1 -0
- package/lib/dev/shared.js +99 -0
- package/lib/dev/shared.js.map +1 -0
- package/lib/dev/tunnel.d.ts +31 -0
- package/lib/dev/tunnel.d.ts.map +1 -0
- package/lib/dev/tunnel.js +110 -0
- package/lib/dev/tunnel.js.map +1 -0
- package/lib/dev/types.d.ts +53 -0
- package/lib/dev/types.d.ts.map +1 -0
- package/lib/dev/types.js +223 -0
- package/lib/dev/types.js.map +1 -0
- package/lib/dev/vite.d.ts +50 -0
- package/lib/dev/vite.d.ts.map +1 -0
- package/lib/dev/vite.js +114 -0
- package/lib/dev/vite.js.map +1 -0
- package/lib/dev/webhook-dev.d.ts +9 -0
- package/lib/dev/webhook-dev.d.ts.map +1 -0
- package/lib/dev/webhook-dev.js +28 -0
- package/lib/dev/webhook-dev.js.map +1 -0
- package/lib/domain/transaction/merge-operation.d.ts.map +1 -0
- package/lib/{mcp/domain → domain}/transaction/merge-operation.js +10 -11
- package/lib/domain/transaction/merge-operation.js.map +1 -0
- package/lib/domain/transaction/merge-types.d.ts.map +1 -0
- package/lib/domain/transaction/merge-types.js.map +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/platform/client.d.ts +37 -0
- package/lib/platform/client.d.ts.map +1 -0
- package/lib/platform/client.js +37 -0
- package/lib/platform/client.js.map +1 -0
- package/lib/render/index.d.ts +3 -0
- package/lib/render/index.d.ts.map +1 -0
- package/lib/render/index.js +3 -0
- package/lib/render/index.js.map +1 -0
- package/lib/render/output.d.ts +15 -0
- package/lib/render/output.d.ts.map +1 -0
- package/lib/render/output.js +30 -0
- package/lib/render/output.js.map +1 -0
- package/lib/render/table-formatter.d.ts +34 -0
- package/lib/render/table-formatter.d.ts.map +1 -0
- package/lib/render/table-formatter.js +221 -0
- package/lib/render/table-formatter.js.map +1 -0
- package/lib/utils/properties.d.ts +12 -0
- package/lib/utils/properties.d.ts.map +1 -0
- package/lib/utils/properties.js +23 -0
- package/lib/utils/properties.js.map +1 -0
- package/package.json +23 -23
- package/lib/auth/keys.json +0 -12
- package/lib/commands/apps.d.ts.map +0 -1
- package/lib/commands/apps.js +0 -93
- package/lib/commands/apps.js.map +0 -1
- package/lib/mcp/bkper-factory.d.ts.map +0 -1
- package/lib/mcp/bkper-factory.js.map +0 -1
- package/lib/mcp/domain/transaction/merge-operation.d.ts.map +0 -1
- package/lib/mcp/domain/transaction/merge-operation.js.map +0 -1
- package/lib/mcp/domain/transaction/merge-types.d.ts.map +0 -1
- package/lib/mcp/domain/transaction/merge-types.js.map +0 -1
- package/lib/mcp/server.d.ts +0 -13
- package/lib/mcp/server.d.ts.map +0 -1
- package/lib/mcp/server.js +0 -161
- package/lib/mcp/server.js.map +0 -1
- package/lib/mcp/system-prompt.md +0 -192
- package/lib/mcp/tools/create_transactions.d.ts +0 -59
- package/lib/mcp/tools/create_transactions.d.ts.map +0 -1
- package/lib/mcp/tools/create_transactions.js +0 -163
- package/lib/mcp/tools/create_transactions.js.map +0 -1
- package/lib/mcp/tools/get_balances.d.ts +0 -26
- package/lib/mcp/tools/get_balances.d.ts.map +0 -1
- package/lib/mcp/tools/get_balances.js +0 -106
- package/lib/mcp/tools/get_balances.js.map +0 -1
- package/lib/mcp/tools/get_book.d.ts +0 -21
- package/lib/mcp/tools/get_book.d.ts.map +0 -1
- package/lib/mcp/tools/get_book.js +0 -126
- package/lib/mcp/tools/get_book.js.map +0 -1
- package/lib/mcp/tools/list_books.d.ts +0 -21
- package/lib/mcp/tools/list_books.d.ts.map +0 -1
- package/lib/mcp/tools/list_books.js +0 -67
- package/lib/mcp/tools/list_books.js.map +0 -1
- package/lib/mcp/tools/list_transactions.d.ts +0 -38
- package/lib/mcp/tools/list_transactions.d.ts.map +0 -1
- package/lib/mcp/tools/list_transactions.js +0 -109
- package/lib/mcp/tools/list_transactions.js.map +0 -1
- package/lib/mcp/tools/merge_transactions.d.ts +0 -40
- package/lib/mcp/tools/merge_transactions.d.ts.map +0 -1
- package/lib/mcp/tools/merge_transactions.js +0 -120
- package/lib/mcp/tools/merge_transactions.js.map +0 -1
- /package/lib/{mcp/bkper-factory.d.ts → bkper-factory.d.ts} +0 -0
- /package/lib/{mcp/domain → domain}/transaction/merge-operation.d.ts +0 -0
- /package/lib/{mcp/domain → domain}/transaction/merge-types.d.ts +0 -0
- /package/lib/{mcp/domain → domain}/transaction/merge-types.js +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import fs from 'fs';
|
|
11
|
+
import path from 'path';
|
|
12
|
+
import crypto from 'crypto';
|
|
13
|
+
/**
|
|
14
|
+
* Recursively gets all files in a directory.
|
|
15
|
+
*
|
|
16
|
+
* @param dir - Directory to scan
|
|
17
|
+
* @returns Array of file paths
|
|
18
|
+
*/
|
|
19
|
+
export function getFilesRecursive(dir) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const files = [];
|
|
22
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
23
|
+
for (const entry of entries) {
|
|
24
|
+
const fullPath = path.join(dir, entry.name);
|
|
25
|
+
if (entry.isDirectory()) {
|
|
26
|
+
files.push(...(yield getFilesRecursive(fullPath)));
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
files.push(fullPath);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return files;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Creates asset manifest for deployment.
|
|
37
|
+
* Computes SHA-256 hashes for all files in the assets directory.
|
|
38
|
+
*
|
|
39
|
+
* @param assetsPath - Path to asset directory (relative to project root)
|
|
40
|
+
* @returns Asset manifest with hashes and sizes
|
|
41
|
+
*/
|
|
42
|
+
export function createAssetManifest(assetsPath) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
const fullPath = path.resolve(assetsPath);
|
|
45
|
+
if (!fs.existsSync(fullPath)) {
|
|
46
|
+
throw new Error(`Assets directory not found: ${assetsPath}`);
|
|
47
|
+
}
|
|
48
|
+
const manifest = {};
|
|
49
|
+
const files = yield getFilesRecursive(fullPath);
|
|
50
|
+
for (const file of files) {
|
|
51
|
+
const relativePath = '/' + path.relative(fullPath, file).replace(/\\/g, '/');
|
|
52
|
+
const content = fs.readFileSync(file);
|
|
53
|
+
const hash = computeHash(content);
|
|
54
|
+
const size = fs.statSync(file).size;
|
|
55
|
+
manifest[relativePath] = { hash, size };
|
|
56
|
+
}
|
|
57
|
+
return manifest;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Computes SHA-256 hash of content.
|
|
62
|
+
* Returns first 32 characters as per Cloudflare spec.
|
|
63
|
+
*
|
|
64
|
+
* @param content - File content as Buffer
|
|
65
|
+
* @returns 32-character hex hash
|
|
66
|
+
*/
|
|
67
|
+
export function computeHash(content) {
|
|
68
|
+
const hash = crypto.createHash('sha256').update(content).digest('hex');
|
|
69
|
+
return hash.substring(0, 32);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Reads asset file contents for deployment.
|
|
73
|
+
*
|
|
74
|
+
* @param assetsPath - Path to asset directory
|
|
75
|
+
* @returns Map of hash to base64-encoded content
|
|
76
|
+
*/
|
|
77
|
+
export function readAssetFiles(assetsPath) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
const fullPath = path.resolve(assetsPath);
|
|
80
|
+
if (!fs.existsSync(fullPath)) {
|
|
81
|
+
throw new Error(`Assets directory not found: ${assetsPath}`);
|
|
82
|
+
}
|
|
83
|
+
const files = yield getFilesRecursive(fullPath);
|
|
84
|
+
const assetFiles = {};
|
|
85
|
+
let totalSize = 0;
|
|
86
|
+
const MAX_TOTAL_SIZE = 50 * 1024 * 1024; // 50 MB
|
|
87
|
+
const MAX_FILE_SIZE = 25 * 1024 * 1024; // 25 MB (Cloudflare limit)
|
|
88
|
+
const MAX_FILE_COUNT = 10000;
|
|
89
|
+
if (files.length > MAX_FILE_COUNT) {
|
|
90
|
+
throw new Error(`Too many asset files (${files.length}). Maximum is ${MAX_FILE_COUNT}.`);
|
|
91
|
+
}
|
|
92
|
+
for (const file of files) {
|
|
93
|
+
const content = fs.readFileSync(file);
|
|
94
|
+
const fileSize = content.length;
|
|
95
|
+
if (fileSize > MAX_FILE_SIZE) {
|
|
96
|
+
const fileName = path.relative(fullPath, file);
|
|
97
|
+
throw new Error(`File ${fileName} exceeds 25 MB Cloudflare limit (${(fileSize /
|
|
98
|
+
1024 /
|
|
99
|
+
1024).toFixed(2)} MB)`);
|
|
100
|
+
}
|
|
101
|
+
totalSize += fileSize;
|
|
102
|
+
if (totalSize > MAX_TOTAL_SIZE) {
|
|
103
|
+
throw new Error(`Total asset size exceeds 50 MB limit (${(totalSize / 1024 / 1024).toFixed(2)} MB)`);
|
|
104
|
+
}
|
|
105
|
+
const hash = computeHash(content);
|
|
106
|
+
const base64 = content.toString('base64');
|
|
107
|
+
assetFiles[hash] = base64;
|
|
108
|
+
}
|
|
109
|
+
return assetFiles;
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=bundler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.js","sourceRoot":"","s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
+
* Loads app configuration from bkper.json, bkper.yaml, bkperapp.json, or bkperapp.yaml in current directory.
|
|
5
|
+
* Checks files in priority order: bkper.json → bkper.yaml → bkperapp.json → bkperapp.yaml
|
|
6
|
+
*
|
|
7
|
+
* @returns App configuration object
|
|
8
|
+
* @throws Error if no config file is found
|
|
9
|
+
*/
|
|
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
|
+
/**
|
|
19
|
+
* Checks if deployment config uses new source-based format.
|
|
20
|
+
* Source format: entry points end with .ts
|
|
21
|
+
* Legacy format: paths are directories (no extension)
|
|
22
|
+
*
|
|
23
|
+
* @param deployment - The deployment configuration object to check
|
|
24
|
+
* @returns true if the deployment uses source-based format, false otherwise
|
|
25
|
+
*/
|
|
26
|
+
export declare function isSourceConfig(deployment: unknown): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Loads source-based deployment configuration from bkper.yaml.
|
|
29
|
+
* Maps snake_case YAML keys to camelCase TypeScript properties.
|
|
30
|
+
* Checks in priority order: bkper.yaml → bkperapp.yaml
|
|
31
|
+
*
|
|
32
|
+
* @returns Source deployment configuration or undefined if not configured
|
|
33
|
+
*/
|
|
34
|
+
export declare function loadSourceDeploymentConfig(): SourceDeploymentConfig | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Loads README.md content if it exists.
|
|
37
|
+
*
|
|
38
|
+
* @returns README content or undefined
|
|
39
|
+
*/
|
|
40
|
+
export declare function loadReadme(): string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Creates an App instance configured from bkper.yaml (or bkperapp.yaml) and environment variables.
|
|
43
|
+
*
|
|
44
|
+
* @returns Configured App instance
|
|
45
|
+
*/
|
|
46
|
+
export declare function createConfiguredApp(): App;
|
|
47
|
+
/**
|
|
48
|
+
* Handles error response from Platform API
|
|
49
|
+
*/
|
|
50
|
+
export declare function handleError(error: ErrorResponse | unknown): never;
|
|
51
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +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;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAM1F;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,KAAK,CAAC,GAAG,CAiBzC;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,gBAAgB,GAAG,SAAS,CAuBnE;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,OAAO,GAAG,OAAO,CAY3D;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAAI,sBAAsB,GAAG,SAAS,CA2B/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,CAkBjE"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { App } from 'bkper-js';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import * as YAML from 'yaml';
|
|
4
|
+
// =============================================================================
|
|
5
|
+
// App Config Loading
|
|
6
|
+
// =============================================================================
|
|
7
|
+
/**
|
|
8
|
+
* Loads app configuration from bkper.json, bkper.yaml, bkperapp.json, or bkperapp.yaml in current directory.
|
|
9
|
+
* Checks files in priority order: bkper.json → bkper.yaml → bkperapp.json → bkperapp.yaml
|
|
10
|
+
*
|
|
11
|
+
* @returns App configuration object
|
|
12
|
+
* @throws Error if no config file is found
|
|
13
|
+
*/
|
|
14
|
+
export function loadAppConfig() {
|
|
15
|
+
// Priority order: new filenames first, legacy filenames as fallback
|
|
16
|
+
const configPaths = [
|
|
17
|
+
'./bkper.json',
|
|
18
|
+
'./bkper.yaml',
|
|
19
|
+
'./bkperapp.json', // Legacy
|
|
20
|
+
'./bkperapp.yaml', // Legacy
|
|
21
|
+
];
|
|
22
|
+
for (const path of configPaths) {
|
|
23
|
+
if (fs.existsSync(path)) {
|
|
24
|
+
const content = fs.readFileSync(path, 'utf8');
|
|
25
|
+
return path.endsWith('.json') ? JSON.parse(content) : YAML.parse(content);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
throw new Error('bkper.yaml or bkper.json not found');
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Loads deployment configuration from bkper.yaml or bkperapp.yaml.
|
|
32
|
+
* Checks in priority order: bkper.yaml → bkperapp.yaml
|
|
33
|
+
*
|
|
34
|
+
* @returns Deployment configuration or undefined if not configured
|
|
35
|
+
*/
|
|
36
|
+
export function loadDeploymentConfig() {
|
|
37
|
+
// Priority order: new filename first, legacy as fallback
|
|
38
|
+
const yamlPaths = ['./bkper.yaml', './bkperapp.yaml'];
|
|
39
|
+
for (const path of yamlPaths) {
|
|
40
|
+
if (fs.existsSync(path)) {
|
|
41
|
+
const config = YAML.parse(fs.readFileSync(path, 'utf8'));
|
|
42
|
+
if (config.deployment) {
|
|
43
|
+
return {
|
|
44
|
+
web: config.deployment.web,
|
|
45
|
+
events: config.deployment.events,
|
|
46
|
+
services: config.deployment.services,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Checks if deployment config uses new source-based format.
|
|
55
|
+
* Source format: entry points end with .ts
|
|
56
|
+
* Legacy format: paths are directories (no extension)
|
|
57
|
+
*
|
|
58
|
+
* @param deployment - The deployment configuration object to check
|
|
59
|
+
* @returns true if the deployment uses source-based format, false otherwise
|
|
60
|
+
*/
|
|
61
|
+
export function isSourceConfig(deployment) {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
if (!deployment || typeof deployment !== 'object')
|
|
64
|
+
return false;
|
|
65
|
+
const d = deployment;
|
|
66
|
+
// Check if web.main or events.main ends with .ts
|
|
67
|
+
const webMain = (_a = d.web) === null || _a === void 0 ? void 0 : _a.main;
|
|
68
|
+
const eventsMain = (_b = d.events) === null || _b === void 0 ? void 0 : _b.main;
|
|
69
|
+
return ((typeof webMain === 'string' && webMain.endsWith('.ts')) ||
|
|
70
|
+
(typeof eventsMain === 'string' && eventsMain.endsWith('.ts')));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Loads source-based deployment configuration from bkper.yaml.
|
|
74
|
+
* Maps snake_case YAML keys to camelCase TypeScript properties.
|
|
75
|
+
* Checks in priority order: bkper.yaml → bkperapp.yaml
|
|
76
|
+
*
|
|
77
|
+
* @returns Source deployment configuration or undefined if not configured
|
|
78
|
+
*/
|
|
79
|
+
export function loadSourceDeploymentConfig() {
|
|
80
|
+
const yamlPaths = ['./bkper.yaml', './bkperapp.yaml'];
|
|
81
|
+
for (const path of yamlPaths) {
|
|
82
|
+
if (fs.existsSync(path)) {
|
|
83
|
+
const config = YAML.parse(fs.readFileSync(path, 'utf8'));
|
|
84
|
+
if (config.deployment && isSourceConfig(config.deployment)) {
|
|
85
|
+
return {
|
|
86
|
+
web: config.deployment.web,
|
|
87
|
+
events: config.deployment.events,
|
|
88
|
+
services: config.deployment.services,
|
|
89
|
+
secrets: config.deployment.secrets,
|
|
90
|
+
// Map snake_case to camelCase
|
|
91
|
+
compatibilityDate: config.deployment.compatibility_date,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Loads README.md content if it exists.
|
|
100
|
+
*
|
|
101
|
+
* @returns README content or undefined
|
|
102
|
+
*/
|
|
103
|
+
export function loadReadme() {
|
|
104
|
+
if (fs.existsSync('./README.md')) {
|
|
105
|
+
return fs.readFileSync('./README.md', 'utf8');
|
|
106
|
+
}
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Creates an App instance configured from bkper.yaml (or bkperapp.yaml) and environment variables.
|
|
111
|
+
*
|
|
112
|
+
* @returns Configured App instance
|
|
113
|
+
*/
|
|
114
|
+
export function createConfiguredApp() {
|
|
115
|
+
const json = loadAppConfig();
|
|
116
|
+
const app = new App(json);
|
|
117
|
+
const readme = loadReadme();
|
|
118
|
+
if (readme) {
|
|
119
|
+
app.setReadme(readme);
|
|
120
|
+
}
|
|
121
|
+
return app;
|
|
122
|
+
}
|
|
123
|
+
// =============================================================================
|
|
124
|
+
// Error Handling
|
|
125
|
+
// =============================================================================
|
|
126
|
+
/**
|
|
127
|
+
* Handles error response from Platform API
|
|
128
|
+
*/
|
|
129
|
+
export function handleError(error) {
|
|
130
|
+
var _a;
|
|
131
|
+
// Handle unexpected error shapes (e.g., network errors, non-JSON responses)
|
|
132
|
+
if (!error ||
|
|
133
|
+
typeof error !== 'object' ||
|
|
134
|
+
!('error' in error) ||
|
|
135
|
+
!((_a = error.error) === null || _a === void 0 ? void 0 : _a.message)) {
|
|
136
|
+
console.error('Error deploying app:', error);
|
|
137
|
+
process.exit(1);
|
|
138
|
+
}
|
|
139
|
+
const typedError = error;
|
|
140
|
+
console.error(`Error: ${typedError.error.message}`);
|
|
141
|
+
if (typedError.error.details) {
|
|
142
|
+
console.error('Details:', JSON.stringify(typedError.error.details, null, 2));
|
|
143
|
+
}
|
|
144
|
+
process.exit(1);
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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IACpB,CAAC;IAED,MAAM,UAAU,GAAG,KAAsB,CAAC;IAC1C,OAAO,CAAC,KAAK,CAAC,UAAU,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACpD,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QAC3B,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DeployOptions, HandlerType, SourceDeploymentConfig } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Deploys the app to the Bkper Platform.
|
|
4
|
+
*
|
|
5
|
+
* @param options Deploy options (dev, events)
|
|
6
|
+
*/
|
|
7
|
+
export declare function deployApp(options?: DeployOptions): Promise<void>;
|
|
8
|
+
export declare function resolveSourceDeployPaths(type: HandlerType, deploymentConfig: SourceDeploymentConfig): {
|
|
9
|
+
bundleDir: string;
|
|
10
|
+
bundlePath: string;
|
|
11
|
+
assetsDir?: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Removes the app from the Bkper Platform.
|
|
15
|
+
*
|
|
16
|
+
* @param options Undeploy options (dev, events, deleteData)
|
|
17
|
+
*/
|
|
18
|
+
export declare function undeployApp(options?: DeployOptions): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Shows the deployment status for the app.
|
|
21
|
+
*/
|
|
22
|
+
export declare function statusApp(): Promise<void>;
|
|
23
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/apps/deploy.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAe,WAAW,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAMlG;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsJ1E;AAED,wBAAgB,wBAAwB,CACpC,IAAI,EAAE,WAAW,EACjB,gBAAgB,EAAE,sBAAsB,GACzC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAqB/D;AA6BD;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoE5E;AAMD;;GAEG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAuE/C"}
|