zedbee 0.1.0-beta.4 → 0.1.0-beta.5

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 (77) hide show
  1. package/README.md +2 -0
  2. package/THIRD_PARTY_NOTICES.md +6 -6
  3. package/dist/checks/prettier/adapter.js +1 -1
  4. package/dist/checks/prettier/adapter.js.map +1 -1
  5. package/dist/checks/prettier/project-trust.d.ts +4 -2
  6. package/dist/checks/prettier/project-trust.d.ts.map +1 -1
  7. package/dist/checks/prettier/project-trust.js +71 -16
  8. package/dist/checks/prettier/project-trust.js.map +1 -1
  9. package/dist/commands/init.d.ts +6 -0
  10. package/dist/commands/init.d.ts.map +1 -1
  11. package/dist/commands/init.js +58 -12
  12. package/dist/commands/init.js.map +1 -1
  13. package/dist/hooks/command.d.ts +8 -0
  14. package/dist/hooks/command.d.ts.map +1 -0
  15. package/dist/hooks/command.js +109 -0
  16. package/dist/hooks/command.js.map +1 -0
  17. package/dist/hooks/detect.d.ts +1 -1
  18. package/dist/hooks/detect.d.ts.map +1 -1
  19. package/dist/hooks/detect.js +16 -14
  20. package/dist/hooks/detect.js.map +1 -1
  21. package/dist/hooks/husky.d.ts +4 -1
  22. package/dist/hooks/husky.d.ts.map +1 -1
  23. package/dist/hooks/husky.js +24 -5
  24. package/dist/hooks/husky.js.map +1 -1
  25. package/dist/hooks/install.d.ts +1 -1
  26. package/dist/hooks/install.d.ts.map +1 -1
  27. package/dist/hooks/install.js +2 -1
  28. package/dist/hooks/install.js.map +1 -1
  29. package/dist/hooks/lefthook.d.ts +1 -1
  30. package/dist/hooks/lefthook.d.ts.map +1 -1
  31. package/dist/hooks/lefthook.js +14 -4
  32. package/dist/hooks/lefthook.js.map +1 -1
  33. package/dist/hooks/raw-git.d.ts +1 -1
  34. package/dist/hooks/raw-git.d.ts.map +1 -1
  35. package/dist/hooks/raw-git.js +2 -2
  36. package/dist/hooks/raw-git.js.map +1 -1
  37. package/dist/hooks/simple-git-hooks.d.ts +1 -1
  38. package/dist/hooks/simple-git-hooks.d.ts.map +1 -1
  39. package/dist/hooks/simple-git-hooks.js +6 -4
  40. package/dist/hooks/simple-git-hooks.js.map +1 -1
  41. package/dist/init/install-project.d.ts +9 -0
  42. package/dist/init/install-project.d.ts.map +1 -0
  43. package/dist/init/install-project.js +100 -0
  44. package/dist/init/install-project.js.map +1 -0
  45. package/dist/init/prettier-discovery.d.ts.map +1 -1
  46. package/dist/init/prettier-discovery.js +5 -6
  47. package/dist/init/prettier-discovery.js.map +1 -1
  48. package/dist/init/prettier-import.js +2 -2
  49. package/dist/init/prettier-import.js.map +1 -1
  50. package/dist/init/recommend.d.ts.map +1 -1
  51. package/dist/init/recommend.js +5 -5
  52. package/dist/init/recommend.js.map +1 -1
  53. package/dist/init/types.d.ts +1 -0
  54. package/dist/init/types.d.ts.map +1 -1
  55. package/dist/init/write-config.d.ts.map +1 -1
  56. package/dist/init/write-config.js +2 -9
  57. package/dist/init/write-config.js.map +1 -1
  58. package/dist/inspection/inspect-repository.d.ts +2 -0
  59. package/dist/inspection/inspect-repository.d.ts.map +1 -1
  60. package/dist/inspection/inspect-repository.js +1 -1
  61. package/dist/inspection/inspect-repository.js.map +1 -1
  62. package/dist/inspection/working-tree-registry.d.ts +4 -0
  63. package/dist/inspection/working-tree-registry.d.ts.map +1 -0
  64. package/dist/inspection/working-tree-registry.js +100 -0
  65. package/dist/inspection/working-tree-registry.js.map +1 -0
  66. package/dist/ui/init-app.d.ts +10 -2
  67. package/dist/ui/init-app.d.ts.map +1 -1
  68. package/dist/ui/init-app.js +7 -8
  69. package/dist/ui/init-app.js.map +1 -1
  70. package/dist/ui/install-project-app.d.ts +15 -0
  71. package/dist/ui/install-project-app.d.ts.map +1 -0
  72. package/dist/ui/install-project-app.js +97 -0
  73. package/dist/ui/install-project-app.js.map +1 -0
  74. package/docs/checks.md +3 -1
  75. package/docs/cli-reference.md +6 -2
  76. package/licenses/production-inventory.json +511 -511
  77. package/package.json +1 -1
