@tscircuit/cli 0.1.85 → 0.1.86

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.
Files changed (2) hide show
  1. package/dist/main.js +5 -4
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -433425,7 +433425,7 @@ import readline from "node:readline";
433425
433425
  import { execSync as execSync2 } from "node:child_process";
433426
433426
  var import_semver = __toESM2(require_semver2(), 1);
433427
433427
  // package.json
433428
- var version = "0.1.84";
433428
+ var version = "0.1.85";
433429
433429
  var package_default = {
433430
433430
  name: "@tscircuit/cli",
433431
433431
  version,
@@ -438721,6 +438721,7 @@ var pushSnippet = async ({
438721
438721
  path16.resolve(path16.join(path16.dirname(snippetFilePath), "package.json")),
438722
438722
  path16.resolve(path16.join(process.cwd(), "package.json"))
438723
438723
  ].find((path17) => fs16.existsSync(path17));
438724
+ const projectDir = packageJsonPath ? path16.dirname(packageJsonPath) : path16.dirname(snippetFilePath);
438724
438725
  if (!packageJsonPath) {
438725
438726
  onError("No package.json found, try running 'tsci init' to bootstrap the project");
438726
438727
  return onExit(1);
@@ -438730,7 +438731,7 @@ var pushSnippet = async ({
438730
438731
  try {
438731
438732
  packageJson = JSON.parse(fs16.readFileSync(packageJsonPath).toString());
438732
438733
  } catch {
438733
- onError("Invalid package.json provided");
438734
+ onError("Invalid package.json");
438734
438735
  return onExit(1);
438735
438736
  }
438736
438737
  }
@@ -438876,9 +438877,9 @@ var pushSnippet = async ({
438876
438877
  });
438877
438878
  onSuccess(`
438878
438879
  `);
438879
- const filePaths = getPackageFilePaths(path16.dirname(packageJsonPath));
438880
+ const filePaths = getPackageFilePaths(projectDir);
438880
438881
  for (const fullFilePath of filePaths) {
438881
- const relativeFilePath = path16.relative(path16.dirname(snippetFilePath), fullFilePath);
438882
+ const relativeFilePath = path16.relative(projectDir, fullFilePath);
438882
438883
  const fileContent = fs16.readFileSync(fullFilePath, "utf-8");
438883
438884
  await ky2.post("package_files/create", {
438884
438885
  json: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.85",
3
+ "version": "0.1.86",
4
4
  "main": "dist/main.js",
5
5
  "devDependencies": {
6
6
  "@babel/standalone": "^7.26.9",