lambda-watcher 0.3.0__tar.gz → 0.4.1__tar.gz
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.
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/PKG-INFO +24 -11
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/README.md +23 -10
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/pyproject.toml +1 -1
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/__init__.py +1 -1
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/cli.py +819 -155
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/config.py +204 -8
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/db.py +7 -0
- lambda_watcher-0.4.1/src/lambda_watcher/demo.py +289 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/diffing/__init__.py +2 -2
- lambda_watcher-0.4.1/src/lambda_watcher/diffing/build.py +153 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/diffing/render_html.py +95 -0
- lambda_watcher-0.4.1/src/lambda_watcher/heartbeat.py +119 -0
- lambda_watcher-0.4.1/src/lambda_watcher/helptext.py +564 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/ingest.py +22 -1
- lambda_watcher-0.4.1/src/lambda_watcher/reindex.py +366 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/service.py +8 -4
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/store.py +89 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/templates.py +21 -5
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/utils.py +14 -1
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/watcher.py +155 -6
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher.egg-info/PKG-INFO +24 -11
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher.egg-info/SOURCES.txt +7 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/tests/test_cli.py +379 -2
- lambda_watcher-0.4.1/tests/test_config.py +163 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/tests/test_diff.py +53 -1
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/tests/test_docs.py +85 -3
- lambda_watcher-0.4.1/tests/test_heartbeat.py +64 -0
- lambda_watcher-0.4.1/tests/test_helptext.py +70 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/tests/test_ingest.py +15 -0
- lambda_watcher-0.4.1/tests/test_reindex.py +267 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/tests/test_service.py +3 -3
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/tests/test_watcher.py +138 -0
- lambda_watcher-0.3.0/src/lambda_watcher/diffing/build.py +0 -51
- lambda_watcher-0.3.0/src/lambda_watcher/reindex.py +0 -182
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/LICENSE +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/setup.cfg +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/__main__.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/analysis/__init__.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/analysis/deps.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/analysis/envvars.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/analysis/handler.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/analysis/inventory.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/analysis/runtime.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/analysis/secrets.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/analysis/services.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/diffing/compare.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/diffing/highlight.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/diffing/icons.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/diffing/intraline.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/diffing/render_text.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/extract.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/gitmirror.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/identify.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher/notify.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher.egg-info/dependency_links.txt +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher.egg-info/entry_points.txt +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher.egg-info/requires.txt +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/src/lambda_watcher.egg-info/top_level.txt +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/tests/test_analysis.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/tests/test_extract.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/tests/test_identify.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/tests/test_no_window.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/tests/test_render_html.py +0 -0
- {lambda_watcher-0.3.0 → lambda_watcher-0.4.1}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lambda-watcher
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Watch your Downloads folder for AWS Lambda deployment zips, archive them as versions, analyse them, and diff any two versions.
|
|
5
5
|
Author: Lambda Watcher contributors
|
|
6
6
|
License: Apache-2.0
|
|
@@ -45,7 +45,7 @@ to how you work. You keep downloading zips; it does the rest.
|
|
|
45
45
|
|
|
46
46
|
```
|
|
47
47
|
$ lambda-watcher watch
|
|
48
|
-
lambda-watcher 0.
|
|
48
|
+
lambda-watcher 0.3.0 — archiving into ~/.lambda-watcher
|
|
49
49
|
watching ~/Downloads. Press Ctrl-C to stop.
|
|
50
50
|
new order-processor v0001 order-processor.zip — archived a new version
|
|
51
51
|
new order-processor v0002 order-processor (1).zip — 2 added, 2 modified, 9 renamed, 55 vendored
|
|
@@ -85,7 +85,8 @@ Then you review:
|
|
|
85
85
|
lw diff order-processor # last two versions, in the terminal
|
|
86
86
|
lw diff order-processor --from 2 --to 10 # any two versions
|
|
87
87
|
lw diff order-processor --html --open # a shareable HTML report
|
|
88
|
-
lw report order-processor # the whole history,
|
|
88
|
+
lw report order-processor # the whole history, in your browser
|
|
89
|
+
lw report # every function on one page, in your browser
|
|
89
90
|
lw open order-processor # the whole archive, in your editor
|
|
90
91
|
lw git order-processor log -p # or just use git
|
|
91
92
|
```
|
|
@@ -215,9 +216,16 @@ lw # is it running, and what has it caught?
|
|
|
215
216
|
lw diff order-processor # what changed in the last version
|
|
216
217
|
```
|
|
217
218
|
|
|
219
|
+
Nothing to download yet? `lw demo` runs three downloads of a sample Lambda
|
|
220
|
+
through the real pipeline — in a scratch archive of its own, so nothing
|
|
221
|
+
appears in yours — and shows you the diff and the HTML report it produces.
|
|
222
|
+
`lw --install-completion` teaches your shell to tab-complete function names.
|
|
223
|
+
|
|
218
224
|
Every new version also writes its own comparison to
|
|
219
|
-
`~/.lambda-watcher/reports/<function>/latest.html` as it is archived,
|
|
220
|
-
|
|
225
|
+
`~/.lambda-watcher/reports/<function>/latest.html` as it is archived, and
|
|
226
|
+
rewrites `~/.lambda-watcher/reports/index.html`, which links every function's
|
|
227
|
+
latest change and counts the secrets each one ships. The answer is a bookmark
|
|
228
|
+
rather than a command.
|
|
221
229
|
|
|
222
230
|
<details>
|
|
223
231
|
<summary>Running it by hand, or setting it up piece by piece</summary>
|
|
@@ -227,7 +235,8 @@ lw watch # run in the foreground instead; Ctrl-C stops it
|
|
|
227
235
|
lw start # install and start the background watcher
|
|
228
236
|
lw stop # stop it (--remove also unregisters it)
|
|
229
237
|
lw restart # after editing the config
|
|
230
|
-
lw doctor # check the
|
|
238
|
+
lw doctor # check everything, name the fix for each problem, exit 1 if there is one
|
|
239
|
+
lw logs -f # follow what the watcher is doing right now
|
|
231
240
|
```
|
|
232
241
|
|
|
233
242
|
Already have a folder of old backups? Import them oldest-first so the version
|
|
@@ -251,6 +260,7 @@ the manual recipes.
|
|
|
251
260
|
|---|---|
|
|
252
261
|
| `setup` | Config, background watcher and any history already on disk, in one go. `--no-service` skips the background watcher, `--yes` takes every default. |
|
|
253
262
|
| `status` | Is it running, and what has it archived? Also what bare `lw` prints. |
|
|
263
|
+
| `demo` | See it work on a sample Lambda, in a scratch archive of its own. `--open` opens the report; `--clean` removes it. |
|
|
254
264
|
| `start` / `stop` | Register the background watcher with the OS, or stop it. `stop --remove` unregisters it too. |
|
|
255
265
|
| `restart` | Stop and start it — use after editing the config. |
|
|
256
266
|
| `watch` | Watch the download folders in the foreground. `--once` processes what is already there and exits. |
|
|
@@ -260,7 +270,7 @@ the manual recipes.
|
|
|
260
270
|
| `versions FN` | Every archived version of one function. |
|
|
261
271
|
| `show FN [V]` | Runtime, handler, dependencies, env vars, services and findings for one version. `--files`, `--json`. |
|
|
262
272
|
| `diff FN` | Compare two versions. Defaults to the last two. `--from`/`--to`, `--html`, `--open`, `--vendor`, `--whitespace`, `--no-patch`, `--json`. |
|
|
263
|
-
| `report FN` | Build a browsable HTML history: an index plus a diff for every step. |
|
|
273
|
+
| `report FN` | Build a browsable HTML history: an index plus a diff for every step, opened in your browser. `--no-open` just writes it. |
|
|
264
274
|
| `export FN [V]` | Get a version back out as a deployable zip (`--zip`) or a plain folder (`--tree`). |
|
|
265
275
|
| `open FN [V]` | Open the function's mirror in your editor — every version in one folder, with history. Name a version to open just its files. |
|
|
266
276
|
| `git FN ...` | Run git inside that function's mirror repo: `lw git order-processor log --oneline`. |
|
|
@@ -268,11 +278,13 @@ the manual recipes.
|
|
|
268
278
|
| `merge SRC DST` | Combine two entries that are really the same Lambda, renumbering by archive time. |
|
|
269
279
|
| `label FN V TEXT` | Annotate a version, e.g. `label order-processor 7 "prod deploy 2026-03-01"`. |
|
|
270
280
|
| `search TERM` | Search filenames and dependencies across everything archived. |
|
|
271
|
-
| `log` | Recent activity, including downloads that were skipped and why. |
|
|
281
|
+
| `log` | Recent activity, including downloads that were skipped and why, and when the watcher started and stopped. |
|
|
282
|
+
| `logs` | The watcher's own log file — what it noticed and what it made of it. `-f` follows it, `--service` shows the service manager's output instead. |
|
|
272
283
|
| `path FN [V]` | Print a path, for `cd "$(lw path order-processor 7)"`. |
|
|
273
284
|
| `rm FN` | Delete a function and everything archived for it. |
|
|
274
285
|
| `reindex` | Rebuild the SQLite index from the manifests on disk. |
|
|
275
|
-
| `
|
|
286
|
+
| `init` | Write an annotated config file you can edit. `setup` does this for you; `--force` overwrites. |
|
|
287
|
+
| `doctor` | Check the config, watch folders, the watcher and its heartbeat, git and disk space. Every problem names its fix; exits 1 if there is one, so it works from a cron job. |
|
|
276
288
|
|
|
277
289
|
Version arguments accept `7`, `v7`, `latest`, `first`, or `-1` / `-2` counting
|
|
278
290
|
back from the newest.
|
|
@@ -284,7 +296,7 @@ back from the newest.
|
|
|
284
296
|
├── config.yaml
|
|
285
297
|
├── index.db # rebuildable index (see `reindex`)
|
|
286
298
|
├── logs/watcher.log
|
|
287
|
-
├── reports/ # generated HTML
|
|
299
|
+
├── reports/ # generated HTML; index.html links it all
|
|
288
300
|
├── quarantine/ # archives that failed, with a reason file
|
|
289
301
|
├── repos/
|
|
290
302
|
│ └── order-processor/ # git mirror: one commit per version, tagged v0001…
|
|
@@ -338,7 +350,8 @@ Everything is optional. The settings worth knowing:
|
|
|
338
350
|
watch:
|
|
339
351
|
dirs: ["~/Downloads"] # add more if you download from several places
|
|
340
352
|
stable_seconds: 2.0 # how long a file must stop changing before it is read
|
|
341
|
-
force_polling: false # turn on for network shares
|
|
353
|
+
force_polling: false # turn on for network shares and VM mounts
|
|
354
|
+
# (WSL is detected and polled without this)
|
|
342
355
|
arrival_max_age_seconds: 300 # ignore "modified" events for files older than this
|
|
343
356
|
|
|
344
357
|
store:
|
|
@@ -14,7 +14,7 @@ to how you work. You keep downloading zips; it does the rest.
|
|
|
14
14
|
|
|
15
15
|
```
|
|
16
16
|
$ lambda-watcher watch
|
|
17
|
-
lambda-watcher 0.
|
|
17
|
+
lambda-watcher 0.3.0 — archiving into ~/.lambda-watcher
|
|
18
18
|
watching ~/Downloads. Press Ctrl-C to stop.
|
|
19
19
|
new order-processor v0001 order-processor.zip — archived a new version
|
|
20
20
|
new order-processor v0002 order-processor (1).zip — 2 added, 2 modified, 9 renamed, 55 vendored
|
|
@@ -54,7 +54,8 @@ Then you review:
|
|
|
54
54
|
lw diff order-processor # last two versions, in the terminal
|
|
55
55
|
lw diff order-processor --from 2 --to 10 # any two versions
|
|
56
56
|
lw diff order-processor --html --open # a shareable HTML report
|
|
57
|
-
lw report order-processor # the whole history,
|
|
57
|
+
lw report order-processor # the whole history, in your browser
|
|
58
|
+
lw report # every function on one page, in your browser
|
|
58
59
|
lw open order-processor # the whole archive, in your editor
|
|
59
60
|
lw git order-processor log -p # or just use git
|
|
60
61
|
```
|
|
@@ -184,9 +185,16 @@ lw # is it running, and what has it caught?
|
|
|
184
185
|
lw diff order-processor # what changed in the last version
|
|
185
186
|
```
|
|
186
187
|
|
|
188
|
+
Nothing to download yet? `lw demo` runs three downloads of a sample Lambda
|
|
189
|
+
through the real pipeline — in a scratch archive of its own, so nothing
|
|
190
|
+
appears in yours — and shows you the diff and the HTML report it produces.
|
|
191
|
+
`lw --install-completion` teaches your shell to tab-complete function names.
|
|
192
|
+
|
|
187
193
|
Every new version also writes its own comparison to
|
|
188
|
-
`~/.lambda-watcher/reports/<function>/latest.html` as it is archived,
|
|
189
|
-
|
|
194
|
+
`~/.lambda-watcher/reports/<function>/latest.html` as it is archived, and
|
|
195
|
+
rewrites `~/.lambda-watcher/reports/index.html`, which links every function's
|
|
196
|
+
latest change and counts the secrets each one ships. The answer is a bookmark
|
|
197
|
+
rather than a command.
|
|
190
198
|
|
|
191
199
|
<details>
|
|
192
200
|
<summary>Running it by hand, or setting it up piece by piece</summary>
|
|
@@ -196,7 +204,8 @@ lw watch # run in the foreground instead; Ctrl-C stops it
|
|
|
196
204
|
lw start # install and start the background watcher
|
|
197
205
|
lw stop # stop it (--remove also unregisters it)
|
|
198
206
|
lw restart # after editing the config
|
|
199
|
-
lw doctor # check the
|
|
207
|
+
lw doctor # check everything, name the fix for each problem, exit 1 if there is one
|
|
208
|
+
lw logs -f # follow what the watcher is doing right now
|
|
200
209
|
```
|
|
201
210
|
|
|
202
211
|
Already have a folder of old backups? Import them oldest-first so the version
|
|
@@ -220,6 +229,7 @@ the manual recipes.
|
|
|
220
229
|
|---|---|
|
|
221
230
|
| `setup` | Config, background watcher and any history already on disk, in one go. `--no-service` skips the background watcher, `--yes` takes every default. |
|
|
222
231
|
| `status` | Is it running, and what has it archived? Also what bare `lw` prints. |
|
|
232
|
+
| `demo` | See it work on a sample Lambda, in a scratch archive of its own. `--open` opens the report; `--clean` removes it. |
|
|
223
233
|
| `start` / `stop` | Register the background watcher with the OS, or stop it. `stop --remove` unregisters it too. |
|
|
224
234
|
| `restart` | Stop and start it — use after editing the config. |
|
|
225
235
|
| `watch` | Watch the download folders in the foreground. `--once` processes what is already there and exits. |
|
|
@@ -229,7 +239,7 @@ the manual recipes.
|
|
|
229
239
|
| `versions FN` | Every archived version of one function. |
|
|
230
240
|
| `show FN [V]` | Runtime, handler, dependencies, env vars, services and findings for one version. `--files`, `--json`. |
|
|
231
241
|
| `diff FN` | Compare two versions. Defaults to the last two. `--from`/`--to`, `--html`, `--open`, `--vendor`, `--whitespace`, `--no-patch`, `--json`. |
|
|
232
|
-
| `report FN` | Build a browsable HTML history: an index plus a diff for every step. |
|
|
242
|
+
| `report FN` | Build a browsable HTML history: an index plus a diff for every step, opened in your browser. `--no-open` just writes it. |
|
|
233
243
|
| `export FN [V]` | Get a version back out as a deployable zip (`--zip`) or a plain folder (`--tree`). |
|
|
234
244
|
| `open FN [V]` | Open the function's mirror in your editor — every version in one folder, with history. Name a version to open just its files. |
|
|
235
245
|
| `git FN ...` | Run git inside that function's mirror repo: `lw git order-processor log --oneline`. |
|
|
@@ -237,11 +247,13 @@ the manual recipes.
|
|
|
237
247
|
| `merge SRC DST` | Combine two entries that are really the same Lambda, renumbering by archive time. |
|
|
238
248
|
| `label FN V TEXT` | Annotate a version, e.g. `label order-processor 7 "prod deploy 2026-03-01"`. |
|
|
239
249
|
| `search TERM` | Search filenames and dependencies across everything archived. |
|
|
240
|
-
| `log` | Recent activity, including downloads that were skipped and why. |
|
|
250
|
+
| `log` | Recent activity, including downloads that were skipped and why, and when the watcher started and stopped. |
|
|
251
|
+
| `logs` | The watcher's own log file — what it noticed and what it made of it. `-f` follows it, `--service` shows the service manager's output instead. |
|
|
241
252
|
| `path FN [V]` | Print a path, for `cd "$(lw path order-processor 7)"`. |
|
|
242
253
|
| `rm FN` | Delete a function and everything archived for it. |
|
|
243
254
|
| `reindex` | Rebuild the SQLite index from the manifests on disk. |
|
|
244
|
-
| `
|
|
255
|
+
| `init` | Write an annotated config file you can edit. `setup` does this for you; `--force` overwrites. |
|
|
256
|
+
| `doctor` | Check the config, watch folders, the watcher and its heartbeat, git and disk space. Every problem names its fix; exits 1 if there is one, so it works from a cron job. |
|
|
245
257
|
|
|
246
258
|
Version arguments accept `7`, `v7`, `latest`, `first`, or `-1` / `-2` counting
|
|
247
259
|
back from the newest.
|
|
@@ -253,7 +265,7 @@ back from the newest.
|
|
|
253
265
|
├── config.yaml
|
|
254
266
|
├── index.db # rebuildable index (see `reindex`)
|
|
255
267
|
├── logs/watcher.log
|
|
256
|
-
├── reports/ # generated HTML
|
|
268
|
+
├── reports/ # generated HTML; index.html links it all
|
|
257
269
|
├── quarantine/ # archives that failed, with a reason file
|
|
258
270
|
├── repos/
|
|
259
271
|
│ └── order-processor/ # git mirror: one commit per version, tagged v0001…
|
|
@@ -307,7 +319,8 @@ Everything is optional. The settings worth knowing:
|
|
|
307
319
|
watch:
|
|
308
320
|
dirs: ["~/Downloads"] # add more if you download from several places
|
|
309
321
|
stable_seconds: 2.0 # how long a file must stop changing before it is read
|
|
310
|
-
force_polling: false # turn on for network shares
|
|
322
|
+
force_polling: false # turn on for network shares and VM mounts
|
|
323
|
+
# (WSL is detected and polled without this)
|
|
311
324
|
arrival_max_age_seconds: 300 # ignore "modified" events for files older than this
|
|
312
325
|
|
|
313
326
|
store:
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "lambda-watcher"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.4.1"
|
|
8
8
|
description = "Watch your Downloads folder for AWS Lambda deployment zips, archive them as versions, analyse them, and diff any two versions."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|