@@ -0,0 +1,97 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from "react";
3
+ import { Box, Text, render, useApp, useInput, useWindowSize } from "ink";
4
+ import { BrandedCommandFrame, BrandedCommandPanel, brandedCommandContentWidth, } from "./branded-command-frame.js";
5
+ import { InitActionButton, initRenderOptions } from "./init-app.js";
6
+ import { PlainWordmark } from "./pixel-wordmark.js";
7
+ import { TerminalViewport } from "./terminal-viewport.js";
8
+ import { colorProp, ZEDBEE_THEME } from "./theme.js";
9
+ export function InstallProjectApp({ targets, width, color, signal, install, onDecision, }) {
10
+ const { exit } = useApp();
11
+ const size = useWindowSize();
12
+ const columns = size.columns ?? width;
13
+ const rows = size.rows ?? 40;
14
+ const [selected, setSelected] = useState(0);
15
+ const [offset, setOffset] = useState(0);
16
+ const [busy, setBusy] = useState(false);
17
+ const [error, setError] = useState();
18
+ const operation = useRef(null);
19
+ const canceled = useRef(false);
20
+ const target = targets[selected];
21
+ const finish = (installed) => {
22
+ onDecision(installed);
23
+ exit();
24
+ };
25
+ useEffect(() => {
26
+ const cancel = () => {
27
+ canceled.current = true;
28
+ if (operation.current !== null)
29
+ operation.current.abort();
30
+ else
31
+ finish(false);
32
+ };
33
+ if (signal?.aborted)
34
+ cancel();
35
+ signal?.addEventListener("abort", cancel, { once: true });
36
+ return () => {
37
+ signal?.removeEventListener("abort", cancel);
38
+ operation.current?.abort();
39
+ };
40
+ }, [signal]);
41
+ useInput((input, key) => {
42
+ if (key.escape ||
43
+ (key.ctrl && input.toLowerCase() === "c") ||
44
+ input === "\u0003") {
45
+ canceled.current = true;
46
+ if (operation.current !== null)
47
+ operation.current.abort();
48
+ else
49
+ finish(false);
50
+ return;
51
+ }
52
+ if (key.pageDown || key.pageUp) {
53
+ setOffset((value) => Math.max(0, value + (key.pageDown ? 10 : -10)));
54
+ return;
55
+ }
56
+ if (busy)
57
+ return;
58
+ if (key.upArrow || key.downArrow) {
59
+ setSelected((value) => (value + (key.downArrow ? 1 : -1) + targets.length) % targets.length);
60
+ setError(undefined);
61
+ }
62
+ else if (key.return && operation.current === null) {
63
+ const controller = new AbortController();
64
+ operation.current = controller;
65
+ setBusy(true);
66
+ setError(undefined);
67
+ void install(target, controller.signal)
68
+ .then(() => finish(!canceled.current))
69
+ .catch((cause) => {
70
+ if (canceled.current) {
71
+ finish(false);
72
+ return;
73
+ }
74
+ setError(cause instanceof Error ? cause.message : "Installation failed.");
75
+ })
76
+ .finally(() => {
77
+ operation.current = null;
78
+ setBusy(false);
79
+ });
80
+ }
81
+ });
82
+ const count = Math.max(2, rows - 33);
83
+ const start = Math.max(0, Math.min(selected, targets.length - count));
84
+ const panel = (_jsx(BrandedCommandPanel, { title: "PROJECT FOLDER", width: brandedCommandContentWidth(columns), color: color, children: _jsxs(Box, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [_jsx(Text, { children: "Choose the project folder for Zedbee." }), _jsx(Text, { ...colorProp(color, ZEDBEE_THEME.secondary), children: "Zedbee will be installed in the selected project." }), _jsx(Box, { flexDirection: "column", marginY: 1, children: targets.slice(start, start + count).map((item) => (_jsxs(Text, { bold: item === target, ...colorProp(color, item === target ? ZEDBEE_THEME.yellow : ZEDBEE_THEME.primary), children: [item === target ? "➜" : " ", " ", item.projectRoot === "." ? "Repository root" : item.projectRoot, item.hasPrettier ? " · Prettier detected" : ""] }, item.projectRoot))) }), busy ? (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { ...colorProp(color, ZEDBEE_THEME.yellow), children: ["Preparing ", target.projectRoot, "..."] }) })) : null, error === undefined ? null : (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { children: "Could not prepare this project" }), _jsx(Text, { children: error })] })), busy ? null : (_jsx(Box, { marginTop: 1, flexDirection: "column", children: _jsx(InitActionButton, { label: "CONTINUE", focused: false, color: color }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { ...colorProp(color, ZEDBEE_THEME.secondary), children: busy
85
+ ? "Esc Cancel"
86
+ : "↑ ↓ Select folder · Enter Continue · Esc Cancel" }) })] }) }));
87
+ return (_jsx(TerminalViewport, { width: columns, height: rows, offset: offset, color: color, onOffsetChange: setOffset, children: rows < 36 ? (_jsxs(Box, { flexDirection: "column", paddingX: 1, children: [_jsx(PlainWordmark, { color: color }), panel] })) : (_jsx(BrandedCommandFrame, { width: columns, color: color, children: panel })) }));
88
+ }
89
+ export async function runProjectInstallPrompt(targets, options, install) {
90
+ let installed = false;
91
+ const app = render(_jsx(InstallProjectApp, { targets: targets, ...options, install: install, onDecision: (value) => {
92
+ installed = value;
93
+ } }), initRenderOptions());
94
+ await app.waitUntilExit();
95
+ return installed;
96
+ }
97
+ //# sourceMappingURL=install-project-app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-project-app.js","sourceRoot":"","sources":["../../src/ui/install-project-app.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAGzE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAWrD,MAAM,UAAU,iBAAiB,CAAC,EAChC,OAAO,EACP,KAAK,EACL,KAAK,EACL,MAAM,EACN,OAAO,EACP,UAAU,GACa;IACvB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC;IAC1B,MAAM,I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M,GAAG,CAAC,aAAa,EAAE,CAAC;IAC1B,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/docs/checks.md CHANGED
@@ -97,7 +97,9 @@ Representable native override `excludeFiles` patterns are copied with the overri
97
97
 
