qtex 1.1.12 → 1.1.14

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/index.js CHANGED
@@ -97,7 +97,7 @@ ${colors.bold}OPTIONS:${colors.reset}
97
97
 
98
98
  // Auto-open generated PDF in the system browser
99
99
  const outputFileName = values.output || 'output.pdf';
100
- const outputPath = resolve(process.cwd(), directory, outputFileName);
100
+ const outputPath = resolve(process.cwd(), outputFileName);
101
101
  const openCmd = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start ""' : 'xdg-open';
102
102
  exec(`${openCmd} "${outputPath}"`);
103
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qtex",
3
- "version": "1.1.12",
3
+ "version": "1.1.14",
4
4
  "description": "Ultra-fast cloud LaTeX compiler. Compile .tex documents in milliseconds without installing TeXLive or MikTeX. Zero config, sub-second builds, live watch mode.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/compiler.js CHANGED
@@ -35,6 +35,7 @@ export async function compile(dir, options) {
35
35
  const form = new FormData();
36
36
  const validateForm = new FormData();
37
37
  let hasLatex = false;
38
+ let sentFilesCount = 0;
38
39
 
39
40
  for (const fileObj of allFiles) {
40
41
  const ext = extname(fileObj.path).toLowerCase();
@@ -47,6 +48,7 @@ export async function compile(dir, options) {
47
48
  const content = await readFile(fileObj.path);
48
49
  const blob = new Blob([content]);
49
50
  form.append('files', blob, fileObj.relative);
51
+ sentFilesCount++;
50
52
 
51
53
  if (ext === '.tex') {
52
54
  validateForm.append('files', blob, fileObj.relative);
@@ -99,7 +101,7 @@ export async function compile(dir, options) {
99
101
  if (response.ok) {
100
102
  const buffer = await response.arrayBuffer();
101
103
  const compileTime = response.headers.get('x-compile-time-ms') || 'unknown';
102
- const filesReceived = response.headers.get('x-files-received') || '0';
104
+ const filesReceived = response.headers.get('x-files-received') || sentFilesCount;
103
105
 
104
106
  const outputPath = resolve(process.cwd(), outputFileName);
105
107
  await writeFile(outputPath, Buffer.from(buffer));