uncompact 0.45.0 → 0.45.2
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/npm/install.js +19 -18
- package/package.json +1 -1
package/npm/install.js
CHANGED
|
@@ -125,7 +125,6 @@ async function main() {
|
|
|
125
125
|
const destPath = path.join(binDir, binaryName);
|
|
126
126
|
|
|
127
127
|
if (fs.existsSync(destPath)) {
|
|
128
|
-
console.log(`[uncompact] Binary already exists at ${destPath}`);
|
|
129
128
|
return;
|
|
130
129
|
}
|
|
131
130
|
|
|
@@ -134,30 +133,31 @@ async function main() {
|
|
|
134
133
|
try {
|
|
135
134
|
release = await getRelease(version);
|
|
136
135
|
} catch (err) {
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
process.stderr.write(`[uncompact] Failed to fetch release: ${err.message}\n`);
|
|
137
|
+
process.stderr.write(`[uncompact] You can install manually: go install github.com/${REPO_OWNER}/${REPO_NAME.toLowerCase()}@latest\n`);
|
|
139
138
|
process.exit(0);
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
const asset = release.assets.find((a) => a.name === assetName);
|
|
143
142
|
if (!asset) {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
process.stderr.write(`[uncompact] No binary found for ${platform}/${arch} in release ${release.tag_name}\n`);
|
|
144
|
+
process.stderr.write(`[uncompact] Available assets: ${release.assets.map((a) => a.name).join(", ")}\n`);
|
|
145
|
+
process.stderr.write(`[uncompact] You can install manually: go install github.com/${REPO_OWNER}/${REPO_NAME.toLowerCase()}@latest\n`);
|
|
147
146
|
process.exit(0);
|
|
148
147
|
}
|
|
149
148
|
|
|
150
|
-
|
|
149
|
+
process.stderr.write(`[uncompact] Installing ${BINARY_NAME} ${release.tag_name} for ${platform}/${arch}...\n`);
|
|
150
|
+
process.stderr.write(`[uncompact] Downloading ${asset.name}...\n`);
|
|
151
151
|
|
|
152
152
|
let buffer;
|
|
153
153
|
try {
|
|
154
154
|
buffer = await httpsGet(asset.browser_download_url);
|
|
155
155
|
} catch (err) {
|
|
156
|
-
|
|
156
|
+
process.stderr.write(`[uncompact] Failed to download: ${err.message}\n`);
|
|
157
157
|
process.exit(0);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
process.stderr.write(`[uncompact] Extracting...\n`);
|
|
161
161
|
|
|
162
162
|
try {
|
|
163
163
|
if (platform === "windows") {
|
|
@@ -166,7 +166,7 @@ async function main() {
|
|
|
166
166
|
extractTarGz(buffer, binDir, binaryName);
|
|
167
167
|
}
|
|
168
168
|
} catch (err) {
|
|
169
|
-
|
|
169
|
+
process.stderr.write(`[uncompact] Failed to extract: ${err.message}\n`);
|
|
170
170
|
process.exit(0);
|
|
171
171
|
}
|
|
172
172
|
|
|
@@ -174,22 +174,23 @@ async function main() {
|
|
|
174
174
|
fs.chmodSync(destPath, 0o755);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
|
|
178
|
-
console.log();
|
|
177
|
+
process.stderr.write(`[uncompact] Installed to ${destPath}\n\n`);
|
|
179
178
|
|
|
180
179
|
// Automatically install Claude Code hooks
|
|
181
|
-
|
|
180
|
+
process.stderr.write("[uncompact] Configuring Claude Code hooks...\n");
|
|
182
181
|
try {
|
|
183
|
-
|
|
182
|
+
// We redirect stdout to stderr to ensure visibility during npm install
|
|
183
|
+
execFileSync(destPath, ["install", "--yes"], { stdio: ["inherit", process.stderr, "inherit"] });
|
|
184
184
|
} catch (err) {
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
process.stderr.write("[uncompact] Failed to automatically configure hooks. You can run it manually:\n");
|
|
186
|
+
process.stderr.write(" uncompact install\n");
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
process.stderr.write("\n");
|
|
189
189
|
|
|
190
190
|
// Show help output after install
|
|
191
191
|
try {
|
|
192
|
-
|
|
192
|
+
// We redirect stdout to stderr to ensure visibility during npm install
|
|
193
|
+
execFileSync(destPath, [], { stdio: ["inherit", process.stderr, "inherit"] });
|
|
193
194
|
} catch (err) {
|
|
194
195
|
// Ignore errors from running the binary itself
|
|
195
196
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uncompact",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.2",
|
|
4
4
|
"description": "Stop Claude Code compaction from making your AI stupid. Re-inject project context after compaction via the Supermodel API.",
|
|
5
5
|
"author": "Supermodel <abe@supermodel.software>",
|
|
6
6
|
"license": "MIT",
|