revdeck 0.8.0 → 0.8.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/CHANGELOG.md +10 -0
- package/README.md +8 -7
- package/README.ru.md +7 -6
- package/dist/cli.js +12 -25
- package/dist/cli.js.map +3 -3
- package/dist/daemon.js +1 -1
- package/dist/daemon.js.map +2 -2
- package/dist/mcp.js +6 -3
- package/dist/mcp.js.map +2 -2
- package/docs/configuration.md +1 -1
- package/docs/integrations.md +13 -10
- package/docs/ru/configuration.md +1 -1
- package/docs/ru/integrations.md +13 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to this project are documented here. The format is based on
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.8.1] - 2026-11-18
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- `revdeck devcontainer --write` now writes `REVDECK_HOST_ROOT` as `${localWorkspaceFolder}` instead
|
|
12
|
+
of a `${localEnv:HOME}`-relative path. Each developer's devcontainer tooling expands the variable
|
|
13
|
+
to their own checkout, so the shared `devcontainer.json` no longer contains a user-specific path
|
|
14
|
+
that breaks colleagues who clone into another folder. A Windows host path (`C:\...`) from Docker
|
|
15
|
+
Desktop is passed to the daemon without POSIX normalization.
|
|
16
|
+
|
|
7
17
|
## [0.8.0] - 2026-11-18
|
|
8
18
|
|
|
9
19
|
### Changed
|
package/README.md
CHANGED
|
@@ -280,13 +280,14 @@ home path, so the same `.devcontainer/devcontainer.json` works for every develop
|
|
|
280
280
|
foreign keys in an existing JSONC file are preserved.
|
|
281
281
|
|
|
282
282
|
The daemon runs on the host and cannot read the container workspace path (`/workspaces/...`), so the
|
|
283
|
-
same command also writes `REVDECK_HOST_ROOT`
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
server inside the container replace their worktree path with that host path before
|
|
287
|
-
`.revdeck.yml`, rule documents, checks and local diff bases then come from the host
|
|
288
|
-
repository is
|
|
289
|
-
|
|
283
|
+
same command also writes `REVDECK_HOST_ROOT: "${localWorkspaceFolder}"` into `containerEnv` and
|
|
284
|
+
`remoteEnv` (the MCP server inherits it from the container). The devcontainer tooling expands
|
|
285
|
+
`${localWorkspaceFolder}` to each developer's host path, so the shared file has no user-specific path.
|
|
286
|
+
The CLI and MCP server inside the container replace their worktree path with that host path before
|
|
287
|
+
calling the daemon; `.revdeck.yml`, rule documents, checks and local diff bases then come from the host
|
|
288
|
+
checkout. If the repository is not the opened workspace folder, set `REVDECK_HOST_ROOT` to the host
|
|
289
|
+
repository root manually (for example `${localWorkspaceFolder}/subdir`). Reviews opened before this
|
|
290
|
+
mapping still point at the container root: reopen them after updating the devcontainer.
|
|
290
291
|
|
|
291
292
|
The daemon creates the bridge socket on startup, so on the host run `revdeck daemon restart`, then
|
|
292
293
|
rebuild the container. Inside the container revdeck never starts a local daemon, so `gh`/`glab` are
|
package/README.ru.md
CHANGED
|
@@ -265,12 +265,13 @@ info-`daemon.json` без токена UI) и выставляет `REVDECK_RUNT
|
|
|
265
265
|
чужие ключи в существующем JSONC сохраняются.
|
|
266
266
|
|
|
267
267
|
Демон живёт на хосте и не видит путь рабочей копии в контейнере (`/workspaces/...`), поэтому команда
|
|
268
|
-
дополнительно записывает `REVDECK_HOST_ROOT`
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
контейнере заменяют свой путь на путь хоста перед обращением к демону:
|
|
272
|
-
правил, checks и база локального diff читаются из рабочей копии хоста. Если
|
|
273
|
-
|
|
268
|
+
дополнительно записывает `REVDECK_HOST_ROOT: "${localWorkspaceFolder}"` в `containerEnv` и
|
|
269
|
+
`remoteEnv` (MCP-сервер наследует его из окружения контейнера). Клиент devcontainer раскрывает
|
|
270
|
+
`${localWorkspaceFolder}` в путь конкретного разработчика, поэтому общий файл не содержит личного
|
|
271
|
+
пути. CLI и MCP-сервер в контейнере заменяют свой путь на путь хоста перед обращением к демону:
|
|
272
|
+
`.revdeck.yml`, документы правил, checks и база локального diff читаются из рабочей копии хоста. Если
|
|
273
|
+
репозиторий — не открытая папка workspace, задайте `REVDECK_HOST_ROOT` вручную (например,
|
|
274
|
+
`${localWorkspaceFolder}/subdir`). Ревью, открытые до этого изменения, хранят путь контейнера — их
|
|
274
275
|
нужно открыть заново после обновления devcontainer.
|
|
275
276
|
|
|
276
277
|
Демон создаёт сокет моста при старте: на хосте выполните `revdeck daemon restart`, затем пересоберите
|
package/dist/cli.js
CHANGED
|
@@ -29,9 +29,12 @@ function toHostRoot(root, hostRoot = process.env.REVDECK_HOST_ROOT, containerRoo
|
|
|
29
29
|
const target = hostRoot?.trim();
|
|
30
30
|
if (!target) return resolved;
|
|
31
31
|
const relative = path.relative(path.resolve(containerRoot), resolved);
|
|
32
|
-
if (relative === "") return
|
|
32
|
+
if (relative === "") return target;
|
|
33
33
|
if (relative.startsWith("..") || path.isAbsolute(relative)) return resolved;
|
|
34
|
-
|
|
34
|
+
const windows = /^[A-Za-z]:[\\/]/.test(target) || target.startsWith("\\\\");
|
|
35
|
+
const separator = windows ? "\\" : "/";
|
|
36
|
+
const prefix = target.replace(/[\\/]+$/, "");
|
|
37
|
+
return `${prefix}${separator}${relative.split(path.sep).join(separator)}`;
|
|
35
38
|
}
|
|
36
39
|
function findConfigFile(root) {
|
|
37
40
|
for (const name of CONFIG_FILES) {
|
|
@@ -808,7 +811,7 @@ var VERSION;
|
|
|
808
811
|
var init_version = __esm({
|
|
809
812
|
"src/version.ts"() {
|
|
810
813
|
"use strict";
|
|
811
|
-
VERSION = "0.8.
|
|
814
|
+
VERSION = "0.8.1";
|
|
812
815
|
}
|
|
813
816
|
});
|
|
814
817
|
|
|
@@ -3014,7 +3017,6 @@ import { applyEdits as applyEdits2, modify as modify2 } from "jsonc-parser";
|
|
|
3014
3017
|
init_paths();
|
|
3015
3018
|
import { existsSync as existsSync7 } from "node:fs";
|
|
3016
3019
|
import { mkdir as mkdir3, readFile as readFile4, writeFile as writeFile2 } from "node:fs/promises";
|
|
3017
|
-
import os3 from "node:os";
|
|
3018
3020
|
import path8 from "node:path";
|
|
3019
3021
|
import { applyEdits, modify, parse as parseJsonc2 } from "jsonc-parser";
|
|
3020
3022
|
init_locale();
|
|
@@ -3022,13 +3024,8 @@ init_format();
|
|
|
3022
3024
|
var CONTAINER_RUNTIME_DIR = "/run/revdeck";
|
|
3023
3025
|
var CONTAINER_STATE_DIR = "/var/lib/revdeck";
|
|
3024
3026
|
var CONTAINER_UI_HOST = "host.docker.internal";
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
if (path8.isAbsolute(relative) || relative.startsWith("..")) return null;
|
|
3028
|
-
const suffix = relative ? `/${relative.split(path8.sep).join("/")}` : "";
|
|
3029
|
-
return `\${localEnv:HOME}\${localEnv:USERPROFILE}${suffix}`;
|
|
3030
|
-
}
|
|
3031
|
-
function devcontainerPatch(hostRoot) {
|
|
3027
|
+
var HOST_ROOT_EXPRESSION = "${localWorkspaceFolder}";
|
|
3028
|
+
function devcontainerPatch() {
|
|
3032
3029
|
const bridge = "${localEnv:HOME}${localEnv:USERPROFILE}/.local/state/revdeck/devcontainer";
|
|
3033
3030
|
return {
|
|
3034
3031
|
mounts: [
|
|
@@ -3040,14 +3037,14 @@ function devcontainerPatch(hostRoot) {
|
|
|
3040
3037
|
REVDECK_STATE_DIR: CONTAINER_STATE_DIR,
|
|
3041
3038
|
REVDECK_DEV_CONTAINER: "1",
|
|
3042
3039
|
REVDECK_UI_HOST: CONTAINER_UI_HOST,
|
|
3043
|
-
|
|
3040
|
+
REVDECK_HOST_ROOT: HOST_ROOT_EXPRESSION
|
|
3044
3041
|
},
|
|
3045
3042
|
remoteEnv: {
|
|
3046
3043
|
REVDECK_RUNTIME_DIR: CONTAINER_RUNTIME_DIR,
|
|
3047
3044
|
REVDECK_STATE_DIR: CONTAINER_STATE_DIR,
|
|
3048
3045
|
REVDECK_DEV_CONTAINER: "1",
|
|
3049
3046
|
REVDECK_UI_HOST: CONTAINER_UI_HOST,
|
|
3050
|
-
|
|
3047
|
+
REVDECK_HOST_ROOT: HOST_ROOT_EXPRESSION
|
|
3051
3048
|
},
|
|
3052
3049
|
runArgs: [`--add-host=${CONTAINER_UI_HOST}:host-gateway`]
|
|
3053
3050
|
};
|
|
@@ -3104,8 +3101,7 @@ function applyDevcontainerPatch(text, patch) {
|
|
|
3104
3101
|
}
|
|
3105
3102
|
async function runDevcontainer(rootInput, options) {
|
|
3106
3103
|
const root = findRepoRoot(rootInput);
|
|
3107
|
-
const
|
|
3108
|
-
const patch = devcontainerPatch(hostRoot);
|
|
3104
|
+
const patch = devcontainerPatch();
|
|
3109
3105
|
await ensureDir(devcontainerRunDir());
|
|
3110
3106
|
await ensureDir(devcontainerStateDir());
|
|
3111
3107
|
const dir = path8.join(root, ".devcontainer");
|
|
@@ -3113,16 +3109,7 @@ async function runDevcontainer(rootInput, options) {
|
|
|
3113
3109
|
writers.out(tr("\u041C\u043E\u0441\u0442 revdeck \u0434\u043B\u044F \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u0430:", "revdeck bridge for the container:"));
|
|
3114
3110
|
writers.out(` ${tr("\u0441\u043E\u043A\u0435\u0442", "socket")}: ${devcontainerRunDir()} -> ${CONTAINER_RUNTIME_DIR}`);
|
|
3115
3111
|
writers.out(` ${tr("\u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435", "state")}: ${devcontainerStateDir()} -> ${CONTAINER_STATE_DIR} (${tr("\u0442\u043E\u043B\u044C\u043A\u043E \u0447\u0442\u0435\u043D\u0438\u0435", "read-only")})`);
|
|
3116
|
-
|
|
3117
|
-
writers.out(` ${tr("\u0440\u0430\u0431\u043E\u0447\u0430\u044F \u043A\u043E\u043F\u0438\u044F \u0445\u043E\u0441\u0442\u0430", "host working copy")}: ${hostRoot}`);
|
|
3118
|
-
} else {
|
|
3119
|
-
writers.err(
|
|
3120
|
-
tr(
|
|
3121
|
-
"! \u0440\u0435\u043F\u043E\u0437\u0438\u0442\u043E\u0440\u0438\u0439 \u0432\u043D\u0435 \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0433\u043E \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430: \u0437\u0430\u0434\u0430\u0439\u0442\u0435 REVDECK_HOST_ROOT=<\u043F\u0443\u0442\u044C \u043D\u0430 \u0445\u043E\u0441\u0442\u0435> \u0432 devcontainer.json \u0432\u0440\u0443\u0447\u043D\u0443\u044E, \u0438\u043D\u0430\u0447\u0435 \u0434\u0435\u043C\u043E\u043D \u043D\u0435 \u0443\u0432\u0438\u0434\u0438\u0442 .revdeck.yml",
|
|
3122
|
-
"! the repository is outside the home directory: set REVDECK_HOST_ROOT=<host path> in devcontainer.json manually, otherwise the daemon will not see .revdeck.yml"
|
|
3123
|
-
)
|
|
3124
|
-
);
|
|
3125
|
-
}
|
|
3112
|
+
writers.out(` ${tr("\u0440\u0430\u0431\u043E\u0447\u0430\u044F \u043A\u043E\u043F\u0438\u044F \u0445\u043E\u0441\u0442\u0430", "host working copy")}: ${HOST_ROOT_EXPRESSION}`);
|
|
3126
3113
|
if (!existsSync7(devcontainerSocketPath())) {
|
|
3127
3114
|
writers.err(
|
|
3128
3115
|
tr(
|