bkper 4.29.3 → 4.30.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 +1 -1
- package/lib/agent/system-prompt.js +2 -2
- package/lib/commands/apps/deploy.d.ts +24 -3
- package/lib/commands/apps/deploy.d.ts.map +1 -1
- package/lib/commands/apps/deploy.js +41 -25
- package/lib/commands/apps/deploy.js.map +1 -1
- package/lib/commands/apps/git/clone.d.ts +8 -0
- package/lib/commands/apps/git/clone.d.ts.map +1 -1
- package/lib/commands/apps/git/clone.js +20 -31
- package/lib/commands/apps/git/clone.js.map +1 -1
- package/lib/commands/apps/git/credentials.d.ts +2 -1
- package/lib/commands/apps/git/credentials.d.ts.map +1 -1
- package/lib/commands/apps/git/credentials.js +28 -12
- package/lib/commands/apps/git/credentials.js.map +1 -1
- package/lib/commands/apps/git/external-source.d.ts +16 -0
- package/lib/commands/apps/git/external-source.d.ts.map +1 -0
- package/lib/commands/apps/git/external-source.js +113 -0
- package/lib/commands/apps/git/external-source.js.map +1 -0
- package/lib/commands/apps/git/index.d.ts +2 -1
- package/lib/commands/apps/git/index.d.ts.map +1 -1
- package/lib/commands/apps/git/index.js +2 -1
- package/lib/commands/apps/git/index.js.map +1 -1
- package/lib/commands/apps/git/inspect.d.ts.map +1 -1
- package/lib/commands/apps/git/inspect.js +7 -2
- package/lib/commands/apps/git/inspect.js.map +1 -1
- package/lib/commands/apps/git/mode.d.ts +3 -2
- package/lib/commands/apps/git/mode.d.ts.map +1 -1
- package/lib/commands/apps/git/mode.js +5 -6
- package/lib/commands/apps/git/mode.js.map +1 -1
- package/lib/commands/apps/git/preflight.d.ts +8 -3
- package/lib/commands/apps/git/preflight.d.ts.map +1 -1
- package/lib/commands/apps/git/preflight.js +19 -12
- package/lib/commands/apps/git/preflight.js.map +1 -1
- package/lib/commands/apps/git/push.d.ts +6 -1
- package/lib/commands/apps/git/push.d.ts.map +1 -1
- package/lib/commands/apps/git/push.js +50 -40
- package/lib/commands/apps/git/push.js.map +1 -1
- package/lib/commands/apps/git/run-git.d.ts +1 -0
- package/lib/commands/apps/git/run-git.d.ts.map +1 -1
- package/lib/commands/apps/git/run-git.js +1 -1
- package/lib/commands/apps/git/run-git.js.map +1 -1
- package/lib/commands/apps/git/types.d.ts +2 -2
- package/lib/commands/apps/git/types.d.ts.map +1 -1
- package/lib/commands/apps/git/types.js.map +1 -1
- package/lib/commands/apps/register.js +5 -5
- package/lib/commands/apps/register.js.map +1 -1
- package/lib/commands/apps/source-workflow.d.ts +4 -1
- package/lib/commands/apps/source-workflow.d.ts.map +1 -1
- package/lib/commands/apps/source-workflow.js +87 -32
- package/lib/commands/apps/source-workflow.js.map +1 -1
- package/lib/commands/apps/sync.d.ts.map +1 -1
- package/lib/commands/apps/sync.js +1 -0
- package/lib/commands/apps/sync.js.map +1 -1
- package/lib/docs/apps/app-listing.md +3 -3
- package/lib/docs/apps/architecture.md +3 -3
- package/lib/docs/apps/configuration.md +5 -5
- package/lib/docs/apps/context-menu.md +3 -3
- package/lib/docs/apps/deploying.md +10 -8
- package/lib/docs/apps/event-handlers.md +5 -5
- package/lib/docs/apps/first-app.md +12 -12
- package/lib/docs/apps/overview.md +10 -10
- package/lib/docs/apps/quality.md +5 -5
- package/lib/docs/apps/security.md +5 -5
- package/lib/docs/apps/self-hosted.md +4 -4
- package/lib/docs/apps/shared-app-source.md +16 -11
- package/lib/docs/cli/app-management.md +17 -12
- package/lib/docs/core/core-concepts.md +1 -1
- package/lib/docs/sdk/bkper-api-types.md +2 -0
- package/lib/docs/sdk/bkper-js.md +2 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/commands/apps/git/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,oBAAoB,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAAG,MAAM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,GACzB,yBAAyB,GACzB,+BAA+B,GAC/B,0BAA0B,GAC1B,iBAAiB,GACjB,4BAA4B,GAC5B,uBAAuB,GACvB,0BAA0B,GAC1B,wBAAwB,GACxB,4BAA4B,GAC5B,uBAAuB,GACvB,yBAAyB,GACzB,2BAA2B,GAC3B,2BAA2B,GAC3B,0BAA0B,GAC1B,oBAAoB,CAAC;AAE3B,qBAAa,eAAgB,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;gBAEb,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,EAAO;CAM5E;AAED,eAAO,MAAM,qBAAqB,8BAA8B,CAAC;AACjE,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,sBAAsB,SAAS,CAAC;AAC7C,eAAO,MAAM,mBAAmB,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/commands/apps/git/types.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/commands/apps/git/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAwIH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAItC,YAAY,IAAsB,EAAE,OAAe,EAAE,QAAkB,EAAE;QACrE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AACjE,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AACvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAC7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC"}
|
|
@@ -55,14 +55,14 @@ export function registerAppCommands(program) {
|
|
|
55
55
|
})));
|
|
56
56
|
appCommand
|
|
57
57
|
.command('sync')
|
|
58
|
-
.description('Sync App config
|
|
58
|
+
.description('Sync App config after verifying committed source is stored')
|
|
59
59
|
.action(withAction('syncing app', () => __awaiter(this, void 0, void 0, function* () {
|
|
60
60
|
const result = yield syncApp();
|
|
61
61
|
console.log(`Synced ${result.id} (${result.action})`);
|
|
62
62
|
})));
|
|
63
63
|
appCommand
|
|
64
64
|
.command('deploy')
|
|
65
|
-
.description('Deploy the existing local build
|
|
65
|
+
.description('Deploy the existing local build after verifying stored source')
|
|
66
66
|
.option('-p, --preview', 'Deploy to preview environment')
|
|
67
67
|
.action(options => withAction('deploying app', () => __awaiter(this, void 0, void 0, function* () {
|
|
68
68
|
yield deployApp(options);
|
|
@@ -77,10 +77,10 @@ export function registerAppCommands(program) {
|
|
|
77
77
|
yield undeployApp(options);
|
|
78
78
|
}), { skipSetup: true })());
|
|
79
79
|
appCommand
|
|
80
|
-
.command('status')
|
|
80
|
+
.command('status [appId]')
|
|
81
81
|
.description('Show deployment status')
|
|
82
|
-
.action(
|
|
83
|
-
yield statusApp();
|
|
82
|
+
.action((appId) => withAction('getting app status', () => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
yield statusApp(appId);
|
|
84
84
|
}), { skipSetup: true })());
|
|
85
85
|
appCommand
|
|
86
86
|
.command('logs [appId]')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/commands/apps/register.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,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C;IAC3C,CAAC,CAAA,CAAC,EAAE,CACP,CAAC;AACV,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { configureManagedOrigin, type PlatformSourceApi, type SafePushOptions, type SafePushResult } from './git/index.js';
|
|
2
|
+
import { type ExternalSourceVerification, type PrepareExternalSourceOptions } from './git/external-source.js';
|
|
2
3
|
import type { SyncResult } from './types.js';
|
|
3
4
|
export interface DeploySourceMetadata {
|
|
4
5
|
mode: 'managed';
|
|
5
6
|
declaredBranch: string;
|
|
6
7
|
commitSha: string;
|
|
7
8
|
}
|
|
9
|
+
type PrepareExternalSource = (options?: PrepareExternalSourceOptions) => Promise<ExternalSourceVerification>;
|
|
8
10
|
type ConfigureOrigin = typeof configureManagedOrigin;
|
|
9
11
|
type PushManagedSource = (options: SafePushOptions) => Promise<SafePushResult>;
|
|
10
12
|
interface SourceWorkflowOptions {
|
|
@@ -13,6 +15,7 @@ interface SourceWorkflowOptions {
|
|
|
13
15
|
api?: PlatformSourceApi;
|
|
14
16
|
configureOrigin?: ConfigureOrigin;
|
|
15
17
|
push?: PushManagedSource;
|
|
18
|
+
prepareExternal?: PrepareExternalSource;
|
|
16
19
|
}
|
|
17
20
|
export interface ManagedSyncWorkflowOptions extends SourceWorkflowOptions {
|
|
18
21
|
coreAppExists: boolean;
|
|
@@ -25,7 +28,7 @@ export interface ManagedSyncWorkflowOptions extends SourceWorkflowOptions {
|
|
|
25
28
|
export declare function syncManagedAppSource(options: ManagedSyncWorkflowOptions): Promise<SyncResult>;
|
|
26
29
|
/**
|
|
27
30
|
* Pushes managed source before the caller reads and uploads existing local build output.
|
|
28
|
-
* External Apps
|
|
31
|
+
* External Apps are verified by the CLI and retain source-less Platform uploads.
|
|
29
32
|
*/
|
|
30
33
|
export declare function prepareManagedDeploySource(options: SourceWorkflowOptions): Promise<DeploySourceMetadata | undefined>;
|
|
31
34
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-workflow.d.ts","sourceRoot":"","sources":["../../../src/commands/apps/source-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,sBAAsB,
|
|
1
|
+
{"version":3,"file":"source-workflow.d.ts","sourceRoot":"","sources":["../../../src/commands/apps/source-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,sBAAsB,EActB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,cAAc,EAEtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEH,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACpC,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,qBAAqB,GAAG,CACzB,OAAO,CAAC,EAAE,4BAA4B,KACrC,OAAO,CAAC,0BAA0B,CAAC,CAAC;AAEzC,KAAK,eAAe,GAAG,OAAO,sBAAsB,CAAC;AACrD,KAAK,iBAAiB,GAAG,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;AAE/E,UAAU,qBAAqB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,iBAAiB,CAAC;IACxB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,eAAe,CAAC,EAAE,qBAAqB,CAAC;CAC3C;AAED,MAAM,WAAW,0BAA2B,SAAQ,qBAAqB;IACrE,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD;AAmED;;;GAGG;AACH,wBAAsB,oBAAoB,CACtC,OAAO,EAAE,0BAA0B,GACpC,OAAO,CAAC,UAAU,CAAC,CAwGrB;AAED;;;GAGG;AACH,wBAAsB,0BAA0B,CAC5C,OAAO,EAAE,qBAAqB,GAC/B,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAyH3C"}
|
|
@@ -7,12 +7,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { configureManagedOrigin, createPlatformSourceApi, detectSourceMode, ensurePendingSourceMarker, inspectGitRepository, ManagedGitError, pushAllLocalRefsAtomic, pushCurrentBranchSafe, readSourceMarker, requireManagedGitPreflight, writeManagedSourceMarker, } from './git/index.js';
|
|
10
|
+
import { configureManagedOrigin, createPlatformSourceApi, detectSourceMode, ensurePendingSourceMarker, hasExternalRemote, inspectGitRepository, ManagedGitError, pushAllLocalRefsAtomic, pushCurrentBranchSafe, readSourceMarker, requireGitRepository, requireManagedGitPreflight, writeManagedSourceMarker, } from './git/index.js';
|
|
11
|
+
import { prepareExternalSource, } from './git/external-source.js';
|
|
11
12
|
function platformStatus(status) {
|
|
12
13
|
return typeof status === 'string' ? null : status;
|
|
13
14
|
}
|
|
14
15
|
function pushManagedRepository(options_1, remote_1) {
|
|
15
|
-
return __awaiter(this, arguments, void 0, function* (options, remote, requireMainBranch = false, upload = 'main') {
|
|
16
|
+
return __awaiter(this, arguments, void 0, function* (options, remote, requireMainBranch = false, upload = 'main', skipPushIfTrackingRefMatches = false) {
|
|
16
17
|
var _a, _b;
|
|
17
18
|
const appDir = (_a = options.appDir) !== null && _a !== void 0 ? _a : process.cwd();
|
|
18
19
|
if (options.push) {
|
|
@@ -21,6 +22,7 @@ function pushManagedRepository(options_1, remote_1) {
|
|
|
21
22
|
expectedOriginRemote: remote,
|
|
22
23
|
requireMainBranch,
|
|
23
24
|
upload,
|
|
25
|
+
skipPushIfTrackingRefMatches,
|
|
24
26
|
});
|
|
25
27
|
}
|
|
26
28
|
const preflight = yield requireManagedGitPreflight({
|
|
@@ -35,23 +37,27 @@ function pushManagedRepository(options_1, remote_1) {
|
|
|
35
37
|
expectedOriginRemote: remote,
|
|
36
38
|
requireMainBranch,
|
|
37
39
|
upload,
|
|
40
|
+
skipPushIfTrackingRefMatches,
|
|
41
|
+
preflight,
|
|
38
42
|
});
|
|
39
43
|
});
|
|
40
44
|
}
|
|
45
|
+
function validateManagedMarker(marker, appId) {
|
|
46
|
+
if ((marker === null || marker === void 0 ? void 0 : marker.state) === 'managed' && marker.appId !== appId) {
|
|
47
|
+
throw new ManagedGitError('APP_ID_MISMATCH', [
|
|
48
|
+
'The local managed-source marker does not match bkper.yaml.',
|
|
49
|
+
`Config App ID: ${appId}`,
|
|
50
|
+
`Marker App ID: ${marker.appId}`,
|
|
51
|
+
'Use the clone that belongs to this App or repair the local marker intentionally.',
|
|
52
|
+
].join('\n'));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
41
55
|
function validateLocalManagedMarker(appDir, appId) {
|
|
42
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
57
|
const repo = yield inspectGitRepository(appDir);
|
|
44
58
|
if (!repo)
|
|
45
59
|
return;
|
|
46
|
-
|
|
47
|
-
if ((marker === null || marker === void 0 ? void 0 : marker.state) === 'managed' && marker.appId !== appId) {
|
|
48
|
-
throw new ManagedGitError('APP_ID_MISMATCH', [
|
|
49
|
-
'The local managed-source marker does not match bkper.yaml.',
|
|
50
|
-
`Config App ID: ${appId}`,
|
|
51
|
-
`Marker App ID: ${marker.appId}`,
|
|
52
|
-
'Use the clone that belongs to this App or repair the local marker intentionally.',
|
|
53
|
-
].join('\n'));
|
|
54
|
-
}
|
|
60
|
+
validateManagedMarker(readSourceMarker(repo.root), appId);
|
|
55
61
|
});
|
|
56
62
|
}
|
|
57
63
|
/**
|
|
@@ -60,8 +66,21 @@ function validateLocalManagedMarker(appDir, appId) {
|
|
|
60
66
|
*/
|
|
61
67
|
export function syncManagedAppSource(options) {
|
|
62
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
var _a, _b, _c, _d;
|
|
69
|
+
var _a, _b, _c, _d, _e;
|
|
64
70
|
const appDir = (_a = options.appDir) !== null && _a !== void 0 ? _a : process.cwd();
|
|
71
|
+
const repo = yield inspectGitRepository(appDir);
|
|
72
|
+
requireGitRepository(repo);
|
|
73
|
+
const localMarker = readSourceMarker(repo.root);
|
|
74
|
+
validateManagedMarker(localMarker, options.appId);
|
|
75
|
+
const action = options.coreAppExists ? 'updated' : 'created';
|
|
76
|
+
if ((localMarker === null || localMarker === void 0 ? void 0 : localMarker.state) === 'managed') {
|
|
77
|
+
console.log('Confirming committed source in Bkper-managed Git...');
|
|
78
|
+
const pushed = yield pushManagedRepository(options, localMarker.remote);
|
|
79
|
+
console.log(`Stored source verified at ${pushed.head}.`);
|
|
80
|
+
writeManagedSourceMarker(repo.root, options.appId, localMarker.remote);
|
|
81
|
+
yield options.syncCore(action);
|
|
82
|
+
return { id: options.appId, action };
|
|
83
|
+
}
|
|
65
84
|
const api = (_b = options.api) !== null && _b !== void 0 ? _b : createPlatformSourceApi();
|
|
66
85
|
const statusResult = yield api.getStatus(options.appId);
|
|
67
86
|
const status = platformStatus(statusResult);
|
|
@@ -72,8 +91,8 @@ export function syncManagedAppSource(options) {
|
|
|
72
91
|
coreAppExists: options.coreAppExists,
|
|
73
92
|
featureDisabled: statusResult === 'feature_disabled',
|
|
74
93
|
});
|
|
75
|
-
const action = options.coreAppExists ? 'updated' : 'created';
|
|
76
94
|
if (decision.mode === 'external') {
|
|
95
|
+
yield ((_c = options.prepareExternal) !== null && _c !== void 0 ? _c : prepareExternalSource)({ appDir });
|
|
77
96
|
yield options.syncCore(action);
|
|
78
97
|
return { id: options.appId, action };
|
|
79
98
|
}
|
|
@@ -86,7 +105,7 @@ export function syncManagedAppSource(options) {
|
|
|
86
105
|
appDir,
|
|
87
106
|
requireMainBranch: true,
|
|
88
107
|
});
|
|
89
|
-
const upload = (
|
|
108
|
+
const upload = (_d = decision.upload) !== null && _d !== void 0 ? _d : 'main';
|
|
90
109
|
const pending = ensurePendingSourceMarker(preflight.repo.root, upload);
|
|
91
110
|
console.log(upload === 'all_refs'
|
|
92
111
|
? 'Enabling Bkper-managed source and uploading local branches and tags...'
|
|
@@ -96,7 +115,7 @@ export function syncManagedAppSource(options) {
|
|
|
96
115
|
if (activation.source.appId !== options.appId) {
|
|
97
116
|
throw new ManagedGitError('APP_ID_MISMATCH', 'Managed source activation returned a different App ID.');
|
|
98
117
|
}
|
|
99
|
-
yield ((
|
|
118
|
+
yield ((_e = options.configureOrigin) !== null && _e !== void 0 ? _e : configureManagedOrigin)(preflight.repo.root, activation.source.remote, options.appId);
|
|
100
119
|
yield pushManagedRepository(options, activation.source.remote, true, pending.upload);
|
|
101
120
|
writeManagedSourceMarker(preflight.repo.root, options.appId, activation.source.remote);
|
|
102
121
|
return { id: options.appId, action };
|
|
@@ -107,45 +126,71 @@ export function syncManagedAppSource(options) {
|
|
|
107
126
|
if (status.appId !== options.appId) {
|
|
108
127
|
throw new ManagedGitError('APP_ID_MISMATCH', 'Platform managed source does not match the local App ID.');
|
|
109
128
|
}
|
|
129
|
+
console.log('Confirming committed source in Bkper-managed Git...');
|
|
110
130
|
const pushed = yield pushManagedRepository(options, status.remote);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
131
|
+
console.log(`Stored source verified at ${pushed.head}.`);
|
|
132
|
+
const refreshedRepo = yield inspectGitRepository(appDir);
|
|
133
|
+
if (refreshedRepo) {
|
|
134
|
+
writeManagedSourceMarker(refreshedRepo.root, options.appId, status.remote);
|
|
135
|
+
}
|
|
114
136
|
yield options.syncCore(action);
|
|
115
137
|
return { id: options.appId, action };
|
|
116
138
|
});
|
|
117
139
|
}
|
|
118
140
|
/**
|
|
119
141
|
* Pushes managed source before the caller reads and uploads existing local build output.
|
|
120
|
-
* External Apps
|
|
142
|
+
* External Apps are verified by the CLI and retain source-less Platform uploads.
|
|
121
143
|
*/
|
|
122
144
|
export function prepareManagedDeploySource(options) {
|
|
123
145
|
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
-
var _a, _b;
|
|
146
|
+
var _a, _b, _c;
|
|
125
147
|
const appDir = (_a = options.appDir) !== null && _a !== void 0 ? _a : process.cwd();
|
|
126
|
-
const
|
|
148
|
+
const repo = yield inspectGitRepository(appDir);
|
|
149
|
+
requireGitRepository(repo);
|
|
150
|
+
const localMarker = readSourceMarker(repo.root);
|
|
151
|
+
validateManagedMarker(localMarker, options.appId);
|
|
152
|
+
if ((localMarker === null || localMarker === void 0 ? void 0 : localMarker.state) === 'managed') {
|
|
153
|
+
console.log('Checking committed Bkper-managed source...');
|
|
154
|
+
const pushed = yield pushManagedRepository(options, localMarker.remote, false, 'main', true);
|
|
155
|
+
console.log(`Stored source ready at ${pushed.head}.`);
|
|
156
|
+
writeManagedSourceMarker(repo.root, options.appId, localMarker.remote);
|
|
157
|
+
return {
|
|
158
|
+
mode: 'managed',
|
|
159
|
+
declaredBranch: pushed.branch,
|
|
160
|
+
commitSha: pushed.head,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
const prepareExternal = (_b = options.prepareExternal) !== null && _b !== void 0 ? _b : prepareExternalSource;
|
|
164
|
+
const api = (_c = options.api) !== null && _c !== void 0 ? _c : createPlatformSourceApi();
|
|
127
165
|
let statusResult;
|
|
128
166
|
try {
|
|
129
167
|
statusResult = yield api.getStatus(options.appId);
|
|
130
168
|
}
|
|
131
169
|
catch (error) {
|
|
132
170
|
if (error instanceof ManagedGitError && error.code === 'AUTHENTICATION_REQUIRED') {
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
171
|
+
const marker = readSourceMarker(repo.root);
|
|
172
|
+
if (!marker && (repo.isNestedApp || hasExternalRemote(repo.remotes))) {
|
|
173
|
+
yield prepareExternal({ appDir });
|
|
136
174
|
return undefined;
|
|
175
|
+
}
|
|
137
176
|
}
|
|
138
177
|
throw error;
|
|
139
178
|
}
|
|
140
179
|
if (statusResult === 'feature_disabled' || statusResult === 'app_not_found') {
|
|
141
|
-
const
|
|
142
|
-
const marker = repo ? readSourceMarker(repo.root) : null;
|
|
180
|
+
const marker = readSourceMarker(repo.root);
|
|
143
181
|
if (marker) {
|
|
144
182
|
throw new ManagedGitError('MANAGED_SOURCE_UNAVAILABLE', statusResult === 'feature_disabled'
|
|
145
183
|
? 'This repository is managed, but managed source is disabled in this Platform environment.'
|
|
146
184
|
: 'This repository is managed, but its Platform linkage is not visible. Retry the deployment.');
|
|
147
185
|
}
|
|
148
|
-
|
|
186
|
+
if (repo.isNestedApp || hasExternalRemote(repo.remotes)) {
|
|
187
|
+
yield prepareExternal({ appDir });
|
|
188
|
+
return undefined;
|
|
189
|
+
}
|
|
190
|
+
throw new ManagedGitError('MANAGED_SOURCE_UNAVAILABLE', [
|
|
191
|
+
'This standalone App has no stored source linked for deployment.',
|
|
192
|
+
'Run `bkper app sync` to create and upload Bkper-managed private source, then retry.',
|
|
193
|
+
].join('\n'));
|
|
149
194
|
}
|
|
150
195
|
const decision = yield detectSourceMode({
|
|
151
196
|
appDir,
|
|
@@ -153,9 +198,16 @@ export function prepareManagedDeploySource(options) {
|
|
|
153
198
|
platformStatus: statusResult,
|
|
154
199
|
coreAppExists: true,
|
|
155
200
|
});
|
|
156
|
-
if (decision.mode === 'external'
|
|
201
|
+
if (decision.mode === 'external') {
|
|
202
|
+
yield prepareExternal({ appDir });
|
|
157
203
|
return undefined;
|
|
158
204
|
}
|
|
205
|
+
if (decision.mode === 'activate_managed') {
|
|
206
|
+
throw new ManagedGitError('MANAGED_SOURCE_UNAVAILABLE', [
|
|
207
|
+
'This standalone App has not enabled Bkper-managed source yet.',
|
|
208
|
+
'Run `bkper app sync` to create and upload the private repository, then retry deployment.',
|
|
209
|
+
].join('\n'));
|
|
210
|
+
}
|
|
159
211
|
if (decision.reason === 'pending_marker') {
|
|
160
212
|
throw new ManagedGitError('MANAGED_SOURCE_UNAVAILABLE', 'Managed source activation is pending. Run `bkper app sync` to finish uploading source before deploying.');
|
|
161
213
|
}
|
|
@@ -166,10 +218,13 @@ export function prepareManagedDeploySource(options) {
|
|
|
166
218
|
if (statusResult.appId !== options.appId) {
|
|
167
219
|
throw new ManagedGitError('APP_ID_MISMATCH', 'Platform managed source does not match the local App ID.');
|
|
168
220
|
}
|
|
169
|
-
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
221
|
+
console.log('Checking committed Bkper-managed source...');
|
|
222
|
+
const pushed = yield pushManagedRepository(options, statusResult.remote, false, 'main', true);
|
|
223
|
+
console.log(`Stored source ready at ${pushed.head}.`);
|
|
224
|
+
const refreshedRepo = yield inspectGitRepository(appDir);
|
|
225
|
+
if (refreshedRepo) {
|
|
226
|
+
writeManagedSourceMarker(refreshedRepo.root, options.appId, statusResult.remote);
|
|
227
|
+
}
|
|
173
228
|
return {
|
|
174
229
|
mode: 'managed',
|
|
175
230
|
declaredBranch: pushed.branch,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-workflow.js","sourceRoot":"","sources":["../../../src/commands/apps/source-workflow.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACH,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,0BAA0B,EAC1B,wBAAwB,
|
|
1
|
+
{"version":3,"file":"source-workflow.js","sourceRoot":"","sources":["../../../src/commands/apps/source-workflow.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACH,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,yBAAyB,EACzB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,GAM3B,MAAM,gB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AG7C;;;;GAIG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,CAI9C;AAED;;;;GAIG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,CAI9C;AAED;;;;GAIG;AACH,wBAAsB,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/commands/apps/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAc,MAAM,UAAU,CAAC;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C;;;;GAIG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,CAI9C;AAED;;;;GAIG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,CAI9C;AAED;;;;GAIG;AACH,wBAAsB,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,CAoCnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../../src/commands/apps/sync.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAO,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,UAAgB,SAAS;;QAC3B,MAAM,GAAG,GAAG,mBAAmB,EAAE,CAAC;QAClC,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC;QACtC,OAAO,UAAU,CAAC;IACtB,CAAC;CAAA;AAED;;;;GAIG;AACH,MAAM,UAAgB,SAAS;;QAC3B,MAAM,GAAG,GAAG,mBAAmB,EAAE,CAAC;QAClC,MAAM,UAAU,GAAG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CAAC;iBAAM,CAAC;gBACJ,MAAM,GAAG,CAAC;YACd,CAAC;QACL,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;QAC1C,OAAO,oBAAoB,CAAC;YACxB,KAAK;YACL,aAAa,EAAE,MAAM;YACrB,QAAQ,EAAE,CAAM,MAAM,EAAC,EAAE;gBACrB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;oBACvB,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC;gBACvB,CAAC;qBAAM,CAAC;oBACJ,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC;gBACvB,CAAC;YACL,CAAC,CAAA;SACJ,CAAC,CAAC;IACP,CAAC;CAAA"}
|
|
@@ -4,7 +4,7 @@ All Bkper apps are listed on the Automations Portal at _[app.bkper.com](https://
|
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
App listings are populated from the fields you declare in [`bkper.yaml`](https://bkper.com/docs/
|
|
7
|
+
App listings are populated from the fields you declare in [`bkper.yaml`](https://bkper.com/docs/platform/apps/configuration.md). Sync metadata changes with `bkper app sync`. Deploying code is a separate step.
|
|
8
8
|
|
|
9
9
|
## Listing fields
|
|
10
10
|
|
|
@@ -24,7 +24,7 @@ ownerWebsite: https://yourwebsite.com
|
|
|
24
24
|
website: https://your-app.bkper.app
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
See [App Configuration](https://bkper.com/docs/
|
|
27
|
+
See [App Configuration](https://bkper.com/docs/platform/apps/configuration.md) for the full `bkper.yaml` reference.
|
|
28
28
|
|
|
29
29
|
## Default visibility
|
|
30
30
|
|
|
@@ -49,7 +49,7 @@ To make your app available to all Bkper users, contact us at [support@bkper.com]
|
|
|
49
49
|
### What the review involves
|
|
50
50
|
|
|
51
51
|
- **Functionality check** — The app works correctly and handles errors gracefully
|
|
52
|
-
- **Quality review** — The implementation follows the [App Quality Guidelines](https://bkper.com/docs/
|
|
52
|
+
- **Quality review** — The implementation follows the [App Quality Guidelines](https://bkper.com/docs/platform/apps/quality.md)
|
|
53
53
|
- **Security review** — Event handlers are idempotent and include loop prevention
|
|
54
54
|
- **Listing quality** — The app has a clear name, description, logo, and user-facing documentation
|
|
55
55
|
|
|
@@ -4,7 +4,7 @@ Bkper platform apps use one Worker bundle per app and environment. The same Work
|
|
|
4
4
|
|
|
5
5
|
Treat `/api/*` as the reusable surface for app behavior. The bundled web client is one consumer; scripts, external clients, and agents can call the same routes with bearer authentication.
|
|
6
6
|
|
|
7
|
-
Follow the [App Quality Guidelines](https://bkper.com/docs/
|
|
7
|
+
Follow the [App Quality Guidelines](https://bkper.com/docs/platform/apps/quality.md) when implementing, changing, or reviewing an app.
|
|
8
8
|
|
|
9
9
|
## Structure
|
|
10
10
|
|
|
@@ -204,7 +204,7 @@ Platform outbound authentication injects the validated user's OAuth token on Bkp
|
|
|
204
204
|
|
|
205
205
|
Authentication identifies the Bkper user, but each app must authorize sensitive data and actions server-side. Client-side checks are not an authorization boundary.
|
|
206
206
|
|
|
207
|
-
See [App Security](https://bkper.com/docs/
|
|
207
|
+
See [App Security](https://bkper.com/docs/platform/apps/security.md) for domain restrictions, Book permissions, and app installation checks.
|
|
208
208
|
|
|
209
209
|
## Event handlers
|
|
210
210
|
|
|
@@ -212,7 +212,7 @@ Platform event deliveries reach `/events` on the same Worker. Event adapters liv
|
|
|
212
212
|
|
|
213
213
|
Event code uses server-side `new Bkper()` and must not read `bkper-oauth-token`, `bkper-agent-id`, or `Authorization` headers. Dispatch and platform outbound authentication handle the event token and app agent identity.
|
|
214
214
|
|
|
215
|
-
See [Event Handlers](https://bkper.com/docs/
|
|
215
|
+
See [Event Handlers](https://bkper.com/docs/platform/apps/event-handlers.md) for routing, responses, loop prevention, and event types. Self-hosted handlers process event authentication directly because the platform outbound layer is not involved.
|
|
216
216
|
|
|
217
217
|
## App shapes
|
|
218
218
|
|
|
@@ -97,7 +97,7 @@ deployment:
|
|
|
97
97
|
|
|
98
98
|
`SIDEBAR` and `EXPANDED` Apps can receive live context updates while their iframe stays loaded. `NEW_TAB` Apps receive context only in the URL used to open the tab.
|
|
99
99
|
|
|
100
|
-
See [Context Menu](https://bkper.com/docs/
|
|
100
|
+
See [Context Menu](https://bkper.com/docs/platform/apps/context-menu.md#live-context-updates) for menu URL configuration and live context updates.
|
|
101
101
|
|
|
102
102
|
### Menu URL variables
|
|
103
103
|
|
|
@@ -123,9 +123,9 @@ The following variables can be used in `menuUrl` and `menuUrlDev`:
|
|
|
123
123
|
| `webhookUrl` | Production webhook URL for receiving events. |
|
|
124
124
|
| `webhookUrlDev` | Development webhook URL (auto-updated by `bkper app dev`). |
|
|
125
125
|
| `apiVersion` | API version for event payloads (currently `v5`). |
|
|
126
|
-
| `events` | List of [event types](https://bkper.com/docs/
|
|
126
|
+
| `events` | List of [event types](https://bkper.com/docs/platform/apps/event-handlers.md#event-types) to subscribe to. |
|
|
127
127
|
|
|
128
|
-
See [Event Handlers](https://bkper.com/docs/
|
|
128
|
+
See [Event Handlers](https://bkper.com/docs/platform/apps/event-handlers.md) for details on handling events.
|
|
129
129
|
|
|
130
130
|
### File patterns
|
|
131
131
|
|
|
@@ -160,7 +160,7 @@ propertiesSchema:
|
|
|
160
160
|
|
|
161
161
|
### Deployment
|
|
162
162
|
|
|
163
|
-
For apps deployed to the [Bkper Platform](https://bkper.com/docs/
|
|
163
|
+
For apps deployed to the [Bkper Platform](https://bkper.com/docs/platform/apps/overview.md):
|
|
164
164
|
|
|
165
165
|
| Field | Description |
|
|
166
166
|
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -170,4 +170,4 @@ For apps deployed to the [Bkper Platform](https://bkper.com/docs/build/apps/over
|
|
|
170
170
|
| `deployment.secrets` | Secret names used by the app. Managed via `bkper app secrets`. |
|
|
171
171
|
| `deployment.compatibility_date` | [Cloudflare Workers compatibility date](https://developers.cloudflare.com/workers/configuration/compatibility-dates/). |
|
|
172
172
|
|
|
173
|
-
See [Building & Deploying](https://bkper.com/docs/
|
|
173
|
+
See [Building & Deploying](https://bkper.com/docs/platform/apps/deploying.md) for the full deployment workflow.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Apps can add context menu items on the Transactions page **More** menu in your Books. This lets you open dynamically built URLs with reference to the current Book's context — the active query, selected account, date range, and more.
|
|
4
4
|
|
|
5
|
-
Embedded interfaces should follow the [App Quality Guidelines](https://bkper.com/docs/
|
|
5
|
+
Embedded interfaces should follow the [App Quality Guidelines](https://bkper.com/docs/platform/apps/quality.md) for visual consistency, startup behavior, and Book-context verification.
|
|
6
6
|
|
|
7
7
|
## How it works
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ When clicked, a popup opens carrying the particular context of that book at that
|
|
|
16
16
|
|
|
17
17
|
## Configuration
|
|
18
18
|
|
|
19
|
-
Configure the menu URL in your [`bkper.yaml`](https://bkper.com/docs/
|
|
19
|
+
Configure the menu URL in your [`bkper.yaml`](https://bkper.com/docs/platform/apps/configuration.md):
|
|
20
20
|
|
|
21
21
|
```yaml
|
|
22
22
|
menuUrl: https://my-app.bkper.app?bookId=${book.id}&query=${transactions.query}
|
|
@@ -115,4 +115,4 @@ The menu URL supports these dynamic expressions:
|
|
|
115
115
|
| `${group.id}` | The selected group ID |
|
|
116
116
|
| `${group.name}` | The selected group name |
|
|
117
117
|
|
|
118
|
-
For the full list of accepted expressions, see the [Menu URL variables](https://bkper.com/docs/
|
|
118
|
+
For the full list of accepted expressions, see the [Menu URL variables](https://bkper.com/docs/platform/apps/configuration.md#menu-url-variables) reference.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## The deployment workflow
|
|
4
4
|
|
|
5
|
+
Sync and deployment require an attached, clean, committed Git branch whose current commit is stored remotely. Bkper-managed private Git is recommended. Apps without Git receive actionable initialization and managed-sync instructions from the CLI; external repositories must configure and push the current branch to its intended upstream.
|
|
6
|
+
|
|
5
7
|
Run the template's deterministic checks before releasing:
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -26,7 +28,7 @@ npm run check
|
|
|
26
28
|
bkper app sync
|
|
27
29
|
```
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
Verifies stored source, then syncs your `bkper.yaml` configuration to Bkper — name, description, menu URLs, webhook URLs, access control, and branding. For managed source, it safely pushes the current clean, committed branch. For external source, it fetches the configured upstream and verifies that it contains the current commit. Sync does not build or deploy the app.
|
|
30
32
|
|
|
31
33
|
3. **Deploy** — Upload the local build to the platform
|
|
32
34
|
|
|
@@ -34,7 +36,7 @@ npm run check
|
|
|
34
36
|
bkper app deploy
|
|
35
37
|
```
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
Deploy verifies stored source again. Managed source is pushed and Platform-verified; external source is checked against the configured upstream by the CLI. Deploy then uploads your existing pre-built code from `dist/` to the Bkper Platform. The command does not run a build, and the Platform does not prove that `dist/` was produced from the verified commit. Your app is live at `https://{appId}.bkper.app`.
|
|
38
40
|
|
|
39
41
|
The app template combines all three after source changes are committed:
|
|
40
42
|
|
|
@@ -46,7 +48,7 @@ Use `npm run deploy:preview` for the preview environment.
|
|
|
46
48
|
|
|
47
49
|
> **Caution: Source is not deployment**
|
|
48
50
|
> An ordinary `git push` stores source only and never deploys. `bkper app sync` also does not deploy. Run `bkper app deploy` explicitly when the local build is ready to release.
|
|
49
|
-
See [Shared App Source](https://bkper.com/docs/
|
|
51
|
+
See [Shared App Source](https://bkper.com/docs/platform/apps/shared-app-source.md) for managed-source setup, cloning, access, and external Git workflows.
|
|
50
52
|
|
|
51
53
|
### Production
|
|
52
54
|
|
|
@@ -131,7 +133,7 @@ app.get('/api/data', async c => {
|
|
|
131
133
|
});
|
|
132
134
|
```
|
|
133
135
|
|
|
134
|
-
During local development, use the `.dev.vars` file instead. See [Development Experience](https://bkper.com/docs/
|
|
136
|
+
During local development, use the `.dev.vars` file instead. See [Development Experience](https://bkper.com/docs/platform/apps/development.md#local-secrets).
|
|
135
137
|
|
|
136
138
|
### KV storage
|
|
137
139
|
|
|
@@ -172,10 +174,10 @@ bkper app install <appId> -b <bookId>
|
|
|
172
174
|
bkper app uninstall <appId> -b <bookId>
|
|
173
175
|
```
|
|
174
176
|
|
|
175
|
-
Once installed, the app's [event handlers](https://bkper.com/docs/
|
|
177
|
+
Once installed, the app's [event handlers](https://bkper.com/docs/platform/apps/event-handlers.md) receive events from that book at `/events`, and the app's [context menu](https://bkper.com/docs/platform/apps/context-menu.md) appears in the book's UI.
|
|
176
178
|
|
|
177
179
|
## Next steps
|
|
178
180
|
|
|
179
|
-
- [Shared App Source](https://bkper.com/docs/
|
|
180
|
-
- [Development Experience](https://bkper.com/docs/
|
|
181
|
-
- [App Listing](https://bkper.com/docs/
|
|
181
|
+
- [Shared App Source](https://bkper.com/docs/platform/apps/shared-app-source.md) — Share private source without coupling Git pushes to deployment
|
|
182
|
+
- [Development Experience](https://bkper.com/docs/platform/apps/development.md) — Run the app and event delivery locally
|
|
183
|
+
- [App Listing](https://bkper.com/docs/platform/apps/app-listing.md) — Prepare the app for installation
|