dsh-patch-edit-plus 0.4.6 → 0.4.8
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.de.md +63 -0
- package/CHANGELOG.es.md +63 -0
- package/CHANGELOG.fr.md +63 -0
- package/CHANGELOG.it.md +63 -0
- package/CHANGELOG.ja.md +68 -0
- package/CHANGELOG.ko.md +68 -0
- package/CHANGELOG.md +13 -0
- package/CHANGELOG.ru.md +63 -0
- package/CHANGELOG.zh.md +13 -0
- package/INSTALL.de.md +179 -0
- package/INSTALL.es.md +179 -0
- package/INSTALL.fr.md +179 -0
- package/INSTALL.it.md +179 -0
- package/INSTALL.ja.md +179 -0
- package/INSTALL.ko.md +179 -0
- package/INSTALL.md +179 -0
- package/INSTALL.ru.md +179 -0
- package/INSTALL.zh.md +179 -0
- package/README.md +6 -5
- package/README.zh.md +6 -5
- package/dsh.plugin.json +2 -2
- package/lib/config.js +2 -0
- package/lib/guidance.js +115 -0
- package/lib/index.js +17 -1
- package/lib/register.js +7 -2
- package/lib/tool.js +6 -10
- package/lib/types/config.d.ts +14 -0
- package/lib/types/guidance.d.ts +55 -0
- package/lib/types/register.d.ts +4 -1
- package/lib/types/tool.d.ts +4 -4
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/it.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/ko.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +27 -2
package/INSTALL.de.md
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# Installationsanleitung (offizielle DSH-CLI)
|
|
2
|
+
|
|
3
|
+
Diese Anleitung verwendet ausschließlich den offiziellen DSH-Befehl `dsh plugin`. Dieser Befehl installiert die Abhängigkeit in ein Profil und synchronisiert `dsh.profile.bundles`. Ersetzen Sie ihn nicht durch bloßes `npm install`, ein direktes `pnpm add` im Profil oder manuelle Bearbeitungen des Profil-Manifests.
|
|
4
|
+
|
|
5
|
+
- [Englische Installationsanleitung](./INSTALL.md)
|
|
6
|
+
- [Chinesische Installationsanleitung](./INSTALL.zh.md)
|
|
7
|
+
- [Japanische Installationsanleitung](./INSTALL.ja.md)
|
|
8
|
+
- [Koreanische Installationsanleitung](./INSTALL.ko.md)
|
|
9
|
+
- [Deutsche Installationsanleitung](./INSTALL.de.md)
|
|
10
|
+
- [Französische Installationsanleitung](./INSTALL.fr.md)
|
|
11
|
+
- [Italienische Installationsanleitung](./INSTALL.it.md)
|
|
12
|
+
- [Russische Installationsanleitung](./INSTALL.ru.md)
|
|
13
|
+
- [Spanische Installationsanleitung](./INSTALL.es.md)
|
|
14
|
+
- [Englisches README](./README.md)
|
|
15
|
+
- [Chinesisches README](./README.zh.md)
|
|
16
|
+
- [Japanisches README](./README.ja.md)
|
|
17
|
+
- [Koreanisches README](./README.ko.md)
|
|
18
|
+
- [Deutsches README](./README.de.md)
|
|
19
|
+
- [Französisches README](./README.fr.md)
|
|
20
|
+
- [Italienisches README](./README.it.md)
|
|
21
|
+
- [Russisches README](./README.ru.md)
|
|
22
|
+
- [Spanisches README](./README.es.md)
|
|
23
|
+
- [Änderungsprotokoll](./CHANGELOG.md)
|
|
24
|
+
- [Japanisches Änderungsprotokoll](./CHANGELOG.ja.md)
|
|
25
|
+
- [Koreanisches Änderungsprotokoll](./CHANGELOG.ko.md)
|
|
26
|
+
- [Deutsches Änderungsprotokoll](./CHANGELOG.de.md)
|
|
27
|
+
- [Französisches Änderungsprotokoll](./CHANGELOG.fr.md)
|
|
28
|
+
- [Italienisches Änderungsprotokoll](./CHANGELOG.it.md)
|
|
29
|
+
- [Russisches Änderungsprotokoll](./CHANGELOG.ru.md)
|
|
30
|
+
- [Spanisches Änderungsprotokoll](./CHANGELOG.es.md)
|
|
31
|
+
|
|
32
|
+
Die Platzhalter in dieser Anleitung sind:
|
|
33
|
+
|
|
34
|
+
- `<profile>`: das zu ändernde DSH-Profil, üblicherweise `web`;
|
|
35
|
+
- `dsh-patch-edit-plus`: das npm-Paket, die Laufzeit-Plugin-ID und die ID der einzigen Zeile, die der Bundle-Patch einfügt.
|
|
36
|
+
|
|
37
|
+
> **Unterstützter DSH-Bereich: `0.1.0-rc.8` bis `0.2.0-rc.2` (einschließlich Desktop) — eine einzige Version, v0.4.0.**
|
|
38
|
+
>
|
|
39
|
+
> Prüfen Sie zunächst mit `dsh --version` die laufende Version.
|
|
40
|
+
>
|
|
41
|
+
> | DSH-Version | Status | Hinweise |
|
|
42
|
+
> | --- | --- | --- |
|
|
43
|
+
> | `0.2.0-rc.1` ~ `0.2.0-rc.2` (einschließlich Desktop) | unterstützt | Dieselbe v0.4.0. |
|
|
44
|
+
> | `0.1.0-rc.8` ~ `0.1.7-rc.2` | unterstützt | Dieselbe v0.4.0 — keine Auswahl von Zweig oder Dist-Tag nötig. |
|
|
45
|
+
>
|
|
46
|
+
> Installieren Sie auf jeder unterstützten Host-Linie `latest`: eine einzige Version bedient 0.1.x und 0.2.x gleichermaßen. Nach der Veröffentlichung zeigen die Dist-Tags `latest`, `dsh-0.2.0`, `dsh-0.1.7`, `dsh-0.1.5` und `dsh-0.1.2` alle auf 0.4.0.
|
|
47
|
+
|
|
48
|
+
## 0. Voraussetzungen und Profil-Ermittlung
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
|
|
52
|
+
dsh --version
|
|
53
|
+
ls "${DSH_HOME:-$HOME/.dsh}/profiles"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Benutzen Sie das Profil, das Ihr laufender DSH-Prozess nennt. `web` ist üblich, aber das aktive `--profile`-Argument ist maßgeblich.
|
|
57
|
+
|
|
58
|
+
## 1. Offizielle Installation
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
dsh plugin --profile <profile> add dsh-patch-edit-plus -w
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
(Das Flag `-w` ist erforderlich, wenn das Profil eine pnpm-Workspace-Wurzel ist, wie es bei `web` der Fall ist.)
|
|
65
|
+
|
|
66
|
+
Eine bestimmte Version explizit installieren:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
dsh plugin --profile <profile> add dsh-patch-edit-plus@0.4.0 -w
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Die offizielle CLI aktualisiert die Profil-Abhängigkeit, die Lockdatei und `dsh.profile.bundles` automatisch. Fügen Sie keine manuelle YAML-Zeile hinzu.
|
|
73
|
+
|
|
74
|
+
### Abkühlphase der Lieferkette
|
|
75
|
+
|
|
76
|
+
Die DSH-Laufzeit verwendet pnpm 11, dessen `minimumReleaseAge`-Richtlinie eine frisch veröffentlichte Version mit `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` blockieren kann. Fügen Sie die Version zu `minimumReleaseAgeExclude` in `~/.dsh/profiles/<profile>/pnpm-workspace.yaml` hinzu:
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
minimumReleaseAgeExclude:
|
|
80
|
+
- dsh-patch-edit-plus@0.4.0
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## 2. Host neu starten
|
|
84
|
+
|
|
85
|
+
Dies ist ein **reines Host-Plugin**: Es registriert ein Werkzeug und einen Einstellungsabschnitt auf dem Host und bringt keine Browser-Hälfte mit. Starten Sie den DSH-Host-Prozess nach jeder Installation oder Aktualisierung neu; ein Neuladen der Seite ist weder nötig noch ausreichend.
|
|
86
|
+
|
|
87
|
+
## 3. Upgrade
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
dsh plugin --profile <profile> update dsh-patch-edit-plus -w
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Starten Sie DSH danach neu.
|
|
94
|
+
|
|
95
|
+
## 4. Registrierung über lokalen Pfad / `link:` (Alternative)
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# ~/.dsh/profiles/<profile>/package.json dependencies:
|
|
99
|
+
# "dsh-patch-edit-plus": "link:<absolute path to dsh-patch-edit-plus>"
|
|
100
|
+
# ~/.dsh/profiles/<profile>/cordis.patch.yml:
|
|
101
|
+
# - insert:
|
|
102
|
+
# - id: dsh-patch-edit-plus
|
|
103
|
+
# name: dsh-patch-edit-plus
|
|
104
|
+
cd ~/.dsh/profiles/<profile> && pnpm install && dsh web
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Oder verwenden Sie die offizielle CLI mit einem lokalen Pfad (kein Netz nötig):
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
dsh plugin --profile <profile> add /absolute/path/to/dsh-patch-edit-plus -w
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Der Bau aus einem Quell-Checkout verwendet diese Skripte:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm install
|
|
117
|
+
npm run build # tsc -p tsconfig.build.json → lib/ + lib/types/
|
|
118
|
+
npm run typecheck # tsc -p tsconfig.json
|
|
119
|
+
npm run verify:source # source-level assertions
|
|
120
|
+
npm run test # vitest run
|
|
121
|
+
npm run smoke # _smoke/load-smoke.mjs
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`lib/` wird nicht eingecheckt, daher muss ein Quell-Checkout gebaut werden, bevor er per Pfad registriert werden kann. Die Veröffentlichung baut ihn automatisch über den `prepublishOnly`-Hook, sodass ein veröffentlichtes Tarball immer kompilierte Ausgabe enthält.
|
|
125
|
+
|
|
126
|
+
## 5. Installation überprüfen
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
grep -n "dsh-patch-edit-plus" \
|
|
130
|
+
"${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
|
|
131
|
+
node -p "require('${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/node_modules/dsh-patch-edit-plus/package.json').version"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Prüfen Sie die offizielle Komposition:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
dsh --profile <profile> --dump-default-config
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Sie muss enthalten:
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
- id: dsh-patch-edit-plus
|
|
144
|
+
name: dsh-patch-edit-plus
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 6. Das Plugin überprüfen
|
|
148
|
+
|
|
149
|
+
Bestätigen Sie nach dem Neustart in einer Sitzung:
|
|
150
|
+
|
|
151
|
+
1. Das Werkzeug `apply_patch` steht dem Modell zur Verfügung.
|
|
152
|
+
2. Ein Unified-Diff-Patch wird angewendet, und der Dateiinhalt entspricht exakt dem Diff.
|
|
153
|
+
3. Ein Patch, der die Verifikation nicht besteht, lässt den Workspace unangetastet — die Engine prüft alles lesend, bevor sie irgendetwas schreibt.
|
|
154
|
+
4. Ein Patch im Codex-Stil liefert, während `allowCodexPatch` aus ist, einen umsetzbaren Hinweis, der dem Modell sagt, wie es den Stil aktiviert oder im Unified-Diff-Format wiederholt, statt eines generischen Parse-Fehlers.
|
|
155
|
+
|
|
156
|
+
Stellt ein anderes Plugin bereits ein Werkzeug namens `apply_patch` bereit, entscheidet die dreistufige Konfliktrichtlinie (`rename` als Standard, sonst `skip` / `fail`). Beim Standard `rename` ist der DSH-Start unbeeinträchtigt und das Werkzeug wird unter einem Namen mit Suffix registriert.
|
|
157
|
+
|
|
158
|
+
## 7. Fehlerbehebung
|
|
159
|
+
|
|
160
|
+
| Symptom | Maßnahme |
|
|
161
|
+
| --- | --- |
|
|
162
|
+
| `dsh` wird nicht gefunden | Installieren oder aktivieren Sie die offizielle DSH-CLI. |
|
|
163
|
+
| `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | Fügen Sie die Version zu `minimumReleaseAgeExclude` in der `pnpm-workspace.yaml` des Profils hinzu. |
|
|
164
|
+
| `apply_patch` erscheint nicht | Starten Sie den Host-Prozess neu und prüfen Sie die Kompositions-Zeile erneut. |
|
|
165
|
+
| Werkzeugnamens-Kollision mit einem anderen `apply_patch`-Provider | Stellen Sie die Konfliktrichtlinie auf `rename` (Standard), `skip` oder `fail`, siehe README. |
|
|
166
|
+
| Codex-Syntax abgelehnt | Aktivieren Sie `allowCodexPatch: true` oder senden Sie die Änderung erneut als Unified Diff. |
|
|
167
|
+
| Hunk-Fehlanpassung | Lesen Sie die vier Elemente der Diagnostik (Datei + Hunk-Index, Suchursprung, erwartete Vorschau, tatsächlicher Auszug) und senden Sie den Hunk mit passendem Kontext erneut. |
|
|
168
|
+
|
|
169
|
+
## 8. Entfernen
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
dsh plugin --profile <profile> remove dsh-patch-edit-plus
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Starten Sie DSH danach neu.
|
|
176
|
+
|
|
177
|
+
## Lizenz
|
|
178
|
+
|
|
179
|
+
MIT
|
package/INSTALL.es.md
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# Guía de instalación (CLI oficial de DSH)
|
|
2
|
+
|
|
3
|
+
Esta guía usa únicamente el comando oficial de DSH `dsh plugin`. Ese comando instala la dependencia en un perfil y sincroniza `dsh.profile.bundles`. No lo sustituya por un `npm install` sencillo, un `pnpm add` directo en el perfil o ediciones manuales del manifiesto del perfil.
|
|
4
|
+
|
|
5
|
+
- [Guía de instalación en inglés](./INSTALL.md)
|
|
6
|
+
- [Guía de instalación en chino](./INSTALL.zh.md)
|
|
7
|
+
- [Guía de instalación en japonés](./INSTALL.ja.md)
|
|
8
|
+
- [Guía de instalación en coreano](./INSTALL.ko.md)
|
|
9
|
+
- [Guía de instalación en español](./INSTALL.es.md)
|
|
10
|
+
- [Guía de instalación en francés](./INSTALL.fr.md)
|
|
11
|
+
- [Guía de instalación en alemán](./INSTALL.de.md)
|
|
12
|
+
- [Guía de instalación en italiano](./INSTALL.it.md)
|
|
13
|
+
- [Guía de instalación en ruso](./INSTALL.ru.md)
|
|
14
|
+
- [README en inglés](./README.md)
|
|
15
|
+
- [README en chino](./README.zh.md)
|
|
16
|
+
- [README en japonés](./README.ja.md)
|
|
17
|
+
- [README en coreano](./README.ko.md)
|
|
18
|
+
- [README en español](./README.es.md)
|
|
19
|
+
- [README en francés](./README.fr.md)
|
|
20
|
+
- [README en alemán](./README.de.md)
|
|
21
|
+
- [README en italiano](./README.it.md)
|
|
22
|
+
- [README en ruso](./README.ru.md)
|
|
23
|
+
- [Registro de cambios](./CHANGELOG.md)
|
|
24
|
+
- [Registro de cambios en japonés](./CHANGELOG.ja.md)
|
|
25
|
+
- [Registro de cambios en coreano](./CHANGELOG.ko.md)
|
|
26
|
+
- [Registro de cambios en español](./CHANGELOG.es.md)
|
|
27
|
+
- [Registro de cambios en francés](./CHANGELOG.fr.md)
|
|
28
|
+
- [Registro de cambios en alemán](./CHANGELOG.de.md)
|
|
29
|
+
- [Registro de cambios en italiano](./CHANGELOG.it.md)
|
|
30
|
+
- [Registro de cambios en ruso](./CHANGELOG.ru.md)
|
|
31
|
+
|
|
32
|
+
Los marcadores de posición de esta guía son:
|
|
33
|
+
|
|
34
|
+
- `<profile>`: el perfil de DSH que hay que modificar, normalmente `web`;
|
|
35
|
+
- `dsh-patch-edit-plus`: el paquete npm, el ID del plugin en tiempo de ejecución y el id de la única fila que inserta el parche del bundle.
|
|
36
|
+
|
|
37
|
+
> **Rango de DSH admitido: de `0.1.0-rc.8` a `0.2.0-rc.2` (desktop incluido) — una única versión, la v0.4.0.**
|
|
38
|
+
>
|
|
39
|
+
> Compruebe primero la versión en ejecución con `dsh --version`.
|
|
40
|
+
>
|
|
41
|
+
> | Versión de DSH | Estado | Notas |
|
|
42
|
+
> | --- | --- | --- |
|
|
43
|
+
> | `0.2.0-rc.1` ~ `0.2.0-rc.2` (desktop incluido) | compatible | Misma v0.4.0. |
|
|
44
|
+
> | `0.1.0-rc.8` ~ `0.1.7-rc.2` | compatible | Misma v0.4.0 — no hay que elegir rama ni dist-tag. |
|
|
45
|
+
>
|
|
46
|
+
> En cualquier línea de host admitida instale `latest`: una sola versión sirve tanto a los 0.1.x como a los 0.2.x. Tras la publicación, los dist-tags `latest`, `dsh-0.2.0`, `dsh-0.1.7`, `dsh-0.1.5` y `dsh-0.1.2` apuntarán todos a 0.4.0.
|
|
47
|
+
|
|
48
|
+
## 0. Requisitos previos y descubrimiento del perfil
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
|
|
52
|
+
dsh --version
|
|
53
|
+
ls "${DSH_HOME:-$HOME/.dsh}/profiles"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Use el perfil que indique su proceso de DSH en ejecución. `web` es habitual, pero el argumento `--profile` activo es lo que manda.
|
|
57
|
+
|
|
58
|
+
## 1. Instalación oficial
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
dsh plugin --profile <profile> add dsh-patch-edit-plus -w
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
(la opción `-w` es obligatoria cuando el perfil es la raíz de un workspace de pnpm, como es el caso de `web`.)
|
|
65
|
+
|
|
66
|
+
Instalar explícitamente una versión concreta:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
dsh plugin --profile <profile> add dsh-patch-edit-plus@0.4.0 -w
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
La CLI oficial actualiza automáticamente la dependencia del perfil, el lockfile y `dsh.profile.bundles`. No añada una fila YAML manual.
|
|
73
|
+
|
|
74
|
+
### Período de enfriamiento de la cadena de suministro
|
|
75
|
+
|
|
76
|
+
El runtime de DSH usa pnpm 11, cuya política `minimumReleaseAge` puede bloquear una versión recién publicada con `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`. Añada la versión a `minimumReleaseAgeExclude` en `~/.dsh/profiles/<profile>/pnpm-workspace.yaml`:
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
minimumReleaseAgeExclude:
|
|
80
|
+
- dsh-patch-edit-plus@0.4.0
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## 2. Reiniciar el host
|
|
84
|
+
|
|
85
|
+
Este es un plugin **solo de host**: registra una herramienta y una sección de ajustes en el host, y no incluye ninguna parte de navegador. Reinicie el proceso host de DSH tras instalar o actualizar; recargar la página no es necesario ni suficiente.
|
|
86
|
+
|
|
87
|
+
## 3. Actualización
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
dsh plugin --profile <profile> update dsh-patch-edit-plus -w
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Reinicie DSH después.
|
|
94
|
+
|
|
95
|
+
## 4. Registro por ruta local / `link:` (alternativa)
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# ~/.dsh/profiles/<profile>/package.json dependencies:
|
|
99
|
+
# "dsh-patch-edit-plus": "link:<absolute path to dsh-patch-edit-plus>"
|
|
100
|
+
# ~/.dsh/profiles/<profile>/cordis.patch.yml:
|
|
101
|
+
# - insert:
|
|
102
|
+
# - id: dsh-patch-edit-plus
|
|
103
|
+
# name: dsh-patch-edit-plus
|
|
104
|
+
cd ~/.dsh/profiles/<profile> && pnpm install && dsh web
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
O use la CLI oficial con una ruta local (sin necesidad de red):
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
dsh plugin --profile <profile> add /absolute/path/to/dsh-patch-edit-plus -w
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
La compilación desde un checkout del código fuente usa estos scripts:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm install
|
|
117
|
+
npm run build # tsc -p tsconfig.build.json → lib/ + lib/types/
|
|
118
|
+
npm run typecheck # tsc -p tsconfig.json
|
|
119
|
+
npm run verify:source # source-level assertions
|
|
120
|
+
npm run test # vitest run
|
|
121
|
+
npm run smoke # _smoke/load-smoke.mjs
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`lib/` no se sube al repositorio, así que un checkout del código fuente debe compilarse antes de poder registrarse por ruta. La publicación lo compila automáticamente mediante el hook `prepublishOnly`, de modo que el tarball publicado siempre contiene la salida compilada.
|
|
125
|
+
|
|
126
|
+
## 5. Verificar la instalación
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
grep -n "dsh-patch-edit-plus" \
|
|
130
|
+
"${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
|
|
131
|
+
node -p "require('${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/node_modules/dsh-patch-edit-plus/package.json').version"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Compruebe la composición oficial:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
dsh --profile <profile> --dump-default-config
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Debe contener:
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
- id: dsh-patch-edit-plus
|
|
144
|
+
name: dsh-patch-edit-plus
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 6. Verificar el plugin
|
|
148
|
+
|
|
149
|
+
Tras el reinicio, confirme en una sesión:
|
|
150
|
+
|
|
151
|
+
1. La herramienta `apply_patch` está disponible para el modelo.
|
|
152
|
+
2. Un parche en diff unificado se aplica y el contenido del archivo coincide exactamente con el diff.
|
|
153
|
+
3. Un parche que no supera la verificación deja el workspace intacto — el motor verifica todo en modo de solo lectura antes de escribir nada.
|
|
154
|
+
4. Un parche estilo Codex con `allowCodexPatch` desactivado devuelve una pista accionable que indica al modelo cómo activar el estilo o reintentar en diff unificado, en lugar de un error genérico de análisis.
|
|
155
|
+
|
|
156
|
+
Si otro plugin ya proporciona una herramienta llamada `apply_patch`, la política de conflictos de tres niveles (`rename` por defecto, o `skip` / `fail`) decide el resultado. Con el `rename` por defecto, el arranque de DSH no se ve afectado y la herramienta se registra con un nombre con sufijo.
|
|
157
|
+
|
|
158
|
+
## 7. Solución de problemas
|
|
159
|
+
|
|
160
|
+
| Síntoma | Acción |
|
|
161
|
+
| --- | --- |
|
|
162
|
+
| `dsh` no se encuentra | Instale o habilite la CLI oficial de DSH. |
|
|
163
|
+
| `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | Añada la versión a `minimumReleaseAgeExclude` en el `pnpm-workspace.yaml` del perfil. |
|
|
164
|
+
| `apply_patch` no aparece | Reinicie el proceso host y vuelva a comprobar la fila de la composición. |
|
|
165
|
+
| Choque de nombre de herramienta con otro proveedor de `apply_patch` | Fije la política de conflictos en `rename` (por defecto), `skip` o `fail`, según el README. |
|
|
166
|
+
| Sintaxis de Codex rechazada | Active `allowCodexPatch: true` o reenvíe el cambio como diff unificado. |
|
|
167
|
+
| Hunk que no coincide | Lea el diagnóstico de cuatro elementos (archivo + índice del hunk, origen de la búsqueda, vista previa esperada, extracto real) y reenvíe el hunk con un contexto coincidente. |
|
|
168
|
+
|
|
169
|
+
## 8. Desinstalación
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
dsh plugin --profile <profile> remove dsh-patch-edit-plus
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Reinicie DSH después.
|
|
176
|
+
|
|
177
|
+
## Licencia
|
|
178
|
+
|
|
179
|
+
MIT
|
package/INSTALL.fr.md
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# Guide d'installation (CLI DSH officiel)
|
|
2
|
+
|
|
3
|
+
Ce guide n'utilise que la commande officielle DSH `dsh plugin`. Cette commande installe la dépendance dans un profil et synchronise `dsh.profile.bundles`. Ne la remplacez pas par un simple `npm install`, un `pnpm add` direct dans le profil, ou des modifications manuelles du manifeste du profil.
|
|
4
|
+
|
|
5
|
+
- [Guide d'installation en anglais](./INSTALL.md)
|
|
6
|
+
- [Guide d'installation en chinois](./INSTALL.zh.md)
|
|
7
|
+
- [Guide d'installation en japonais](./INSTALL.ja.md)
|
|
8
|
+
- [Guide d'installation en coréen](./INSTALL.ko.md)
|
|
9
|
+
- [Guide d'installation en français](./INSTALL.fr.md)
|
|
10
|
+
- [Guide d'installation en allemand](./INSTALL.de.md)
|
|
11
|
+
- [Guide d'installation en italien](./INSTALL.it.md)
|
|
12
|
+
- [Guide d'installation en russe](./INSTALL.ru.md)
|
|
13
|
+
- [Guide d'installation en espagnol](./INSTALL.es.md)
|
|
14
|
+
- [README en anglais](./README.md)
|
|
15
|
+
- [README en chinois](./README.zh.md)
|
|
16
|
+
- [README en japonais](./README.ja.md)
|
|
17
|
+
- [README en coréen](./README.ko.md)
|
|
18
|
+
- [README en français](./README.fr.md)
|
|
19
|
+
- [README en allemand](./README.de.md)
|
|
20
|
+
- [README en italien](./README.it.md)
|
|
21
|
+
- [README en russe](./README.ru.md)
|
|
22
|
+
- [README en espagnol](./README.es.md)
|
|
23
|
+
- [Changelog](./CHANGELOG.md)
|
|
24
|
+
- [Changelog en japonais](./CHANGELOG.ja.md)
|
|
25
|
+
- [Changelog en coréen](./CHANGELOG.ko.md)
|
|
26
|
+
- [Changelog en français](./CHANGELOG.fr.md)
|
|
27
|
+
- [Changelog en allemand](./CHANGELOG.de.md)
|
|
28
|
+
- [Changelog en italien](./CHANGELOG.it.md)
|
|
29
|
+
- [Changelog en russe](./CHANGELOG.ru.md)
|
|
30
|
+
- [Changelog en espagnol](./CHANGELOG.es.md)
|
|
31
|
+
|
|
32
|
+
Les espaces réservés de ce guide sont :
|
|
33
|
+
|
|
34
|
+
- `<profile>` : le profil DSH à modifier, généralement `web` ;
|
|
35
|
+
- `dsh-patch-edit-plus` : le paquet npm, l'identifiant du plugin à l'exécution, et l'id de l'unique ligne insérée par le patch de bundle.
|
|
36
|
+
|
|
37
|
+
> **Plage de DSH prise en charge : de `0.1.0-rc.8` à `0.2.0-rc.2` (desktop inclus) — une version unique, la v0.4.0.**
|
|
38
|
+
>
|
|
39
|
+
> Vérifiez d'abord la version en cours avec `dsh --version`.
|
|
40
|
+
>
|
|
41
|
+
> | Version de DSH | Statut | Notes |
|
|
42
|
+
> | --- | --- | --- |
|
|
43
|
+
> | `0.2.0-rc.1` ~ `0.2.0-rc.2` (desktop inclus) | pris en charge | Même v0.4.0. |
|
|
44
|
+
> | `0.1.0-rc.8` ~ `0.1.7-rc.2` | pris en charge | Même v0.4.0 — aucun choix de branche ni de dist-tag n'est nécessaire. |
|
|
45
|
+
>
|
|
46
|
+
> Sur toute ligne d'hôte prise en charge, installez `latest` : une seule version sert aussi bien les 0.1.x que les 0.2.x. Après publication, les dist-tags `latest`, `dsh-0.2.0`, `dsh-0.1.7`, `dsh-0.1.5` et `dsh-0.1.2` pointeront tous vers 0.4.0.
|
|
47
|
+
|
|
48
|
+
## 0. Prérequis et découverte du profil
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
|
|
52
|
+
dsh --version
|
|
53
|
+
ls "${DSH_HOME:-$HOME/.dsh}/profiles"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Utilisez le profil nommé par votre processus DSH en cours d'exécution. `web` est courant, mais c'est l'argument `--profile` actif qui fait foi.
|
|
57
|
+
|
|
58
|
+
## 1. Installation officielle
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
dsh plugin --profile <profile> add dsh-patch-edit-plus -w
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
(le drapeau `-w` est requis quand le profil est une racine d'espace de travail pnpm, comme c'est le cas de `web`.)
|
|
65
|
+
|
|
66
|
+
Pour installer explicitement une version précise :
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
dsh plugin --profile <profile> add dsh-patch-edit-plus@0.4.0 -w
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
La CLI officielle met à jour automatiquement la dépendance du profil, le lockfile et `dsh.profile.bundles`. N'ajoutez pas de ligne YAML manuelle.
|
|
73
|
+
|
|
74
|
+
### Période de refroidissement de la chaîne d'approvisionnement
|
|
75
|
+
|
|
76
|
+
Le runtime DSH utilise pnpm 11, dont la politique `minimumReleaseAge` peut bloquer une version tout juste publiée avec `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`. Ajoutez la version à `minimumReleaseAgeExclude` dans `~/.dsh/profiles/<profile>/pnpm-workspace.yaml` :
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
minimumReleaseAgeExclude:
|
|
80
|
+
- dsh-patch-edit-plus@0.4.0
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## 2. Redémarrer l'hôte
|
|
84
|
+
|
|
85
|
+
C'est un plugin **réservé à l'hôte** : il enregistre un outil et une section de paramètres sur l'hôte, et n'embarque aucune partie navigateur. Redémarrez le processus hôte DSH après chaque installation ou mise à niveau ; rafraîchir la page n'est ni nécessaire ni suffisant.
|
|
86
|
+
|
|
87
|
+
## 3. Mise à niveau
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
dsh plugin --profile <profile> update dsh-patch-edit-plus -w
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Redémarrez DSH ensuite.
|
|
94
|
+
|
|
95
|
+
## 4. Enregistrement par chemin local / `link:` (alternative)
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# ~/.dsh/profiles/<profile>/package.json dependencies:
|
|
99
|
+
# "dsh-patch-edit-plus": "link:<absolute path to dsh-patch-edit-plus>"
|
|
100
|
+
# ~/.dsh/profiles/<profile>/cordis.patch.yml:
|
|
101
|
+
# - insert:
|
|
102
|
+
# - id: dsh-patch-edit-plus
|
|
103
|
+
# name: dsh-patch-edit-plus
|
|
104
|
+
cd ~/.dsh/profiles/<profile> && pnpm install && dsh web
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Ou utilisez la CLI officielle avec un chemin local (aucun réseau requis) :
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
dsh plugin --profile <profile> add /absolute/path/to/dsh-patch-edit-plus -w
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
La construction depuis un checkout des sources utilise ces scripts :
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm install
|
|
117
|
+
npm run build # tsc -p tsconfig.build.json → lib/ + lib/types/
|
|
118
|
+
npm run typecheck # tsc -p tsconfig.json
|
|
119
|
+
npm run verify:source # source-level assertions
|
|
120
|
+
npm run test # vitest run
|
|
121
|
+
npm run smoke # _smoke/load-smoke.mjs
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`lib/` n'est pas versionné ; un checkout des sources doit donc être construit avant de pouvoir être enregistré par chemin. La publication le construit automatiquement via le hook `prepublishOnly`, si bien que le tarball publié contient toujours la sortie compilée.
|
|
125
|
+
|
|
126
|
+
## 5. Vérifier l'installation
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
grep -n "dsh-patch-edit-plus" \
|
|
130
|
+
"${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
|
|
131
|
+
node -p "require('${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/node_modules/dsh-patch-edit-plus/package.json').version"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Vérifiez la composition officielle :
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
dsh --profile <profile> --dump-default-config
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Elle doit contenir :
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
- id: dsh-patch-edit-plus
|
|
144
|
+
name: dsh-patch-edit-plus
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 6. Vérifier le plugin
|
|
148
|
+
|
|
149
|
+
Après le redémarrage, confirmez dans une session :
|
|
150
|
+
|
|
151
|
+
1. L'outil `apply_patch` est disponible pour le modèle.
|
|
152
|
+
2. Un patch en diff unifié s'applique, et le contenu du fichier correspond exactement au diff.
|
|
153
|
+
3. Un patch qui échoue à la vérification laisse l'espace de travail intact — le moteur vérifie tout en lecture seule avant d'écrire quoi que ce soit.
|
|
154
|
+
4. Un patch de style Codex reçu alors que `allowCodexPatch` est désactivé renvoie une aide actionnable indiquant au modèle comment activer ce style ou réessayer en diff unifié, plutôt qu'une erreur d'analyse générique.
|
|
155
|
+
|
|
156
|
+
Si un autre plugin fournit déjà un outil nommé `apply_patch`, la politique de conflit à trois niveaux (`rename` par défaut, ou `skip` / `fail`) décide de l'issue. Avec le `rename` par défaut, le démarrage de DSH n'est pas affecté et l'outil est enregistré sous un nom suffixé.
|
|
157
|
+
|
|
158
|
+
## 7. Dépannage
|
|
159
|
+
|
|
160
|
+
| Symptôme | Action |
|
|
161
|
+
| --- | --- |
|
|
162
|
+
| `dsh` est introuvable | Installez ou activez la CLI DSH officielle. |
|
|
163
|
+
| `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | Ajoutez la version à `minimumReleaseAgeExclude` dans le `pnpm-workspace.yaml` du profil. |
|
|
164
|
+
| `apply_patch` n'apparaît pas | Redémarrez le processus hôte et revérifiez la ligne de composition. |
|
|
165
|
+
| Conflit de nom d'outil avec un autre fournisseur d'`apply_patch` | Réglez la politique de conflit sur `rename` (défaut), `skip` ou `fail` selon le README. |
|
|
166
|
+
| Syntaxe Codex rejetée | Activez `allowCodexPatch: true`, ou renvoyez la modification sous forme de diff unifié. |
|
|
167
|
+
| Hunk non correspondant | Lisez le diagnostic à quatre éléments (fichier + index du hunk, origine de recherche, aperçu attendu, extrait réel) et réémettez le hunk avec un contexte correspondant. |
|
|
168
|
+
|
|
169
|
+
## 8. Suppression
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
dsh plugin --profile <profile> remove dsh-patch-edit-plus
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Redémarrez DSH ensuite.
|
|
176
|
+
|
|
177
|
+
## Licence
|
|
178
|
+
|
|
179
|
+
MIT
|