Skip to content

Commit 92527d1

Browse files
Merge pull request #71 from NerioVillalobos/codex/add-metadelta-finddelta-command-0w42vf
Add `finddelta` command to generate Core/Vlocity delta manifests and bump version to 0.9.9
2 parents feb3770 + 1fb52b0 commit 92527d1

3 files changed

Lines changed: 82 additions & 8 deletions

File tree

README.md

Lines changed: 79 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
> **Last update / Última actualización:** 2026-03-06 — `@nervill/metadelta` 0.9.8
1+
> **Last update / Última actualización:** 2026-03-06 — `@nervill/metadelta` 0.9.9
22
33
# Metadelta Salesforce CLI Plugin
44

@@ -7,9 +7,10 @@
77

88
## English
99

10-
Metadelta is a custom Salesforce CLI plugin that offers eight complementary workflows:
10+
Metadelta is a custom Salesforce CLI plugin that offers ten complementary workflows:
1111

1212
* `sf metadelta find` inspects a target org and reports metadata components modified by a specific user within a recent time window, optionally generating manifest files for deployment or Vlocity datapack migration. When it writes `package.xml`, the command stamps the file with the API version detected from the target org.
13+
* `sf metadelta finddelta` compares two Git branches and generates delta manifests under `manifest/` for Salesforce Core (`.xml`) and Vlocity (`.yaml`), including destructive manifests when deletions are detected. It can also merge missing components into existing manifests with `--xml` and `--yaml` without duplicating entries.
1314
* `sf metadelta findtest` reviews Apex classes inside a local SFDX project, confirms the presence of their corresponding test classes, and can validate existing `package.xml` manifests prior to a deployment. Generated or updated manifests inherit the API version reported by the target org when available.
1415
* `sf metadelta manual collect` aggregates manual-step markdown documents stored under `docs/`, renders a consolidated index/banner per story, and offers a sprint-aware mode that only includes the files still pending merge into the base branch.
1516
* `sf metadelta merge` scans manifest XML files whose names contain a given substring, deduplicates their metadata members, and builds a consolidated `globalpackage.xml` (or a custom output filename).
@@ -25,6 +26,7 @@ Created by **Nerio Villalobos** (<nervill@gmail.com>).
2526

