@tscircuit/cli 0.1.752 → 0.1.753
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/main.js +14 -2
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -74126,7 +74126,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
|
|
|
74126
74126
|
import { execSync as execSync2 } from "node:child_process";
|
|
74127
74127
|
var import_semver2 = __toESM2(require_semver2(), 1);
|
|
74128
74128
|
// package.json
|
|
74129
|
-
var version = "0.1.
|
|
74129
|
+
var version = "0.1.752";
|
|
74130
74130
|
var package_default = {
|
|
74131
74131
|
name: "@tscircuit/cli",
|
|
74132
74132
|
version,
|
|
@@ -80303,7 +80303,19 @@ var registerClone = (program3) => {
|
|
|
80303
80303
|
file_path: fileInfo.file_path
|
|
80304
80304
|
}
|
|
80305
80305
|
}).json();
|
|
80306
|
-
|
|
80306
|
+
const { is_text: isText, content_text: contentText } = fileContent.package_file;
|
|
80307
|
+
if (isText && typeof contentText === "string") {
|
|
80308
|
+
fs25.writeFileSync(fullPath, contentText);
|
|
80309
|
+
} else if (!isText) {
|
|
80310
|
+
const fileBuffer = await ky2.get("package_files/download", {
|
|
80311
|
+
searchParams: {
|
|
80312
|
+
package_file_id: fileContent.package_file.package_file_id
|
|
80313
|
+
}
|
|
80314
|
+
}).arrayBuffer();
|
|
80315
|
+
fs25.writeFileSync(fullPath, Buffer.from(fileBuffer));
|
|
80316
|
+
} else {
|
|
80317
|
+
console.warn(`Skipping ${filePath} due to empty content.`);
|
|
80318
|
+
}
|
|
80307
80319
|
} catch (error) {
|
|
80308
80320
|
console.warn(`Skipping ${filePath} due to error:`, error instanceof Error ? error.message : error);
|
|
80309
80321
|
}
|