Skip to content

Commit 69331b8

Browse files
committed
fix: repoint docs base path and links to renamed repo
The repo was renamed codeanalyzer-ts -> codeanalyzer-typescript, but the Astro base and all hardcoded content links still pointed at the old name, so GitHub Pages (now served at /codeanalyzer-typescript/) 404'd every asset — the site rendered unstyled. Update base, site edit links, and the /codeanalyzer-ts/ content-link prefixes.
1 parent 75f35ee commit 69331b8

15 files changed

Lines changed: 626 additions & 72 deletions

File tree

.codeanalyzer/analysis_cache.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# codeanalyzer-typescript — documentation site
22

3-
This branch holds the documentation site for [**codeanalyzer-typescript**](https://github.com/codellm-devkit/codeanalyzer-ts), the TypeScript/JavaScript static-analysis backend behind [CLDK](https://github.com/codellm-devkit/python-sdk). The tool's source code lives on `main`; this `docs` branch is the [Astro](https://astro.build/) + [Starlight](https://starlight.astro.build/) site that documents it.
3+
This branch holds the documentation site for [**codeanalyzer-typescript**](https://github.com/codellm-devkit/codeanalyzer-typescript), the TypeScript/JavaScript static-analysis backend behind [CLDK](https://github.com/codellm-devkit/python-sdk). The tool's source code lives on `main`; this `docs` branch is the [Astro](https://astro.build/) + [Starlight](https://starlight.astro.build/) site that documents it.
44

55
## Develop
66

@@ -36,22 +36,22 @@ astro.config.mjs # site + sidebar config
3636

3737
## Internal links (important)
3838

39-
The site is served from a **base path**`https://codellm-devkit.github.io/codeanalyzer-ts/` (set via `site` + `base` in `astro.config.mjs`). Astro does **not** rewrite links in page content, so every internal link must include the base prefix:
39+
The site is served from a **base path**`https://codellm-devkit.github.io/codeanalyzer-typescript/` (set via `site` + `base` in `astro.config.mjs`). Astro does **not** rewrite links in page content, so every internal link must include the base prefix:
4040

4141
```md
4242
<!-- correct -->
43-
[Quickstart](/codeanalyzer-ts/quickstart/)
44-
<LinkCard href="/codeanalyzer-ts/guides/concepts/" ... />
43+
[Quickstart](/codeanalyzer-typescript/quickstart/)
44+
<LinkCard href="/codeanalyzer-typescript/guides/concepts/" ... />
4545

4646
<!-- WRONG — 404s at the base path -->
4747
[Quickstart](/quickstart/)
4848
```
4949

50-
Sidebar `slug` entries in `astro.config.mjs` and assets are based automatically — only authored links in `.mdx` need the prefix. To verify after editing, build and grep `dist/` for any `href="/…"` that doesn't start with `/codeanalyzer-ts/`.
50+
Sidebar `slug` entries in `astro.config.mjs` and assets are based automatically — only authored links in `.mdx` need the prefix. To verify after editing, build and grep `dist/` for any `href="/…"` that doesn't start with `/codeanalyzer-typescript/`.
5151

5252
## Deploy
5353

54-
Pushing to `docs` triggers `.github/workflows/deploy.yml`, which builds the site and publishes `dist/` to the `gh-pages` branch. GitHub Pages then serves it at `https://codellm-devkit.github.io/codeanalyzer-ts/`.
54+
Pushing to `docs` triggers `.github/workflows/deploy.yml`, which builds the site and publishes `dist/` to the `gh-pages` branch. GitHub Pages then serves it at `https://codellm-devkit.github.io/codeanalyzer-typescript/`.
5555

5656
## License
5757

astro.config.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { pluginLineNumbers } from "@expressive-code/plugin-line-numbers";
77
// https://astro.build/config
88
export default defineConfig({
99
site: "https://codellm-devkit.github.io",
10-
base: "/codeanalyzer-ts",
10+
base: "/codeanalyzer-typescript",
1111
integrations: [
1212
// Mermaid must run BEFORE Starlight so it can preprocess ```mermaid blocks.
1313
mermaid({
@@ -65,12 +65,12 @@ export default defineConfig({
6565
{
6666
icon: "github",
6767
label: "codeanalyzer-typescript on GitHub",
68-
href: "https://github.com/codellm-devkit/codeanalyzer-ts",
68+
href: "https://github.com/codellm-devkit/codeanalyzer-typescript",
6969
},
7070
{
7171
icon: "seti:typescript",
7272
label: "codeanalyzer-typescript releases",
73-
href: "https://github.com/codellm-devkit/codeanalyzer-ts/releases",
73+
href: "https://github.com/codellm-devkit/codeanalyzer-typescript/releases",
7474
},
7575
{
7676
icon: "discord",
@@ -79,7 +79,7 @@ export default defineConfig({
7979
},
8080
],
8181
editLink: {
82-
baseUrl: "https://github.com/codellm-devkit/codeanalyzer-ts/edit/docs/",
82+
baseUrl: "https://github.com/codellm-devkit/codeanalyzer-typescript/edit/docs/",
8383
},
8484
sidebar: [
8585
{

bun.lock

Lines changed: 552 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/content/docs/guides/call-graph.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: How codeanalyzer-typescript builds the level-1 call graph — the T
55

66
import { Aside, LinkCard, CardGrid } from "@astrojs/starlight/components";
77

8-
The call graph is the answer to *"who calls whom?"* — a flat list of identity-only `TSCallEdge` objects whose `source` and `target` are signature strings. This page is the deep dive on how the **level-1** graph is built: the TypeScript checker resolves each recorded call site, Rapid Type Analysis expands virtual dispatch, and phantom nodes capture the calls that leave the project. It's the always-on base graph; [level 2](/codeanalyzer-ts/guides/level-2/) enriches it.
8+
The call graph is the answer to *"who calls whom?"* — a flat list of identity-only `TSCallEdge` objects whose `source` and `target` are signature strings. This page is the deep dive on how the **level-1** graph is built: the TypeScript checker resolves each recorded call site, Rapid Type Analysis expands virtual dispatch, and phantom nodes capture the calls that leave the project. It's the always-on base graph; [level 2](/codeanalyzer-typescript/guides/level-2/) enriches it.
99

1010
```mermaid
1111
flowchart TB
@@ -88,7 +88,7 @@ The edge into it carries `provenance: ["import"]`, and the phantom is recorded i
8888
A specifier is external only if it isn't a relative or absolute path. Packages (`express`), scoped packages (`@scope/pkg`), and `node:` URLs become phantoms; relative imports (`./x`, `../lib/y`) are internal and left to the checker, never faked. Phantom resolution reads only imports — no type checker, no `node_modules` — so it works identically for TypeScript `import` and JavaScript `require`.
8989
</Aside>
9090

91-
Disable phantom resolution entirely with [`--no-phantoms`](/codeanalyzer-ts/guides/cli-usage/#phantom-nodes) if you want a graph restricted to in-project targets.
91+
Disable phantom resolution entirely with [`--no-phantoms`](/codeanalyzer-typescript/guides/cli-usage/#phantom-nodes) if you want a graph restricted to in-project targets.
9292

9393
## Why identity-only edges
9494

@@ -109,8 +109,8 @@ exact = [(u, v) for u, v, d in g.edges(data=True) if not d["rta"]]
109109
## Where to go next
110110

111111
<CardGrid>
112-
<LinkCard title="Core concepts" description="How the call graph sits alongside the symbol table and external symbols." href="/codeanalyzer-ts/guides/concepts/" />
113-
<LinkCard title="Output schema" description="The TSCallEdge and TSExternalSymbol models in full." href="/codeanalyzer-ts/reference/schema/#tscalledge" />
114-
<LinkCard title="Level 2: CodeQL & entrypoints" description="What enrichment will add on top of this graph." href="/codeanalyzer-ts/guides/level-2/" />
115-
<LinkCard title="CLI usage" description="Flags that change the graph: analysis level, phantoms." href="/codeanalyzer-ts/guides/cli-usage/" />
112+
<LinkCard title="Core concepts" description="How the call graph sits alongside the symbol table and external symbols." href="/codeanalyzer-typescript/guides/concepts/" />
113+
<LinkCard title="Output schema" description="The TSCallEdge and TSExternalSymbol models in full." href="/codeanalyzer-typescript/reference/schema/#tscalledge" />
114+
<LinkCard title="Level 2: CodeQL & entrypoints" description="What enrichment will add on top of this graph." href="/codeanalyzer-typescript/guides/level-2/" />
115+
<LinkCard title="CLI usage" description="Flags that change the graph: analysis level, phantoms." href="/codeanalyzer-typescript/guides/cli-usage/" />
116116
</CardGrid>

src/content/docs/guides/cli-usage.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Worked examples for the codeanalyzer-typescript command — output
55

66
import { Aside, LinkCard, CardGrid, Tabs, TabItem } from "@astrojs/starlight/components";
77

8-
The `codeanalyzer-typescript` command runs static analysis on a TypeScript/JavaScript project and emits a `TSApplication` artifact. This guide walks through the common invocations; for the full flag table see the [CLI reference](/codeanalyzer-ts/reference/cli/).
8+
The `codeanalyzer-typescript` command runs static analysis on a TypeScript/JavaScript project and emits a `TSApplication` artifact. This guide walks through the common invocations; for the full flag table see the [CLI reference](/codeanalyzer-typescript/reference/cli/).
99

1010
<Aside type="note" title="Invoking the analyzer">
1111
The examples below call the compiled binary `codeanalyzer-typescript`. If you haven't built it, run from source instead — `bun run start -- --input …` — everything after `--` is identical.
@@ -56,7 +56,7 @@ codeanalyzer-typescript --input ./my-ts-project --analysis-level 2
5656
Every run produces a symbol table **and** a call graph. At level 1, edges come from the TypeScript checker plus Rapid Type Analysis, with phantom nodes for calls into imported libraries. Level 2 is intended to merge in CodeQL-derived edges.
5757

5858
<Aside type="caution">
59-
Level-2 CodeQL enrichment is **experimental** and currently a stub: it logs a warning and emits no extra edges, falling back to the level-1 graph. See [Level 2: CodeQL & entrypoints](/codeanalyzer-ts/guides/level-2/).
59+
Level-2 CodeQL enrichment is **experimental** and currently a stub: it logs a warning and emits no extra edges, falling back to the level-1 graph. See [Level 2: CodeQL & entrypoints](/codeanalyzer-typescript/guides/level-2/).
6060
</Aside>
6161

6262
## Build control: materializing dependencies
@@ -71,7 +71,7 @@ codeanalyzer-typescript --input ./my-ts-project --no-build
7171
codeanalyzer-typescript --input ./my-ts-project --eager
7272
```
7373

74-
Materialization runs the project's package manager with `--ignore-scripts` and **degrades gracefully**: if the install fails, the run still completes with partial type information. See [Installation](/codeanalyzer-ts/installing/#why-your-project-needs-its-dependencies).
74+
Materialization runs the project's package manager with `--ignore-scripts` and **degrades gracefully**: if the install fails, the run still completes with partial type information. See [Installation](/codeanalyzer-typescript/installing/#why-your-project-needs-its-dependencies).
7575

7676
## Caching: eager vs lazy
7777

@@ -117,7 +117,7 @@ By default, calls into imported libraries become phantom `external_symbols` so t
117117
codeanalyzer-typescript --input ./my-ts-project --no-phantoms
118118
```
119119

120-
See [Call graph & dispatch](/codeanalyzer-ts/guides/call-graph/#phantom-nodes) for what phantom nodes capture.
120+
See [Call graph & dispatch](/codeanalyzer-typescript/guides/call-graph/#phantom-nodes) for what phantom nodes capture.
121121

122122
## Verbosity
123123

@@ -144,8 +144,8 @@ codeanalyzer-typescript \
144144
## Where to go next
145145

146146
<CardGrid>
147-
<LinkCard title="CLI reference" description="The complete flag table with defaults." href="/codeanalyzer-ts/reference/cli/" />
148-
<LinkCard title="Core concepts" description="What the artifact actually contains." href="/codeanalyzer-ts/guides/concepts/" />
149-
<LinkCard title="Call graph & dispatch" description="How --analysis-level and --no-phantoms change the graph." href="/codeanalyzer-ts/guides/call-graph/" />
150-
<LinkCard title="Output schema" description="The TSApplication data model." href="/codeanalyzer-ts/reference/schema/" />
147+
<LinkCard title="CLI reference" description="The complete flag table with defaults." href="/codeanalyzer-typescript/reference/cli/" />
148+
<LinkCard title="Core concepts" description="What the artifact actually contains." href="/codeanalyzer-typescript/guides/concepts/" />
149+
<LinkCard title="Call graph & dispatch" description="How --analysis-level and --no-phantoms change the graph." href="/codeanalyzer-typescript/guides/call-graph/" />
150+
<LinkCard title="Output schema" description="The TSApplication data model." href="/codeanalyzer-typescript/reference/schema/" />
151151
</CardGrid>

src/content/docs/guides/concepts.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ flowchart LR
4040

4141
A `TSCallable` (function, method, constructor, accessor, or arrow) carries its `signature`, source `code`, `parameters`, `type_parameters`, `decorators`, `call_sites`, accessed symbols, cyclomatic complexity, and TypeScript-native flags (`is_async`, `is_static`, `is_abstract`, `accessibility`, …). A `TSClass` carries its `base_classes`, `implements_types`, `methods`, `attributes`, and decorators. The TypeScript node kinds Python and Java don't have — interfaces, enums, type aliases, namespaces — are first-class. Each node records line/column spans so you can map any element back to source.
4242

43-
Construction is done by the **TypeScript compiler** through [ts-morph](https://ts-morph.com/): the same checker that types the project resolves references, so the analyzer materializes the project's `node_modules` first (see [Installation](/codeanalyzer-ts/installing/)).
43+
Construction is done by the **TypeScript compiler** through [ts-morph](https://ts-morph.com/): the same checker that types the project resolves references, so the analyzer materializes the project's `node_modules` first (see [Installation](/codeanalyzer-typescript/installing/)).
4444

4545
<Aside type="note" title="Signatures are the identity">
4646
A callable's `signature` (e.g. `src/user.UserService.getUser`) is its identity across the whole artifact. Call-graph edges and entrypoints both reference callables by signature, not by a separate node object — see [below](#signatures-are-the-identity).
@@ -58,7 +58,7 @@ flowchart LR
5858
B -->|import| E["node:fs.readFileSync"]
5959
```
6060

61-
The TypeScript checker resolves each recorded call site to a callee declaration and backfills `callee_signature` in place; the resulting edges are guaranteed to point at real signatures (no dangling edges). Virtual dispatch is expanded with **Rapid Type Analysis**, and calls leaving the project become phantom **external symbols**. The full mechanism is its own page — [Call graph & dispatch](/codeanalyzer-ts/guides/call-graph/).
61+
The TypeScript checker resolves each recorded call site to a callee declaration and backfills `callee_signature` in place; the resulting edges are guaranteed to point at real signatures (no dangling edges). Virtual dispatch is expanded with **Rapid Type Analysis**, and calls leaving the project become phantom **external symbols**. The full mechanism is its own page — [Call graph & dispatch](/codeanalyzer-typescript/guides/call-graph/).
6262

6363
Because it's a plain edge list keyed by signature, loading it into a graph is direct:
6464

@@ -92,7 +92,7 @@ Only **bare** specifiers become phantoms — packages like `express`, scoped pac
9292
**Entrypoints** are the framework-dispatched roots of an application — the functions a framework calls that your own code never calls directly: an HTTP route handler, a message consumer, a CLI command. They're collected into `entrypoints`, keyed by framework name, with each `TSEntrypoint` referencing a callable by signature and carrying framework metadata (route path, HTTP methods, …).
9393

9494
<Aside type="caution" title="Empty at level 1">
95-
At level 1, `entrypoints` is always `{}`. Framework entrypoint detection is part of the **level-2** roadmap — see [Level 2: CodeQL & entrypoints](/codeanalyzer-ts/guides/level-2/).
95+
At level 1, `entrypoints` is always `{}`. Framework entrypoint detection is part of the **level-2** roadmap — see [Level 2: CodeQL & entrypoints](/codeanalyzer-typescript/guides/level-2/).
9696
</Aside>
9797

9898
## Signatures are the identity
@@ -126,8 +126,8 @@ flowchart LR
126126
## Where to go next
127127

128128
<CardGrid>
129-
<LinkCard title="Call graph & dispatch" description="The tsc resolver, RTA expansion, and phantom nodes in depth." href="/codeanalyzer-ts/guides/call-graph/" />
130-
<LinkCard title="Output schema" description="Every field of every model in the artifact." href="/codeanalyzer-ts/reference/schema/" />
131-
<LinkCard title="CLI usage" description="The flags that control what ends up in the artifact." href="/codeanalyzer-ts/guides/cli-usage/" />
132-
<LinkCard title="Level 2: CodeQL & entrypoints" description="What the experimental second layer will add." href="/codeanalyzer-ts/guides/level-2/" />
129+
<LinkCard title="Call graph & dispatch" description="The tsc resolver, RTA expansion, and phantom nodes in depth." href="/codeanalyzer-typescript/guides/call-graph/" />
130+
<LinkCard title="Output schema" description="Every field of every model in the artifact." href="/codeanalyzer-typescript/reference/schema/" />
131+
<LinkCard title="CLI usage" description="The flags that control what ends up in the artifact." href="/codeanalyzer-typescript/guides/cli-usage/" />
132+
<LinkCard title="Level 2: CodeQL & entrypoints" description="What the experimental second layer will add." href="/codeanalyzer-typescript/guides/level-2/" />
133133
</CardGrid>

src/content/docs/guides/level-2.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ That makes `--analysis-level 2` safe to wire into a pipeline now: when enrichmen
7878
## Where to go next
7979

8080
<CardGrid>
81-
<LinkCard title="Call graph & dispatch" description="The level-1 graph that level 2 enriches." href="/codeanalyzer-ts/guides/call-graph/" />
82-
<LinkCard title="Output schema" description="The TSEntrypoint and TSCallEdge models." href="/codeanalyzer-ts/reference/schema/#tsentrypoint" />
83-
<LinkCard title="Core concepts" description="Provenance and how merged edges record their engines." href="/codeanalyzer-ts/guides/concepts/#provenance" />
81+
<LinkCard title="Call graph & dispatch" description="The level-1 graph that level 2 enriches." href="/codeanalyzer-typescript/guides/call-graph/" />
82+
<LinkCard title="Output schema" description="The TSEntrypoint and TSCallEdge models." href="/codeanalyzer-typescript/reference/schema/#tsentrypoint" />
83+
<LinkCard title="Core concepts" description="Provenance and how merged edges record their engines." href="/codeanalyzer-typescript/guides/concepts/#provenance" />
8484
</CardGrid>

0 commit comments

Comments
 (0)