2627
- [Installation](#installation)
2728
- [`sf metadelta find`](#usage)
29+
- [`sf metadelta finddelta`](#finddelta-command)
2830
- [`sf metadelta cleanps`](#cleanps-command)
2931
- [`sf metadelta findtest`](#findtest-command)
3032
- [`sf metadelta manual collect`](#manual-collect-command)
@@ -44,7 +46,7 @@ Created by **Nerio Villalobos** (<nervill@gmail.com>).
4446
```bash
4547
sf plugins install github:NerioVillalobos/plugin-metadelta.git
4648
```
47-
Confirm installation with `sf plugins`, which should list `@nervill/metadelta 0.9.8`.
49+
Confirm installation with `sf plugins`, which should list `@nervill/metadelta 0.9.9`.
4850

4951
3. (Optional, for local development) Clone this repository and install dependencies:
5052
```bash
@@ -56,7 +58,7 @@ Created by **Nerio Villalobos** (<nervill@gmail.com>).
5658
```bash
5759
sf plugins link .
5860
```
59-
Confirm installation with `sf plugins`, which should list `@nervill/metadelta 0.9.8 (link)`.
61+
Confirm installation with `sf plugins`, which should list `@nervill/metadelta 0.9.9 (link)`.
6062

6163
### Usage
6264

@@ -132,6 +134,41 @@ sf metadelta find --org myOrg --metafile ./mismetadatos.json
132134
sf metadelta find --org myOrg --namespace myns --yaml
133135
```
134136

137+
138+
### `finddelta` command
139+
140+
Generate delta manifests by comparing two branches:
141+
142+
```bash
143+
sf metadelta finddelta --from <source_branch> --to <base_branch> [--xml manifest/Release.xml] [--yaml manifest/vlocity.yaml]
144+
```
145+
146+
What it does:
147+
148+
1. Runs `git diff --name-status <to>..<from>` to detect additions, deletions, and renames.
149+
2. Generates Core and Vlocity delta manifests under `manifest/` using the `from` branch as the output name.
150+
3. Creates destructive manifests automatically when deletions exist.
151+
4. If `--xml` and/or `--yaml` are provided, merges only missing components into the destination manifests (no duplicates).
152+
153+
Core outputs:
154+
155+
- `manifest/<from>.xml`
156+
- `manifest/Destructive-<from>.xml` (only when needed)
157+
158+
Vlocity outputs:
159+
160+
- `manifest/<from>.yaml`
161+
- `manifest/Destructive-<from>.yaml` (only when needed)
162+
163+
Flags:
164+
165+
| Flag | Description |
166+
|------|-------------|
167+
| `--from` | **Required.** Source branch (typically the PR branch). |
168+
| `--to` | **Required.** Base branch for comparison. |
169+
| `--xml` | Existing destination `package.xml` to update with missing Core components. |
170+
| `--yaml` | Existing destination YAML manifest to update with missing Vlocity components. |
171+
135172
### `postvalidate` command
136173

137174
Validates a deployment by re‑retrieving the manifests you used (XML for Salesforce Core and/or YAML for Vlocity) into a temporary folder, comparing the downloaded files against your local sources, and rendering a colorized `Component | Name | Diff` table with `` for matches and `` for differences.
@@ -511,9 +548,10 @@ This project is released under the [ISC License](LICENSE).
511548
512549
## Español
513550
514-
Metadelta es un plugin personalizado de Salesforce CLI que ofrece ocho flujos complementarios:
551+
Metadelta es un plugin personalizado de Salesforce CLI que ofrece diez flujos complementarios:
515552
516553
* `sf metadelta find` inspecciona una org de destino y reporta los componentes de metadatos modificados por un usuario específico durante un rango de tiempo reciente, generando opcionalmente manifiestos para despliegues o migraciones de paquetes de Vlocity. Al crear `package.xml`, la versión del manifiesto coincide con la versión de API detectada en la org de destino.
554+
* `sf metadelta finddelta` compara dos ramas Git y genera manifiestos delta en `manifest/` para Salesforce Core (`.xml`) y Vlocity (`.yaml`), incluyendo manifiestos destructivos cuando detecta eliminaciones. También puede fusionar componentes faltantes en manifiestos existentes con `--xml` y `--yaml` sin duplicar entradas.
517555
* `sf metadelta findtest` revisa las clases Apex dentro de un proyecto SFDX local, confirma la presencia de sus clases de prueba correspondientes y puede validar `package.xml` existentes antes de un despliegue. Los manifiestos generados o actualizados usan la versión de API que reporte la org de destino cuando esté disponible.
518556
* `sf metadelta manual collect` consolida los documentos de pasos manuales almacenados en `docs/`, agrega índice y banner informativo y ofrece un modo parcial que solo incluye los archivos aún pendientes de merge en la rama base.
519557
* `sf metadelta merge` busca archivos de manifiesto cuyos nombres contengan una subcadena específica, unifica sus miembros de metadatos sin duplicados y construye un `globalpackage.xml` consolidado (o el nombre de archivo que indiques).
@@ -529,6 +567,7 @@ Creado por **Nerio Villalobos** (<nervill@gmail.com>).
529567
530568
- [Instalación](#instalación)
531569
- [`sf metadelta find`](#uso)
570+
- [`sf metadelta finddelta`](#comando-finddelta)
532571
- [`sf metadelta cleanps`](#comando-cleanps)
533572
- [`sf metadelta findtest`](#comando-findtest)
534573
- [`sf metadelta manual collect`](#comando-manual-collect)
@@ -630,6 +669,41 @@ sf metadelta find --org miOrg --metafile ./mismetadatos.json
630669
sf metadelta find --org miOrg --namespace miNS --yaml
631670
```
632671
672+
673+
### Comando `finddelta`
674+
675+
Genera manifiestos delta comparando dos ramas:
676+
677+
```bash
678+
sf metadelta finddelta --from <rama_fuente> --to <rama_base> [--xml manifest/Release.xml] [--yaml manifest/vlocity.yaml]
679+
```
680+
681+
Qué hace:
682+
683+
1. Ejecuta `git diff --name-status <to>..<from>` para detectar adiciones, eliminaciones y renombrados.
684+
2. Genera manifiestos delta Core y Vlocity en `manifest/` usando la rama `from` en el nombre de salida.
685+
3. Crea manifiestos destructivos automáticamente cuando existen eliminaciones.
686+
4. Si indicas `--xml` y/o `--yaml`, fusiona solo los componentes faltantes en los manifiestos destino (sin duplicados).
687+
688+
Salidas Core:
689+
690+
- `manifest/<from>.xml`
691+
- `manifest/Destructive-<from>.xml` (solo cuando corresponde)
692+
693+
Salidas Vlocity:
694+
695+
- `manifest/<from>.yaml`
696+
- `manifest/Destructive-<from>.yaml` (solo cuando corresponde)
697+
698+
Banderas:
699+
700+
| Bandera | Descripción |
701+
|---------|-------------|
702+
| `--from` | **Requerida.** Rama fuente (normalmente la rama del PR). |
703+
| `--to` | **Requerida.** Rama base para la comparación. |
704+
| `--xml` | `package.xml` destino existente para incorporar componentes Core faltantes. |
705+
| `--yaml` | YAML destino existente para incorporar componentes Vlocity faltantes. |
706+
633707
### Comando `access`
634708
635709
Metadelta Access es una **herramienta de replicación de accesos de orgs (Org Access Replication Tool)** con controles de seguridad aplicados. Automatiza un proceso que antes era manual para exportar aliases, proteger auth URLs y restaurar accesos entre equipos usando MFA + cifrado con passphrase.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nervill/metadelta",
3-
"version": "0.9.8",
3+
"version": "0.9.9",
44
"description": "Salesforce CLI plugin to find recent metadata changes in an org",
55
"type": "module",
66
"main": "lib/index.js",

0 commit comments

Comments
 (0)