brainfile 0.21.2 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/__tests__/helpers/mcp-wire.d.ts +2 -0
- package/dist/__tests__/helpers/mcp-wire.d.ts.map +1 -1
- package/dist/__tests__/helpers/mcp-wire.js +4 -2
- package/dist/__tests__/helpers/mcp-wire.js.map +1 -1
- package/dist/chunk-CWUTU5VV.mjs +5585 -0
- package/dist/chunk-L4WSDMK3.mjs +1973 -0
- package/dist/{chunk-7KU2R7QC.mjs → chunk-XFDTTLSW.mjs} +3230 -4322
- package/dist/cli.js +7 -1
- package/dist/cli.mjs +8078 -5357
- package/dist/commands/add.d.ts +4 -0
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +68 -72
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/boards.d.ts +18 -0
- package/dist/commands/boards.d.ts.map +1 -0
- package/dist/commands/boards.js +166 -0
- package/dist/commands/boards.js.map +1 -0
- package/dist/commands/brief.d.ts +17 -11
- package/dist/commands/brief.d.ts.map +1 -1
- package/dist/commands/brief.js +38 -35
- package/dist/commands/brief.js.map +1 -1
- package/dist/commands/check.d.ts +47 -0
- package/dist/commands/check.d.ts.map +1 -0
- package/dist/commands/check.js +134 -0
- package/dist/commands/check.js.map +1 -0
- package/dist/commands/columns.d.ts +48 -0
- package/dist/commands/columns.d.ts.map +1 -0
- package/dist/commands/columns.js +132 -0
- package/dist/commands/columns.js.map +1 -0
- package/dist/commands/complete.js +9 -4
- package/dist/commands/complete.js.map +1 -1
- package/dist/commands/decide.d.ts +72 -0
- package/dist/commands/decide.d.ts.map +1 -0
- package/dist/commands/decide.js +264 -0
- package/dist/commands/decide.js.map +1 -0
- package/dist/commands/hooks.d.ts +5 -1
- package/dist/commands/hooks.d.ts.map +1 -1
- package/dist/commands/hooks.js +10 -11
- package/dist/commands/hooks.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +8 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/lint.d.ts +27 -0
- package/dist/commands/lint.d.ts.map +1 -1
- package/dist/commands/lint.js +127 -20
- package/dist/commands/lint.js.map +1 -1
- package/dist/commands/list.d.ts +6 -0
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +216 -7
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/log.d.ts +51 -0
- package/dist/commands/log.d.ts.map +1 -1
- package/dist/commands/log.js +113 -84
- package/dist/commands/log.js.map +1 -1
- package/dist/commands/mcp.d.ts +5 -2
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +44 -9
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/memory-index.d.ts +34 -0
- package/dist/commands/memory-index.d.ts.map +1 -0
- package/dist/commands/memory-index.js +135 -0
- package/dist/commands/memory-index.js.map +1 -0
- package/dist/commands/merge-driver.d.ts +1 -15
- package/dist/commands/merge-driver.d.ts.map +1 -1
- package/dist/commands/merge-driver.js +8 -134
- package/dist/commands/merge-driver.js.map +1 -1
- package/dist/commands/migrate-tracked.d.ts +1 -1
- package/dist/commands/migrate-tracked.d.ts.map +1 -1
- package/dist/commands/migrate-tracked.js +21 -10
- package/dist/commands/migrate-tracked.js.map +1 -1
- package/dist/commands/patch.d.ts +23 -4
- package/dist/commands/patch.d.ts.map +1 -1
- package/dist/commands/patch.js +149 -91
- package/dist/commands/patch.js.map +1 -1
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/plan.js +11 -5
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/schema.d.ts +12 -0
- package/dist/commands/schema.d.ts.map +1 -1
- package/dist/commands/schema.js +28 -10
- package/dist/commands/schema.js.map +1 -1
- package/dist/commands/search.d.ts +46 -12
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +89 -44
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/show.d.ts.map +1 -1
- package/dist/commands/show.js +175 -10
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/template.d.ts +2 -0
- package/dist/commands/template.d.ts.map +1 -1
- package/dist/commands/template.js +2 -1
- package/dist/commands/template.js.map +1 -1
- package/dist/commands/types.d.ts +31 -1
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/commands/types.js +122 -22
- package/dist/commands/types.js.map +1 -1
- package/dist/commands/where.d.ts +20 -1
- package/dist/commands/where.d.ts.map +1 -1
- package/dist/commands/where.js +56 -6
- package/dist/commands/where.js.map +1 -1
- package/dist/hook.mjs +15 -0
- package/dist/hooks/session-start.d.ts +39 -0
- package/dist/hooks/session-start.d.ts.map +1 -0
- package/dist/hooks/session-start.js +181 -0
- package/dist/hooks/session-start.js.map +1 -0
- package/dist/lib/contractRunner.d.ts.map +1 -1
- package/dist/lib/contractRunner.js +8 -0
- package/dist/lib/contractRunner.js.map +1 -1
- package/dist/mcp/helpers.d.ts +29 -1
- package/dist/mcp/helpers.d.ts.map +1 -1
- package/dist/mcp/helpers.js +57 -2
- package/dist/mcp/helpers.js.map +1 -1
- package/dist/mcp/instructions.d.ts +5 -0
- package/dist/mcp/instructions.d.ts.map +1 -0
- package/dist/mcp/instructions.js +57 -0
- package/dist/mcp/instructions.js.map +1 -0
- package/dist/mcp/resources.d.ts +9 -0
- package/dist/mcp/resources.d.ts.map +1 -0
- package/dist/mcp/resources.js +29 -0
- package/dist/mcp/resources.js.map +1 -0
- package/dist/mcp/schemas.d.ts +600 -9
- package/dist/mcp/schemas.d.ts.map +1 -1
- package/dist/mcp/schemas.js +374 -12
- package/dist/mcp/schemas.js.map +1 -1
- package/dist/mcp/tools/adr_promote_tool.d.ts +7 -0
- package/dist/mcp/tools/adr_promote_tool.d.ts.map +1 -0
- package/dist/mcp/tools/adr_promote_tool.js +37 -0
- package/dist/mcp/tools/adr_promote_tool.js.map +1 -0
- package/dist/mcp/tools/board_tool.d.ts +7 -0
- package/dist/mcp/tools/board_tool.d.ts.map +1 -0
- package/dist/mcp/tools/board_tool.js +61 -0
- package/dist/mcp/tools/board_tool.js.map +1 -0
- package/dist/mcp/tools/brief_tool.d.ts.map +1 -1
- package/dist/mcp/tools/brief_tool.js +13 -5
- package/dist/mcp/tools/brief_tool.js.map +1 -1
- package/dist/mcp/tools/check_tool.d.ts +6 -0
- package/dist/mcp/tools/check_tool.d.ts.map +1 -0
- package/dist/mcp/tools/check_tool.js +54 -0
- package/dist/mcp/tools/check_tool.js.map +1 -0
- package/dist/mcp/tools/columns_tool.d.ts +7 -0
- package/dist/mcp/tools/columns_tool.d.ts.map +1 -0
- package/dist/mcp/tools/columns_tool.js +94 -0
- package/dist/mcp/tools/columns_tool.js.map +1 -0
- package/dist/mcp/tools/decide_tool.d.ts +91 -0
- package/dist/mcp/tools/decide_tool.d.ts.map +1 -0
- package/dist/mcp/tools/decide_tool.js +141 -0
- package/dist/mcp/tools/decide_tool.js.map +1 -0
- package/dist/mcp/tools/get_task_tool.d.ts.map +1 -1
- package/dist/mcp/tools/get_task_tool.js +62 -4
- package/dist/mcp/tools/get_task_tool.js.map +1 -1
- package/dist/mcp/tools/lint_tool.d.ts +7 -0
- package/dist/mcp/tools/lint_tool.d.ts.map +1 -0
- package/dist/mcp/tools/lint_tool.js +48 -0
- package/dist/mcp/tools/lint_tool.js.map +1 -0
- package/dist/mcp/tools/list_tasks_tool.d.ts.map +1 -1
- package/dist/mcp/tools/list_tasks_tool.js +132 -15
- package/dist/mcp/tools/list_tasks_tool.js.map +1 -1
- package/dist/mcp/tools/log_tool.d.ts +4 -0
- package/dist/mcp/tools/log_tool.d.ts.map +1 -0
- package/dist/mcp/tools/log_tool.js +52 -0
- package/dist/mcp/tools/log_tool.js.map +1 -0
- package/dist/mcp/tools/note_tool.d.ts +7 -0
- package/dist/mcp/tools/note_tool.d.ts.map +1 -0
- package/dist/mcp/tools/note_tool.js +39 -0
- package/dist/mcp/tools/note_tool.js.map +1 -0
- package/dist/mcp/tools/retire_tool.d.ts +4 -0
- package/dist/mcp/tools/retire_tool.d.ts.map +1 -0
- package/dist/mcp/tools/retire_tool.js +81 -0
- package/dist/mcp/tools/retire_tool.js.map +1 -0
- package/dist/mcp/tools/search_tool.d.ts.map +1 -1
- package/dist/mcp/tools/search_tool.js +36 -19
- package/dist/mcp/tools/search_tool.js.map +1 -1
- package/dist/mcp/tools/supersede_tool.d.ts +4 -0
- package/dist/mcp/tools/supersede_tool.d.ts.map +1 -0
- package/dist/mcp/tools/supersede_tool.js +72 -0
- package/dist/mcp/tools/supersede_tool.js.map +1 -0
- package/dist/mcp/tools/sync_tool.d.ts +9 -0
- package/dist/mcp/tools/sync_tool.d.ts.map +1 -0
- package/dist/mcp/tools/sync_tool.js +87 -0
- package/dist/mcp/tools/sync_tool.js.map +1 -0
- package/dist/mcp/tools/task_add_tool.d.ts.map +1 -1
- package/dist/mcp/tools/task_add_tool.js +39 -17
- package/dist/mcp/tools/task_add_tool.js.map +1 -1
- package/dist/mcp/tools/task_complete_tool.d.ts.map +1 -1
- package/dist/mcp/tools/task_complete_tool.js +3 -2
- package/dist/mcp/tools/task_complete_tool.js.map +1 -1
- package/dist/mcp/tools/task_patch_tool.d.ts.map +1 -1
- package/dist/mcp/tools/task_patch_tool.js +30 -5
- package/dist/mcp/tools/task_patch_tool.js.map +1 -1
- package/dist/mcp/tools/template_tool.d.ts +4 -0
- package/dist/mcp/tools/template_tool.d.ts.map +1 -0
- package/dist/mcp/tools/template_tool.js +70 -0
- package/dist/mcp/tools/template_tool.js.map +1 -0
- package/dist/mcp/tools/types_tool.d.ts +4 -0
- package/dist/mcp/tools/types_tool.d.ts.map +1 -0
- package/dist/mcp/tools/types_tool.js +61 -0
- package/dist/mcp/tools/types_tool.js.map +1 -0
- package/dist/mcp/tools/where_tool.d.ts +4 -0
- package/dist/mcp/tools/where_tool.d.ts.map +1 -0
- package/dist/mcp/tools/where_tool.js +73 -0
- package/dist/mcp/tools/where_tool.js.map +1 -0
- package/dist/schemas/board.json +29 -8
- package/dist/{tui-3Z7ZJV7M.mjs → tui-D6RMFL6X.mjs} +994 -315
- package/dist/utils/board-autosync.d.ts +1 -10
- package/dist/utils/board-autosync.d.ts.map +1 -1
- package/dist/utils/board-autosync.js +11 -29
- package/dist/utils/board-autosync.js.map +1 -1
- package/dist/utils/board-commit-hooks.d.ts +8 -0
- package/dist/utils/board-commit-hooks.d.ts.map +1 -1
- package/dist/utils/board-commit-hooks.js +45 -1
- package/dist/utils/board-commit-hooks.js.map +1 -1
- package/dist/utils/board-repo.d.ts +1 -119
- package/dist/utils/board-repo.d.ts.map +1 -1
- package/dist/utils/board-repo.js +43 -571
- package/dist/utils/board-repo.js.map +1 -1
- package/dist/utils/board-sync.d.ts +3 -123
- package/dist/utils/board-sync.d.ts.map +1 -1
- package/dist/utils/board-sync.js +34 -551
- package/dist/utils/board-sync.js.map +1 -1
- package/dist/utils/graph.d.ts +20 -0
- package/dist/utils/graph.d.ts.map +1 -0
- package/dist/utils/graph.js +61 -0
- package/dist/utils/graph.js.map +1 -0
- package/dist/utils/related.d.ts +21 -0
- package/dist/utils/related.d.ts.map +1 -0
- package/dist/utils/related.js +36 -0
- package/dist/utils/related.js.map +1 -0
- package/package.json +2 -2
- package/dist/tui/theme.d.ts +0 -98
- package/dist/tui/theme.d.ts.map +0 -1
- package/dist/tui/theme.js +0 -141
- package/dist/tui/theme.js.map +0 -1
package/dist/utils/board-sync.js
CHANGED
|
@@ -1,554 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.BOARD_GITATTRIBUTES = exports.DEFAULT_MERGE_DRIVER_COMMAND = exports.MERGE_DRIVER_NAME = exports.URL_REMOTE_NAME = exports.AUTOSYNC_CONFIG_KEY = exports.LEGACY_CHECKED_CONFIG_KEY = exports.REMOTE_CONFIG_KEY = void 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
* host's branch list or "recent pushes" banner. See BOARD_REF_NAMESPACE.
|
|
71
|
-
*/
|
|
72
|
-
const fs = __importStar(require("fs"));
|
|
73
|
-
const os = __importStar(require("os"));
|
|
74
|
-
const path = __importStar(require("path"));
|
|
75
|
-
const board_repo_1 = require("./board-repo");
|
|
76
|
-
const merge_driver_1 = require("../commands/merge-driver");
|
|
77
|
-
exports.REMOTE_CONFIG_KEY = 'brainfile.remote';
|
|
78
|
-
/** Set once this machine has looked for (and moved) a board 0.21.0 pushed as a branch. */
|
|
79
|
-
exports.LEGACY_CHECKED_CONFIG_KEY = 'brainfile.legacyBranchChecked';
|
|
80
|
-
exports.AUTOSYNC_CONFIG_KEY = 'brainfile.autosync';
|
|
81
|
-
/** Remote name used when `--set-remote` is given a URL instead of a name. */
|
|
82
|
-
exports.URL_REMOTE_NAME = 'board';
|
|
83
|
-
exports.MERGE_DRIVER_NAME = 'brainfile';
|
|
84
|
-
exports.DEFAULT_MERGE_DRIVER_COMMAND = 'brainfile merge-driver %O %A %B';
|
|
85
|
-
const SYNC_STATE_FILE = path.join('state', 'sync.json');
|
|
86
|
-
exports.BOARD_GITATTRIBUTES = [
|
|
87
|
-
'logs/ledger.jsonl merge=union',
|
|
88
|
-
'board/*.md merge=brainfile',
|
|
89
|
-
'logs/*.md merge=brainfile',
|
|
90
|
-
'brainfile.md merge=brainfile',
|
|
91
|
-
];
|
|
92
|
-
function configGet(dotDir, key) {
|
|
93
|
-
const r = (0, board_repo_1.git)(['config', '--get', key], dotDir);
|
|
94
|
-
return r.ok && r.stdout ? r.stdout : null;
|
|
95
|
-
}
|
|
96
|
-
function configSet(dotDir, key, value) {
|
|
97
|
-
return (0, board_repo_1.git)(['config', key, value], dotDir).ok;
|
|
98
|
-
}
|
|
99
|
-
function boardRemote(dotDir) {
|
|
100
|
-
return configGet(dotDir, exports.REMOTE_CONFIG_KEY);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Name of the board on the remote (`refs/brainfile/<name>`). Defaults keep
|
|
104
|
-
* the "one private boards repo, one board per project" pattern from
|
|
105
|
-
* colliding: `board` for a board inside a code repository, the parent
|
|
106
|
-
* folder's basename for a standalone board, `home` for the global board.
|
|
107
|
-
*/
|
|
108
|
-
function boardRemoteName(dotDir) {
|
|
109
|
-
const configured = configGet(dotDir, board_repo_1.BOARD_NAME_CONFIG_KEY) ?? configGet(dotDir, board_repo_1.LEGACY_REMOTE_BRANCH_CONFIG_KEY);
|
|
110
|
-
if (configured)
|
|
111
|
-
return configured;
|
|
112
|
-
return defaultName(dotDir, board_repo_1.DEFAULT_BOARD_NAME);
|
|
113
|
-
}
|
|
114
|
-
function defaultName(dotDir, inRepo) {
|
|
115
|
-
if (path.resolve(dotDir) === path.resolve((0, board_repo_1.homeBoardDir)()))
|
|
116
|
-
return 'home';
|
|
117
|
-
// A standalone board is named after the folder it sits in; anything else
|
|
118
|
-
// (a linked board, or a code repo whose board is not checked out yet) is
|
|
119
|
-
// the repository's board.
|
|
120
|
-
if ((0, board_repo_1.boardRepoKind)(dotDir) === 'standalone' && path.basename(path.resolve(dotDir)) === '.brainfile') {
|
|
121
|
-
return path.basename(path.dirname(path.resolve(dotDir))) || inRepo;
|
|
122
|
-
}
|
|
123
|
-
return inRepo;
|
|
124
|
-
}
|
|
125
|
-
/** Full ref of the board on the remote, e.g. `refs/brainfile/board`. */
|
|
126
|
-
function boardRemoteRef(dotDir) {
|
|
127
|
-
return (0, board_repo_1.remoteBoardRef)(boardRemoteName(dotDir));
|
|
128
|
-
}
|
|
129
|
-
/** The branch 0.21.0 pushed this board to, for the one-time move. */
|
|
130
|
-
function legacyRemoteBranch(dotDir) {
|
|
131
|
-
return configGet(dotDir, board_repo_1.LEGACY_REMOTE_BRANCH_CONFIG_KEY) ?? defaultName(dotDir, (0, board_repo_1.boardBranch)(dotDir));
|
|
132
|
-
}
|
|
133
|
-
function boardAutosync(dotDir) {
|
|
134
|
-
const value = configGet(dotDir, exports.AUTOSYNC_CONFIG_KEY);
|
|
135
|
-
if (value === 'off' || value === 'push' || value === 'full')
|
|
136
|
-
return value;
|
|
137
|
-
return boardRemote(dotDir) ? 'push' : 'off';
|
|
138
|
-
}
|
|
139
|
-
function setBoardAutosync(dotDir, mode) {
|
|
140
|
-
return configSet(dotDir, exports.AUTOSYNC_CONFIG_KEY, mode);
|
|
141
|
-
}
|
|
142
|
-
/** True when `target` names a place rather than an existing git remote. */
|
|
143
|
-
function looksLikeRemoteUrl(target) {
|
|
144
|
-
if (/^[a-z][a-z0-9+.-]*:\/\//i.test(target))
|
|
145
|
-
return true; // ssh://, https://, file://
|
|
146
|
-
if (/^[^/\s]+@[^/\s]+:/.test(target))
|
|
147
|
-
return true; // git@host:path
|
|
148
|
-
if (target.startsWith('/') || target.startsWith('.') || target.startsWith('~'))
|
|
149
|
-
return true;
|
|
150
|
-
if (target.includes('/') && fs.existsSync(target))
|
|
151
|
-
return true;
|
|
152
|
-
return false;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Point the board at a remote: an existing remote name, or a URL/path that is
|
|
156
|
-
* registered as the `board` remote. Throws an Error naming an unknown remote.
|
|
157
|
-
* `cwd` may be the board directory or, when no board exists yet, the code
|
|
158
|
-
* repository the board will be materialized into.
|
|
159
|
-
*/
|
|
160
|
-
function setBoardRemote(cwd, target, boardName) {
|
|
161
|
-
const trimmed = target.trim();
|
|
162
|
-
if (!trimmed)
|
|
163
|
-
throw new Error('remote is required');
|
|
164
|
-
let remote;
|
|
165
|
-
if (looksLikeRemoteUrl(trimmed)) {
|
|
166
|
-
remote = exports.URL_REMOTE_NAME;
|
|
167
|
-
const url = trimmed.startsWith('~/') ? path.join(os.homedir(), trimmed.slice(2)) : trimmed;
|
|
168
|
-
const exists = (0, board_repo_1.git)(['remote', 'get-url', remote], cwd).ok;
|
|
169
|
-
const r = exists ? (0, board_repo_1.git)(['remote', 'set-url', remote, url], cwd) : (0, board_repo_1.git)(['remote', 'add', remote, url], cwd);
|
|
170
|
-
if (!r.ok)
|
|
171
|
-
throw new Error(r.stderr || `could not register remote '${remote}'`);
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
remote = trimmed;
|
|
175
|
-
if (!(0, board_repo_1.git)(['remote', 'get-url', remote], cwd).ok) {
|
|
176
|
-
const known = (0, board_repo_1.git)(['remote'], cwd).stdout.split('\n').filter(Boolean);
|
|
177
|
-
const hint = known.length ? ` Known remotes: ${known.join(', ')}.` : '';
|
|
178
|
-
throw new Error(`'${remote}' is not a git remote here.${hint} Pass a URL to add one.`);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
if (boardName !== undefined && !/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(boardName)) {
|
|
182
|
-
throw new Error(`'${boardName}' is not a usable board name: use letters, digits, '.', '_' or '-'.`);
|
|
183
|
-
}
|
|
184
|
-
configSet(cwd, exports.REMOTE_CONFIG_KEY, remote);
|
|
185
|
-
if (boardName)
|
|
186
|
-
configSet(cwd, board_repo_1.BOARD_NAME_CONFIG_KEY, boardName);
|
|
187
|
-
registerMergeDriver(cwd);
|
|
188
|
-
return {
|
|
189
|
-
remote,
|
|
190
|
-
url: (0, board_repo_1.git)(['remote', 'get-url', remote], cwd).stdout || null,
|
|
191
|
-
remoteRef: boardRemoteRef(cwd),
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Register the field-level merge driver in the board's git config.
|
|
196
|
-
*
|
|
197
|
-
* Without an explicit `command` this only fills in a missing driver: a
|
|
198
|
-
* driver someone configured on purpose (an absolute path to the CLI, or a
|
|
199
|
-
* test's built bundle) is never overwritten by the next sync.
|
|
200
|
-
*/
|
|
201
|
-
function registerMergeDriver(cwd, command) {
|
|
202
|
-
const current = configGet(cwd, `merge.${exports.MERGE_DRIVER_NAME}.driver`);
|
|
203
|
-
if (command === undefined) {
|
|
204
|
-
if (current)
|
|
205
|
-
return false;
|
|
206
|
-
command = exports.DEFAULT_MERGE_DRIVER_COMMAND;
|
|
207
|
-
}
|
|
208
|
-
if (current === command)
|
|
209
|
-
return false;
|
|
210
|
-
configSet(cwd, `merge.${exports.MERGE_DRIVER_NAME}.name`, 'brainfile board merge (field-level, last writer wins)');
|
|
211
|
-
return configSet(cwd, `merge.${exports.MERGE_DRIVER_NAME}.driver`, command);
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Make sure `.gitattributes` on the board declares the merge strategies.
|
|
215
|
-
* Returns true when the file was created or extended (caller commits).
|
|
216
|
-
*/
|
|
217
|
-
function ensureBoardAttributes(dotDir) {
|
|
218
|
-
const file = path.join(dotDir, '.gitattributes');
|
|
219
|
-
let existing = '';
|
|
220
|
-
try {
|
|
221
|
-
existing = fs.readFileSync(file, 'utf-8');
|
|
222
|
-
}
|
|
223
|
-
catch {
|
|
224
|
-
/* absent */
|
|
225
|
-
}
|
|
226
|
-
const lines = existing.split('\n').map((l) => l.trim());
|
|
227
|
-
const missing = exports.BOARD_GITATTRIBUTES.filter((l) => !lines.includes(l));
|
|
228
|
-
if (missing.length === 0)
|
|
229
|
-
return false;
|
|
230
|
-
const prefix = existing.length > 0 && !existing.endsWith('\n') ? `${existing}\n` : existing;
|
|
231
|
-
fs.writeFileSync(file, `${prefix}${missing.join('\n')}\n`, 'utf-8');
|
|
232
|
-
return true;
|
|
233
|
-
}
|
|
234
|
-
function readSyncState(dotDir) {
|
|
235
|
-
try {
|
|
236
|
-
const parsed = JSON.parse(fs.readFileSync(path.join(dotDir, SYNC_STATE_FILE), 'utf-8'));
|
|
237
|
-
return typeof parsed?.at === 'string' ? parsed : null;
|
|
238
|
-
}
|
|
239
|
-
catch {
|
|
240
|
-
return null;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
function writeSyncState(dotDir, state) {
|
|
244
|
-
try {
|
|
245
|
-
fs.mkdirSync(path.join(dotDir, 'state'), { recursive: true });
|
|
246
|
-
fs.writeFileSync(path.join(dotDir, SYNC_STATE_FILE), `${JSON.stringify(state, null, 2)}\n`, 'utf-8');
|
|
247
|
-
}
|
|
248
|
-
catch {
|
|
249
|
-
/* state is a convenience; never fail sync over it */
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
function firstLine(text) {
|
|
253
|
-
return text.split('\n').map((l) => l.trim()).find(Boolean) ?? '';
|
|
254
|
-
}
|
|
255
|
-
function isMissingRemoteRef(stderr) {
|
|
256
|
-
return /couldn't find remote ref|Remote branch .* not found|invalid refspec|no such ref/i.test(stderr);
|
|
257
|
-
}
|
|
258
|
-
function commitCount(dotDir, range) {
|
|
259
|
-
const r = (0, board_repo_1.git)(['rev-list', '--count', range], dotDir);
|
|
260
|
-
return r.ok ? Number.parseInt(r.stdout, 10) || 0 : 0;
|
|
261
|
-
}
|
|
262
|
-
/** Merge commits use the git user, with a fallback when none is configured. */
|
|
263
|
-
function identityArgs(dotDir) {
|
|
264
|
-
const args = ['-c', 'commit.gpgsign=false'];
|
|
265
|
-
if (!(0, board_repo_1.git)(['config', '--get', 'user.email'], dotDir).ok) {
|
|
266
|
-
args.push('-c', 'user.name=brainfile', '-c', 'user.email=brainfile@localhost');
|
|
267
|
-
}
|
|
268
|
-
return args;
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Complete-vs-edit: one side archived a task (deleted `board/<id>.md`, wrote
|
|
272
|
-
* `logs/<id>.md`) while the other edited it. Completion wins; the edit is
|
|
273
|
-
* appended to the archived file as a log entry. Returns the paths resolved.
|
|
274
|
-
*/
|
|
275
|
-
function resolveCompleteVersusEdit(dotDir) {
|
|
276
|
-
const status = (0, board_repo_1.git)(['status', '--porcelain', '-z'], dotDir);
|
|
277
|
-
if (!status.ok)
|
|
278
|
-
return [];
|
|
279
|
-
const resolved = [];
|
|
280
|
-
for (const entry of status.stdout.split('\0')) {
|
|
281
|
-
if (entry.length < 4)
|
|
282
|
-
continue;
|
|
283
|
-
const xy = entry.slice(0, 2);
|
|
284
|
-
const file = entry.slice(3);
|
|
285
|
-
if (xy !== 'DU' && xy !== 'UD')
|
|
286
|
-
continue;
|
|
287
|
-
if (!file.startsWith('board/'))
|
|
288
|
-
continue;
|
|
289
|
-
// DU: deleted by us, modified by them. UD: the reverse.
|
|
290
|
-
const editedStage = xy === 'DU' ? 3 : 2;
|
|
291
|
-
const base = (0, board_repo_1.git)(['show', `:1:${file}`], dotDir);
|
|
292
|
-
const edited = (0, board_repo_1.git)(['show', `:${editedStage}:${file}`], dotDir);
|
|
293
|
-
const archived = path.join(dotDir, 'logs', path.basename(file));
|
|
294
|
-
if (edited.ok && fs.existsSync(archived)) {
|
|
295
|
-
const summary = (0, merge_driver_1.summarizeFieldChanges)(base.ok ? base.stdout : '', edited.stdout);
|
|
296
|
-
const entryLine = `- ${new Date().toISOString()}: [sync] edited elsewhere after completion${summary ? ` (${summary})` : ''}`;
|
|
297
|
-
let content = fs.readFileSync(archived, 'utf-8');
|
|
298
|
-
if (/^## Log\s*$/m.test(content)) {
|
|
299
|
-
content = `${content.replace(/\s+$/, '')}\n${entryLine}\n`;
|
|
300
|
-
}
|
|
301
|
-
else {
|
|
302
|
-
content = `${content.replace(/\s+$/, '')}\n\n## Log\n${entryLine}\n`;
|
|
303
|
-
}
|
|
304
|
-
fs.writeFileSync(archived, content, 'utf-8');
|
|
305
|
-
(0, board_repo_1.git)(['add', '--', path.relative(dotDir, archived)], dotDir);
|
|
306
|
-
}
|
|
307
|
-
if ((0, board_repo_1.git)(['rm', '--quiet', '--cached', '--', file], dotDir).ok) {
|
|
308
|
-
try {
|
|
309
|
-
fs.rmSync(path.join(dotDir, file), { force: true });
|
|
310
|
-
}
|
|
311
|
-
catch {
|
|
312
|
-
/* already gone */
|
|
313
|
-
}
|
|
314
|
-
resolved.push(file);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
return resolved;
|
|
318
|
-
}
|
|
319
|
-
/** Bring `incoming` into HEAD: nothing, a fast-forward, or a merge commit. */
|
|
320
|
-
function mergeIncoming(dotDir, incoming, result) {
|
|
321
|
-
if ((0, board_repo_1.git)(['merge-base', '--is-ancestor', incoming, 'HEAD'], dotDir).ok)
|
|
322
|
-
return { ok: true, pulled: 0 };
|
|
323
|
-
const before = (0, board_repo_1.git)(['rev-parse', 'HEAD'], dotDir).stdout;
|
|
324
|
-
const id = identityArgs(dotDir);
|
|
325
|
-
const merge = (0, board_repo_1.git)([...id, 'merge', '--quiet', '--no-edit', incoming], dotDir);
|
|
326
|
-
if (!merge.ok) {
|
|
327
|
-
resolveCompleteVersusEdit(dotDir);
|
|
328
|
-
const remaining = (0, board_repo_1.unmergedFiles)(dotDir);
|
|
329
|
-
if (remaining.length > 0) {
|
|
330
|
-
return {
|
|
331
|
-
ok: false,
|
|
332
|
-
result: {
|
|
333
|
-
...result,
|
|
334
|
-
ok: false,
|
|
335
|
-
failure: 'conflict',
|
|
336
|
-
conflicts: remaining,
|
|
337
|
-
warning: `merge left conflicts in ${remaining.join(', ')} — resolve them in ${dotDir}, then run sync again`,
|
|
338
|
-
},
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
const commit = (0, board_repo_1.git)([...id, 'commit', '--quiet', '--no-edit', '--no-verify'], dotDir);
|
|
342
|
-
if (!commit.ok) {
|
|
343
|
-
return { ok: false, result: { ...result, ok: false, failure: 'error', warning: `merge commit failed: ${firstLine(commit.stderr)}` } };
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
// Count what came from the remote rather than our own merge commit.
|
|
347
|
-
return { ok: true, pulled: commitCount(dotDir, `${before}..${incoming}`) };
|
|
348
|
-
}
|
|
349
|
-
function legacyChecked(dotDir, remote) {
|
|
350
|
-
return configGet(dotDir, exports.LEGACY_CHECKED_CONFIG_KEY) === remote;
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* fetch → fast-forward or merge → push. Runs entirely inside the board
|
|
354
|
-
* directory. Never throws; network failures come back as `warning`.
|
|
355
|
-
*
|
|
356
|
-
* The first sync with a remote also looks for a board that 0.21.0 pushed as
|
|
357
|
-
* a branch: it is merged in, published under refs/brainfile/, and the old
|
|
358
|
-
* branch is deleted from the remote once nothing on it can be lost.
|
|
359
|
-
*/
|
|
360
|
-
function syncBoard(dotDir, options = {}) {
|
|
361
|
-
const push = options.push ?? true;
|
|
362
|
-
const result = { ok: true, pulled: 0, pushed: 0, conflicts: [] };
|
|
363
|
-
if (!(0, board_repo_1.isTrackedBoard)(dotDir))
|
|
364
|
-
return { ...result, skipped: 'not-tracked' };
|
|
365
|
-
const remote = boardRemote(dotDir);
|
|
366
|
-
if (!remote)
|
|
367
|
-
return { ...result, skipped: 'no-remote' };
|
|
368
|
-
const name = boardRemoteName(dotDir);
|
|
369
|
-
const remoteRef = (0, board_repo_1.remoteBoardRef)(name);
|
|
370
|
-
const tracking = (0, board_repo_1.boardTrackingRef)(remote, name);
|
|
371
|
-
result.remote = remote;
|
|
372
|
-
result.remoteRef = remoteRef;
|
|
373
|
-
const checkLegacy = !legacyChecked(dotDir, remote);
|
|
374
|
-
// The one-time legacy check needs the remote's state even for a push.
|
|
375
|
-
const pull = (options.pull ?? true) || checkLegacy;
|
|
376
|
-
// Never sync a board that is mid-merge: a human owns it until it is clean.
|
|
377
|
-
const stuck = (0, board_repo_1.unmergedFiles)(dotDir);
|
|
378
|
-
if (stuck.length > 0) {
|
|
379
|
-
return finish(dotDir, { ...result, ok: false, failure: 'conflict', conflicts: stuck, warning: `unresolved conflicts: ${stuck.join(', ')}` });
|
|
380
|
-
}
|
|
381
|
-
(0, board_repo_1.commitHandEdits)(dotDir);
|
|
382
|
-
if (ensureBoardAttributes(dotDir))
|
|
383
|
-
(0, board_repo_1.commitBoard)(dotDir, { message: 'chore: merge attributes' });
|
|
384
|
-
registerMergeDriver(dotDir);
|
|
385
|
-
let fetched = false;
|
|
386
|
-
let legacy = null;
|
|
387
|
-
let legacyAbsent = false;
|
|
388
|
-
if (pull) {
|
|
389
|
-
const fetch = (0, board_repo_1.git)(['fetch', '--quiet', '--no-tags', remote, `+${remoteRef}:${tracking}`], dotDir);
|
|
390
|
-
if (fetch.ok) {
|
|
391
|
-
fetched = true;
|
|
392
|
-
}
|
|
393
|
-
else if (!isMissingRemoteRef(fetch.stderr)) {
|
|
394
|
-
return finish(dotDir, { ...result, ok: false, failure: 'offline', warning: `fetch from ${remote} failed: ${firstLine(fetch.stderr)}` });
|
|
395
|
-
}
|
|
396
|
-
else {
|
|
397
|
-
// Gone from the remote (or never there): forget the stale position.
|
|
398
|
-
(0, board_repo_1.git)(['update-ref', '-d', tracking], dotDir);
|
|
399
|
-
}
|
|
400
|
-
if (checkLegacy) {
|
|
401
|
-
const branch = legacyRemoteBranch(dotDir);
|
|
402
|
-
const old = (0, board_repo_1.git)(['fetch', '--quiet', '--no-tags', remote, `refs/heads/${branch}`], dotDir);
|
|
403
|
-
if (old.ok) {
|
|
404
|
-
legacy = { branch, sha: (0, board_repo_1.git)(['rev-parse', 'FETCH_HEAD'], dotDir).stdout };
|
|
405
|
-
}
|
|
406
|
-
else if (isMissingRemoteRef(old.stderr)) {
|
|
407
|
-
legacyAbsent = true;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
for (const incoming of [fetched ? tracking : null, legacy?.sha ?? null]) {
|
|
411
|
-
if (!incoming)
|
|
412
|
-
continue;
|
|
413
|
-
const merged = mergeIncoming(dotDir, incoming, result);
|
|
414
|
-
if (!merged.ok)
|
|
415
|
-
return finish(dotDir, merged.result);
|
|
416
|
-
result.pulled += merged.pulled;
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
if (push) {
|
|
420
|
-
const known = (0, board_repo_1.git)(['rev-parse', '--verify', '--quiet', tracking], dotDir).ok;
|
|
421
|
-
const ahead = commitCount(dotDir, known ? `${tracking}..HEAD` : 'HEAD');
|
|
422
|
-
if (ahead > 0) {
|
|
423
|
-
const pushed = (0, board_repo_1.git)(['push', '--quiet', remote, `HEAD:${remoteRef}`], dotDir);
|
|
424
|
-
if (!pushed.ok) {
|
|
425
|
-
const rejected = /rejected|non-fast-forward|fetch first/i.test(pushed.stderr);
|
|
426
|
-
return finish(dotDir, {
|
|
427
|
-
...result,
|
|
428
|
-
ok: false,
|
|
429
|
-
failure: rejected ? 'rejected' : 'offline',
|
|
430
|
-
warning: rejected
|
|
431
|
-
? `push to ${remote} rejected (the remote moved) — run sync again`
|
|
432
|
-
: `push to ${remote} failed: ${firstLine(pushed.stderr)}`,
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
(0, board_repo_1.git)(['update-ref', tracking, 'HEAD'], dotDir);
|
|
436
|
-
result.pushed = ahead;
|
|
437
|
-
}
|
|
438
|
-
if (legacy && (0, board_repo_1.git)(['merge-base', '--is-ancestor', legacy.sha, tracking], dotDir).ok) {
|
|
439
|
-
// Everything on the old branch is now under refs/brainfile/; the lease
|
|
440
|
-
// keeps a 0.21.0 machine's push made in the meantime from being lost.
|
|
441
|
-
const removed = (0, board_repo_1.git)(['push', '--quiet', `--force-with-lease=refs/heads/${legacy.branch}:${legacy.sha}`, remote, `:refs/heads/${legacy.branch}`], dotDir);
|
|
442
|
-
if (removed.ok) {
|
|
443
|
-
(0, board_repo_1.git)(['update-ref', '-d', `refs/remotes/${remote}/${legacy.branch}`], dotDir);
|
|
444
|
-
result.movedFromBranch = legacy.branch;
|
|
445
|
-
configSet(dotDir, exports.LEGACY_CHECKED_CONFIG_KEY, remote);
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
if (legacyAbsent) {
|
|
450
|
-
(0, board_repo_1.git)(['update-ref', '-d', `refs/remotes/${remote}/${legacyRemoteBranch(dotDir)}`], dotDir);
|
|
451
|
-
configSet(dotDir, exports.LEGACY_CHECKED_CONFIG_KEY, remote);
|
|
452
|
-
}
|
|
453
|
-
return finish(dotDir, result);
|
|
454
|
-
}
|
|
455
|
-
function finish(dotDir, result) {
|
|
456
|
-
writeSyncState(dotDir, {
|
|
457
|
-
at: new Date().toISOString(),
|
|
458
|
-
remote: result.remote ?? '',
|
|
459
|
-
remoteRef: result.remoteRef ?? '',
|
|
460
|
-
ok: result.ok,
|
|
461
|
-
...(result.warning ? { warning: result.warning } : {}),
|
|
462
|
-
});
|
|
463
|
-
return result;
|
|
464
|
-
}
|
|
465
|
-
/** Seconds since the last recorded sync attempt, or null when there was none. */
|
|
466
|
-
function secondsSinceSync(dotDir, now = Date.now()) {
|
|
467
|
-
const state = readSyncState(dotDir);
|
|
468
|
-
if (!state)
|
|
469
|
-
return null;
|
|
470
|
-
const at = Date.parse(state.at);
|
|
471
|
-
return Number.isNaN(at) ? null : Math.max(0, Math.round((now - at) / 1000));
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* Short status for a header: `synced 12s ago`, `local only` for a tracked
|
|
475
|
-
* board nobody else has, `not synced · saved locally` after a failure. Null
|
|
476
|
-
* for a plain board.
|
|
477
|
-
*/
|
|
478
|
-
function syncStatusLabel(dotDir, now = Date.now()) {
|
|
479
|
-
if (!(0, board_repo_1.isTrackedBoard)(dotDir))
|
|
480
|
-
return null;
|
|
481
|
-
if (!boardRemote(dotDir))
|
|
482
|
-
return 'local only';
|
|
483
|
-
const state = readSyncState(dotDir);
|
|
484
|
-
if (!state)
|
|
485
|
-
return 'not synced yet';
|
|
486
|
-
if (!state.ok)
|
|
487
|
-
return 'not synced · saved locally';
|
|
488
|
-
const seconds = secondsSinceSync(dotDir, now) ?? 0;
|
|
489
|
-
const age = seconds < 60 ? `${seconds}s` : seconds < 3600 ? `${Math.round(seconds / 60)}m` : `${Math.round(seconds / 3600)}h`;
|
|
490
|
-
return `synced ${age} ago`;
|
|
491
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* Commits on this machine the remote has not seen yet, judged against the
|
|
494
|
-
* last-known remote position (no network). Null when the board is not shared.
|
|
495
|
-
*/
|
|
496
|
-
function pendingChanges(dotDir) {
|
|
497
|
-
const remote = boardRemote(dotDir);
|
|
498
|
-
if (!remote)
|
|
499
|
-
return 0;
|
|
500
|
-
const tracking = (0, board_repo_1.boardTrackingRef)(remote, boardRemoteName(dotDir));
|
|
501
|
-
const known = (0, board_repo_1.git)(['rev-parse', '--verify', '--quiet', tracking], dotDir).ok;
|
|
502
|
-
return commitCount(dotDir, known ? `${tracking}..HEAD` : 'HEAD');
|
|
503
|
-
}
|
|
504
|
-
/**
|
|
505
|
-
* A page where people can see the board on the web, for hosts that show refs
|
|
506
|
-
* outside branches: GitHub's commit history accepts a full ref name. Null for
|
|
507
|
-
* other hosts.
|
|
508
|
-
*/
|
|
509
|
-
function boardWebUrl(remoteUrl, remoteRef) {
|
|
510
|
-
if (!remoteUrl)
|
|
511
|
-
return null;
|
|
512
|
-
const m = /^(?:https:\/\/(?:[^@/]+@)?github\.com\/|git@github\.com:|ssh:\/\/git@github\.com\/)([^/]+)\/([^/]+?)(?:\.git)?\/?$/.exec(remoteUrl);
|
|
513
|
-
return m ? `https://github.com/${m[1]}/${m[2]}/commits/${remoteRef}` : null;
|
|
514
|
-
}
|
|
515
|
-
const plural = (n, word) => `${n} ${word}${n === 1 ? '' : 's'}`;
|
|
516
|
-
/**
|
|
517
|
-
* The one sentence a person needs after a sync: what moved, or why nothing
|
|
518
|
-
* did and that nothing was lost. `detail` is the technical cause, if any.
|
|
519
|
-
*/
|
|
520
|
-
function syncMessage(result) {
|
|
521
|
-
if (result.skipped === 'not-tracked') {
|
|
522
|
-
return { tone: 'warn', text: 'This board is plain files on this machine and is not shared. To share it: brainfile migrate --to-branch' };
|
|
523
|
-
}
|
|
524
|
-
if (result.skipped === 'no-remote') {
|
|
525
|
-
return { tone: 'warn', text: 'This board is only on this machine. To share it: brainfile sync --set-remote origin' };
|
|
526
|
-
}
|
|
527
|
-
const remote = result.remote ?? 'the remote';
|
|
528
|
-
if (!result.ok) {
|
|
529
|
-
switch (result.failure) {
|
|
530
|
-
case 'conflict':
|
|
531
|
-
return {
|
|
532
|
-
tone: 'warn',
|
|
533
|
-
text: `Two edits collided in ${result.conflicts.join(', ')}. Open the file in .brainfile/, keep the right version, then run brainfile sync. Nothing else is shared until then.`,
|
|
534
|
-
};
|
|
535
|
-
case 'rejected':
|
|
536
|
-
return { tone: 'warn', text: `Someone shared changes through ${remote} at the same moment. Run brainfile sync again to combine them. Nothing was lost.` };
|
|
537
|
-
case 'offline':
|
|
538
|
-
return {
|
|
539
|
-
tone: 'warn',
|
|
540
|
-
text: `Couldn't reach ${remote}. Nothing was lost: your changes are saved on this machine and will be sent on the next sync.`,
|
|
541
|
-
detail: result.warning,
|
|
542
|
-
};
|
|
543
|
-
default:
|
|
544
|
-
return { tone: 'warn', text: `Sync with ${remote} stopped. Your changes are saved on this machine.`, detail: result.warning };
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
const parts = [];
|
|
548
|
-
if (result.pulled > 0)
|
|
549
|
-
parts.push(`received ${plural(result.pulled, 'change')}`);
|
|
550
|
-
if (result.pushed > 0)
|
|
551
|
-
parts.push(`sent ${plural(result.pushed, 'change')}`);
|
|
552
|
-
return { tone: 'ok', text: parts.length ? `Shared through ${remote}: ${parts.join(', ')}.` : `Up to date with ${remote}.` };
|
|
553
|
-
}
|
|
3
|
+
exports.boardConflictRelation = exports.boardConflictError = exports.boardConflict = exports.surveyBoards = exports.syncMessage = exports.boardWebUrl = exports.pendingChanges = exports.syncStatusLabel = exports.secondsSinceSync = exports.syncBoard = exports.resolveCompleteVersusEdit = exports.readSyncState = exports.ensureBoardAttributes = exports.registerMergeDriver = exports.setBoardRemote = exports.looksLikeRemoteUrl = exports.setBoardAutosync = exports.boardAutosync = exports.boardRemoteRef = exports.boardRemoteName = exports.boardRemote = exports.BOARD_GITATTRIBUTES = exports.DEFAULT_MERGE_DRIVER_COMMAND = exports.MERGE_DRIVER_NAME = exports.URL_REMOTE_NAME = exports.AUTOSYNC_CONFIG_KEY = exports.LEGACY_CHECKED_CONFIG_KEY = exports.REMOTE_CONFIG_KEY = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Board sync (spec-9) lives in `@brainfile/core/repo`; re-exported here so
|
|
6
|
+
* CLI modules keep one import path.
|
|
7
|
+
*/
|
|
8
|
+
var repo_1 = require("@brainfile/core/repo");
|
|
9
|
+
Object.defineProperty(exports, "REMOTE_CONFIG_KEY", { enumerable: true, get: function () { return repo_1.REMOTE_CONFIG_KEY; } });
|
|
10
|
+
Object.defineProperty(exports, "LEGACY_CHECKED_CONFIG_KEY", { enumerable: true, get: function () { return repo_1.LEGACY_CHECKED_CONFIG_KEY; } });
|
|
11
|
+
Object.defineProperty(exports, "AUTOSYNC_CONFIG_KEY", { enumerable: true, get: function () { return repo_1.AUTOSYNC_CONFIG_KEY; } });
|
|
12
|
+
Object.defineProperty(exports, "URL_REMOTE_NAME", { enumerable: true, get: function () { return repo_1.URL_REMOTE_NAME; } });
|
|
13
|
+
Object.defineProperty(exports, "MERGE_DRIVER_NAME", { enumerable: true, get: function () { return repo_1.MERGE_DRIVER_NAME; } });
|
|
14
|
+
Object.defineProperty(exports, "DEFAULT_MERGE_DRIVER_COMMAND", { enumerable: true, get: function () { return repo_1.DEFAULT_MERGE_DRIVER_COMMAND; } });
|
|
15
|
+
Object.defineProperty(exports, "BOARD_GITATTRIBUTES", { enumerable: true, get: function () { return repo_1.BOARD_GITATTRIBUTES; } });
|
|
16
|
+
Object.defineProperty(exports, "boardRemote", { enumerable: true, get: function () { return repo_1.boardRemote; } });
|
|
17
|
+
Object.defineProperty(exports, "boardRemoteName", { enumerable: true, get: function () { return repo_1.boardRemoteName; } });
|
|
18
|
+
Object.defineProperty(exports, "boardRemoteRef", { enumerable: true, get: function () { return repo_1.boardRemoteRef; } });
|
|
19
|
+
Object.defineProperty(exports, "boardAutosync", { enumerable: true, get: function () { return repo_1.boardAutosync; } });
|
|
20
|
+
Object.defineProperty(exports, "setBoardAutosync", { enumerable: true, get: function () { return repo_1.setBoardAutosync; } });
|
|
21
|
+
Object.defineProperty(exports, "looksLikeRemoteUrl", { enumerable: true, get: function () { return repo_1.looksLikeRemoteUrl; } });
|
|
22
|
+
Object.defineProperty(exports, "setBoardRemote", { enumerable: true, get: function () { return repo_1.setBoardRemote; } });
|
|
23
|
+
Object.defineProperty(exports, "registerMergeDriver", { enumerable: true, get: function () { return repo_1.registerMergeDriver; } });
|
|
24
|
+
Object.defineProperty(exports, "ensureBoardAttributes", { enumerable: true, get: function () { return repo_1.ensureBoardAttributes; } });
|
|
25
|
+
Object.defineProperty(exports, "readSyncState", { enumerable: true, get: function () { return repo_1.readSyncState; } });
|
|
26
|
+
Object.defineProperty(exports, "resolveCompleteVersusEdit", { enumerable: true, get: function () { return repo_1.resolveCompleteVersusEdit; } });
|
|
27
|
+
Object.defineProperty(exports, "syncBoard", { enumerable: true, get: function () { return repo_1.syncBoard; } });
|
|
28
|
+
Object.defineProperty(exports, "secondsSinceSync", { enumerable: true, get: function () { return repo_1.secondsSinceSync; } });
|
|
29
|
+
Object.defineProperty(exports, "syncStatusLabel", { enumerable: true, get: function () { return repo_1.syncStatusLabel; } });
|
|
30
|
+
Object.defineProperty(exports, "pendingChanges", { enumerable: true, get: function () { return repo_1.pendingChanges; } });
|
|
31
|
+
Object.defineProperty(exports, "boardWebUrl", { enumerable: true, get: function () { return repo_1.boardWebUrl; } });
|
|
32
|
+
Object.defineProperty(exports, "syncMessage", { enumerable: true, get: function () { return repo_1.syncMessage; } });
|
|
33
|
+
Object.defineProperty(exports, "surveyBoards", { enumerable: true, get: function () { return repo_1.surveyBoards; } });
|
|
34
|
+
Object.defineProperty(exports, "boardConflict", { enumerable: true, get: function () { return repo_1.boardConflict; } });
|
|
35
|
+
Object.defineProperty(exports, "boardConflictError", { enumerable: true, get: function () { return repo_1.boardConflictError; } });
|
|
36
|
+
Object.defineProperty(exports, "boardConflictRelation", { enumerable: true, get: function () { return repo_1.boardConflictRelation; } });
|
|
554
37
|
//# sourceMappingURL=board-sync.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-sync.js","sourceRoot":"","sources":["../../src/utils/board-sync.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsGA,kCAEC;AAQD,0CAIC;AAcD,wCAEC;AAOD,sCAIC;AAED,4CAEC;AAGD,gDAMC;AAcD,wCA6BC;AASD,kDASC;AAMD,sDAcC;AAED,sCAOC;AAsCD,8DAqCC;AA8CD,8BA8FC;AAcD,4CAKC;AAOD,0CASC;AAMD,wCAMC;AAOD,kCAIC;AAQD,kCA+BC;AA9iBD;;;;;;;;;;;;;;;;;GAiBG;AACH,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,6CAesB;AACtB,2DAAiE;AAEpD,QAAA,iBAAiB,GAAG,kBAAkB,CAAC;AACpD,0FAA0F;AAC7E,QAAA,yBAAyB,GAAG,+BAA+B,CAAC;AAC5D,QAAA,mBAAmB,GAAG,oBAAoB,CAAC;AACxD,6EAA6E;AAChE,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,iBAAiB,GAAG,WAAW,CAAC;AAChC,QAAA,4BAA4B,GAAG,iCAAiC,CAAC;AAC9E,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAE3C,QAAA,mBAAmB,GAAG;IACjC,+BAA+B;IAC/B,4BAA4B;IAC5B,2BAA2B;IAC3B,8BAA8B;CAC/B,CAAC;AAuCF,SAAS,SAAS,CAAC,MAAc,EAAE,GAAW;IAC5C,MAAM,CAAC,GAAG,IAAA,gBAAG,EAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;IAChD,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM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