mirror of
https://github.com/backnotprop/plannotator.git
synced 2026-09-14 14:17:26 +08:00
929e8f9f59
The Pi extension is distributed and executed as raw TypeScript through Pi's jiti loader. Phantom .js paths force jiti through its last-resort fallback, while extensionless paths still require probing. Exact .ts paths avoid both and match the files that actually ship. - rewrite relative .js and extensionless specifiers in hand-written sources (the existing noEmit bundler tsconfig permits .ts imports) - make vendor.sh emit .ts in explicit rewrite rules and normalize both source styles across verbatim-copied generated modules - guard hand-written and generated sources against either inexact form Extension module import: 43.5ms -> 15ms median (PI_TIMING, n=12 interleaved). bun test: 73/73 (pi-extension), 456/456 (server); all seven TypeScript project checks and the packed-artifact audit pass. Co-authored-by: dca123 <dca123@users.noreply.github.com> Co-authored-by: Michael Ramos <mdramos8@gmail.com>
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
/**
|
|
* Node-compatible servers for Plannotator Pi extension.
|
|
*
|
|
* Pi loads extensions via jiti (Node.js), so we can't use Bun.serve().
|
|
* These are lightweight node:http servers implementing just the routes
|
|
* each UI needs — plan review, code review, and markdown annotation.
|
|
*/
|
|
|
|
export type {
|
|
DiffOption,
|
|
DiffType,
|
|
GitContext,
|
|
} from "./generated/review-core.ts";
|
|
export type { WorkspaceDiffType } from "./generated/review-workspace.ts";
|
|
export type { VcsSelection } from "./server/vcs.ts";
|
|
export {
|
|
type AnnotateServerResult,
|
|
startAnnotateServer,
|
|
} from "./server/serverAnnotate.ts";
|
|
export {
|
|
type PlanServerResult,
|
|
startPlanReviewServer,
|
|
} from "./server/serverPlan.ts";
|
|
export {
|
|
type ReviewServerResult,
|
|
startReviewServer,
|
|
} from "./server/serverReview.ts";
|
|
export {
|
|
canStageFiles,
|
|
detectManagedVcs,
|
|
detectRemoteDefaultCompareTarget,
|
|
detectVcs,
|
|
getGitContext,
|
|
getVcsContext,
|
|
getVcsDiffFingerprint,
|
|
getVcsFileContentsForDiff,
|
|
prepareLocalReviewDiff,
|
|
resolveInitialDiffType,
|
|
resolveVcsCwd,
|
|
reviewRuntime,
|
|
runGitDiff,
|
|
runVcsDiff,
|
|
stageFile,
|
|
unstageFile,
|
|
} from "./server/vcs.ts";
|