patchy-cli 0.0.6-pr.160.51e2c7a → 0.0.6-pr.167.3fcaa8b

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.
Files changed (3) hide show
  1. package/README.md +22 -21
  2. package/package.json +6 -6
  3. package/schema.json +2 -2
package/README.md CHANGED
@@ -42,10 +42,10 @@ Create a folder for the fork: `mkdir spoon-knife-fork && cd spoon-knife-fork`
42
42
  `patchy init` creates your config: `./patchy.json` ([full reference](#patchyjson-reference))
43
43
  ```json5
44
44
  {
45
- "repo_url": "https://github.com/octocat/spoon-knife",
45
+ "source_repo": "https://github.com/octocat/spoon-knife",
46
46
  "patches_dir": "./patches/",
47
47
  "clones_dir": "./clones/",
48
- "repo_dir": "spoon-knife",
48
+ "target_repo": "spoon-knife",
49
49
  "ref": "main"
50
50
  }
51
51
  ```
@@ -154,18 +154,19 @@ patchy init
154
154
 
155
155
  ```jsonc
156
156
  {
157
- // Git URL to clone from.
158
- "repo_url": "https://github.com/example/repo.git", // Override: --repo-url | env: PATCHY_REPO_URL
159
-
160
- // Path to repo you're generating patches from or applying patches to.
161
- "repo_dir": "~/repos/repo", // Override: --repo-dir | env: PATCHY_REPO_DIR
162
-
157
+ // Git URL or local file path to clone from.
158
+ "source_repo": "https://github.com/example/repo.git", // Override: --source-repo | env: PATCHY_SOURCE_REPO
163
159
  // Directory containing patch files.
164
160
  "patches_dir": "./patches/", // Override: --patches-dir | env: PATCHY_PATCHES_DIR
165
161
 
166
- // Parent directory for cloning repos. You can easily clone more repos here from repo_url.
162
+ // Default directory for cloning repos.
167
163
  "clones_dir": "./clones/", // Override: --clones-dir | env: PATCHY_CLONES_DIR
168
164
 
165
+ // Path to repo you're generating patches from or applying patches to.
166
+ // Can be relative to clones_dir: <clones_dir>/<target_repo> or absolute.
167
+ "target_repo": "repo", // Override: --target-repo | env: PATCHY_TARGET_REPO
168
+
169
+
169
170
  // Git ref to checkout (branch, tag, SHA).
170
171
  "ref": "main" // Override: --ref | env: PATCHY_REF
171
172
  }
@@ -176,7 +177,7 @@ Precedence: CLI flags > Environment variables > `patchy.json`
176
177
 
177
178
  ## Patch file layout
178
179
 
179
- The `patches/` directory (customizable via [`patches_dir`](#patchyjson-reference)) uses the same folder structure as `repo_dir`:
180
+ The `patches/` directory (customizable via [`patches_dir`](#patchyjson-reference)) uses the same folder structure as `target_repo`:
180
181
 
181
182
  ```
182
183
  ./
@@ -194,50 +195,50 @@ The `patches/` directory (customizable via [`patches_dir`](#patchyjson-reference
194
195
  - **`.diff` files** — For modified existing files (generated via `git diff HEAD`)
195
196
  - **Plain files** — For newly added files (copied verbatim for easier inspection and editing)
196
197
 
197
- `patchy generate` automatically removes stale files in `patches/` that no longer correspond to changes in `repo_dir`.
198
+ `patchy generate` automatically removes stale files in `patches/` that no longer correspond to changes in `target_repo`.
198
199
 
199
200
  ## Commands
200
201
 
201
202
  ### `patchy generate`
202
203
 
203
- Generate `.diff` files and new files into `./patches/` based on current `git diff` in `repo_dir`.
204
+ Generate `.diff` files and new files into `./patches/` based on current `git diff` in `target_repo`.
204
205
 
205
206
  ```sh
206
- patchy generate [--repo-dir] [--patches-dir] [--dry-run]
207
+ patchy generate [--target-repo] [--patches-dir] [--dry-run]
207
208
  ```
208
209
 
209
210
  Note: `patchy generate` is destructive and will remove any unneeded files in your `./patches/` folder.
210
211
 
211
212
  ### `patchy apply`
212
213
 
213
- Apply patch files from `patches/` into `repo_dir`.
214
+ Apply patch files from `patches/` into `target_repo`.
214
215
 
215
216
  ```sh
216
- patchy apply [--repo-dir] [--patches-dir] [--dry-run]
217
+ patchy apply [--target-repo] [--patches-dir] [--dry-run]
217
218
  ```
218
219
 
219
220
  ### `patchy repo reset`
220
221
 
221
- Hard reset the Git working tree of `repo_dir`. Discards local changes.
222
+ Hard reset the Git working tree of `target_repo`. Discards local changes.
222
223
 
223
224
  ```sh
224
- patchy repo reset [--repo-dir]
225
+ patchy repo reset [--target-repo]
225
226
  ```
226
227
 
227
228
  ### `patchy repo checkout --ref <git-ref>`
228
229
 
229
- Check out a specific Git ref (branch, tag, or SHA) in `repo_dir`.
230
+ Check out a specific Git ref (branch, tag, or SHA) in `target_repo`.
230
231
 
231
232
  ```sh
232
- patchy repo checkout --ref main [--repo-dir]
233
+ patchy repo checkout --ref main [--target-repo]
233
234
  ```
234
235
 
235
- ### `patchy repo clone --url <git-url>`
236
+ ### `patchy repo clone`
236
237
 
237
238
  Clone a repository into a subdirectory of `clones_dir`. The target directory is derived from the repo name.
238
239
 
239
240
  ```sh
240
- patchy repo clone [--clones-dir] [--ref] [--repo-url]
241
+ patchy repo clone [--source-repo] [--clones-dir] [--ref]
241
242
  ```
242
243
 
243
244
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchy-cli",
3
- "version": "0.0.6-pr.160.51e2c7a",
3
+ "version": "0.0.6-pr.167.3fcaa8b",
4
4
  "description": "A CLI tool for managing Git patch workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -62,11 +62,11 @@
62
62
  "url": "https://github.com/richardgill/patchy"
63
63
  },
64
64
  "optionalDependencies": {
65
- "patchy-cli-linux-x64": "0.0.6-pr.160.51e2c7a",
66
- "patchy-cli-linux-arm64": "0.0.6-pr.160.51e2c7a",
67
- "patchy-cli-darwin-x64": "0.0.6-pr.160.51e2c7a",
68
- "patchy-cli-darwin-arm64": "0.0.6-pr.160.51e2c7a",
69
- "patchy-cli-windows-x64": "0.0.6-pr.160.51e2c7a"
65
+ "patchy-cli-linux-x64": "0.0.6-pr.167.3fcaa8b",
66
+ "patchy-cli-linux-arm64": "0.0.6-pr.167.3fcaa8b",
67
+ "patchy-cli-darwin-x64": "0.0.6-pr.167.3fcaa8b",
68
+ "patchy-cli-darwin-arm64": "0.0.6-pr.167.3fcaa8b",
69
+ "patchy-cli-windows-x64": "0.0.6-pr.167.3fcaa8b"
70
70
  },
71
71
  "publishConfig": {
72
72
  "access": "public"
package/schema.json CHANGED
@@ -4,10 +4,10 @@
4
4
  "$schema": "https://json-schema.org/draft/2020-12/schema",
5
5
  "type": "object",
6
6
  "properties": {
7
- "repo_url": {
7
+ "source_repo": {
8
8
  "type": "string"
9
9
  },
10
- "repo_dir": {
10
+ "target_repo": {
11
11
  "type": "string"
12
12
  },
13
13
  "clones_dir": {