zedbee 0.1.0-beta.4 → 0.1.0-beta.6
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/README.md +2 -0
- package/THIRD_PARTY_NOTICES.md +6 -6
- package/dist/checks/eslint/lint-adapter.d.ts.map +1 -1
- package/dist/checks/eslint/lint-adapter.js +74 -15
- package/dist/checks/eslint/lint-adapter.js.map +1 -1
- package/dist/checks/prettier/adapter.js +1 -1
- package/dist/checks/prettier/adapter.js.map +1 -1
- package/dist/checks/prettier/project-trust.d.ts +4 -2
- package/dist/checks/prettier/project-trust.d.ts.map +1 -1
- package/dist/checks/prettier/project-trust.js +71 -16
- package/dist/checks/prettier/project-trust.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/init.d.ts +9 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +89 -19
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/scan.d.ts.map +1 -1
- package/dist/commands/scan.js +7 -0
- package/dist/commands/scan.js.map +1 -1
- package/dist/config/schema.d.ts +2 -1
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +4 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/hooks/command.d.ts +10 -0
- package/dist/hooks/command.d.ts.map +1 -0
- package/dist/hooks/command.js +121 -0
- package/dist/hooks/command.js.map +1 -0
- package/dist/hooks/detect.d.ts +1 -1
- package/dist/hooks/detect.d.ts.map +1 -1
- package/dist/hooks/detect.js +16 -14
- package/dist/hooks/detect.js.map +1 -1
- package/dist/hooks/husky.d.ts +4 -1
- package/dist/hooks/husky.d.ts.map +1 -1
- package/dist/hooks/husky.js +24 -5
- package/dist/hooks/husky.js.map +1 -1
- package/dist/hooks/install.d.ts +1 -1
- package/dist/hooks/install.d.ts.map +1 -1
- package/dist/hooks/install.js +2 -1
- package/dist/hooks/install.js.map +1 -1
- package/dist/hooks/lefthook.d.ts +1 -1
- package/dist/hooks/lefthook.d.ts.map +1 -1
- package/dist/hooks/lefthook.js +14 -4
- package/dist/hooks/lefthook.js.map +1 -1
- package/dist/hooks/raw-git.d.ts +1 -1
- package/dist/hooks/raw-git.d.ts.map +1 -1
- package/dist/hooks/raw-git.js +2 -2
- package/dist/hooks/raw-git.js.map +1 -1
- package/dist/hooks/simple-git-hooks.d.ts +1 -1
- package/dist/hooks/simple-git-hooks.d.ts.map +1 -1
- package/dist/hooks/simple-git-hooks.js +6 -4
- package/dist/hooks/simple-git-hooks.js.map +1 -1
- package/dist/init/format-proposal.d.ts +4 -0
- package/dist/init/format-proposal.d.ts.map +1 -0
- package/dist/init/format-proposal.js +48 -0
- package/dist/init/format-proposal.js.map +1 -0
- package/dist/init/install-project.d.ts +9 -0
- package/dist/init/install-project.d.ts.map +1 -0
- package/dist/init/install-project.js +100 -0
- package/dist/init/install-project.js.map +1 -0
- package/dist/init/prettier-discovery.d.ts.map +1 -1
- package/dist/init/prettier-discovery.js +5 -6
- package/dist/init/prettier-discovery.js.map +1 -1
- package/dist/init/prettier-import.js +2 -2
- package/dist/init/prettier-import.js.map +1 -1
- package/dist/init/recommend.d.ts.map +1 -1
- package/dist/init/recommend.js +49 -11
- package/dist/init/recommend.js.map +1 -1
- package/dist/init/types.d.ts +6 -0
- package/dist/init/types.d.ts.map +1 -1
- package/dist/init/types.js.map +1 -1
- package/dist/init/write-config.d.ts.map +1 -1
- package/dist/init/write-config.js +2 -9
- package/dist/init/write-config.js.map +1 -1
- package/dist/inspection/inspect-repository.d.ts +2 -0
- package/dist/inspection/inspect-repository.d.ts.map +1 -1
- package/dist/inspection/inspect-repository.js +1 -1
- package/dist/inspection/inspect-repository.js.map +1 -1
- package/dist/inspection/working-tree-registry.d.ts +4 -0
- package/dist/inspection/working-tree-registry.d.ts.map +1 -0
- package/dist/inspection/working-tree-registry.js +100 -0
- package/dist/inspection/working-tree-registry.js.map +1 -0
- package/dist/renderers/json.d.ts.map +1 -1
- package/dist/renderers/json.js +10 -5
- package/dist/renderers/json.js.map +1 -1
- package/dist/renderers/sarif.d.ts.map +1 -1
- package/dist/renderers/sarif.js +6 -3
- package/dist/renderers/sarif.js.map +1 -1
- package/dist/renderers/text.d.ts.map +1 -1
- package/dist/renderers/text.js +9 -6
- package/dist/renderers/text.js.map +1 -1
- package/dist/reporting/fix-command.d.ts +5 -0
- package/dist/reporting/fix-command.d.ts.map +1 -0
- package/dist/reporting/fix-command.js +27 -0
- package/dist/reporting/fix-command.js.map +1 -0
- package/dist/reporting/next-steps.d.ts +2 -1
- package/dist/reporting/next-steps.d.ts.map +1 -1
- package/dist/reporting/next-steps.js +4 -3
- package/dist/reporting/next-steps.js.map +1 -1
- package/dist/scan/report.d.ts +2 -0
- package/dist/scan/report.d.ts.map +1 -1
- package/dist/ui/init-app.d.ts +14 -5
- package/dist/ui/init-app.d.ts.map +1 -1
- package/dist/ui/init-app.js +82 -22
- package/dist/ui/init-app.js.map +1 -1
- package/dist/ui/install-project-app.d.ts +15 -0
- package/dist/ui/install-project-app.d.ts.map +1 -0
- package/dist/ui/install-project-app.js +97 -0
- package/dist/ui/install-project-app.js.map +1 -0
- package/dist/ui/scan-app.d.ts.map +1 -1
- package/dist/ui/scan-app.js +4 -1
- package/dist/ui/scan-app.js.map +1 -1
- package/docs/checks.md +4 -2
- package/docs/cli-reference.md +11 -3
- package/licenses/production-inventory.json +511 -511
- package/node_modules/prettier/LICENSE +7 -0
- package/node_modules/prettier/README.md +104 -0
- package/node_modules/prettier/THIRD-PARTY-NOTICES.md +8019 -0
- package/node_modules/prettier/bin/prettier.cjs +84 -0
- package/node_modules/prettier/doc.d.ts +254 -0
- package/node_modules/prettier/doc.js +1575 -0
- package/node_modules/prettier/doc.mjs +1544 -0
- package/node_modules/prettier/index.cjs +790 -0
- package/node_modules/prettier/index.d.ts +959 -0
- package/node_modules/prettier/index.mjs +19074 -0
- package/node_modules/prettier/internal/experimental-cli-worker.mjs +2756 -0
- package/node_modules/prettier/internal/experimental-cli.mjs +12572 -0
- package/node_modules/prettier/internal/legacy-cli.mjs +7059 -0
- package/node_modules/prettier/package.json +207 -0
- package/node_modules/prettier/plugins/acorn.d.ts +6 -0
- package/node_modules/prettier/plugins/acorn.js +17 -0
- package/node_modules/prettier/plugins/acorn.mjs +17 -0
- package/node_modules/prettier/plugins/angular.d.ts +8 -0
- package/node_modules/prettier/plugins/angular.js +5 -0
- package/node_modules/prettier/plugins/angular.mjs +5 -0
- package/node_modules/prettier/plugins/babel.d.ts +18 -0
- package/node_modules/prettier/plugins/babel.js +16 -0
- package/node_modules/prettier/plugins/babel.mjs +16 -0
- package/node_modules/prettier/plugins/estree.d.ts +6 -0
- package/node_modules/prettier/plugins/estree.js +44 -0
- package/node_modules/prettier/plugins/estree.mjs +44 -0
- package/node_modules/prettier/plugins/flow.d.ts +5 -0
- package/node_modules/prettier/plugins/flow.js +7 -0
- package/node_modules/prettier/plugins/flow.mjs +7 -0
- package/node_modules/prettier/plugins/glimmer.d.ts +9 -0
- package/node_modules/prettier/plugins/glimmer.js +37 -0
- package/node_modules/prettier/plugins/glimmer.mjs +37 -0
- package/node_modules/prettier/plugins/graphql.d.ts +9 -0
- package/node_modules/prettier/plugins/graphql.js +17 -0
- package/node_modules/prettier/plugins/graphql.mjs +17 -0
- package/node_modules/prettier/plugins/html.d.ts +13 -0
- package/node_modules/prettier/plugins/html.js +25 -0
- package/node_modules/prettier/plugins/html.mjs +25 -0
- package/node_modules/prettier/plugins/markdown.d.ts +11 -0
- package/node_modules/prettier/plugins/markdown.js +70 -0
- package/node_modules/prettier/plugins/markdown.mjs +70 -0
- package/node_modules/prettier/plugins/meriyah.d.ts +5 -0
- package/node_modules/prettier/plugins/meriyah.js +6 -0
- package/node_modules/prettier/plugins/meriyah.mjs +6 -0
- package/node_modules/prettier/plugins/postcss.d.ts +11 -0
- package/node_modules/prettier/plugins/postcss.js +62 -0
- package/node_modules/prettier/plugins/postcss.mjs +62 -0
- package/node_modules/prettier/plugins/typescript.d.ts +5 -0
- package/node_modules/prettier/plugins/typescript.js +22 -0
- package/node_modules/prettier/plugins/typescript.mjs +22 -0
- package/node_modules/prettier/plugins/yaml.d.ts +9 -0
- package/node_modules/prettier/plugins/yaml.js +141 -0
- package/node_modules/prettier/plugins/yaml.mjs +154 -0
- package/node_modules/prettier/standalone.d.ts +33 -0
- package/node_modules/prettier/standalone.js +29 -0
- package/node_modules/prettier/standalone.mjs +29 -0
- package/package.json +4 -1
- package/schema/zedbee.schema.json +1 -1
package/docs/checks.md
CHANGED
|
@@ -88,7 +88,7 @@ The formatting check accepts all and only these fourteen Prettier fields. Values
|
|
|
88
88
|
|
|
89
89
|
`checks.formatting.engine` selects the formatting engine and defaults to `"managed"` when omitted. Existing configurations keep managed behavior.
|
|
90
90
|
|
|
91
|
-
- `"managed"` uses Zedbee's bundled Prettier with the fourteen managed settings below.
|
|
91
|
+
- `"managed"` uses Zedbee's bundled Prettier with the fourteen managed settings below. Its separate installation preserves the project's own Prettier version and command.
|
|
92
92
|
- `"project"` uses the selected project's installed Prettier (supported range `>=3.0.0 <4.0.0`), its native configuration, and its plugins. `settings` cannot be combined with `engine: "project"`.
|
|
93
93
|
|
|
94
94
|
During `zedbee init`, when an existing setup is found you can copy supported settings once into `.zedbeerc.jsonc` (`--formatting copy`), use the project's Prettier (`--formatting project`), keep Zedbee defaults (`--formatting managed`), or stop checking formatting (`--formatting off`). A copy is a one-time import; Zedbee does not synchronize it afterwards, and plugins and unsupported options are not copied. With separate consent, copy mode evaluates every selected executable or package-exported shared configuration through its owning project's supervised Prettier worker, retains only representable settings, and binds the preview to every evaluated configuration file so a change in any scope invalidates the apply. Project-root `.prettierignore` and `.gitignore` rules are copied as formatting-only path exclusions, preserving their order, negations, and directory-relative meaning. Subsequent scans use the saved rules; editing the original ignore file does not refresh the copy.
|
|
@@ -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
|
-
|
|
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
|
|
package/docs/cli-reference.md
CHANGED
|
@@ -242,11 +242,17 @@ 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 `
|
|
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.
|
|
248
|
+
|
|
249
|
+
Setup formats `.zedbeerc.jsonc` before showing the review. When root project formatting is selected, setup gives this generated configuration a managed formatting override so its first commit uses the formatter that wrote it; project source retains native formatting. After applying setup, stage the configuration and the other generated files before running `zedbee checks` or committing: those commands read the staged snapshot. A scan with `--base` reads configuration from the selected commits, so staging a new configuration does not change an earlier committed scan.
|
|
250
|
+
|
|
251
|
+
When Prettier projects are detected only in subfolders, setup defaults formatting to those folders. The interactive formatting-scope control can instead select the whole repository, including docs and other folders. `--formatting-scope projects|repository` makes the same choice in non-interactive setup. Other checks keep their configured scope.
|
|
246
252
|
|
|
247
253
|
## Managed analyzer boundary
|
|
248
254
|
|
|
249
|
-
Zedbee ships and pins Prettier 3.9.6, ESLint 9.39.5, typescript-eslint 8.67.0, TypeScript 6.0.3, Secretlint 13.0.5, eslint-plugin-react 7.37.5, eslint-plugin-react-hooks 7.1.1, eslint-plugin-jsx-a11y 6.10.2, ast-grep 0.45.1, jscpd 5.3.2, Dependency Cruiser 18.2.0, and Knip 6.32.2. It supplies its own inert analyzer configuration and never loads project ESLint, Secretlint, Babel, parser, plugin, or executable analyzer configuration; project Prettier runs only when a project formatting engine is explicitly trusted, as described in the [check guide](checks.md#formatting-engines). Rule options follow the analyzer and plugin versions pinned by the installed Zedbee release. Only bundled rules can be configured; custom plugins cannot be loaded. TypeScript configuration is parsed as selected snapshot data, not executed; installed declaration packages may be resolved through the constrained project `node_modules` boundary. Typed lint loads every contained `tsconfig*.json` in an inspected workspace and uses each project for the files it covers. By default, a TypeScript file outside every loaded project makes typed lint incomplete. This avoids validating changed target code under unrelated compiler settings.
|
|
255
|
+
Zedbee bundles its own Prettier installation so installing Zedbee preserves the project’s Prettier version and command. Zedbee ships and pins Prettier 3.9.6, ESLint 9.39.5, typescript-eslint 8.67.0, TypeScript 6.0.3, Secretlint 13.0.5, eslint-plugin-react 7.37.5, eslint-plugin-react-hooks 7.1.1, eslint-plugin-jsx-a11y 6.10.2, ast-grep 0.45.1, jscpd 5.3.2, Dependency Cruiser 18.2.0, and Knip 6.32.2. It supplies its own inert analyzer configuration and never loads project ESLint, Secretlint, Babel, parser, plugin, or executable analyzer configuration; project Prettier runs only when a project formatting engine is explicitly trusted, as described in the [check guide](checks.md#formatting-engines). Rule options follow the analyzer and plugin versions pinned by the installed Zedbee release. Only bundled rules can be configured; custom plugins cannot be loaded. TypeScript configuration is parsed as selected snapshot data, not executed; installed declaration packages may be resolved through the constrained project `node_modules` boundary. Typed lint loads every contained `tsconfig*.json` in an inspected workspace and uses each project for the files it covers. By default, a TypeScript file outside every loaded project makes typed lint incomplete. This avoids validating changed target code under unrelated compiler settings. Typed-lint failures include safe file paths, loaded TypeScript project paths, and the baseline or target snapshot identity in their diagnostics; engine failures remain distinct from project-coverage failures.
|
|
250
256
|
|
|
251
257
|
Zedbee does not load any native analyzer config files, including native Prettier and ESLint configs. The only exception is a project formatting engine that was explicitly trusted as described in the [check guide](checks.md#formatting-engines); every other analyzer keeps the managed boundary. Adoption therefore has a deliberate tradeoff: teams with native configs may see different Zedbee results because those files are not loaded. Re-express the supported policy in `.zedbeerc.jsonc`, within Zedbee's bounded managed settings, rather than expecting native configuration parity. Generated package-manager lockfiles are excluded from formatting scans and fixes, but remain eligible for other supported checks; see [formatting settings](checks.md#prettier-settings).
|
|
252
258
|
|
|
@@ -357,7 +363,9 @@ can be bypassed by Git options; neither makes checks mandatory on a server.
|
|
|
357
363
|
|
|
358
364
|
`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
365
|
|
|
360
|
-
|
|
366
|
+
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.
|
|
367
|
+
|
|
368
|
+
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
369
|
|
|
362
370
|
## Cache and performance
|
|
363
371
|
|