98
98
  Project-format reports include `formattingCoverage` counts for `checkedFiles`, `ignoredFiles`, and `unsupportedFiles`. Ignored and unsupported files are not counted as checked. An entirely ignored/unsupported run is skipped.
99
99
 
100
- Project execution is an explicit trust decision. Choosing it in `init` records consent in local Git configuration keyed to the checkout and project root; a fresh clone needs its own consent, and CI must pass `--trust-project-prettier` from a trusted workflow. That flag is invocation-only. `--yes` alone never grants it, and tracked repository configuration can never grant it. When the installation is missing, the version is unsupported, a plugin is missing, the configuration is invalid, or trust is absent, the formatting check is incomplete with a concrete remedy. Zedbee never silently falls back to managed formatting, and project-format results are not persisted in the observation cache. Managed behavior is unchanged when `engine` is omitted.
100
+ During setup, Prettier discovery includes tracked files and nonignored untracked files in the current repository. Ignored checkout folders and nested Git repositories or worktrees are excluded, so they do not create formatting overrides. Tracked files remain part of the project even if an ignore rule also matches them.
101
+
102
+ Project execution is an explicit trust decision. Choosing it in `init` records consent in local Git configuration keyed to the shared Git repository directory and project root. Consent carries across branches and linked worktrees, and repeated setup honors saved consent. Existing checkout-scoped grants from registered worktrees are also honored; a fresh clone needs its own consent, and CI must pass `--trust-project-prettier` from a trusted workflow. That flag is invocation-only outside `init`. Switching to managed formatting or turning formatting off in `init` revokes the corresponding project grants across the repository’s worktrees. `--yes` alone never grants it, and tracked repository configuration can never grant it. When the installation is missing, the version is unsupported, a plugin is missing, the configuration is invalid, or trust is absent, the formatting check is incomplete with a concrete remedy. Zedbee never silently falls back to managed formatting, and project-format results are not persisted in the observation cache. Managed behavior is unchanged when `engine` is omitted.
101
103
 
