@automaton-labs/aib 0.0.1
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 +578 -0
- package/dist/bin/aib.js +2 -0
- package/dist/bin/cli.js +3 -0
- package/dist/client/http-client.js +1 -0
- package/dist/client/transport-options.js +1 -0
- package/dist/client/websocket-client.js +1 -0
- package/dist/commands/add-missing-imports-preview-cache.js +2 -0
- package/dist/commands/add-missing-imports.js +2 -0
- package/dist/commands/apply-module-plan.js +3 -0
- package/dist/commands/captured-input.js +2 -0
- package/dist/commands/config-command.js +3 -0
- package/dist/commands/diagnostics-command.js +3 -0
- package/dist/commands/doctor.js +1 -0
- package/dist/commands/entity-resolution.js +1 -0
- package/dist/commands/execution-command.js +1 -0
- package/dist/commands/feedback-command.js +3 -0
- package/dist/commands/find-importers.js +1 -0
- package/dist/commands/find-unused-imports.js +1 -0
- package/dist/commands/generate-docs-command.js +6 -0
- package/dist/commands/help-command.js +3 -0
- package/dist/commands/imports-command.js +1 -0
- package/dist/commands/init-skill-usage.js +3 -0
- package/dist/commands/init-workspace.js +3 -0
- package/dist/commands/inspect-cycles.js +5 -0
- package/dist/commands/inspect-format.js +18 -0
- package/dist/commands/inspect-graph.js +9 -0
- package/dist/commands/inspect-imports.js +2 -0
- package/dist/commands/inspect-symbol-query.js +1 -0
- package/dist/commands/inspect-tree.js +5 -0
- package/dist/commands/inspect.js +16 -0
- package/dist/commands/json-file-input.js +1 -0
- package/dist/commands/list-instances.js +1 -0
- package/dist/commands/module-plan-cache.js +2 -0
- package/dist/commands/module-plan-command.js +1 -0
- package/dist/commands/module-plan-timeout.js +1 -0
- package/dist/commands/move-command.js +1 -0
- package/dist/commands/move-preview-cache.js +2 -0
- package/dist/commands/move-to-file.js +2 -0
- package/dist/commands/mutation-execution-cache.js +3 -0
- package/dist/commands/normalize-imports.js +4 -0
- package/dist/commands/observability-command.js +3 -0
- package/dist/commands/ping.js +1 -0
- package/dist/commands/print-config.js +1 -0
- package/dist/commands/quick-read.js +11 -0
- package/dist/commands/refactor-batch-builder.js +1 -0
- package/dist/commands/refactor-batch-execution-cache.js +1 -0
- package/dist/commands/refactor-batch-preview-cache.js +2 -0
- package/dist/commands/refactor-batch.js +4 -0
- package/dist/commands/refactor-command.js +1 -0
- package/dist/commands/rename-command.js +1 -0
- package/dist/commands/rename-entities.js +4 -0
- package/dist/commands/rename-execution-cache.js +1 -0
- package/dist/commands/rename-input.js +1 -0
- package/dist/commands/rename-preview-cache.js +2 -0
- package/dist/commands/result-view.js +6 -0
- package/dist/commands/runtime-command.js +4 -0
- package/dist/commands/runtime-info.js +1 -0
- package/dist/commands/session-workspace.js +31 -0
- package/dist/commands/shared.js +1 -0
- package/dist/commands/sync-command.js +2 -0
- package/dist/commands/validate-module-plan.js +2 -0
- package/dist/commands/workspace-cache.js +1 -0
- package/dist/compatibility/policy.js +1 -0
- package/dist/config/auto-start-ide.js +1 -0
- package/dist/config/defaults.js +1 -0
- package/dist/config/env-vars.js +1 -0
- package/dist/config/glob-match.js +1 -0
- package/dist/config/import-rules.js +1 -0
- package/dist/config/local-config.js +3 -0
- package/dist/config/mutation-comments.js +1 -0
- package/dist/config/path-aliases.js +1 -0
- package/dist/config/path-display.js +1 -0
- package/dist/config/product-storage.js +1 -0
- package/dist/config/resolve-command-alias.js +1 -0
- package/dist/config/resolve.js +1 -0
- package/dist/config/workspace-root.js +3 -0
- package/dist/config/workspace-state.js +1 -0
- package/dist/content/content-bundle.js +1 -0
- package/dist/diagnostics/module-plan-timeline.js +2 -0
- package/dist/diagnostics/readiness-text.js +8 -0
- package/dist/discovery/registry.js +1 -0
- package/dist/discovery/select-instance.js +1 -0
- package/dist/dsl/aib-dsl.js +1 -0
- package/dist/help/bootstrap.md +924 -0
- package/dist/help/diagnostics/doctor.json +70 -0
- package/dist/help/docs/basics.md +14 -0
- package/dist/help/docs/dsl.md +25 -0
- package/dist/help/docs/help-format.md +12 -0
- package/dist/help/docs/imports.normalize.md +36 -0
- package/dist/help/docs/inspect.code.md +29 -0
- package/dist/help/docs/inspect.deps.md +32 -0
- package/dist/help/docs/inspect.duplicates.md +72 -0
- package/dist/help/docs/inspect.exports.md +34 -0
- package/dist/help/docs/inspect.file.md +32 -0
- package/dist/help/docs/inspect.graph.md +112 -0
- package/dist/help/docs/inspect.imports.md +15 -0
- package/dist/help/docs/inspect.md +71 -0
- package/dist/help/docs/inspect.members.md +24 -0
- package/dist/help/docs/inspect.tree.md +30 -0
- package/dist/help/docs/inspect.usages.md +48 -0
- package/dist/help/docs/modulePlan.md +51 -0
- package/dist/help/docs/move.md +37 -0
- package/dist/help/docs/mutation.md +47 -0
- package/dist/help/docs/patterns.md +178 -0
- package/dist/help/docs/prefs.md +40 -0
- package/dist/help/docs/qr.md +33 -0
- package/dist/help/docs/refactor.batch.md +44 -0
- package/dist/help/docs/rename.md +39 -0
- package/dist/help/docs/selectors.md +23 -0
- package/dist/help/docs/session.md +61 -0
- package/dist/help/docs/view.md +30 -0
- package/dist/help/dsl/bootstrap.md +924 -0
- package/dist/help/dsl/docs/basics.md +14 -0
- package/dist/help/dsl/docs/dsl.md +25 -0
- package/dist/help/dsl/docs/help-format.md +12 -0
- package/dist/help/dsl/docs/imports.normalize.md +36 -0
- package/dist/help/dsl/docs/inspect.code.md +29 -0
- package/dist/help/dsl/docs/inspect.deps.md +32 -0
- package/dist/help/dsl/docs/inspect.duplicates.md +72 -0
- package/dist/help/dsl/docs/inspect.exports.md +34 -0
- package/dist/help/dsl/docs/inspect.file.md +32 -0
- package/dist/help/dsl/docs/inspect.graph.md +112 -0
- package/dist/help/dsl/docs/inspect.imports.md +15 -0
- package/dist/help/dsl/docs/inspect.md +71 -0
- package/dist/help/dsl/docs/inspect.members.md +24 -0
- package/dist/help/dsl/docs/inspect.tree.md +30 -0
- package/dist/help/dsl/docs/inspect.usages.md +48 -0
- package/dist/help/dsl/docs/modulePlan.md +51 -0
- package/dist/help/dsl/docs/move.md +37 -0
- package/dist/help/dsl/docs/mutation.md +47 -0
- package/dist/help/dsl/docs/patterns.md +178 -0
- package/dist/help/dsl/docs/prefs.md +40 -0
- package/dist/help/dsl/docs/qr.md +33 -0
- package/dist/help/dsl/docs/refactor.batch.md +44 -0
- package/dist/help/dsl/docs/rename.md +39 -0
- package/dist/help/dsl/docs/selectors.md +23 -0
- package/dist/help/dsl/docs/session.md +61 -0
- package/dist/help/dsl/docs/view.md +30 -0
- package/dist/help/dsl/full.md +924 -0
- package/dist/help/dsl/snippets/agents.md +14 -0
- package/dist/help/dsl/topics/basics.md +12 -0
- package/dist/help/dsl/topics/dsl.md +23 -0
- package/dist/help/dsl/topics/help-format.md +10 -0
- package/dist/help/dsl/topics/imports.normalize.md +34 -0
- package/dist/help/dsl/topics/inspect.code.md +27 -0
- package/dist/help/dsl/topics/inspect.deps.md +30 -0
- package/dist/help/dsl/topics/inspect.duplicates.md +43 -0
- package/dist/help/dsl/topics/inspect.exports.md +32 -0
- package/dist/help/dsl/topics/inspect.file.md +30 -0
- package/dist/help/dsl/topics/inspect.graph.md +110 -0
- package/dist/help/dsl/topics/inspect.imports.md +13 -0
- package/dist/help/dsl/topics/inspect.md +69 -0
- package/dist/help/dsl/topics/inspect.members.md +22 -0
- package/dist/help/dsl/topics/inspect.tree.md +20 -0
- package/dist/help/dsl/topics/inspect.usages.md +46 -0
- package/dist/help/dsl/topics/modulePlan.md +38 -0
- package/dist/help/dsl/topics/move.md +27 -0
- package/dist/help/dsl/topics/mutation.md +45 -0
- package/dist/help/dsl/topics/patterns.md +176 -0
- package/dist/help/dsl/topics/prefs.md +38 -0
- package/dist/help/dsl/topics/qr.md +31 -0
- package/dist/help/dsl/topics/refactor.batch.md +33 -0
- package/dist/help/dsl/topics/rename.md +25 -0
- package/dist/help/dsl/topics/selectors.md +21 -0
- package/dist/help/dsl/topics/session.md +59 -0
- package/dist/help/dsl/topics/view.md +28 -0
- package/dist/help/full.md +924 -0
- package/dist/help/help-meta.json +113 -0
- package/dist/help/index.md +167 -0
- package/dist/help/json/bootstrap.md +1074 -0
- package/dist/help/json/docs/basics.md +15 -0
- package/dist/help/json/docs/dsl.md +25 -0
- package/dist/help/json/docs/help-format.md +12 -0
- package/dist/help/json/docs/imports.normalize.md +47 -0
- package/dist/help/json/docs/inspect.code.md +41 -0
- package/dist/help/json/docs/inspect.deps.md +46 -0
- package/dist/help/json/docs/inspect.duplicates.md +65 -0
- package/dist/help/json/docs/inspect.exports.md +40 -0
- package/dist/help/json/docs/inspect.file.md +38 -0
- package/dist/help/json/docs/inspect.graph.md +139 -0
- package/dist/help/json/docs/inspect.imports.md +15 -0
- package/dist/help/json/docs/inspect.md +87 -0
- package/dist/help/json/docs/inspect.members.md +32 -0
- package/dist/help/json/docs/inspect.tree.md +30 -0
- package/dist/help/json/docs/inspect.usages.md +61 -0
- package/dist/help/json/docs/modulePlan.md +70 -0
- package/dist/help/json/docs/move.md +53 -0
- package/dist/help/json/docs/mutation.md +62 -0
- package/dist/help/json/docs/patterns.md +178 -0
- package/dist/help/json/docs/prefs.md +40 -0
- package/dist/help/json/docs/qr.md +33 -0
- package/dist/help/json/docs/refactor.batch.md +72 -0
- package/dist/help/json/docs/rename.md +47 -0
- package/dist/help/json/docs/selectors.md +23 -0
- package/dist/help/json/docs/session.md +77 -0
- package/dist/help/json/docs/view.md +30 -0
- package/dist/help/json/full.md +1074 -0
- package/dist/help/json/snippets/agents.md +14 -0
- package/dist/help/json/topics/basics.md +13 -0
- package/dist/help/json/topics/dsl.md +23 -0
- package/dist/help/json/topics/help-format.md +10 -0
- package/dist/help/json/topics/imports.normalize.md +45 -0
- package/dist/help/json/topics/inspect.code.md +39 -0
- package/dist/help/json/topics/inspect.deps.md +44 -0
- package/dist/help/json/topics/inspect.duplicates.md +37 -0
- package/dist/help/json/topics/inspect.exports.md +38 -0
- package/dist/help/json/topics/inspect.file.md +36 -0
- package/dist/help/json/topics/inspect.graph.md +137 -0
- package/dist/help/json/topics/inspect.imports.md +13 -0
- package/dist/help/json/topics/inspect.md +85 -0
- package/dist/help/json/topics/inspect.members.md +30 -0
- package/dist/help/json/topics/inspect.tree.md +20 -0
- package/dist/help/json/topics/inspect.usages.md +59 -0
- package/dist/help/json/topics/modulePlan.md +57 -0
- package/dist/help/json/topics/move.md +43 -0
- package/dist/help/json/topics/mutation.md +60 -0
- package/dist/help/json/topics/patterns.md +176 -0
- package/dist/help/json/topics/prefs.md +38 -0
- package/dist/help/json/topics/qr.md +31 -0
- package/dist/help/json/topics/refactor.batch.md +61 -0
- package/dist/help/json/topics/rename.md +42 -0
- package/dist/help/json/topics/selectors.md +21 -0
- package/dist/help/json/topics/session.md +59 -0
- package/dist/help/json/topics/view.md +28 -0
- package/dist/help/snippets/agents.md +14 -0
- package/dist/help/topics/basics.md +12 -0
- package/dist/help/topics/dsl.md +23 -0
- package/dist/help/topics/help-format.md +10 -0
- package/dist/help/topics/imports.normalize.md +34 -0
- package/dist/help/topics/inspect.code.md +27 -0
- package/dist/help/topics/inspect.deps.md +30 -0
- package/dist/help/topics/inspect.duplicates.md +43 -0
- package/dist/help/topics/inspect.exports.md +32 -0
- package/dist/help/topics/inspect.file.md +30 -0
- package/dist/help/topics/inspect.graph.md +110 -0
- package/dist/help/topics/inspect.imports.md +13 -0
- package/dist/help/topics/inspect.md +69 -0
- package/dist/help/topics/inspect.members.md +22 -0
- package/dist/help/topics/inspect.tree.md +20 -0
- package/dist/help/topics/inspect.usages.md +46 -0
- package/dist/help/topics/modulePlan.md +38 -0
- package/dist/help/topics/move.md +27 -0
- package/dist/help/topics/mutation.md +45 -0
- package/dist/help/topics/patterns.md +176 -0
- package/dist/help/topics/prefs.md +38 -0
- package/dist/help/topics/qr.md +31 -0
- package/dist/help/topics/refactor.batch.md +33 -0
- package/dist/help/topics/rename.md +25 -0
- package/dist/help/topics/selectors.md +21 -0
- package/dist/help/topics/session.md +59 -0
- package/dist/help/topics/view.md +28 -0
- package/dist/ide-launch/common.cjs +162 -0
- package/dist/managed-host/extension-vsix-resolver.js +1 -0
- package/dist/managed-host/manage-serve-web-host.cjs +141 -0
- package/dist/managed-host/serve-web-autostart.js +1 -0
- package/dist/managed-host/serve-web-host.cjs +1790 -0
- package/dist/metrics/central-metrics.js +2 -0
- package/dist/observability/config.js +1 -0
- package/dist/observability/context.js +1 -0
- package/dist/observability/failure-snapshot.js +2 -0
- package/dist/observability/recent.js +2 -0
- package/dist/payloads/read-stdin-json.js +1 -0
- package/dist/runtime/bundled-node.js +1 -0
- package/dist/runtime/input-source.js +1 -0
- package/dist/runtime/managed-runtime-provisioning.js +1 -0
- package/dist/runtime/run-command.js +1 -0
- package/dist/selectors/parse-entities.js +1 -0
- package/dist/session/client.js +1 -0
- package/dist/session/paths.js +1 -0
- package/dist/session/server.js +6 -0
- package/dist/shared/agent-text.js +1 -0
- package/dist/shared/diagnostic-catalog.js +1 -0
- package/dist/shared/diagnostics.js +1 -0
- package/dist/shared/errors.js +28 -0
- package/dist/shared/event-loop.js +1 -0
- package/dist/shared/hints.js +1 -0
- package/dist/shared/metrics.js +1 -0
- package/dist/shared/operations.js +1 -0
- package/dist/shared/presentation.js +4 -0
- package/dist/shared/protocol.js +1 -0
- package/dist/shared/routes.js +1 -0
- package/dist/shared/stdout.js +2 -0
- package/dist/shared/types.js +1 -0
- package/dist/tracing/config.js +2 -0
- package/dist/tracing/trace.js +3 -0
- package/extension/vscode-refactor-bridge-extension.vsix +0 -0
- package/package.json +39 -0
- package/runtimes/launcher/win-x64/aib.exe +0 -0
- package/scripts/install-windows-launcher.cjs +58 -0
- package/scripts/postinstall.cjs +28 -0
- package/scripts/provision-runtime.cjs +299 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"codes": {
|
|
4
|
+
"DOCTOR_NODE_VERSION_UNSUPPORTED": {
|
|
5
|
+
"component": "cli",
|
|
6
|
+
"reason": "Node.js 20 or newer is required for the CLI entrypoint.",
|
|
7
|
+
"next": "Install Node.js 20 or newer, then rerun aib doctor."
|
|
8
|
+
},
|
|
9
|
+
"DOCTOR_CLI_PACKAGE_INCOMPLETE": {
|
|
10
|
+
"component": "cli",
|
|
11
|
+
"reason": "The CLI package is missing built files or package metadata.",
|
|
12
|
+
"next": "Reinstall aib. In a development checkout, run npm run cli:build."
|
|
13
|
+
},
|
|
14
|
+
"DOCTOR_MANAGED_HOST_ASSETS_MISSING": {
|
|
15
|
+
"component": "managed runtime",
|
|
16
|
+
"reason": "Managed host assets were not found.",
|
|
17
|
+
"next": "Reinstall aib. In a development checkout, rebuild the CLI package."
|
|
18
|
+
},
|
|
19
|
+
"DOCTOR_EXTENSION_VSIX_MISSING": {
|
|
20
|
+
"component": "extension",
|
|
21
|
+
"reason": "The packaged extension VSIX was not found.",
|
|
22
|
+
"next": "Reinstall aib. In a development checkout, run npm --prefix packages/extension run package:vsix."
|
|
23
|
+
},
|
|
24
|
+
"DOCTOR_EXTENSION_VSIX_RESOLUTION_FAILED": {
|
|
25
|
+
"component": "extension",
|
|
26
|
+
"reason": "The extension VSIX path could not be resolved.",
|
|
27
|
+
"next": "Reinstall aib or set AIB_EXTENSION_VSIX to an existing VSIX."
|
|
28
|
+
},
|
|
29
|
+
"DOCTOR_MANAGED_RUNTIME_NODE_MISSING": {
|
|
30
|
+
"component": "managed runtime",
|
|
31
|
+
"reason": "Bundled Node runtime is missing for package-local code-server.",
|
|
32
|
+
"next": "Reinstall aib. In a development checkout, run node scripts/runtime/provision-managed-runtimes.cjs --node."
|
|
33
|
+
},
|
|
34
|
+
"DOCTOR_IDE_COMMAND_MISSING": {
|
|
35
|
+
"component": "managed runtime",
|
|
36
|
+
"reason": "No VS Code-compatible command or package-local code-server runtime was found.",
|
|
37
|
+
"next": "Reinstall aib with managed runtime assets or set AIB_IDE_COMMAND/AIB_CODE_SERVER_PATH."
|
|
38
|
+
},
|
|
39
|
+
"DOCTOR_HEADLESS_BROWSER_MISSING": {
|
|
40
|
+
"component": "browser",
|
|
41
|
+
"reason": "No compatible Chrome, Edge, or Chromium executable was found.",
|
|
42
|
+
"next": "Install a compatible browser or set AIB_CHROME_PATH."
|
|
43
|
+
},
|
|
44
|
+
"DOCTOR_MANAGED_RUNTIME_PLATFORM_UNSUPPORTED": {
|
|
45
|
+
"component": "platform",
|
|
46
|
+
"reason": "Managed runtime auto-start is currently supported on Windows and Linux.",
|
|
47
|
+
"next": "Use Windows/Linux for managed runtime checks, or run static aib doctor only."
|
|
48
|
+
},
|
|
49
|
+
"AUTO_START_IDE_FAILED": {
|
|
50
|
+
"component": "managed runtime",
|
|
51
|
+
"reason": "Managed runtime failed to start or activate the extension bridge.",
|
|
52
|
+
"next": "Run aib doctor --runtime --verbose."
|
|
53
|
+
},
|
|
54
|
+
"DOCTOR_RUNTIME_CHECK_FAILED": {
|
|
55
|
+
"component": "managed runtime",
|
|
56
|
+
"reason": "A managed runtime check failed.",
|
|
57
|
+
"next": "Run aib doctor --runtime --verbose."
|
|
58
|
+
},
|
|
59
|
+
"MANAGED_IDE_STOP_FAILED": {
|
|
60
|
+
"component": "managed runtime",
|
|
61
|
+
"reason": "Managed runtime stop failed.",
|
|
62
|
+
"next": "Run aib runtime status --verbose."
|
|
63
|
+
},
|
|
64
|
+
"MANAGED_IDE_STATUS_FAILED": {
|
|
65
|
+
"component": "managed runtime",
|
|
66
|
+
"reason": "Managed runtime status could not be read.",
|
|
67
|
+
"next": "Run aib runtime status --verbose."
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Basics
|
|
2
|
+
|
|
3
|
+
Use the active session while you work.
|
|
4
|
+
|
|
5
|
+
Examples are patterns, not limits.
|
|
6
|
+
Feature sections show common high-value uses, not every valid use.
|
|
7
|
+
Adapt requests to the task: combine features, batch related questions, and skip steps when you already have enough context.
|
|
8
|
+
|
|
9
|
+
Prefer batch DSL instead of one-off inline calls.
|
|
10
|
+
One request can inspect/mutate several files/entities and save reusable artifacts when supported.
|
|
11
|
+
Use one-off commands only for small checks/changes.
|
|
12
|
+
|
|
13
|
+
For mutations, aib asks TS/IDE refactors to update affected references and imports.
|
|
14
|
+
After a successful mutation, do not manually patch the same imports unless aib reports a follow-up or the build/checks show a real issue.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# DSL
|
|
2
|
+
|
|
3
|
+
DSL request model:
|
|
4
|
+
- directives set defaults for following requests
|
|
5
|
+
- each request line can override defaults with key=value
|
|
6
|
+
- +flag means true
|
|
7
|
+
- -flag means false
|
|
8
|
+
- file/imports/exports/members/code/deps accept a path as the first positional argument; examples below use this shape.
|
|
9
|
+
- Use @file when several following operations share the same file.
|
|
10
|
+
- For one-off file operations, pass the path directly.
|
|
11
|
+
|
|
12
|
+
Syntax:
|
|
13
|
+
@file <path> default file
|
|
14
|
+
@source <path> default sourceFile for mutations
|
|
15
|
+
op arg arg key=value request
|
|
16
|
+
+flag boolean true
|
|
17
|
+
-flag boolean false
|
|
18
|
+
>name save reusable artifact when supported
|
|
19
|
+
old->new rename pair
|
|
20
|
+
Parent.member parent-qualified member
|
|
21
|
+
Parent.{a,b} several members under one parent
|
|
22
|
+
key=[a,b] list value for repeatable fields
|
|
23
|
+
file="path with spaces.ts" quote values with spaces
|
|
24
|
+
detail=sum|loc|code aliases for summary|locations|code
|
|
25
|
+
from=... alias for fromFile
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Help Format
|
|
2
|
+
|
|
3
|
+
Inline commands below omit the aib prefix.
|
|
4
|
+
Run them as: aib <command>
|
|
5
|
+
|
|
6
|
+
Stdin examples show command and input separately to avoid shell-specific syntax.
|
|
7
|
+
Stdin Run lines include the aib prefix to avoid confusion.
|
|
8
|
+
|
|
9
|
+
PowerShell stdin shape:
|
|
10
|
+
@'
|
|
11
|
+
<input>
|
|
12
|
+
'@ | aib <command> --stdin
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Imports Normalize
|
|
2
|
+
|
|
3
|
+
Use imports normalize for explicit import-style cleanup.
|
|
4
|
+
It rewrites resolved local import/export specifiers inside a chosen file or directory.
|
|
5
|
+
|
|
6
|
+
Use importNormalize in aib.json for repeated defaults.
|
|
7
|
+
|
|
8
|
+
Good for:
|
|
9
|
+
- converting one area to aliases or relative imports
|
|
10
|
+
- cleaning import style after manual edits or broad refactors
|
|
11
|
+
- applying the same import style to a directory without hand-editing files
|
|
12
|
+
- applying new tsconfig aliases after they are added
|
|
13
|
+
|
|
14
|
+
Controls:
|
|
15
|
+
scope file/dir scope to normalize
|
|
16
|
+
to relative|alias|shortestAlias
|
|
17
|
+
preferAlias select one tsconfig paths pattern when several aliases can resolve the same file
|
|
18
|
+
exclude files, directories, or glob-like patterns to skip
|
|
19
|
+
all show all planned edits; avoid on broad directory scopes
|
|
20
|
+
|
|
21
|
+
Run:
|
|
22
|
+
aib imports normalize preview --stdin
|
|
23
|
+
|
|
24
|
+
Input:
|
|
25
|
+
imports.normalize scope=@svc to=shortestAlias exclude=[@svc/generated,"**/* copy.ts"]
|
|
26
|
+
|
|
27
|
+
Rewrite imports found inside src/core.
|
|
28
|
+
When an imported file can be expressed through @features/*, prefer that alias.
|
|
29
|
+
|
|
30
|
+
Input:
|
|
31
|
+
imports.normalize scope=src/core to=alias preferAlias=@features/*
|
|
32
|
+
|
|
33
|
+
With matching importNormalize config for this scope or a parent scope, use inline CLI commands:
|
|
34
|
+
|
|
35
|
+
imports normalize preview @svc
|
|
36
|
+
imports normalize execute @svc
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Inspect Code
|
|
2
|
+
|
|
3
|
+
Use code to fetch exact declarations or members.
|
|
4
|
+
It returns focused code without reading the whole file.
|
|
5
|
+
|
|
6
|
+
Good for:
|
|
7
|
+
- reading a known function, class, method, or declaration
|
|
8
|
+
- fetching several related code blocks in one request
|
|
9
|
+
- keeping context focused on code needed for the current task
|
|
10
|
+
|
|
11
|
+
Controls:
|
|
12
|
+
file, entity, entities, parent, show, ranges
|
|
13
|
+
|
|
14
|
+
Specific:
|
|
15
|
+
show include source output
|
|
16
|
+
|
|
17
|
+
Defaults: +show +ranges
|
|
18
|
+
Use -show for names/ranges only.
|
|
19
|
+
Use -ranges for source without ranges.
|
|
20
|
+
|
|
21
|
+
Prefs:
|
|
22
|
+
inspect.code.maxNonEmptyLines
|
|
23
|
+
|
|
24
|
+
Run:
|
|
25
|
+
aib inspect --stdin
|
|
26
|
+
|
|
27
|
+
Input:
|
|
28
|
+
code @svc/service.ts Service.{render,reset} normalize
|
|
29
|
+
code @svc/serviceB.ts ServiceB.{constructor}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Inspect Deps
|
|
2
|
+
|
|
3
|
+
Use deps to see what one entity depends on inside its file.
|
|
4
|
+
It separates type-only dependencies from runtime value dependencies.
|
|
5
|
+
|
|
6
|
+
Good for:
|
|
7
|
+
- checking what a symbol may need when moved or extracted
|
|
8
|
+
- spotting nearby types, constants, or helpers tied to one entity
|
|
9
|
+
- deciding whether one symbol is standalone or tied to nearby declarations
|
|
10
|
+
- debugging mutation failures caused by local dependency shape
|
|
11
|
+
|
|
12
|
+
Controls:
|
|
13
|
+
file, entity, entities, parent
|
|
14
|
+
|
|
15
|
+
Run:
|
|
16
|
+
aib inspect --stdin
|
|
17
|
+
|
|
18
|
+
Input:
|
|
19
|
+
deps @svc/service.ts entities=[createService,normalize,Service.{render,reset}]
|
|
20
|
+
deps @svc/serviceB.ts ServiceB.{constructor} getConfig
|
|
21
|
+
|
|
22
|
+
inspect deps src/service.ts Service
|
|
23
|
+
|
|
24
|
+
Batch several symbols when you are planning a move:
|
|
25
|
+
Run:
|
|
26
|
+
aib inspect --stdin
|
|
27
|
+
|
|
28
|
+
Input:
|
|
29
|
+
@file src/service.ts
|
|
30
|
+
deps Service
|
|
31
|
+
deps ServiceOptions
|
|
32
|
+
deps createService
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Inspect Duplicates
|
|
2
|
+
|
|
3
|
+
Use duplicates to find repeated top-level names and exact declaration copies.
|
|
4
|
+
It is useful when many files may contain copied local helpers, duplicated types, or repeated declarations.
|
|
5
|
+
|
|
6
|
+
Start with summary for broad scopes.
|
|
7
|
+
Use locations when you need files/lines.
|
|
8
|
+
Use code only for duplicate names you are ready to inspect.
|
|
9
|
+
|
|
10
|
+
Controls:
|
|
11
|
+
scope, detail, limit, offset, kinds, entities, exclude, pathExclude
|
|
12
|
+
|
|
13
|
+
Specific:
|
|
14
|
+
entities only these duplicate names/selectors
|
|
15
|
+
exclude skip these names/selectors
|
|
16
|
+
pathExclude skip files or path/glob-like patterns
|
|
17
|
+
kinds selector kinds, e.g. f, t, c, etc.; kinds=[...]
|
|
18
|
+
|
|
19
|
+
Summary scan:
|
|
20
|
+
Run:
|
|
21
|
+
aib inspect --stdin
|
|
22
|
+
|
|
23
|
+
Input:
|
|
24
|
+
duplicates scope=src detail=sum limit=20
|
|
25
|
+
|
|
26
|
+
Skip noisy duplicate names:
|
|
27
|
+
Run:
|
|
28
|
+
aib inspect --stdin
|
|
29
|
+
|
|
30
|
+
Input:
|
|
31
|
+
duplicates scope=src detail=sum exclude=[Props,Options] limit=20
|
|
32
|
+
|
|
33
|
+
Skip files by path/glob-like pattern:
|
|
34
|
+
Run:
|
|
35
|
+
aib inspect --stdin
|
|
36
|
+
|
|
37
|
+
Input:
|
|
38
|
+
duplicates scope=src detail=loc pathExclude=[src/generated,"**/* copy.ts"] limit=20
|
|
39
|
+
|
|
40
|
+
Inspect specific duplicate code:
|
|
41
|
+
Run:
|
|
42
|
+
aib inspect --stdin
|
|
43
|
+
|
|
44
|
+
Input:
|
|
45
|
+
duplicates scope=src detail=code getBoolean WsOptions
|
|
46
|
+
|
|
47
|
+
For broad cleanup, start with summary.
|
|
48
|
+
Switch to code only for the duplicate names you are ready to inspect.
|
|
49
|
+
|
|
50
|
+
Filter by several names:
|
|
51
|
+
Run:
|
|
52
|
+
aib inspect --stdin
|
|
53
|
+
|
|
54
|
+
Input:
|
|
55
|
+
duplicates scope=src detail=code getBoolean WsOptions normalizeConfig
|
|
56
|
+
|
|
57
|
+
Skip names that are known noise:
|
|
58
|
+
Run:
|
|
59
|
+
aib inspect --stdin
|
|
60
|
+
|
|
61
|
+
Input:
|
|
62
|
+
duplicates scope=src detail=sum exclude=[Props,Options] limit=20
|
|
63
|
+
|
|
64
|
+
Skip files by path/glob-like pattern:
|
|
65
|
+
Run:
|
|
66
|
+
aib inspect --stdin
|
|
67
|
+
|
|
68
|
+
Input:
|
|
69
|
+
duplicates scope=@svc detail=loc pathExclude=[src/generated,"**/*.test.ts","**/* copy.ts"] limit=20
|
|
70
|
+
|
|
71
|
+
exclude filters duplicate names/selectors.
|
|
72
|
+
pathExclude skips files or path/glob-like patterns.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Inspect Exports
|
|
2
|
+
|
|
3
|
+
Use exports to see the public API of one file.
|
|
4
|
+
It answers what other files can import from that file.
|
|
5
|
+
|
|
6
|
+
Important:
|
|
7
|
+
inspect.file marks exported declarations already.
|
|
8
|
+
|
|
9
|
+
Do not batch this for a plain implementation file:
|
|
10
|
+
file src/service.ts
|
|
11
|
+
exports src/service.ts
|
|
12
|
+
|
|
13
|
+
Use exports when you need public module surface, barrels, re-exports, export *, or resolveStar.
|
|
14
|
+
|
|
15
|
+
Good for:
|
|
16
|
+
- checking a module boundary or public surface
|
|
17
|
+
- understanding facade/barrel files
|
|
18
|
+
- resolving export * when the local file only re-exports from elsewhere
|
|
19
|
+
- comparing API shape when public imports matter
|
|
20
|
+
|
|
21
|
+
Controls:
|
|
22
|
+
file, ranges, resolveStar
|
|
23
|
+
|
|
24
|
+
Specific:
|
|
25
|
+
resolveStar resolve export * through re-exported modules; +resolveStar
|
|
26
|
+
|
|
27
|
+
Run:
|
|
28
|
+
aib inspect --stdin
|
|
29
|
+
|
|
30
|
+
Input:
|
|
31
|
+
exports src/service.ts +ranges
|
|
32
|
+
exports src/index.ts +resolveStar
|
|
33
|
+
|
|
34
|
+
inspect exports src/service.ts [--ranges] [--resolve-star]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Inspect File
|
|
2
|
+
|
|
3
|
+
Use file to map top-level declarations physically present in one file.
|
|
4
|
+
Exported declarations are marked in the output.
|
|
5
|
+
It shows what lives in the file before you decide whether to read code.
|
|
6
|
+
|
|
7
|
+
Good for:
|
|
8
|
+
- mapping an unfamiliar file
|
|
9
|
+
- listing top-level declarations
|
|
10
|
+
- checking whether a file contains real declarations or mostly re-exports
|
|
11
|
+
|
|
12
|
+
Do not add limit just in case.
|
|
13
|
+
file output is compact and most files have far fewer than 100 top-level declarations.
|
|
14
|
+
Use limit only after file output is actually too large.
|
|
15
|
+
|
|
16
|
+
Controls:
|
|
17
|
+
file, ranges, localOnly
|
|
18
|
+
|
|
19
|
+
Specific:
|
|
20
|
+
localOnly show local declarations and reexports without resolving facade API; +localOnly
|
|
21
|
+
|
|
22
|
+
Defaults: +ranges
|
|
23
|
+
Use -ranges to show names without ranges.
|
|
24
|
+
|
|
25
|
+
Run:
|
|
26
|
+
aib inspect --stdin
|
|
27
|
+
|
|
28
|
+
Input:
|
|
29
|
+
file @svc/service.ts +localOnly
|
|
30
|
+
file src/index.ts
|
|
31
|
+
|
|
32
|
+
inspect file src/service.ts [--ranges] [--local-only]
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Inspect Graph
|
|
2
|
+
|
|
3
|
+
Use graph when the question is about file/module boundaries, not one symbol.
|
|
4
|
+
It builds a reusable map of local import relationships, then lets you focus files inside that map.
|
|
5
|
+
|
|
6
|
+
Good for:
|
|
7
|
+
- mapping an unfamiliar directory or subsystem
|
|
8
|
+
- seeing which files are hubs, entrypoints, or leaves
|
|
9
|
+
- comparing a few known areas without mapping all src
|
|
10
|
+
- choosing files/entities to inspect next
|
|
11
|
+
- checking module boundaries when ownership is unclear
|
|
12
|
+
|
|
13
|
+
Use deps for one entity's outgoing dependencies.
|
|
14
|
+
Use usages for real incoming references.
|
|
15
|
+
Use graph for file-level connectivity.
|
|
16
|
+
|
|
17
|
+
Model:
|
|
18
|
+
build graph: scope + view + save
|
|
19
|
+
query graph: from + focus + output toggles
|
|
20
|
+
|
|
21
|
+
view controls what enters the saved graph.
|
|
22
|
+
focus only expands details for files already inside it.
|
|
23
|
+
If focus misses a file, rebuild with wider scope or view.
|
|
24
|
+
|
|
25
|
+
Default view:
|
|
26
|
+
directory scope -> local
|
|
27
|
+
file or multiple scopes -> neighbors
|
|
28
|
+
from -> uses the saved graph
|
|
29
|
+
|
|
30
|
+
Views:
|
|
31
|
+
local only files inside scope; best directory map
|
|
32
|
+
neighbors direct import neighborhood; best file-centered map
|
|
33
|
+
expanded wider neighborhood; more output
|
|
34
|
+
|
|
35
|
+
Scope choice:
|
|
36
|
+
scope=src creates a broad reusable map for src.
|
|
37
|
+
scope=src/services is cheaper for local work.
|
|
38
|
+
scope=[src/services,src/components] compares known areas without mapping all src.
|
|
39
|
+
|
|
40
|
+
After you understand which graph sections matter, hide the rest with flags or prefs.
|
|
41
|
+
Graph can be noisy; shape it for the current task.
|
|
42
|
+
|
|
43
|
+
Controls:
|
|
44
|
+
scope, view, from, focus, symbolUsage, edges, hubs, entrypoints, leaves, exclude, save
|
|
45
|
+
|
|
46
|
+
Specific:
|
|
47
|
+
view local|neighbors|expanded
|
|
48
|
+
from reuse saved graph index; from=aib:graph:<name>
|
|
49
|
+
focus focus a file inside the graph; focus=path
|
|
50
|
+
symbolUsage show imported symbols on edges; +symbolUsage
|
|
51
|
+
|
|
52
|
+
edges/hubs/entrypoints/leaves output section toggles; +name or -name
|
|
53
|
+
|
|
54
|
+
Run:
|
|
55
|
+
aib inspect --stdin
|
|
56
|
+
|
|
57
|
+
Input:
|
|
58
|
+
graph scope=@svc view=local >services-graph
|
|
59
|
+
graph from=aib:graph:services-graph focus=[@svc/users.ts,@svc/admins.ts] +symbolUsage -edges
|
|
60
|
+
|
|
61
|
+
Focus saved graph later:
|
|
62
|
+
inspect graph --from-file aib:graph:services-graph --focus @svc/messages.ts --focus @svc/posts.ts --symbol-usage
|
|
63
|
+
|
|
64
|
+
Inline graph focus can add focus and symbolUsage.
|
|
65
|
+
Use DSL, request files, or prefs to hide sections such as edges/hubs/entrypoints/leaves.
|
|
66
|
+
|
|
67
|
+
Specialized graph command:
|
|
68
|
+
Run:
|
|
69
|
+
aib inspect graph --stdin
|
|
70
|
+
|
|
71
|
+
Input:
|
|
72
|
+
graph scope=@svc view=local >services-graph
|
|
73
|
+
graph from=aib:graph:services-graph focus=[@svc/users.ts,@svc/admins.ts] +symbolUsage -edges
|
|
74
|
+
|
|
75
|
+
Multiple scopes:
|
|
76
|
+
Run:
|
|
77
|
+
aib inspect --stdin
|
|
78
|
+
|
|
79
|
+
Input:
|
|
80
|
+
graph scope=[src/main/server,src/services/ws] view=local >server-ws-graph
|
|
81
|
+
|
|
82
|
+
scope accepts one file/dir or an array.
|
|
83
|
+
|
|
84
|
+
Skip noisy files:
|
|
85
|
+
Run:
|
|
86
|
+
aib inspect --stdin
|
|
87
|
+
|
|
88
|
+
Input:
|
|
89
|
+
graph scope=src view=local exclude=["**/*.test.ts","**/* copy.ts"] >src-graph
|
|
90
|
+
|
|
91
|
+
Graph prefs:
|
|
92
|
+
inspect.graph.edges boolean
|
|
93
|
+
inspect.graph.hubs boolean
|
|
94
|
+
inspect.graph.entrypoints boolean
|
|
95
|
+
inspect.graph.leaves boolean
|
|
96
|
+
inspect.graph.symbols boolean
|
|
97
|
+
inspect.graph.symbolUsage boolean
|
|
98
|
+
|
|
99
|
+
symbolUsage is usually the better first choice when imported names matter.
|
|
100
|
+
|
|
101
|
+
Example:
|
|
102
|
+
session prefs set inspect.graph.edges false inspect.graph.hubs false inspect.graph.symbolUsage true
|
|
103
|
+
|
|
104
|
+
Output fields:
|
|
105
|
+
summary file/edge/package counts
|
|
106
|
+
paths compact path aliases used in text output
|
|
107
|
+
focus selected files with imports/importedBy
|
|
108
|
+
hubs highly connected files
|
|
109
|
+
entrypoints scoped files imported by nobody in graph
|
|
110
|
+
leaves scoped files importing nobody in graph
|
|
111
|
+
edges local file-to-file imports
|
|
112
|
+
saved reusable aib:graph handle
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Inspect Imports
|
|
2
|
+
|
|
3
|
+
Use imports to inspect static and dynamic imports in a file.
|
|
4
|
+
If there are no dynamic imports, the dynamic imports block is omitted.
|
|
5
|
+
|
|
6
|
+
Controls:
|
|
7
|
+
file, ranges
|
|
8
|
+
|
|
9
|
+
Defaults: +ranges
|
|
10
|
+
|
|
11
|
+
Run:
|
|
12
|
+
aib inspect --stdin
|
|
13
|
+
|
|
14
|
+
Input:
|
|
15
|
+
imports @svc/service.ts
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Inspect
|
|
2
|
+
|
|
3
|
+
Inspect helps you turn an unknown code area into a small working model.
|
|
4
|
+
|
|
5
|
+
Use it to understand what exists, how pieces connect, what repeats, where a change can spread, and which exact code should enter context next.
|
|
6
|
+
|
|
7
|
+
One useful flow:
|
|
8
|
+
map -> focus -> code
|
|
9
|
+
|
|
10
|
+
map: learn what exists and how it connects
|
|
11
|
+
focus: choose files/entities/usages that matter
|
|
12
|
+
code: fetch exact code needed
|
|
13
|
+
|
|
14
|
+
Choose inspect operation:
|
|
15
|
+
|
|
16
|
+
declarations in one file file
|
|
17
|
+
static/dynamic imports imports
|
|
18
|
+
public API exports
|
|
19
|
+
methods/properties of parent members
|
|
20
|
+
exact implementation code
|
|
21
|
+
outgoing deps of one entity deps
|
|
22
|
+
incoming references/callers usages
|
|
23
|
+
file/module connectivity graph
|
|
24
|
+
compact directory layout tree
|
|
25
|
+
repeated declarations/helpers duplicates
|
|
26
|
+
|
|
27
|
+
Prefer one batch DSL request for related questions.
|
|
28
|
+
|
|
29
|
+
Batch example:
|
|
30
|
+
|
|
31
|
+
Run:
|
|
32
|
+
aib inspect --stdin
|
|
33
|
+
|
|
34
|
+
Input:
|
|
35
|
+
@file @svc/service.ts
|
|
36
|
+
file
|
|
37
|
+
file @svc/serviceB.ts
|
|
38
|
+
members Service
|
|
39
|
+
code entities=[Service.{render,reset},normalize]
|
|
40
|
+
code @svc/serviceC.ts ServiceC -ranges
|
|
41
|
+
usages target=@svc/service.ts normalize scope=src detail=loc
|
|
42
|
+
duplicates scope=src/scripts detail=sum limit=20
|
|
43
|
+
|
|
44
|
+
How inheritance works above:
|
|
45
|
+
@file sets the default file for following file-like inspect requests.
|
|
46
|
+
file uses @svc/service.ts.
|
|
47
|
+
file @svc/serviceB.ts overrides the default for that one request.
|
|
48
|
+
members Service uses @svc/service.ts because it has no file override.
|
|
49
|
+
code entities=[...] also uses @svc/service.ts.
|
|
50
|
+
code @svc/serviceC.ts ServiceC overrides the file and disables ranges for that request.
|
|
51
|
+
usages sets its own target/scope/detail because it searches references instead of reading the default file.
|
|
52
|
+
duplicates sets its own scope because it scans a directory.
|
|
53
|
+
|
|
54
|
+
Inspect request fields:
|
|
55
|
+
|
|
56
|
+
file source file; first positional path, @file path, or file=path
|
|
57
|
+
target file or directory to analyze; target=path
|
|
58
|
+
scope where to search; scope=path or scope=[a,b]
|
|
59
|
+
entity one symbol selector; entity=name or positional selector
|
|
60
|
+
entities several symbol selectors; entities=[...] or positional selectors
|
|
61
|
+
parent parent class/interface for methods/properties; Parent.member or parent=Name
|
|
62
|
+
ranges include line/range metadata
|
|
63
|
+
exclude skip paths or names depending on operation; exclude=[...]
|
|
64
|
+
detail output level; detail=sum|loc|code
|
|
65
|
+
all return all items; +all
|
|
66
|
+
limit max items in one page; limit=N
|
|
67
|
+
offset page offset; offset=N
|
|
68
|
+
save save reusable artifact where supported; >name
|
|
69
|
+
|
|
70
|
+
Operation sections list their supported controls.
|
|
71
|
+
Specific explains controls whose meaning is local to that operation.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Inspect Members
|
|
2
|
+
|
|
3
|
+
Use members to map a class/interface/object-like symbol without reading its body.
|
|
4
|
+
It shows the internal shape of a parent entity without reading its full body.
|
|
5
|
+
|
|
6
|
+
Good for:
|
|
7
|
+
- listing member names when the parent entity is known
|
|
8
|
+
- narrowing a large parent entity to relevant members
|
|
9
|
+
- understanding object shape before changing or moving related code
|
|
10
|
+
|
|
11
|
+
Controls:
|
|
12
|
+
file, entity, entities, ranges, limit, offset, all
|
|
13
|
+
|
|
14
|
+
Prefs:
|
|
15
|
+
inspect.members.maxItems
|
|
16
|
+
inspect.members.all
|
|
17
|
+
|
|
18
|
+
Run:
|
|
19
|
+
aib inspect --stdin
|
|
20
|
+
|
|
21
|
+
Input:
|
|
22
|
+
members @svc/service.ts entities=[Service,ServiceOptions] +all +ranges
|
|
23
|
+
|
|
24
|
+
inspect members src/service.ts Service [--limit N] [--offset N] [--all] [--ranges]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Inspect Tree
|
|
2
|
+
|
|
3
|
+
Use tree to list a compact directory layout.
|
|
4
|
+
It is useful before focused inspect when you know the area but not the exact file.
|
|
5
|
+
|
|
6
|
+
node_modules, .git, dist, build, out, and .tmp are skipped by default.
|
|
7
|
+
|
|
8
|
+
Controls:
|
|
9
|
+
scope, depth, minDepth, limit, include, exclude, onlyDirs
|
|
10
|
+
|
|
11
|
+
Specific:
|
|
12
|
+
depth max nesting depth; depth=N
|
|
13
|
+
minDepth hide shallower paths; minDepth=N
|
|
14
|
+
onlyDirs show directories only; +onlyDirs
|
|
15
|
+
include only matching files/dirs; include=[...]
|
|
16
|
+
|
|
17
|
+
Run:
|
|
18
|
+
aib inspect --stdin
|
|
19
|
+
|
|
20
|
+
Input:
|
|
21
|
+
tree src depth=4 +onlyDirs limit=200
|
|
22
|
+
tree @svc depth=3 include=["**/*.ts"] exclude=["**/*.test.ts","**/* copy.ts"]
|
|
23
|
+
|
|
24
|
+
First pass in an unfamiliar codebase:
|
|
25
|
+
tree src depth=5 +onlyDirs limit=200
|
|
26
|
+
|
|
27
|
+
Show only deeper directories:
|
|
28
|
+
tree src depth=5 minDepth=3 +onlyDirs limit=200
|
|
29
|
+
|
|
30
|
+
Use project config to hide repeated noisy tree paths instead of repeating excludes in every request.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Inspect Usages
|
|
2
|
+
|
|
3
|
+
Use usages to find who references a file, directory, or entity inside a scope.
|
|
4
|
+
It reports real references, not unused imports or text matches.
|
|
5
|
+
For broad impact checks, target-local usages are hidden automatically when the target is inside a wider scope.
|
|
6
|
+
Use includeTarget only when references inside the target file or directory matter.
|
|
7
|
+
|
|
8
|
+
Good for:
|
|
9
|
+
- checking impact before changing behavior
|
|
10
|
+
- finding consumers of an entity or module area
|
|
11
|
+
- confirming whether extracted or renamed code still has callers
|
|
12
|
+
- getting caller locations or caller code without broad file scans
|
|
13
|
+
|
|
14
|
+
Use detail=code directly when you already need caller code.
|
|
15
|
+
Use detail=loc + save when the first question is impact shape and you may expand only part of it later.
|
|
16
|
+
|
|
17
|
+
Controls:
|
|
18
|
+
target, scope, entity, entities, parent, detail, limit, all, save, includeTarget
|
|
19
|
+
|
|
20
|
+
Specific:
|
|
21
|
+
includeTarget include references inside the target file/directory; +includeTarget
|
|
22
|
+
|
|
23
|
+
Prefs:
|
|
24
|
+
inspect.usages.maxLocations
|
|
25
|
+
inspect.usages.maxCodeBlocks
|
|
26
|
+
|
|
27
|
+
Run:
|
|
28
|
+
aib inspect --stdin
|
|
29
|
+
|
|
30
|
+
Input:
|
|
31
|
+
usages target=@svc/service.ts entities=[createService,normalize,Service.{render,reset}] scope=[src/app,src/tests] detail=loc >service-usages
|
|
32
|
+
|
|
33
|
+
Expand saved usages when needed:
|
|
34
|
+
inspect usages --from-file aib:usages:service-usages --focus createService --detail code --limit 20
|
|
35
|
+
|
|
36
|
+
inspect usages src/service.ts createService --scope src --detail locations [--limit N] [--all] [--save name]
|
|
37
|
+
|
|
38
|
+
Expand saved usages by focusing the reusable usages index:
|
|
39
|
+
inspect usages --from-file aib:usages:service-usages --focus createService --detail code
|
|
40
|
+
|
|
41
|
+
Use the saved usages handle with --from-file/from to focus or expand the reusable index.
|
|
42
|
+
|
|
43
|
+
Directory target:
|
|
44
|
+
Run:
|
|
45
|
+
aib inspect --stdin
|
|
46
|
+
|
|
47
|
+
Input:
|
|
48
|
+
usages target=src/shared scope=[src/app,src/renderer] detail=sum >shared-usages
|