@colbymchenry/codegraph 0.7.4 → 0.7.9

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.
Files changed (70) hide show
  1. package/README.md +35 -10
  2. package/dist/bin/codegraph.js +72 -4
  3. package/dist/bin/codegraph.js.map +1 -1
  4. package/dist/bin/uninstall.d.ts +7 -7
  5. package/dist/bin/uninstall.d.ts.map +1 -1
  6. package/dist/bin/uninstall.js +23 -135
  7. package/dist/bin/uninstall.js.map +1 -1
  8. package/dist/installer/claude-md-template.d.ts +10 -6
  9. package/dist/installer/claude-md-template.d.ts.map +1 -1
  10. package/dist/installer/claude-md-template.js +15 -40
  11. package/dist/installer/claude-md-template.js.map +1 -1
  12. package/dist/installer/config-writer.d.ts +17 -24
  13. package/dist/installer/config-writer.d.ts.map +1 -1
  14. package/dist/installer/config-writer.js +44 -239
  15. package/dist/installer/config-writer.js.map +1 -1
  16. package/dist/installer/index.d.ts +45 -4
  17. package/dist/installer/index.d.ts.map +1 -1
  18. package/dist/installer/index.js +214 -78
  19. package/dist/installer/index.js.map +1 -1
  20. package/dist/installer/instructions-template.d.ts +28 -0
  21. package/dist/installer/instructions-template.d.ts.map +1 -0
  22. package/dist/installer/instructions-template.js +63 -0
  23. package/dist/installer/instructions-template.js.map +1 -0
  24. package/dist/installer/targets/claude.d.ts +27 -0
  25. package/dist/installer/targets/claude.d.ts.map +1 -0
  26. package/dist/installer/targets/claude.js +246 -0
  27. package/dist/installer/targets/claude.js.map +1 -0
  28. package/dist/installer/targets/codex.d.ts +18 -0
  29. package/dist/installer/targets/codex.d.ts.map +1 -0
  30. package/dist/installer/targets/codex.js +185 -0
  31. package/dist/installer/targets/codex.js.map +1 -0
  32. package/dist/installer/targets/cursor.d.ts +35 -0
  33. package/dist/installer/targets/cursor.d.ts.map +1 -0
  34. package/dist/installer/targets/cursor.js +229 -0
  35. package/dist/installer/targets/cursor.js.map +1 -0
  36. package/dist/installer/targets/opencode.d.ts +30 -0
  37. package/dist/installer/targets/opencode.d.ts.map +1 -0
  38. package/dist/installer/targets/opencode.js +235 -0
  39. package/dist/installer/targets/opencode.js.map +1 -0
  40. package/dist/installer/targets/registry.d.ts +35 -0
  41. package/dist/installer/targets/registry.d.ts.map +1 -0
  42. package/dist/installer/targets/registry.js +83 -0
  43. package/dist/installer/targets/registry.js.map +1 -0
  44. package/dist/installer/targets/shared.d.ts +77 -0
  45. package/dist/installer/targets/shared.d.ts.map +1 -0
  46. package/dist/installer/targets/shared.js +246 -0
  47. package/dist/installer/targets/shared.js.map +1 -0
  48. package/dist/installer/targets/toml.d.ts +52 -0
  49. package/dist/installer/targets/toml.d.ts.map +1 -0
  50. package/dist/installer/targets/toml.js +147 -0
  51. package/dist/installer/targets/toml.js.map +1 -0
  52. package/dist/installer/targets/types.d.ts +116 -0
  53. package/dist/installer/targets/types.d.ts.map +1 -0
  54. package/dist/installer/targets/types.js +16 -0
  55. package/dist/installer/targets/types.js.map +1 -0
  56. package/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
  57. package/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
  58. package/dist/resolution/frameworks/cargo-workspace.js +225 -0
  59. package/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
  60. package/dist/resolution/frameworks/rust.d.ts.map +1 -1
  61. package/dist/resolution/frameworks/rust.js +35 -17
  62. package/dist/resolution/frameworks/rust.js.map +1 -1
  63. package/dist/resolution/index.d.ts.map +1 -1
  64. package/dist/resolution/index.js +18 -0
  65. package/dist/resolution/index.js.map +1 -1
  66. package/dist/resolution/types.d.ts +9 -0
  67. package/dist/resolution/types.d.ts.map +1 -1
  68. package/package.json +3 -2
  69. package/scripts/local-install.sh +41 -0
  70. package/scripts/release.sh +70 -0
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env bash
2
+ # Build the current branch and link it as the global `codegraph` for
3
+ # hands-on testing. Replaces any existing global install for as long
4
+ # as the symlink is in place.
5
+ #
6
+ # Usage:
7
+ # ./scripts/local-install.sh # build + link
8
+ # ./scripts/local-install.sh --undo # unlink + restore the published version
9
+
10
+ set -euo pipefail
11
+
12
+ cd "$(dirname "$0")/.."
13
+
14
+ PKG=$(node -p "require('./package.json').name")
15
+ VERSION=$(node -p "require('./package.json').version")
16
+ BRANCH=$(git rev-parse --abbrev-ref HEAD)
17
+
18
+ if [ "${1:-}" = "--undo" ]; then
19
+ echo "→ unlinking ${PKG}"
20
+ npm unlink -g "${PKG}" >/dev/null 2>&1 || true
21
+ echo "→ reinstalling published ${PKG}"
22
+ npm install -g "${PKG}"
23
+ echo "done: global codegraph -> $(command -v codegraph)"
24
+ exit 0
25
+ fi
26
+
27
+ echo "→ building ${PKG} ${VERSION} (${BRANCH})"
28
+ npm run build
29
+
30
+ echo "→ linking globally"
31
+ npm link
32
+
33
+ LINKED=$(command -v codegraph || echo "(not on PATH)")
34
+ echo
35
+ echo "✓ global codegraph now points to this branch"
36
+ echo " binary: ${LINKED}"
37
+ echo " branch: ${BRANCH}"
38
+ echo " version: ${VERSION}"
39
+ echo
40
+ echo "To restore the published version:"
41
+ echo " ./scripts/local-install.sh --undo"
@@ -0,0 +1,70 @@
1
+ #!/usr/bin/env bash
2
+ # Tag the current commit with the version in package.json and publish a
3
+ # matching GitHub Release whose body is the corresponding CHANGELOG.md entry.
4
+ #
5
+ # Run AFTER you have:
6
+ # - bumped package.json
7
+ # - added a `## [X.Y.Z] - YYYY-MM-DD` block at the top of CHANGELOG.md
8
+ # - committed, pushed to origin, and run `npm publish`
9
+ #
10
+ # Idempotent: safe to re-run after a partial failure. Skips steps that are
11
+ # already done (tag created, tag pushed, release published).
12
+ #
13
+ # Usage: ./scripts/release.sh
14
+
15
+ set -euo pipefail
16
+
17
+ cd "$(dirname "$0")/.."
18
+
19
+ VERSION=$(node -p "require('./package.json').version")
20
+ TAG="v${VERSION}"
21
+
22
+ REPO=$(git remote get-url origin | sed -E 's|.*github\.com[:/]||; s|\.git$||')
23
+ if [ -z "${REPO}" ]; then
24
+ echo "error: could not derive owner/repo from origin remote URL" >&2
25
+ exit 1
26
+ fi
27
+
28
+ if ! grep -q "^## \[${VERSION}\]" CHANGELOG.md; then
29
+ echo "error: no '## [${VERSION}]' entry found in CHANGELOG.md" >&2
30
+ exit 1
31
+ fi
32
+
33
+ NOTES=$(awk -v v="${VERSION}" '
34
+ /^## \[/ {
35
+ if (p) exit
36
+ if ($0 ~ "^## \\[" v "\\]") p = 1
37
+ }
38
+ p
39
+ ' CHANGELOG.md)
40
+
41
+ if [ -z "${NOTES}" ]; then
42
+ echo "error: failed to extract changelog notes for ${VERSION}" >&2
43
+ exit 1
44
+ fi
45
+
46
+ if git rev-parse "${TAG}" >/dev/null 2>&1; then
47
+ echo "✓ tag ${TAG} already exists locally"
48
+ else
49
+ echo "→ tagging ${TAG}"
50
+ git tag "${TAG}"
51
+ fi
52
+
53
+ if git ls-remote --exit-code --tags origin "${TAG}" >/dev/null 2>&1; then
54
+ echo "✓ tag ${TAG} already on origin"
55
+ else
56
+ echo "→ pushing ${TAG} to origin"
57
+ git push origin "${TAG}"
58
+ fi
59
+
60
+ if gh release view "${TAG}" --repo "${REPO}" >/dev/null 2>&1; then
61
+ echo "✓ release ${TAG} already published"
62
+ else
63
+ echo "→ creating GitHub Release ${TAG} on ${REPO}"
64
+ gh release create "${TAG}" \
65
+ --repo "${REPO}" \
66
+ --title "${TAG}" \
67
+ --notes "${NOTES}"
68
+ fi
69
+
70
+ echo "done: https://github.com/${REPO}/releases/tag/${TAG}"