102
104
  Do not grant project-Prettier trust automatically to unreviewed pull-request code. Native configuration and plugins are project code with the invoking user's permissions; the worker boundary supervises their lifetime but is not an operating-system sandbox. The selected Git snapshot supplies configuration files, relative helpers, ignore files, and source bytes, so an unstaged helper edit cannot alter an index scan.
103
105
 
@@ -242,7 +242,9 @@ The configuration example is illustrative. `zedbee init` writes editable recomme
242
242
 
243
243
  `reporting.terminalFindingLimit` defaults to 25 findings for automatic terminal output and forced `--format ink`; set it to a positive integer or `"all"`. The limit applies to findings only, with blockers first. Counts, disclosures, incomplete checks, report warnings, guidance, and report paths are never limited. Automatic scans always save a complete versioned JSON report, including passes with zero findings. `reporting.temporaryReportMaxAge` defaults to `"24h"`. Temporary reports become eligible for cleanup at the configured age and are removed during a subsequent Zedbee maintenance run. The operating system may remove them sooner. These handoffs are not archives.
244
244
 
245
- The versioned editor schema ships at `node_modules/zedbee/schema/zedbee.schema.json`. `zedbee init` writes that local schema reference, so validation does not depend on a website being available.
245
+ The versioned editor schema ships with the installed package at `schema/zedbee.schema.json`. `zedbee init` writes a relative reference to the local installation, including installations in subfolders, so validation does not depend on a website being available.
246
+
247
+ When interactive setup needs a local Zedbee installation, it first shows a project-folder selector. Arrow keys select a folder; Enter prepares that project by adding Zedbee as a development dependency, then continues into setup and review automatically. Detected Prettier projects are labeled in the list. Failures remain in the selector for retry. Escape cancels; canceling preparation already in progress may leave package-manager changes. Non-interactive setup reports the available install locations without installing automatically.
246
248
 
247
249
  ## Managed analyzer boundary
248
250
 
@@ -357,7 +359,9 @@ can be bypassed by Git options; neither makes checks mandatory on a server.
357
359
 
358
360
  `zedbee init --hook auto` detects Husky, Lefthook, simple-git-hooks, or raw Git hooks. It preserves unrelated commands, shows exact before/after hashes and diffs, refuses symlink targets, writes atomically, and rolls back earlier writes if a later write fails. Linked worktrees resolve the real Git hook path instead of assuming `.git` is a directory.
359
361
 
360
- Newly generated hooks run `npx --no-install zedbee scan --hook-invocation`. The marker distinguishes hook usage in telemetry; it does not change scan behavior. Existing unmarked invocations remain valid and are not rewritten just to add the marker. This prevents an unexpected network download during a commit, but it means Zedbee must remain installed in the project. Run `zedbee init` again to preview an idempotent update; an existing Zedbee invocation is not duplicated.
362
+ Setup locates an installed Zedbee declared by a project `package.json`, preferring the repository root when multiple installations exist. Generated hooks invoke that package's CLI directly through Node, for example `node './web/node_modules/zedbee/dist/cli.js' scan --hook-invocation`, inside a subshell at the Git root. This also handles existing hooks that change directory and Lefthook commands with a custom `root`, without changing the working directory of surrounding commands. The Zedbee invocation stays at the Git repository root, so an installation in `web/` does not require a root `package.json` or moving `.zedbeerc.jsonc`. This works with local hooks and existing hook integrations; creating a new tracked setup still requires a root manifest as described above.
363
+
364
+ If no declared, usable installation exists, interactive setup offers the folder selector above. Non-interactive setup explains where to install Zedbee and writes no hook. `--hook none` remains available to configure checks only. Generated hooks never download packages. The `--hook-invocation` marker identifies hook usage in telemetry without changing scan behavior. Re-running setup refreshes generated commands without duplicating them and preserves custom hook commands. Existing lint, type, and secret commands are preserved too; disable overlapping Zedbee checks if those checks are already covered by your hook.
361
365
 
362
366
  ## Cache and performance
363
367