@zyno-io/ts-reflection 26.824.1834 → 26.825.959

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.
@@ -5,7 +5,6 @@ const crypto = require('node:crypto');
5
5
  const fs = require('node:fs');
6
6
  const http = require('node:http');
7
7
  const https = require('node:https');
8
- const os = require('node:os');
9
8
  const path = require('node:path');
10
9
 
11
10
  const MAX_BINARY_BYTES = 128 * 1024 * 1024;
@@ -22,11 +21,12 @@ async function main() {
22
21
  if (digest !== manifest.binarySha256) throw new Error(`binary checksum mismatch: expected ${manifest.binarySha256}, received ${digest}`);
23
22
  if (binary.length !== manifest.binarySize) throw new Error(`binary size mismatch: expected ${manifest.binarySize}, received ${binary.length}`);
24
23
 
25
- const temporaryDirectory = fs.mkdtempSync(path.join(os.tmpdir(), 'tsf-type-compiler-'));
24
+ const destinationDirectory = path.dirname(input.destination);
25
+ fs.mkdirSync(destinationDirectory, { recursive: true });
26
+ const temporaryDirectory = fs.mkdtempSync(path.join(destinationDirectory, '.tsf-type-compiler-'));
26
27
  const temporaryBinary = path.join(temporaryDirectory, path.basename(input.destination));
27
28
  try {
28
29
  fs.writeFileSync(temporaryBinary, binary, { mode: 0o755 });
29
- fs.mkdirSync(path.dirname(input.destination), { recursive: true });
30
30
  if (fs.existsSync(input.destination)) return;
31
31
  try {
32
32
  fs.renameSync(temporaryBinary, input.destination);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyno-io/ts-reflection",
3
- "version": "26.824.1834",
3
+ "version": "26.825.959",
4
4
  "description": "Browser-neutral TypeScript reflection and runtime metadata",
5
5
  "license": "MIT",
6
6
  "files": [