@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.
- package/README.md +35 -10
- package/dist/bin/codegraph.js +72 -4
- package/dist/bin/codegraph.js.map +1 -1
- package/dist/bin/uninstall.d.ts +7 -7
- package/dist/bin/uninstall.d.ts.map +1 -1
- package/dist/bin/uninstall.js +23 -135
- package/dist/bin/uninstall.js.map +1 -1
- package/dist/installer/claude-md-template.d.ts +10 -6
- package/dist/installer/claude-md-template.d.ts.map +1 -1
- package/dist/installer/claude-md-template.js +15 -40
- package/dist/installer/claude-md-template.js.map +1 -1
- package/dist/installer/config-writer.d.ts +17 -24
- package/dist/installer/config-writer.d.ts.map +1 -1
- package/dist/installer/config-writer.js +44 -239
- package/dist/installer/config-writer.js.map +1 -1
- package/dist/installer/index.d.ts +45 -4
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +214 -78
- package/dist/installer/index.js.map +1 -1
- package/dist/installer/instructions-template.d.ts +28 -0
- package/dist/installer/instructions-template.d.ts.map +1 -0
- package/dist/installer/instructions-template.js +63 -0
- package/dist/installer/instructions-template.js.map +1 -0
- package/dist/installer/targets/claude.d.ts +27 -0
- package/dist/installer/targets/claude.d.ts.map +1 -0
- package/dist/installer/targets/claude.js +246 -0
- package/dist/installer/targets/claude.js.map +1 -0
- package/dist/installer/targets/codex.d.ts +18 -0
- package/dist/installer/targets/codex.d.ts.map +1 -0
- package/dist/installer/targets/codex.js +185 -0
- package/dist/installer/targets/codex.js.map +1 -0
- package/dist/installer/targets/cursor.d.ts +35 -0
- package/dist/installer/targets/cursor.d.ts.map +1 -0
- package/dist/installer/targets/cursor.js +229 -0
- package/dist/installer/targets/cursor.js.map +1 -0
- package/dist/installer/targets/opencode.d.ts +30 -0
- package/dist/installer/targets/opencode.d.ts.map +1 -0
- package/dist/installer/targets/opencode.js +235 -0
- package/dist/installer/targets/opencode.js.map +1 -0
- package/dist/installer/targets/registry.d.ts +35 -0
- package/dist/installer/targets/registry.d.ts.map +1 -0
- package/dist/installer/targets/registry.js +83 -0
- package/dist/installer/targets/registry.js.map +1 -0
- package/dist/installer/targets/shared.d.ts +77 -0
- package/dist/installer/targets/shared.d.ts.map +1 -0
- package/dist/installer/targets/shared.js +246 -0
- package/dist/installer/targets/shared.js.map +1 -0
- package/dist/installer/targets/toml.d.ts +52 -0
- package/dist/installer/targets/toml.d.ts.map +1 -0
- package/dist/installer/targets/toml.js +147 -0
- package/dist/installer/targets/toml.js.map +1 -0
- package/dist/installer/targets/types.d.ts +116 -0
- package/dist/installer/targets/types.d.ts.map +1 -0
- package/dist/installer/targets/types.js +16 -0
- package/dist/installer/targets/types.js.map +1 -0
- package/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
- package/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
- package/dist/resolution/frameworks/cargo-workspace.js +225 -0
- package/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
- package/dist/resolution/frameworks/rust.d.ts.map +1 -1
- package/dist/resolution/frameworks/rust.js +35 -17
- package/dist/resolution/frameworks/rust.js.map +1 -1
- package/dist/resolution/index.d.ts.map +1 -1
- package/dist/resolution/index.js +18 -0
- package/dist/resolution/index.js.map +1 -1
- package/dist/resolution/types.d.ts +9 -0
- package/dist/resolution/types.d.ts.map +1 -1
- package/package.json +3 -2
- package/scripts/local-install.sh +41 -0
- 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}"
|