srcpack 0.1.10 → 0.1.12

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/dist/cli.js CHANGED
@@ -223662,7 +223662,7 @@ Options:
223662
223662
  for (const { name, outfile, result } of outputs) {
223663
223663
  const fileCount = result.index.length;
223664
223664
  const lineCount = sumLines(result);
223665
- const outPath = join6(root, outfile);
223665
+ const outPath = resolve2(root, outfile);
223666
223666
  const nameCol = name.padEnd(maxNameLen);
223667
223667
  const filesCol = formatNumber(fileCount).padStart(maxFilesLen);
223668
223668
  const linesCol = formatNumber(lineCount).padStart(maxLinesLen);
@@ -223674,7 +223674,8 @@ Options:
223674
223674
  } else {
223675
223675
  await mkdir3(dirname3(outPath), { recursive: true });
223676
223676
  await writeFile4(outPath, result.content);
223677
- console.log(` ${nameCol} ${filesCol} ${plural(fileCount, "file")} ${linesCol} ${plural(lineCount, "line")} → ${outfile}`);
223677
+ const displayPath = relative(process.cwd(), outPath);
223678
+ console.log(` ${nameCol} ${filesCol} ${plural(fileCount, "file")} ${linesCol} ${plural(lineCount, "line")} → ${displayPath}`);
223678
223679
  }
223679
223680
  }
223680
223681
  const totalFiles = outputs.reduce((sum, o2) => sum + o2.result.index.length, 0);
@@ -223769,7 +223770,7 @@ No bundles to upload (all excluded).`);
223769
223770
  const results = [];
223770
223771
  for (let i2 = 0;i2 < toUpload.length; i2++) {
223771
223772
  const output = toUpload[i2];
223772
- const filePath = join6(root, output.outfile);
223773
+ const filePath = resolve2(root, output.outfile);
223773
223774
  uploadSpinner.text = `Uploading ${output.name}... (${i2 + 1}/${toUpload.length})`;
223774
223775
  const result = await uploadFile(filePath, uploadConfig);
223775
223776
  results.push(result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "srcpack",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Zero-config CLI for bundling code into LLM-optimized context files",
5
5
  "keywords": [
6
6
  "llm",
package/src/bundle.ts CHANGED
@@ -318,13 +318,17 @@ export async function createBundle(
318
318
  ? indexBlock
319
319
  : indexBlock + "\n\n" + contentParts.join("\n");
320
320
 
321
- const content = prompt ? `${prompt}\n\n---\n\n${bundleContent}` : bundleContent;
321
+ const content = prompt
322
+ ? `${prompt}\n\n---\n\n${bundleContent}`
323
+ : bundleContent;
322
324
  return { content, index };
323
325
  }
324
326
 
325
327
  // No index: just join file content
326
328
  const bundleContent = contentParts.join("\n");
327
- const content = prompt ? `${prompt}\n\n---\n\n${bundleContent}` : bundleContent;
329
+ const content = prompt
330
+ ? `${prompt}\n\n---\n\n${bundleContent}`
331
+ : bundleContent;
328
332
 
329
333
  // Adjust line numbers for prompt offset (no index case)
330
334
  if (promptLines > 0) {
package/src/cli.ts CHANGED
@@ -197,7 +197,7 @@ Options:
197
197
  for (const { name, outfile, result } of outputs) {
198
198
  const fileCount = result.index.length;
199
199
  const lineCount = sumLines(result);
200
- const outPath = join(root, outfile);
200
+ const outPath = resolve(root, outfile);
201
201
 
202
202
  const nameCol = name.padEnd(maxNameLen);
203
203
  const filesCol = formatNumber(fileCount).padStart(maxFilesLen);
@@ -213,8 +213,9 @@ Options:
213
213
  } else {
214
214
  await mkdir(dirname(outPath), { recursive: true });
215
215
  await writeFile(outPath, result.content);
216
+ const displayPath = relative(process.cwd(), outPath);
216
217
  console.log(
217
- ` ${nameCol} ${filesCol} ${plural(fileCount, "file")} ${linesCol} ${plural(lineCount, "line")} → ${outfile}`,
218
+ ` ${nameCol} ${filesCol} ${plural(fileCount, "file")} ${linesCol} ${plural(lineCount, "line")} → ${displayPath}`,
218
219
  );
219
220
  }
220
221
  }
@@ -358,7 +359,7 @@ async function handleGdriveUpload(
358
359
 
359
360
  for (let i = 0; i < toUpload.length; i++) {
360
361
  const output = toUpload[i]!;
361
- const filePath = join(root, output.outfile);
362
+ const filePath = resolve(root, output.outfile);
362
363
  uploadSpinner.text = `Uploading ${output.name}... (${i + 1}/${toUpload.length})`;
363
364
  const result = await uploadFile(filePath, uploadConfig);
364
365
  results.push(result);
package/src/config.ts CHANGED
@@ -112,9 +112,7 @@ export function parseConfig(value: unknown): Config {
112
112
 
113
113
  const config = result.data;
114
114
  // Resolve root: absolute path, relative to CWD, or CWD if empty/unset
115
- config.root = config.root
116
- ? resolve(expandPath(config.root))
117
- : process.cwd();
115
+ config.root = config.root ? resolve(expandPath(config.root)) : process.cwd();
118
116
  config.outDir = expandPath(config.outDir);
119
117
 
120
118
  for (const bundle of Object.values(config.bundles)) {