waterplane 0.1.6 → 0.1.14
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/CHANGELOG.md +146 -1
- package/README.md +47 -24
- package/SECURITY.md +11 -3
- package/deploy/node-version +1 -1
- package/node_modules/@waterplane/shared/dist/agentfiles.d.ts +17 -0
- package/node_modules/@waterplane/shared/dist/agentfiles.js +60 -5
- package/node_modules/@waterplane/shared/dist/agentfiles.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/alwaysonwords.d.ts +83 -0
- package/node_modules/@waterplane/shared/dist/alwaysonwords.js +215 -0
- package/node_modules/@waterplane/shared/dist/alwaysonwords.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/assess/sasswords.js +4 -0
- package/node_modules/@waterplane/shared/dist/assess/sasswords.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/autocompact.js +3 -2
- package/node_modules/@waterplane/shared/dist/autocompact.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/backendsources.d.ts +11 -1
- package/node_modules/@waterplane/shared/dist/backendsources.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/branchmode.d.ts +33 -0
- package/node_modules/@waterplane/shared/dist/branchmode.js +88 -0
- package/node_modules/@waterplane/shared/dist/branchmode.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/budget.d.ts +7 -1
- package/node_modules/@waterplane/shared/dist/budget.js +11 -3
- package/node_modules/@waterplane/shared/dist/budget.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/buildstamp.d.ts +37 -0
- package/node_modules/@waterplane/shared/dist/buildstamp.js +95 -0
- package/node_modules/@waterplane/shared/dist/buildstamp.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/burn.d.ts +16 -1
- package/node_modules/@waterplane/shared/dist/burn.js +30 -0
- package/node_modules/@waterplane/shared/dist/burn.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/calday.d.ts +4 -0
- package/node_modules/@waterplane/shared/dist/calday.js +25 -0
- package/node_modules/@waterplane/shared/dist/calday.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/changebrief.d.ts +77 -0
- package/node_modules/@waterplane/shared/dist/changebrief.js +70 -0
- package/node_modules/@waterplane/shared/dist/changebrief.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/clihealth/healthrecord.js +1 -0
- package/node_modules/@waterplane/shared/dist/clihealth/healthrecord.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/costwindow.d.ts +24 -5
- package/node_modules/@waterplane/shared/dist/costwindow.js +35 -15
- package/node_modules/@waterplane/shared/dist/costwindow.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/desktopfiles.d.ts +100 -0
- package/node_modules/@waterplane/shared/dist/desktopfiles.js +192 -0
- package/node_modules/@waterplane/shared/dist/desktopfiles.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/exposure.d.ts +175 -0
- package/node_modules/@waterplane/shared/dist/exposure.js +357 -0
- package/node_modules/@waterplane/shared/dist/exposure.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/exposurepush.d.ts +60 -0
- package/node_modules/@waterplane/shared/dist/exposurepush.js +103 -0
- package/node_modules/@waterplane/shared/dist/exposurepush.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/commits.d.ts +26 -0
- package/node_modules/@waterplane/shared/dist/healthindex/commits.js +57 -0
- package/node_modules/@waterplane/shared/dist/healthindex/commits.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/move.d.ts +25 -0
- package/node_modules/@waterplane/shared/dist/healthindex/move.js +79 -0
- package/node_modules/@waterplane/shared/dist/healthindex/move.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/readings.d.ts +53 -0
- package/node_modules/@waterplane/shared/dist/healthindex/readings.js +154 -0
- package/node_modules/@waterplane/shared/dist/healthindex/readings.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/repoindex.d.ts +41 -0
- package/node_modules/@waterplane/shared/dist/healthindex/repoindex.js +19 -0
- package/node_modules/@waterplane/shared/dist/healthindex/repoindex.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/score.d.ts +26 -0
- package/node_modules/@waterplane/shared/dist/healthindex/score.js +156 -0
- package/node_modules/@waterplane/shared/dist/healthindex/score.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/types.d.ts +206 -0
- package/node_modules/@waterplane/shared/dist/healthindex/types.js +58 -0
- package/node_modules/@waterplane/shared/dist/healthindex/types.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/vs.d.ts +26 -0
- package/node_modules/@waterplane/shared/dist/healthindex/vs.js +38 -0
- package/node_modules/@waterplane/shared/dist/healthindex/vs.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex/words.d.ts +28 -0
- package/node_modules/@waterplane/shared/dist/healthindex/words.js +124 -0
- package/node_modules/@waterplane/shared/dist/healthindex/words.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/healthindex.d.ts +15 -411
- package/node_modules/@waterplane/shared/dist/healthindex.js +8 -602
- package/node_modules/@waterplane/shared/dist/healthindex.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/hints.js +15 -0
- package/node_modules/@waterplane/shared/dist/hints.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/index.d.ts +37 -0
- package/node_modules/@waterplane/shared/dist/index.js +37 -0
- package/node_modules/@waterplane/shared/dist/index.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent/clean.d.ts +87 -0
- package/node_modules/@waterplane/shared/dist/intent/clean.js +51 -3
- package/node_modules/@waterplane/shared/dist/intent/clean.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent/kind.d.ts +40 -1
- package/node_modules/@waterplane/shared/dist/intent/kind.js +36 -3
- package/node_modules/@waterplane/shared/dist/intent/kind.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent/types.d.ts +13 -0
- package/node_modules/@waterplane/shared/dist/intent/types.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent/verdict.js +9 -16
- package/node_modules/@waterplane/shared/dist/intent/verdict.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent/words.js +5 -0
- package/node_modules/@waterplane/shared/dist/intent/words.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/intent.d.ts +2 -2
- package/node_modules/@waterplane/shared/dist/intent.js +2 -2
- package/node_modules/@waterplane/shared/dist/intent.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/launchmodes.d.ts +2 -0
- package/node_modules/@waterplane/shared/dist/launchmodes.js +12 -0
- package/node_modules/@waterplane/shared/dist/launchmodes.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/ledgerspan.d.ts +106 -0
- package/node_modules/@waterplane/shared/dist/ledgerspan.js +196 -0
- package/node_modules/@waterplane/shared/dist/ledgerspan.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/naming.d.ts +3 -1
- package/node_modules/@waterplane/shared/dist/naming.js +6 -2
- package/node_modules/@waterplane/shared/dist/naming.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/netfuse.d.ts +5 -0
- package/node_modules/@waterplane/shared/dist/netfuse.js +6 -1
- package/node_modules/@waterplane/shared/dist/netfuse.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/netretry.d.ts +78 -0
- package/node_modules/@waterplane/shared/dist/netretry.js +85 -0
- package/node_modules/@waterplane/shared/dist/netretry.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/netretrycfg.d.ts +12 -0
- package/node_modules/@waterplane/shared/dist/netretrycfg.js +27 -0
- package/node_modules/@waterplane/shared/dist/netretrycfg.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/nodemin.d.ts +6 -4
- package/node_modules/@waterplane/shared/dist/nodemin.js +6 -4
- package/node_modules/@waterplane/shared/dist/nodemin.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/optins.d.ts +35 -1
- package/node_modules/@waterplane/shared/dist/optins.js +39 -1
- package/node_modules/@waterplane/shared/dist/optins.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/pairing.js +4 -0
- package/node_modules/@waterplane/shared/dist/pairing.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/passive.js +3 -0
- package/node_modules/@waterplane/shared/dist/passive.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/plugin/api.d.ts +394 -0
- package/node_modules/@waterplane/shared/dist/plugin/api.js +2 -0
- package/node_modules/@waterplane/shared/dist/plugin/api.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/plugin/backend.d.ts +197 -0
- package/node_modules/@waterplane/shared/dist/plugin/backend.js +9 -0
- package/node_modules/@waterplane/shared/dist/plugin/backend.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/plugin/manifest.d.ts +160 -0
- package/node_modules/@waterplane/shared/dist/plugin/manifest.js +98 -0
- package/node_modules/@waterplane/shared/dist/plugin/manifest.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/plugin/module.d.ts +98 -0
- package/node_modules/@waterplane/shared/dist/plugin/module.js +13 -0
- package/node_modules/@waterplane/shared/dist/plugin/module.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/plugin/version.d.ts +66 -0
- package/node_modules/@waterplane/shared/dist/plugin/version.js +86 -0
- package/node_modules/@waterplane/shared/dist/plugin/version.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/plugin.d.ts +5 -867
- package/node_modules/@waterplane/shared/dist/plugin.js +27 -186
- package/node_modules/@waterplane/shared/dist/plugin.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/pluginlaunch.d.ts +7 -0
- package/node_modules/@waterplane/shared/dist/prview.d.ts +23 -0
- package/node_modules/@waterplane/shared/dist/prview.js +107 -0
- package/node_modules/@waterplane/shared/dist/prview.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/queue/queueserial.d.ts +11 -2
- package/node_modules/@waterplane/shared/dist/queue/queueserial.js +13 -4
- package/node_modules/@waterplane/shared/dist/queue/queueserial.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/queue/queuewords.js +1 -0
- package/node_modules/@waterplane/shared/dist/queue/queuewords.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/repohealth.d.ts +4 -0
- package/node_modules/@waterplane/shared/dist/repohealth.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/repotwins.d.ts +31 -0
- package/node_modules/@waterplane/shared/dist/repotwins.js +52 -0
- package/node_modules/@waterplane/shared/dist/repotwins.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/requirements.js +4 -1
- package/node_modules/@waterplane/shared/dist/requirements.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/schedule/schedaction.d.ts +29 -0
- package/node_modules/@waterplane/shared/dist/schedule/schedaction.js +22 -0
- package/node_modules/@waterplane/shared/dist/schedule/schedaction.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/schedule/schedclean.js +26 -0
- package/node_modules/@waterplane/shared/dist/schedule/schedclean.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/schedule/schedhorizon.d.ts +1 -0
- package/node_modules/@waterplane/shared/dist/schedule/schedhorizon.js +1 -0
- package/node_modules/@waterplane/shared/dist/schedule/schedhorizon.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/schedule.d.ts +1 -1
- package/node_modules/@waterplane/shared/dist/schedule.js +1 -1
- package/node_modules/@waterplane/shared/dist/schedule.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/sessionbudget.d.ts +34 -7
- package/node_modules/@waterplane/shared/dist/sessionbudget.js +59 -21
- package/node_modules/@waterplane/shared/dist/sessionbudget.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/sweep.d.ts +2 -1
- package/node_modules/@waterplane/shared/dist/sweep.js +2 -1
- package/node_modules/@waterplane/shared/dist/sweep.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/tokens.d.ts +4 -3
- package/node_modules/@waterplane/shared/dist/tokens.js +9 -7
- package/node_modules/@waterplane/shared/dist/tokens.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/weekburn.d.ts +144 -0
- package/node_modules/@waterplane/shared/dist/weekburn.js +250 -0
- package/node_modules/@waterplane/shared/dist/weekburn.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/wire/alwayson.d.ts +64 -0
- package/node_modules/@waterplane/shared/dist/wire/alwayson.js +7 -0
- package/node_modules/@waterplane/shared/dist/wire/alwayson.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/wire/backend.d.ts +4 -0
- package/node_modules/@waterplane/shared/dist/wire/backendtokens.d.ts +6 -0
- package/node_modules/@waterplane/shared/dist/wire/backendtokens.js +0 -9
- package/node_modules/@waterplane/shared/dist/wire/backendtokens.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/wire/costwindow.d.ts +25 -0
- package/node_modules/@waterplane/shared/dist/wire/messages/clienthost.d.ts +15 -1
- package/node_modules/@waterplane/shared/dist/wire/messages/clientsession.d.ts +24 -0
- package/node_modules/@waterplane/shared/dist/wire/messages/hosttools.d.ts +12 -2
- package/node_modules/@waterplane/shared/dist/wire/notify.d.ts +194 -1
- package/node_modules/@waterplane/shared/dist/wire/notify.js +139 -1
- package/node_modules/@waterplane/shared/dist/wire/notify.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/wire/pullrequest.d.ts +42 -0
- package/node_modules/@waterplane/shared/dist/wire/pullrequest.js +2 -0
- package/node_modules/@waterplane/shared/dist/wire/pullrequest.js.map +1 -0
- package/node_modules/@waterplane/shared/dist/wire/repo.d.ts +131 -0
- package/node_modules/@waterplane/shared/dist/wire/repo.js +8 -3
- package/node_modules/@waterplane/shared/dist/wire/repo.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/wire/sent.d.ts +3 -1
- package/node_modules/@waterplane/shared/dist/wire/session/contextspark.d.ts +7 -0
- package/node_modules/@waterplane/shared/dist/wire/session/info.d.ts +4 -1
- package/node_modules/@waterplane/shared/dist/wire/session/launch.d.ts +36 -0
- package/node_modules/@waterplane/shared/dist/wire/session.d.ts +1 -1
- package/node_modules/@waterplane/shared/dist/wire/telemetry.d.ts +30 -0
- package/node_modules/@waterplane/shared/dist/wire/work.d.ts +13 -0
- package/node_modules/@waterplane/shared/dist/wire/work.js.map +1 -1
- package/node_modules/@waterplane/shared/dist/wordof.d.ts +11 -0
- package/node_modules/@waterplane/shared/dist/wordof.js +14 -0
- package/node_modules/@waterplane/shared/dist/wordof.js.map +1 -0
- package/npm-shrinkwrap.json +3 -3
- package/package.json +2 -2
- package/packages/extensions/scorecard/waterplane-plugin.json +10 -0
- package/packages/host/dist/agentexposure.d.ts +13 -0
- package/packages/host/dist/agentexposure.js +90 -0
- package/packages/host/dist/agentexposure.js.map +1 -0
- package/packages/host/dist/agentintents.js +7 -8
- package/packages/host/dist/agentintents.js.map +1 -1
- package/packages/host/dist/agentwatch.d.ts +3 -7
- package/packages/host/dist/agentwatch.js.map +1 -1
- package/packages/host/dist/alwayson.d.ts +18 -0
- package/packages/host/dist/alwayson.js +159 -0
- package/packages/host/dist/alwayson.js.map +1 -0
- package/packages/host/dist/answergate.d.ts +3 -7
- package/packages/host/dist/answergate.js.map +1 -1
- package/packages/host/dist/attentionstore.d.ts +94 -0
- package/packages/host/dist/attentionstore.js +232 -0
- package/packages/host/dist/attentionstore.js.map +1 -0
- package/packages/host/dist/backends/claude-sources.d.ts +2 -0
- package/packages/host/dist/backends/claude-sources.js +12 -0
- package/packages/host/dist/backends/claude-sources.js.map +1 -1
- package/packages/host/dist/backends/claude.js +3 -2
- package/packages/host/dist/backends/claude.js.map +1 -1
- package/packages/host/dist/backends/derive.js +1 -0
- package/packages/host/dist/backends/derive.js.map +1 -1
- package/packages/host/dist/backends/overhead.d.ts +7 -5
- package/packages/host/dist/backends/overhead.js +15 -13
- package/packages/host/dist/backends/overhead.js.map +1 -1
- package/packages/host/dist/backends/registry.js +4 -1
- package/packages/host/dist/backends/registry.js.map +1 -1
- package/packages/host/dist/backends/types.d.ts +2 -0
- package/packages/host/dist/besidespend.d.ts +22 -0
- package/packages/host/dist/besidespend.js +65 -0
- package/packages/host/dist/besidespend.js.map +1 -0
- package/packages/host/dist/boxkit.d.ts +19 -0
- package/packages/host/dist/boxkit.js +38 -0
- package/packages/host/dist/boxkit.js.map +1 -0
- package/packages/host/dist/branchrules.d.ts +14 -0
- package/packages/host/dist/branchrules.js +47 -0
- package/packages/host/dist/branchrules.js.map +1 -0
- package/packages/host/dist/budget.d.ts +3 -2
- package/packages/host/dist/budget.js +5 -3
- package/packages/host/dist/budget.js.map +1 -1
- package/packages/host/dist/builds.d.ts +31 -1
- package/packages/host/dist/builds.js +55 -3
- package/packages/host/dist/builds.js.map +1 -1
- package/packages/host/dist/buildversions.d.ts +2 -0
- package/packages/host/dist/buildversions.js +36 -0
- package/packages/host/dist/buildversions.js.map +1 -0
- package/packages/host/dist/burnwatch.d.ts +23 -11
- package/packages/host/dist/burnwatch.js +57 -3
- package/packages/host/dist/burnwatch.js.map +1 -1
- package/packages/host/dist/changebrief.d.ts +37 -0
- package/packages/host/dist/changebrief.js +157 -0
- package/packages/host/dist/changebrief.js.map +1 -0
- package/packages/host/dist/cli/index.js +1 -1
- package/packages/host/dist/cli/index.js.map +1 -1
- package/packages/host/dist/clihealth.d.ts +2 -0
- package/packages/host/dist/clihealth.js +11 -2
- package/packages/host/dist/clihealth.js.map +1 -1
- package/packages/host/dist/compliance.d.ts +5 -1
- package/packages/host/dist/compliance.js +70 -31
- package/packages/host/dist/compliance.js.map +1 -1
- package/packages/host/dist/composer.d.ts +3 -1
- package/packages/host/dist/composer.js +3 -1
- package/packages/host/dist/composer.js.map +1 -1
- package/packages/host/dist/context.js +29 -4
- package/packages/host/dist/context.js.map +1 -1
- package/packages/host/dist/convlog.d.ts +1 -1
- package/packages/host/dist/convlog.js +1 -1
- package/packages/host/dist/costwindow.d.ts +25 -0
- package/packages/host/dist/costwindow.js +63 -1
- package/packages/host/dist/costwindow.js.map +1 -1
- package/packages/host/dist/ctxlog/ctxagents.js +16 -25
- package/packages/host/dist/ctxlog/ctxagents.js.map +1 -1
- package/packages/host/dist/ctxlog/ctxcursor.d.ts +36 -1
- package/packages/host/dist/ctxlog/ctxcursor.js +96 -2
- package/packages/host/dist/ctxlog/ctxcursor.js.map +1 -1
- package/packages/host/dist/ctxlog/ctxproject.js +2 -1
- package/packages/host/dist/ctxlog/ctxproject.js.map +1 -1
- package/packages/host/dist/ctxlog/ctxupdate.js +30 -24
- package/packages/host/dist/ctxlog/ctxupdate.js.map +1 -1
- package/packages/host/dist/ctxlog/usagerecord.d.ts +28 -0
- package/packages/host/dist/ctxlog/usagerecord.js +81 -0
- package/packages/host/dist/ctxlog/usagerecord.js.map +1 -0
- package/packages/host/dist/diskwatch.d.ts +4 -6
- package/packages/host/dist/diskwatch.js +3 -1
- package/packages/host/dist/diskwatch.js.map +1 -1
- package/packages/host/dist/eraseen.d.ts +6 -0
- package/packages/host/dist/eraseen.js +100 -0
- package/packages/host/dist/eraseen.js.map +1 -0
- package/packages/host/dist/explainjob.d.ts +24 -0
- package/packages/host/dist/explainjob.js +80 -0
- package/packages/host/dist/explainjob.js.map +1 -0
- package/packages/host/dist/exposure.d.ts +56 -0
- package/packages/host/dist/exposure.js +371 -0
- package/packages/host/dist/exposure.js.map +1 -0
- package/packages/host/dist/exposurepush.d.ts +28 -0
- package/packages/host/dist/exposurepush.js +136 -0
- package/packages/host/dist/exposurepush.js.map +1 -0
- package/packages/host/dist/exposurerun.d.ts +18 -0
- package/packages/host/dist/exposurerun.js +126 -0
- package/packages/host/dist/exposurerun.js.map +1 -0
- package/packages/host/dist/exposurewatch.d.ts +29 -0
- package/packages/host/dist/exposurewatch.js +127 -0
- package/packages/host/dist/exposurewatch.js.map +1 -0
- package/packages/host/dist/extensions/scorecard/host/engine.d.mts +54 -0
- package/packages/host/dist/extensions/scorecard/host/engine.mjs +303 -0
- package/packages/host/dist/extensions/scorecard/host/engine.mjs.map +1 -0
- package/packages/host/dist/extensions/scorecard/host/gitslug.d.mts +5 -0
- package/packages/host/dist/extensions/scorecard/host/gitslug.mjs +45 -0
- package/packages/host/dist/extensions/scorecard/host/gitslug.mjs.map +1 -0
- package/packages/host/dist/extensions/scorecard/host/index.d.mts +15 -0
- package/packages/host/dist/extensions/scorecard/host/index.mjs +47 -0
- package/packages/host/dist/extensions/scorecard/host/index.mjs.map +1 -0
- package/packages/host/dist/extensions/scorecard/host/store.d.mts +12 -0
- package/packages/host/dist/extensions/scorecard/host/store.mjs +91 -0
- package/packages/host/dist/extensions/scorecard/host/store.mjs.map +1 -0
- package/packages/host/dist/extensions/scorecard/shared/logic.d.mts +42 -0
- package/packages/host/dist/extensions/scorecard/shared/logic.mjs +170 -0
- package/packages/host/dist/extensions/scorecard/shared/logic.mjs.map +1 -0
- package/packages/host/dist/extensions/scorecard/shared/wire.d.mts +140 -0
- package/packages/host/dist/extensions/scorecard/shared/wire.mjs +29 -0
- package/packages/host/dist/extensions/scorecard/shared/wire.mjs.map +1 -0
- package/packages/host/dist/files.d.ts +14 -12
- package/packages/host/dist/files.js +64 -94
- package/packages/host/dist/files.js.map +1 -1
- package/packages/host/dist/forge/github.d.ts +3 -0
- package/packages/host/dist/forge/github.js +96 -0
- package/packages/host/dist/forge/github.js.map +1 -0
- package/packages/host/dist/forge/index.d.ts +14 -0
- package/packages/host/dist/forge/index.js +32 -0
- package/packages/host/dist/forge/index.js.map +1 -0
- package/packages/host/dist/forge/types.d.ts +58 -0
- package/packages/host/dist/forge/types.js +2 -0
- package/packages/host/dist/forge/types.js.map +1 -0
- package/packages/host/dist/git.d.ts +41 -16
- package/packages/host/dist/git.js +162 -101
- package/packages/host/dist/git.js.map +1 -1
- package/packages/host/dist/gitnotify.d.ts +54 -0
- package/packages/host/dist/gitnotify.js +167 -0
- package/packages/host/dist/gitnotify.js.map +1 -0
- package/packages/host/dist/healthwatch.d.ts +2 -1
- package/packages/host/dist/healthwatch.js +4 -2
- package/packages/host/dist/healthwatch.js.map +1 -1
- package/packages/host/dist/hoststore.js +2 -2
- package/packages/host/dist/hoststore.js.map +1 -1
- package/packages/host/dist/intents/adapters.js +68 -19
- package/packages/host/dist/intents/adapters.js.map +1 -1
- package/packages/host/dist/intents/clock.d.ts +6 -3
- package/packages/host/dist/intents/clock.js +19 -5
- package/packages/host/dist/intents/clock.js.map +1 -1
- package/packages/host/dist/intents/contract.d.ts +15 -5
- package/packages/host/dist/intents/contract.js.map +1 -1
- package/packages/host/dist/intents/disk.d.ts +16 -0
- package/packages/host/dist/intents/disk.js +26 -1
- package/packages/host/dist/intents/disk.js.map +1 -1
- package/packages/host/dist/intents/fire.js +7 -1
- package/packages/host/dist/intents/fire.js.map +1 -1
- package/packages/host/dist/intents/ladder.js +3 -1
- package/packages/host/dist/intents/ladder.js.map +1 -1
- package/packages/host/dist/intents/manager.d.ts +3 -3
- package/packages/host/dist/intents/manager.js +2 -2
- package/packages/host/dist/intents/manager.js.map +1 -1
- package/packages/host/dist/intents/watch.d.ts +27 -3
- package/packages/host/dist/intents/watch.js +70 -9
- package/packages/host/dist/intents/watch.js.map +1 -1
- package/packages/host/dist/intents/write.d.ts +28 -1
- package/packages/host/dist/intents/write.js +87 -2
- package/packages/host/dist/intents/write.js.map +1 -1
- package/packages/host/dist/localcistatus.d.ts +22 -0
- package/packages/host/dist/localcistatus.js +105 -0
- package/packages/host/dist/localcistatus.js.map +1 -0
- package/packages/host/dist/main.js +45 -12
- package/packages/host/dist/main.js.map +1 -1
- package/packages/host/dist/net.d.ts +2 -0
- package/packages/host/dist/net.js +11 -2
- package/packages/host/dist/net.js.map +1 -1
- package/packages/host/dist/netlog.d.ts +40 -0
- package/packages/host/dist/netlog.js +165 -0
- package/packages/host/dist/netlog.js.map +1 -0
- package/packages/host/dist/netretrycfg.d.ts +7 -0
- package/packages/host/dist/netretrycfg.js +51 -0
- package/packages/host/dist/netretrycfg.js.map +1 -0
- package/packages/host/dist/notifyprefs.d.ts +6 -2
- package/packages/host/dist/notifyprefs.js +20 -5
- package/packages/host/dist/notifyprefs.js.map +1 -1
- package/packages/host/dist/notifytypes.d.ts +63 -0
- package/packages/host/dist/notifytypes.js +2 -0
- package/packages/host/dist/notifytypes.js.map +1 -0
- package/packages/host/dist/opendeliveries.js +24 -0
- package/packages/host/dist/opendeliveries.js.map +1 -1
- package/packages/host/dist/optins.d.ts +28 -1
- package/packages/host/dist/optins.js +96 -4
- package/packages/host/dist/optins.js.map +1 -1
- package/packages/host/dist/peers/agentpeer.js +1 -1
- package/packages/host/dist/peers/agentpeer.js.map +1 -1
- package/packages/host/dist/peers/jobs.d.ts +2 -4
- package/packages/host/dist/peers/jobs.js +6 -1
- package/packages/host/dist/peers/jobs.js.map +1 -1
- package/packages/host/dist/periodspend.d.ts +22 -3
- package/packages/host/dist/periodspend.js +44 -4
- package/packages/host/dist/periodspend.js.map +1 -1
- package/packages/host/dist/plugins/pluginapi.js +40 -10
- package/packages/host/dist/plugins/pluginapi.js.map +1 -1
- package/packages/host/dist/plugins/pluginregistry.d.ts +3 -8
- package/packages/host/dist/plugins/pluginregistry.js +1 -1
- package/packages/host/dist/plugins/pluginregistry.js.map +1 -1
- package/packages/host/dist/plugins/plugintoolkit/sessionof.d.ts +47 -0
- package/packages/host/dist/plugins/plugintoolkit/sessionof.js +136 -0
- package/packages/host/dist/plugins/plugintoolkit/sessionof.js.map +1 -0
- package/packages/host/dist/prmergestore.d.ts +31 -0
- package/packages/host/dist/prmergestore.js +106 -0
- package/packages/host/dist/prmergestore.js.map +1 -0
- package/packages/host/dist/protectmain.d.ts +35 -0
- package/packages/host/dist/protectmain.js +73 -0
- package/packages/host/dist/protectmain.js.map +1 -0
- package/packages/host/dist/prpush.d.ts +38 -0
- package/packages/host/dist/prpush.js +351 -0
- package/packages/host/dist/prpush.js.map +1 -0
- package/packages/host/dist/prs.d.ts +118 -0
- package/packages/host/dist/prs.js +681 -0
- package/packages/host/dist/prs.js.map +1 -0
- package/packages/host/dist/push.d.ts +85 -1
- package/packages/host/dist/push.js +238 -8
- package/packages/host/dist/push.js.map +1 -1
- package/packages/host/dist/pushlanded.d.ts +29 -0
- package/packages/host/dist/pushlanded.js +61 -0
- package/packages/host/dist/pushlanded.js.map +1 -0
- package/packages/host/dist/pushreach.d.ts +9 -0
- package/packages/host/dist/pushreach.js +102 -0
- package/packages/host/dist/pushreach.js.map +1 -0
- package/packages/host/dist/pushverdict.d.ts +42 -0
- package/packages/host/dist/pushverdict.js +110 -0
- package/packages/host/dist/pushverdict.js.map +1 -0
- package/packages/host/dist/render.d.ts +57 -0
- package/packages/host/dist/render.js +57 -39
- package/packages/host/dist/render.js.map +1 -1
- package/packages/host/dist/repohealth.js +5 -2
- package/packages/host/dist/repohealth.js.map +1 -1
- package/packages/host/dist/repohealthapproval.d.ts +3 -0
- package/packages/host/dist/repohealthapproval.js +92 -2
- package/packages/host/dist/repohealthapproval.js.map +1 -1
- package/packages/host/dist/repos.d.ts +7 -1
- package/packages/host/dist/repos.js +30 -3
- package/packages/host/dist/repos.js.map +1 -1
- package/packages/host/dist/reposkill.d.ts +8 -5
- package/packages/host/dist/reposkill.js +16 -11
- package/packages/host/dist/reposkill.js.map +1 -1
- package/packages/host/dist/reposkilltext.d.ts +8 -1
- package/packages/host/dist/reposkilltext.js +85 -12
- package/packages/host/dist/reposkilltext.js.map +1 -1
- package/packages/host/dist/routes/apigitspend.d.ts +2 -0
- package/packages/host/dist/routes/apigitspend.js +40 -0
- package/packages/host/dist/routes/apigitspend.js.map +1 -0
- package/packages/host/dist/routes/apihost.js +17 -0
- package/packages/host/dist/routes/apihost.js.map +1 -1
- package/packages/host/dist/routes/apiprs.d.ts +2 -0
- package/packages/host/dist/routes/apiprs.js +47 -0
- package/packages/host/dist/routes/apiprs.js.map +1 -0
- package/packages/host/dist/routes/apirepofiles.js +13 -1
- package/packages/host/dist/routes/apirepofiles.js.map +1 -1
- package/packages/host/dist/routes/apirepowork.d.ts +6 -0
- package/packages/host/dist/routes/apirepowork.js +42 -33
- package/packages/host/dist/routes/apirepowork.js.map +1 -1
- package/packages/host/dist/routes/apiroutes.js +2 -1
- package/packages/host/dist/routes/apiroutes.js.map +1 -1
- package/packages/host/dist/routes/apisession.js +24 -0
- package/packages/host/dist/routes/apisession.js.map +1 -1
- package/packages/host/dist/routes/apistats.js +12 -7
- package/packages/host/dist/routes/apistats.js.map +1 -1
- package/packages/host/dist/routes/apisystem.js +23 -1
- package/packages/host/dist/routes/apisystem.js.map +1 -1
- package/packages/host/dist/routes/apitable.d.ts +10 -0
- package/packages/host/dist/routes/apitable.js.map +1 -1
- package/packages/host/dist/routes/apiweekburn.d.ts +2 -0
- package/packages/host/dist/routes/apiweekburn.js +30 -0
- package/packages/host/dist/routes/apiweekburn.js.map +1 -0
- package/packages/host/dist/routes/session.js +10 -0
- package/packages/host/dist/routes/session.js.map +1 -1
- package/packages/host/dist/routes/system.js +34 -6
- package/packages/host/dist/routes/system.js.map +1 -1
- package/packages/host/dist/routes/types.d.ts +29 -21
- package/packages/host/dist/routes/work/workbuild.js +3 -2
- package/packages/host/dist/routes/work/workbuild.js.map +1 -1
- package/packages/host/dist/routes/work/workintent.js +6 -2
- package/packages/host/dist/routes/work/workintent.js.map +1 -1
- package/packages/host/dist/routes/work/workschedule.js +33 -3
- package/packages/host/dist/routes/work/workschedule.js.map +1 -1
- package/packages/host/dist/screenlog.d.ts +20 -0
- package/packages/host/dist/screenlog.js +40 -0
- package/packages/host/dist/screenlog.js.map +1 -1
- package/packages/host/dist/server/billingwire.d.ts +3 -1
- package/packages/host/dist/server/billingwire.js +4 -2
- package/packages/host/dist/server/billingwire.js.map +1 -1
- package/packages/host/dist/server/clients.d.ts +14 -24
- package/packages/host/dist/server/clients.js +81 -11
- package/packages/host/dist/server/clients.js.map +1 -1
- package/packages/host/dist/server/ctx.d.ts +2 -0
- package/packages/host/dist/server/ctxseal.d.ts +1 -1
- package/packages/host/dist/server/ctxseal.js +6 -6
- package/packages/host/dist/server/ctxseal.js.map +1 -1
- package/packages/host/dist/server/deliveries.js +4 -2
- package/packages/host/dist/server/deliveries.js.map +1 -1
- package/packages/host/dist/server/http.js +2 -2
- package/packages/host/dist/server/http.js.map +1 -1
- package/packages/host/dist/server/intentDeps.js +13 -6
- package/packages/host/dist/server/intentDeps.js.map +1 -1
- package/packages/host/dist/server/intentEvents.js +9 -4
- package/packages/host/dist/server/intentEvents.js.map +1 -1
- package/packages/host/dist/server/scan.js +23 -1
- package/packages/host/dist/server/scan.js.map +1 -1
- package/packages/host/dist/server/sessionEvents.js +40 -15
- package/packages/host/dist/server/sessionEvents.js.map +1 -1
- package/packages/host/dist/server/shutdown.d.ts +3 -1
- package/packages/host/dist/server/shutdown.js +9 -1
- package/packages/host/dist/server/shutdown.js.map +1 -1
- package/packages/host/dist/sessionbudget.d.ts +2 -0
- package/packages/host/dist/sessionbudget.js +17 -6
- package/packages/host/dist/sessionbudget.js.map +1 -1
- package/packages/host/dist/sessions/agentpoll.d.ts +42 -0
- package/packages/host/dist/sessions/agentpoll.js +193 -0
- package/packages/host/dist/sessions/agentpoll.js.map +1 -0
- package/packages/host/dist/sessions/apiretry.d.ts +106 -0
- package/packages/host/dist/sessions/apiretry.js +387 -0
- package/packages/host/dist/sessions/apiretry.js.map +1 -0
- package/packages/host/dist/sessions/askwatch.d.ts +62 -0
- package/packages/host/dist/sessions/askwatch.js +169 -0
- package/packages/host/dist/sessions/askwatch.js.map +1 -0
- package/packages/host/dist/sessions/boxes.d.ts +2 -23
- package/packages/host/dist/sessions/boxes.js +10 -664
- package/packages/host/dist/sessions/boxes.js.map +1 -1
- package/packages/host/dist/sessions/boxread.d.ts +47 -0
- package/packages/host/dist/sessions/boxread.js +628 -0
- package/packages/host/dist/sessions/boxread.js.map +1 -0
- package/packages/host/dist/sessions/core.d.ts +22 -1
- package/packages/host/dist/sessions/ctxseries.js +3 -0
- package/packages/host/dist/sessions/ctxseries.js.map +1 -1
- package/packages/host/dist/sessions/drive.d.ts +20 -6
- package/packages/host/dist/sessions/drive.js +45 -12
- package/packages/host/dist/sessions/drive.js.map +1 -1
- package/packages/host/dist/sessions/endsession.d.ts +11 -0
- package/packages/host/dist/sessions/endsession.js +71 -0
- package/packages/host/dist/sessions/endsession.js.map +1 -0
- package/packages/host/dist/sessions/haltall.d.ts +14 -0
- package/packages/host/dist/sessions/haltall.js +32 -1
- package/packages/host/dist/sessions/haltall.js.map +1 -1
- package/packages/host/dist/sessions/knobs.d.ts +11 -0
- package/packages/host/dist/sessions/knobs.js +12 -0
- package/packages/host/dist/sessions/knobs.js.map +1 -1
- package/packages/host/dist/sessions/record.js +7 -2
- package/packages/host/dist/sessions/record.js.map +1 -1
- package/packages/host/dist/sessions/resume.d.ts +17 -0
- package/packages/host/dist/sessions/resume.js +65 -11
- package/packages/host/dist/sessions/resume.js.map +1 -1
- package/packages/host/dist/sessions/roster.js +3 -0
- package/packages/host/dist/sessions/roster.js.map +1 -1
- package/packages/host/dist/sessions/sidechannel.d.ts +1 -1
- package/packages/host/dist/sessions/sidechannel.js +2 -2
- package/packages/host/dist/sessions/tmux.js +21 -2
- package/packages/host/dist/sessions/tmux.js.map +1 -1
- package/packages/host/dist/sessions/turn.d.ts +15 -58
- package/packages/host/dist/sessions/turn.js +19 -358
- package/packages/host/dist/sessions/turn.js.map +1 -1
- package/packages/host/dist/sessions.d.ts +10 -7
- package/packages/host/dist/sessions.js +31 -79
- package/packages/host/dist/sessions.js.map +1 -1
- package/packages/host/dist/settle.d.ts +30 -2
- package/packages/host/dist/settle.js +94 -49
- package/packages/host/dist/settle.js.map +1 -1
- package/packages/host/dist/setupprefs.d.ts +26 -1
- package/packages/host/dist/setupprefs.js +49 -1
- package/packages/host/dist/setupprefs.js.map +1 -1
- package/packages/host/dist/setupwatch.d.ts +10 -8
- package/packages/host/dist/setupwatch.js +19 -16
- package/packages/host/dist/setupwatch.js.map +1 -1
- package/packages/host/dist/sidecar/sidecarname.d.ts +2 -0
- package/packages/host/dist/sidecar/sidecarname.js +5 -1
- package/packages/host/dist/sidecar/sidecarname.js.map +1 -1
- package/packages/host/dist/sidecar/sidecarroute.d.ts +1 -1
- package/packages/host/dist/sidecar/sidecarroute.js +5 -0
- package/packages/host/dist/sidecar/sidecarroute.js.map +1 -1
- package/packages/host/dist/sidecar.d.ts +1 -1
- package/packages/host/dist/sidecar.js +1 -1
- package/packages/host/dist/sidecar.js.map +1 -1
- package/packages/host/dist/tokenscan.d.ts +4 -4
- package/packages/host/dist/tokenscan.js +18 -37
- package/packages/host/dist/tokenscan.js.map +1 -1
- package/packages/host/dist/tokenstats.js +16 -18
- package/packages/host/dist/tokenstats.js.map +1 -1
- package/packages/host/dist/transcript/transcriptparse.js +17 -26
- package/packages/host/dist/transcript/transcriptparse.js.map +1 -1
- package/packages/host/dist/transcript/transcriptturns.d.ts +29 -0
- package/packages/host/dist/transcript/transcriptturns.js +27 -0
- package/packages/host/dist/transcript/transcriptturns.js.map +1 -1
- package/packages/host/dist/transcript.d.ts +1 -1
- package/packages/host/dist/transcript.js +1 -1
- package/packages/host/dist/transcript.js.map +1 -1
- package/packages/host/dist/usagesources.d.ts +1 -1
- package/packages/host/dist/usagesources.js +7 -2
- package/packages/host/dist/usagesources.js.map +1 -1
- package/packages/host/dist/visualskill.js +2 -2
- package/packages/host/dist/weekburn.d.ts +79 -0
- package/packages/host/dist/weekburn.js +276 -0
- package/packages/host/dist/weekburn.js.map +1 -0
- package/packages/host/dist/worktreeleftover.d.ts +9 -0
- package/packages/host/dist/worktreeleftover.js +17 -1
- package/packages/host/dist/worktreeleftover.js.map +1 -1
- package/packages/web/dist/assets/demo-DsZGy-MC.js +24 -0
- package/packages/web/dist/assets/icons-eqlvjswV.js +1 -0
- package/packages/web/dist/assets/index-GHwJuQb3.js +169 -0
- package/packages/web/dist/assets/index-VzDSZwwH.css +1 -0
- package/packages/web/dist/assets/shared-BWk5jXWb.js +49 -0
- package/packages/web/dist/assets/sheets-Dj-0m0DB.js +232 -0
- package/packages/web/dist/assets/{sheets-Bjv2L-cG.css → sheets-DoUhPGK0.css} +1 -1
- package/packages/web/dist/build-id.txt +1 -1
- package/packages/web/dist/buildstamp.json +1 -0
- package/packages/web/dist/index.html +7 -7
- package/packages/web/dist/sw.js +18 -3
- package/release.json +7 -4
- package/scripts/windows/wsl-setup.sh +10 -1
- package/tools/repohealth/constants.mjs +21 -1
- package/tools/repohealth/fixture.json +493 -30
- package/tools/repohealth/lang/typescript-resolve.mjs +354 -0
- package/tools/repohealth/metrics/graph.mjs +258 -0
- package/tools/repohealth/metrics/size.mjs +1 -1
- package/tools/repohealth/own.mjs +4 -4
- package/tools/repohealth/packs/c.mjs +4 -0
- package/tools/repohealth/packs/common.mjs +4 -0
- package/tools/repohealth/packs/dart.mjs +4 -0
- package/tools/repohealth/packs/kotlin.mjs +8 -0
- package/tools/repohealth/packs/python.mjs +8 -0
- package/tools/repohealth/packs/shell.mjs +4 -0
- package/tools/repohealth/packs/typescript.mjs +278 -7
- package/tools/repohealth/readings.mjs +39 -0
- package/tools/repohealth/series.mjs +1 -0
- package/tools/repohealth/snapshot.mjs +14 -0
- package/tools/repohealth/types.mjs +12 -0
- package/tools/repohealth.mjs +2 -0
- package/packages/web/dist/assets/demo-CXlqlYE4.js +0 -23
- package/packages/web/dist/assets/icons-BbqDBVjw.js +0 -1
- package/packages/web/dist/assets/index-CgPoyb3Y.css +0 -1
- package/packages/web/dist/assets/index-D5JKj8DK.js +0 -169
- package/packages/web/dist/assets/shared-eyaskl5l.js +0 -47
- package/packages/web/dist/assets/sheets-BzzL2re1.js +0 -204
|
@@ -280,6 +280,14 @@ export default Object.freeze({
|
|
|
280
280
|
return this.mentions(text, path, opts);
|
|
281
281
|
},
|
|
282
282
|
|
|
283
|
+
// No import-graph rule yet: `metrics/graph.mjs` reports this language absent
|
|
284
|
+
// rather than as a tree with no coupling. `imports` above is the safe-side
|
|
285
|
+
// rule `untested` needs; a graph needs every internal import resolved AND
|
|
286
|
+
// the unresolved ones counted, which this pack does not do.
|
|
287
|
+
graphConfigPath: null,
|
|
288
|
+
graphContext: null,
|
|
289
|
+
graphImports: null,
|
|
290
|
+
graphKeysFor: null,
|
|
283
291
|
/**
|
|
284
292
|
* Every `dir/name` key the module at `path` answers to: each non-empty suffix
|
|
285
293
|
* of its own directory, joined to its basename.
|
|
@@ -447,6 +447,14 @@ export default Object.freeze({
|
|
|
447
447
|
return this.mentions(text, path, opts);
|
|
448
448
|
},
|
|
449
449
|
|
|
450
|
+
// No import-graph rule yet: `metrics/graph.mjs` reports this language absent
|
|
451
|
+
// rather than as a tree with no coupling. `imports` above is the safe-side
|
|
452
|
+
// rule `untested` needs; a graph needs every internal import resolved AND
|
|
453
|
+
// the unresolved ones counted, which this pack does not do.
|
|
454
|
+
graphConfigPath: null,
|
|
455
|
+
graphContext: null,
|
|
456
|
+
graphImports: null,
|
|
457
|
+
graphKeysFor: null,
|
|
450
458
|
/**
|
|
451
459
|
* Every `dir/name` key the module at `path` answers to: each non-empty
|
|
452
460
|
* suffix of its own directory, joined to its basename.
|
|
@@ -73,6 +73,10 @@ export default Object.freeze({
|
|
|
73
73
|
mentions: null,
|
|
74
74
|
keysFor: null,
|
|
75
75
|
imports: null,
|
|
76
|
+
graphConfigPath: null,
|
|
77
|
+
graphContext: null,
|
|
78
|
+
graphImports: null,
|
|
79
|
+
graphKeysFor: null,
|
|
76
80
|
|
|
77
81
|
/**
|
|
78
82
|
* No parser, and a sentence rather than a silence: `metrics/route.mjs` puts
|
|
@@ -115,11 +115,15 @@
|
|
|
115
115
|
* - **Transitive or workspace dependency resolution.** `manifests` counts
|
|
116
116
|
* the keys declared in each `package.json` and resolves nothing: no lock
|
|
117
117
|
* file is read, no version is compared, a workspace link counts as a
|
|
118
|
-
* dependency like any other.
|
|
119
|
-
*
|
|
120
|
-
*
|
|
118
|
+
* dependency like any other. (`graphImports` does map a workspace
|
|
119
|
+
* package's NAME to its directory — which module an import loads, never
|
|
120
|
+
* which version — through `lang/typescript-resolve.mjs`.)
|
|
121
|
+
* - **Any other JS-adjacent manifest.** `deno.json`, `jsr.json` and
|
|
122
|
+
* `bower.json` are not read; `tsconfig.json` is read for its `paths` and
|
|
123
|
+
* `baseUrl` only, by `graphContext`.
|
|
121
124
|
*/
|
|
122
125
|
import { NO_TYPESCRIPT, contentKey, identsOf, loadTypeScript, signedBlocks } from "../lang/typescript-ast.mjs";
|
|
126
|
+
import { RESOLVE_CONFIG_PATH, buildResolveContext, resolveSpecifier } from "../lang/typescript-resolve.mjs";
|
|
123
127
|
|
|
124
128
|
/**
|
|
125
129
|
* The source extensions this pack claims. Module-level rather than written
|
|
@@ -196,6 +200,141 @@ const PATH_REF = new RegExp(
|
|
|
196
200
|
const IMPORT_SPEC =
|
|
197
201
|
/\b(?:import|export)\s+(type\s+)?[\w$*{}\s,]*?\bfrom\s*(["'])([^"'\n]+)\2|\b(?:import\s*\(\s*|import\s*|require\s*\(\s*)(["'])([^"'\n]+)\4/g;
|
|
198
202
|
|
|
203
|
+
/** Words after which a `/` opens a regex rather than divides. */
|
|
204
|
+
const REGEX_AFTER_WORD = new Set(["return", "typeof", "case", "do", "else", "in", "of", "new", "delete", "void", "throw", "instanceof", "yield", "await"]);
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Every import specifier a file's CODE holds, as `{type, spec}` — `type` set
|
|
208
|
+
* for `import type` / `export type`.
|
|
209
|
+
*
|
|
210
|
+
* `IMPORT_SPEC` over the raw text read `// was: import { a } from "./a"` and
|
|
211
|
+
* a fixture held in a template string as edges: a module that no longer
|
|
212
|
+
* imports `./a` was reported in a cycle with it. So the text is lexed first:
|
|
213
|
+
* comments and the body of a template literal or a regex are blanked, and
|
|
214
|
+
* every quoted string is swapped for a placeholder that `IMPORT_SPEC` still
|
|
215
|
+
* reads as a specifier and that maps back to the string. An import spelled
|
|
216
|
+
* INSIDE a string therefore loses its quotes along with its words, and one
|
|
217
|
+
* spelled in code keeps its specifier. The code inside `${…}` is code.
|
|
218
|
+
*
|
|
219
|
+
* Deliberately a lexer, not a parser, and so it misreads some spots. A quote
|
|
220
|
+
* stops at the end of its line, so an apostrophe in JSX text (`<p>don't</p>`)
|
|
221
|
+
* blanks the rest of that line only. Three misreads are not line-bounded:
|
|
222
|
+
*
|
|
223
|
+
* - `/*` in JSX text (`<p>matches src/*.ts</p>`) opens a block comment that
|
|
224
|
+
* runs to the next `*\/` or to the end of the file;
|
|
225
|
+
* - a `/` after `)`, `]` or an identifier is a division, so a regex there
|
|
226
|
+
* holding a backtick (`if (x) /`/.test(s)`) opens a template;
|
|
227
|
+
* - so does a lone backtick in JSX text (`<kbd>`</kbd>`).
|
|
228
|
+
*
|
|
229
|
+
* A template opened that way flips the parity of every backtick after it, and
|
|
230
|
+
* every import from the spot on can be lost — a hidden cycle, a wrong number.
|
|
231
|
+
* When the lex ends with a block comment, a template or a `${` still open,
|
|
232
|
+
* `whole` is false: the file's imports are UNKNOWN, not the short list in
|
|
233
|
+
* `specs`, and `graphImports` says so. A misread that closes again before the
|
|
234
|
+
* end (two such backticks) re-balances and cannot be seen from here.
|
|
235
|
+
*
|
|
236
|
+
* @param {string} text
|
|
237
|
+
* @returns {{specs: {type: boolean, spec: string}[], whole: boolean}}
|
|
238
|
+
*/
|
|
239
|
+
function importSpecs(text) {
|
|
240
|
+
const strings = [];
|
|
241
|
+
const n = text.length;
|
|
242
|
+
let out = "";
|
|
243
|
+
let i = 0;
|
|
244
|
+
let prev = ""; // the last code character emitted, for regex-or-division
|
|
245
|
+
let word = ""; // the identifier `prev` ends, for `return /re/`
|
|
246
|
+
const braces = []; // one `{` depth per open `${`
|
|
247
|
+
let open = false; // a span the lex never closed — see `whole`
|
|
248
|
+
const template = () => {
|
|
249
|
+
while (i < n) {
|
|
250
|
+
const c = text[i];
|
|
251
|
+
if (c === "\\") i += 2;
|
|
252
|
+
else if (c === "`") {
|
|
253
|
+
out += "`";
|
|
254
|
+
i++;
|
|
255
|
+
prev = "`";
|
|
256
|
+
return;
|
|
257
|
+
} else if (c === "$" && text[i + 1] === "{") {
|
|
258
|
+
out += "${";
|
|
259
|
+
i += 2;
|
|
260
|
+
braces.push(0);
|
|
261
|
+
prev = "{";
|
|
262
|
+
return;
|
|
263
|
+
} else i++;
|
|
264
|
+
}
|
|
265
|
+
open = true;
|
|
266
|
+
};
|
|
267
|
+
while (i < n) {
|
|
268
|
+
const c = text[i];
|
|
269
|
+
const d = text[i + 1];
|
|
270
|
+
if (c === "/" && d === "/") {
|
|
271
|
+
while (i < n && text[i] !== "\n") i++;
|
|
272
|
+
out += " ";
|
|
273
|
+
} else if (c === "/" && d === "*") {
|
|
274
|
+
const end = text.indexOf("*/", i + 2);
|
|
275
|
+
if (end === -1) open = true;
|
|
276
|
+
i = end === -1 ? n : end + 2;
|
|
277
|
+
out += " ";
|
|
278
|
+
} else if (c === '"' || c === "'") {
|
|
279
|
+
let j = i + 1;
|
|
280
|
+
let body = "";
|
|
281
|
+
while (j < n && text[j] !== c && text[j] !== "\n") {
|
|
282
|
+
if (text[j] === "\\") body += text[j++];
|
|
283
|
+
body += text[j++] ?? "";
|
|
284
|
+
}
|
|
285
|
+
i = text[j] === c ? j + 1 : j;
|
|
286
|
+
out += `${c}\u0000${strings.length}${c}`;
|
|
287
|
+
strings.push(body);
|
|
288
|
+
prev = c;
|
|
289
|
+
} else if (c === "`") {
|
|
290
|
+
i++;
|
|
291
|
+
out += "`";
|
|
292
|
+
template();
|
|
293
|
+
} else if (c === "/" && (prev === "" || /[(,=:[!&|?{};+\-*%<>~^]/.test(prev) || (/[\w$]/.test(prev) && REGEX_AFTER_WORD.has(word)))) {
|
|
294
|
+
let j = i + 1;
|
|
295
|
+
let cls = false;
|
|
296
|
+
while (j < n && text[j] !== "\n" && (cls || text[j] !== "/")) {
|
|
297
|
+
if (text[j] === "\\") j++;
|
|
298
|
+
else if (text[j] === "[") cls = true;
|
|
299
|
+
else if (text[j] === "]") cls = false;
|
|
300
|
+
j++;
|
|
301
|
+
}
|
|
302
|
+
i = j + 1;
|
|
303
|
+
out += " 0 ";
|
|
304
|
+
prev = "0";
|
|
305
|
+
word = "";
|
|
306
|
+
} else if (braces.length && c === "{") {
|
|
307
|
+
braces[braces.length - 1]++;
|
|
308
|
+
out += c;
|
|
309
|
+
prev = c;
|
|
310
|
+
i++;
|
|
311
|
+
} else if (braces.length && c === "}") {
|
|
312
|
+
i++;
|
|
313
|
+
if (braces[braces.length - 1] === 0) {
|
|
314
|
+
braces.pop();
|
|
315
|
+
out += "}";
|
|
316
|
+
template();
|
|
317
|
+
} else {
|
|
318
|
+
braces[braces.length - 1]--;
|
|
319
|
+
out += c;
|
|
320
|
+
prev = c;
|
|
321
|
+
}
|
|
322
|
+
} else {
|
|
323
|
+
if (/[\w$]/.test(c)) word = /[\w$]/.test(prev) ? word + c : c;
|
|
324
|
+
if (!/\s/.test(c)) prev = c;
|
|
325
|
+
out += c;
|
|
326
|
+
i++;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
const specs = [];
|
|
330
|
+
for (const m of out.matchAll(IMPORT_SPEC)) {
|
|
331
|
+
const raw = m[3] ?? m[5];
|
|
332
|
+
if (!raw.startsWith("\u0000")) continue; // not a whole string: a placeholder is the only literal code holds
|
|
333
|
+
specs.push({ type: Boolean(m[1]), spec: strings[Number(raw.slice(1))] });
|
|
334
|
+
}
|
|
335
|
+
return { specs, whole: !open && braces.length === 0 };
|
|
336
|
+
}
|
|
337
|
+
|
|
199
338
|
/** `packages/web/src/foo/bar.tsx` -> `bar`. */
|
|
200
339
|
function basename(path) {
|
|
201
340
|
const slash = path.lastIndexOf("/");
|
|
@@ -250,6 +389,51 @@ function refKeys(text, base, requireDir, out) {
|
|
|
250
389
|
}
|
|
251
390
|
}
|
|
252
391
|
|
|
392
|
+
/**
|
|
393
|
+
* A specifier naming something that is not a module of this family — a
|
|
394
|
+
* stylesheet, an image, JSON, another framework's component file. It loads
|
|
395
|
+
* bytes, not code this pack measures, so it is neither an edge nor a miss.
|
|
396
|
+
*/
|
|
397
|
+
const ASSET_SPEC = /\.(?:css|scss|sass|less|styl|svg|png|jpe?g|gif|webp|avif|ico|json|md|mdx|html?|txt|wasm|woff2?|ttf|otf|mp3|mp4|webm|wav|ya?ml|graphql|gql|vue|svelte|astro)(?:\?.*)?$/i;
|
|
398
|
+
|
|
399
|
+
/** A repo path's extension as this family writes it, declarations included. */
|
|
400
|
+
const CODE_EXT = new RegExp(`(?:\\.d)?\\.(?:${extAlternation([...EXTS, ...EMITS])})$`);
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* The one key a resolved repo path answers to — its full `dir/name`, which is
|
|
404
|
+
* always among `keysFor` of the module there (and of an `index` under it,
|
|
405
|
+
* which answers to its directory). `null` for a file at the tree's root,
|
|
406
|
+
* which `keysFor` offers no key for either.
|
|
407
|
+
*/
|
|
408
|
+
function pathKey(repoPath) {
|
|
409
|
+
const bare = repoPath.replace(CODE_EXT, "");
|
|
410
|
+
return bare.includes("/") ? bare : null;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Specifiers per blob, for `graphImports`: the regex pass is the cost. `null`
|
|
415
|
+
* when the lex did not end whole (`importSpecs`): the file's imports are
|
|
416
|
+
* unknown, and a short list would be a deleted edge.
|
|
417
|
+
*/
|
|
418
|
+
const SPECS_MEMO = new Map();
|
|
419
|
+
function specsOf(file) {
|
|
420
|
+
const scan = () => {
|
|
421
|
+
const { specs, whole } = importSpecs(file.text);
|
|
422
|
+
if (!whole) return null;
|
|
423
|
+
const out = [];
|
|
424
|
+
for (const { type, spec } of specs) {
|
|
425
|
+
if (type) continue; // `import type`: erased, loads nothing — the rule `imports` reads by.
|
|
426
|
+
if (!ASSET_SPEC.test(spec) && !out.includes(spec)) out.push(spec);
|
|
427
|
+
}
|
|
428
|
+
return out;
|
|
429
|
+
};
|
|
430
|
+
if (!file.oid) return scan();
|
|
431
|
+
if (SPECS_MEMO.has(file.oid)) return SPECS_MEMO.get(file.oid);
|
|
432
|
+
const specs = scan();
|
|
433
|
+
SPECS_MEMO.set(file.oid, specs);
|
|
434
|
+
return specs;
|
|
435
|
+
}
|
|
436
|
+
|
|
253
437
|
export default Object.freeze({
|
|
254
438
|
name: "typescript",
|
|
255
439
|
// 2: the test globs stopped being this repo's conventions and became the
|
|
@@ -260,7 +444,14 @@ export default Object.freeze({
|
|
|
260
444
|
// 4: `import type` / `export type` are not edges — they load nothing.
|
|
261
445
|
// 5: `hatchExplain` exists — which escapes carry their reason (see below).
|
|
262
446
|
// 6: `.mts` / `.cts` are source (and `.d.mts` / `.d.cts` are not) — see the header.
|
|
263
|
-
|
|
447
|
+
// 7: `graphConfigPath`, `graphContext` and `graphImports` exist — the import
|
|
448
|
+
// graph, aliases and workspace packages resolved (`lang/typescript-resolve.mjs`).
|
|
449
|
+
// 8: an import in a comment or a string is no edge (`importSpecs`), and a
|
|
450
|
+
// resolved import reaches only the module at its full path (`graphKeysFor`).
|
|
451
|
+
// 9: a file whose lex ends with a comment, template or `${` still open has
|
|
452
|
+
// unknown imports (`graphImports` -> null), and the graph is absent
|
|
453
|
+
// rather than missing every edge after the misread spot.
|
|
454
|
+
version: "9",
|
|
264
455
|
|
|
265
456
|
/** Activates when the tree at HEAD carries one of these. See the header. */
|
|
266
457
|
exts: EXTS,
|
|
@@ -511,9 +702,11 @@ export default Object.freeze({
|
|
|
511
702
|
const requireDir = opts.requireDir !== false;
|
|
512
703
|
const base = dirSegments(path ?? "");
|
|
513
704
|
const out = new Set();
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
705
|
+
// A lex that did not end whole still yields what it read before the
|
|
706
|
+
// misread spot: a module reached only after it stays on the list, the
|
|
707
|
+
// direction this reading already errs in for a bare specifier.
|
|
708
|
+
for (const { type, spec } of importSpecs(text).specs) {
|
|
709
|
+
if (type) continue; // `import type` / `export type`: erased, loads nothing.
|
|
517
710
|
if (!spec.startsWith("./") && !spec.startsWith("../")) continue;
|
|
518
711
|
// Re-quoted so the extensionless form meets the closing quote
|
|
519
712
|
// `PATH_REF` looks for — the specifier is read by the one rule that
|
|
@@ -523,6 +716,63 @@ export default Object.freeze({
|
|
|
523
716
|
return out;
|
|
524
717
|
},
|
|
525
718
|
|
|
719
|
+
/**
|
|
720
|
+
* The config files `graphContext` reads — every `tsconfig*.json`,
|
|
721
|
+
* `jsconfig*.json` and `package.json` — as regex source over a tree path.
|
|
722
|
+
*/
|
|
723
|
+
graphConfigPath: RESOLVE_CONFIG_PATH,
|
|
724
|
+
|
|
725
|
+
/** The resolver's data for one tree: aliases by scope, workspace packages. */
|
|
726
|
+
graphContext(entries, textOf) {
|
|
727
|
+
return buildResolveContext(entries, textOf);
|
|
728
|
+
},
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Every module one file LOADS, for `metrics/graph.mjs`: relative specifiers
|
|
732
|
+
* as `imports` reads them, plus the ones `imports` leaves alone —
|
|
733
|
+
* `tsconfig` aliases, workspace packages, `#` subpath imports, `baseUrl`.
|
|
734
|
+
*
|
|
735
|
+
* One entry per specifier: `candidates` are keys in the order the resolver
|
|
736
|
+
* tries them (the first one that is a module is the edge), and `internal`
|
|
737
|
+
* says a specifier that hits no module is a MISS — this project's code that
|
|
738
|
+
* was not found — rather than a package from outside. An external package
|
|
739
|
+
* and an asset produce no entry at all.
|
|
740
|
+
*
|
|
741
|
+
* `relative` marks a `./` / `../` specifier: its keys are matched as
|
|
742
|
+
* `imports` matches them, against every suffix `keysFor` offers. Every
|
|
743
|
+
* other candidate is a whole tree path the resolver built, and is matched
|
|
744
|
+
* only against `graphKeysFor` — a module's own full path — so `@/lib/x`
|
|
745
|
+
* (→ `src/lib/x`) does not also reach `vendor/src/lib/x.ts`, which answers
|
|
746
|
+
* to the suffix `src/lib/x` too.
|
|
747
|
+
*
|
|
748
|
+
* `null` when the file's imports are unknown — the lexer misread a spot it
|
|
749
|
+
* cannot recover from (`importSpecs`) — never a shorter list.
|
|
750
|
+
*
|
|
751
|
+
* @param {{path: string, oid?: string, text: string}} file
|
|
752
|
+
* @param {object | null} ctx What `graphContext` returned for this tree.
|
|
753
|
+
* @returns {{spec: string, internal: boolean, relative?: boolean, candidates: string[]}[] | null}
|
|
754
|
+
*/
|
|
755
|
+
graphImports(file, ctx) {
|
|
756
|
+
const base = dirSegments(file.path ?? "");
|
|
757
|
+
const specs = specsOf(file);
|
|
758
|
+
if (specs === null) return null;
|
|
759
|
+
const out = [];
|
|
760
|
+
for (const spec of specs) {
|
|
761
|
+
if (spec.startsWith("./") || spec.startsWith("../")) {
|
|
762
|
+
const keys = new Set();
|
|
763
|
+
refKeys(`"${spec}"`, base, true, keys);
|
|
764
|
+
if (keys.size) out.push({ spec, internal: true, relative: true, candidates: [...keys] });
|
|
765
|
+
continue;
|
|
766
|
+
}
|
|
767
|
+
const r = resolveSpecifier(spec, file.path ?? "", ctx);
|
|
768
|
+
if (!r) continue;
|
|
769
|
+
const candidates = r.candidates.filter((p) => !ASSET_SPEC.test(p)).map(pathKey).filter((k) => k !== null);
|
|
770
|
+
if (r.candidates.length && !candidates.length && r.candidates.every((p) => ASSET_SPEC.test(p))) continue;
|
|
771
|
+
out.push({ spec, internal: r.internal, candidates });
|
|
772
|
+
}
|
|
773
|
+
return out;
|
|
774
|
+
},
|
|
775
|
+
|
|
526
776
|
/**
|
|
527
777
|
* Every `dir/name` key the module at `path` answers to: each non-empty
|
|
528
778
|
* suffix of its own directory, and of its compiled mirror.
|
|
@@ -564,6 +814,27 @@ export default Object.freeze({
|
|
|
564
814
|
return keys;
|
|
565
815
|
},
|
|
566
816
|
|
|
817
|
+
/**
|
|
818
|
+
* The keys `keysFor` offers that start at the tree's root: the module's own
|
|
819
|
+
* path, its compiled mirror, and an `index`'s directory — never a shorter
|
|
820
|
+
* suffix. What a resolved (non-relative) import is matched against in
|
|
821
|
+
* `metrics/graph.mjs`; see `graphImports`.
|
|
822
|
+
*
|
|
823
|
+
* @param {string} path
|
|
824
|
+
* @returns {string[]}
|
|
825
|
+
*/
|
|
826
|
+
graphKeysFor(path) {
|
|
827
|
+
const name = basename(path);
|
|
828
|
+
const segs = dirSegments(path);
|
|
829
|
+
const mirrors = segs.includes("src") ? [segs, segs.map((s) => (s === "src" ? "dist" : s))] : [segs];
|
|
830
|
+
const keys = [];
|
|
831
|
+
for (const dir of mirrors) {
|
|
832
|
+
if (dir.length) keys.push(dir.join("/") + "/" + name);
|
|
833
|
+
if (name === "index" && dir.length > 1) keys.push(dir.join("/"));
|
|
834
|
+
}
|
|
835
|
+
return keys;
|
|
836
|
+
},
|
|
837
|
+
|
|
567
838
|
/**
|
|
568
839
|
* The parser `dups` and `deadExports` need, or `null` when it cannot be
|
|
569
840
|
* loaded.
|
|
@@ -335,6 +335,27 @@ function untestedDetail(row, _prereg, since) {
|
|
|
335
335
|
return ` ${nf(n)} of ${plural(files, "module")} in the tree.${via}${moved}`;
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
+
/**
|
|
339
|
+
* A count of files in import cycles needs the files it is a part of, how
|
|
340
|
+
* those split into cycles, and the largest one by name — the files a person
|
|
341
|
+
* opens to undo it.
|
|
342
|
+
*/
|
|
343
|
+
function cycleDetail(row) {
|
|
344
|
+
const g = row?.graph?.value;
|
|
345
|
+
if (!g || typeof g.files !== "number") return "";
|
|
346
|
+
if (!g.cycleFiles) return ` Over ${plural(g.files, "module")} and ${plural(g.edges, "import")} between them.`;
|
|
347
|
+
const top = g.cycles?.[0];
|
|
348
|
+
const named = top ? ` The largest holds ${nf(top.size)}: ${top.files.join(", ")}${top.size > top.files.length ? ", …" : ""}.` : "";
|
|
349
|
+
return ` ${nf(g.cycleFiles)} of ${plural(g.files, "module")}, in ${plural(g.cycleCount, "cycle")}.${named}`;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/** A p95 of fan-out needs its max and the file that holds it. */
|
|
353
|
+
function fanOutDetail(row) {
|
|
354
|
+
const g = row?.graph?.value;
|
|
355
|
+
if (!g || typeof g.fanOutMax !== "number") return "";
|
|
356
|
+
return ` The most is ${nf(g.fanOutMax)}, in ${g.fanOutMaxPath}; ${nf(g.resolved)} of ${plural(g.internal, "internal import")} resolved.`;
|
|
357
|
+
}
|
|
358
|
+
|
|
338
359
|
/**
|
|
339
360
|
* The scalar series a quartile move or a slope flip is worth a sentence about.
|
|
340
361
|
*
|
|
@@ -412,6 +433,23 @@ export const SERIES = Object.freeze([
|
|
|
412
433
|
get: (r) => r.untested?.value?.length ?? null,
|
|
413
434
|
detail: untestedDetail,
|
|
414
435
|
},
|
|
436
|
+
// The import graph (`metrics/graph.mjs`). Plotted and ranked against their
|
|
437
|
+
// own past like the rest; the health index reads neither — they earn an
|
|
438
|
+
// index entry only once their series has pointed at a fix.
|
|
439
|
+
{
|
|
440
|
+
key: "graph.cycleFiles",
|
|
441
|
+
label: "the count of files in import cycles",
|
|
442
|
+
unit: "",
|
|
443
|
+
get: (r) => r.graph?.value?.cycleFiles ?? null,
|
|
444
|
+
detail: cycleDetail,
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
key: "graph.fanOutP95",
|
|
448
|
+
label: "p95 imports per file",
|
|
449
|
+
unit: "imports",
|
|
450
|
+
get: (r) => r.graph?.value?.fanOutP95 ?? null,
|
|
451
|
+
detail: fanOutDetail,
|
|
452
|
+
},
|
|
415
453
|
]);
|
|
416
454
|
|
|
417
455
|
/** The families whose reading can go absent, and what to call one when it does. */
|
|
@@ -424,4 +462,5 @@ export const FAMILIES = Object.freeze([
|
|
|
424
462
|
["context", "the always-on context reading"],
|
|
425
463
|
["untested", "the untested-module reading"],
|
|
426
464
|
["classics", "the classics reading"],
|
|
465
|
+
["graph", "the import-graph reading"],
|
|
427
466
|
]);
|
|
@@ -109,6 +109,7 @@ export const ROW_KEYS = Object.freeze([
|
|
|
109
109
|
"context",
|
|
110
110
|
"untested",
|
|
111
111
|
"classics",
|
|
112
|
+
"graph",
|
|
112
113
|
"tripwires",
|
|
113
114
|
// Not a measurement: the chain state `tripwires.mjs` needs to tell a
|
|
114
115
|
// TRANSITION from a STATE. It lives on the row because it used to live in a
|
|
@@ -361,9 +361,18 @@ export function buildSnapshot(root, sha, git, prereg, scope = null) {
|
|
|
361
361
|
const claudeMd = entries.find((e) => e.path === "CLAUDE.md") ?? null;
|
|
362
362
|
const agentsMd = entries.find((e) => e.path === "AGENTS.md") ?? null;
|
|
363
363
|
|
|
364
|
+
// The files a pack resolves imports with (`tsconfig`, workspace manifests),
|
|
365
|
+
// by the same exclusion: a vendored package's `tsconfig` declares nothing
|
|
366
|
+
// about this tree's own imports.
|
|
367
|
+
const graphEntries = prereg.PACKS.filter((p) => p.pack.graphConfigPath && typeof p.pack.graphContext === "function").map((p) => {
|
|
368
|
+
const re = new RegExp(p.pack.graphConfigPath);
|
|
369
|
+
return { pack: p, entries: entries.filter((e) => re.test(e.path) && !inExcludedDir(e.path, prereg.SRC.excludeDirs)) };
|
|
370
|
+
});
|
|
371
|
+
|
|
364
372
|
// One batch for the whole snapshot; `git.mjs` drops the oids it already has.
|
|
365
373
|
const wanted = [...srcEntries, ...testEntries, ...skillEntries];
|
|
366
374
|
for (const m of manifestEntries) wanted.push(...m.entries);
|
|
375
|
+
for (const m of graphEntries) wanted.push(...m.entries);
|
|
367
376
|
if (claudeMd) wanted.push(claudeMd);
|
|
368
377
|
if (agentsMd) wanted.push(agentsMd);
|
|
369
378
|
const blobs = git.readBlobs(root, wanted.map((e) => e.oid));
|
|
@@ -412,6 +421,10 @@ export function buildSnapshot(root, sha, git, prereg, scope = null) {
|
|
|
412
421
|
}
|
|
413
422
|
manifests.sort((a, b) => (a.pack < b.pack ? -1 : a.pack > b.pack ? 1 : a.pkg < b.pkg ? -1 : a.pkg > b.pkg ? 1 : 0));
|
|
414
423
|
|
|
424
|
+
/** pack name -> its resolver context, for `metrics/graph.mjs`. */
|
|
425
|
+
const graphContexts = {};
|
|
426
|
+
for (const m of graphEntries) graphContexts[m.pack.name] = m.pack.pack.graphContext(m.entries, textOf);
|
|
427
|
+
|
|
415
428
|
const claudeText = claudeMd ? textOf(claudeMd) : null;
|
|
416
429
|
|
|
417
430
|
return {
|
|
@@ -427,5 +440,6 @@ export function buildSnapshot(root, sha, git, prereg, scope = null) {
|
|
|
427
440
|
areas: deriveAreas(skillTexts, groups),
|
|
428
441
|
tests,
|
|
429
442
|
manifests,
|
|
443
|
+
graphContexts,
|
|
430
444
|
};
|
|
431
445
|
}
|
|
@@ -200,6 +200,10 @@
|
|
|
200
200
|
* not a workspace label, because a label is not unique across depths. `[]`
|
|
201
201
|
* where the tree holds none — `classics.mjs` turns that into `deps: null`,
|
|
202
202
|
* since "no manifest" and "depends on nothing" are opposite claims.
|
|
203
|
+
* @property {Record<string, object>} graphContexts
|
|
204
|
+
* Pack name -> what that pack's `graphContext()` built from its config
|
|
205
|
+
* files (for TypeScript: `tsconfig` aliases and workspace packages), for
|
|
206
|
+
* `metrics/graph.mjs`. Only packs with an import-graph rule appear.
|
|
203
207
|
*/
|
|
204
208
|
|
|
205
209
|
/**
|
|
@@ -294,6 +298,14 @@
|
|
|
294
298
|
* `path#name` for every value export no other blob names, from the same
|
|
295
299
|
* per-pack analyzer `dups` uses, and absent with the same reason where no
|
|
296
300
|
* pack supplies one.
|
|
301
|
+
* @property {Measured<object>} graph
|
|
302
|
+
* The import graph between the tree's own modules, over the files whose
|
|
303
|
+
* pack has an import-graph rule: `cycleFiles` (modules in an import cycle),
|
|
304
|
+
* `cycles` and `largestCycle`, `fanOutP95`/`fanOutMax`/`fanOutMaxPath`,
|
|
305
|
+
* and `internal`/`resolved` — how many of the tree's own imports were
|
|
306
|
+
* followed to a module. Absent with a reason where no pack has the rule,
|
|
307
|
+
* or where too few internal imports resolved for a missing edge not to
|
|
308
|
+
* read as missing coupling (`PREREG.GRAPH_MIN_RESOLVED`).
|
|
297
309
|
* @property {Measured<object>} classics
|
|
298
310
|
* `deps` is `null` — never a row of zeros — both where the tree holds no
|
|
299
311
|
* dependency manifest and where no active pack reads one, with `depsReason`
|
package/tools/repohealth.mjs
CHANGED
|
@@ -84,6 +84,7 @@ import { measureCochange } from "./repohealth/metrics/cochange.mjs";
|
|
|
84
84
|
import { measureDups } from "./repohealth/metrics/dups.mjs";
|
|
85
85
|
import { measureDeadExports } from "./repohealth/metrics/deadexports.mjs";
|
|
86
86
|
import { measureTripwires } from "./repohealth/metrics/tripwires.mjs";
|
|
87
|
+
import { measureGraph } from "./repohealth/metrics/graph.mjs";
|
|
87
88
|
import { OWN_FILE, declaresOwn, measureOwn } from "./repohealth/own.mjs";
|
|
88
89
|
import { declarationsByIndex, measureCentral } from "./repohealth/central.mjs";
|
|
89
90
|
|
|
@@ -385,6 +386,7 @@ function update({ fixture }) {
|
|
|
385
386
|
context: measureContext(snap, history, index, CFG),
|
|
386
387
|
untested: measureUntested(snap, history, index, CFG),
|
|
387
388
|
classics: measureClassics(snap, history, index, CFG),
|
|
389
|
+
graph: measureGraph(snap, history, index, CFG),
|
|
388
390
|
...tripwireFields(measureTripwires(snap, history, index, CFG, prevRow)),
|
|
389
391
|
};
|
|
390
392
|
// The repo's OWN readings (`own.mjs`): HEAD only, the whole tree only. Not
|