@ts-for-gir/cli 4.0.1 → 4.0.3

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/bin/ts-for-gir CHANGED
@@ -7268,7 +7268,7 @@ import { dirname, join } from "node:path";
7268
7268
  import { fileURLToPath } from "node:url";
7269
7269
  function getPackageVersion() {
7270
7270
  if (true) {
7271
- return "4.0.1";
7271
+ return "4.0.3";
7272
7272
  }
7273
7273
  const currentModulePath = fileURLToPath(import.meta.url);
7274
7274
  const currentDir = dirname(currentModulePath);
@@ -8165,7 +8165,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
8165
8165
  var NEW_LINE_REG_EXP = /[\n\r]+/g;
8166
8166
  function getPackageVersion2() {
8167
8167
  if (true) {
8168
- return "4.0.1";
8168
+ return "4.0.3";
8169
8169
  }
8170
8170
  try {
8171
8171
  const currentModulePath = fileURLToPath2(import.meta.url);
@@ -27956,7 +27956,7 @@ import { fileURLToPath as fileURLToPath5 } from "node:url";
27956
27956
  import { i18n, JSX as JSX8, ReflectionKind as ReflectionKind5 } from "typedoc";
27957
27957
  function getTsForGirVersion() {
27958
27958
  if (true) {
27959
- return "4.0.1";
27959
+ return "4.0.3";
27960
27960
  }
27961
27961
  try {
27962
27962
  const __dirname3 = dirname8(fileURLToPath5(import.meta.url));
@@ -28842,9 +28842,18 @@ var GJS_ASSET_NAME = "ts-for-gir-gjs";
28842
28842
  function getCurrentBinaryPath() {
28843
28843
  const p = process.argv[1] ?? null;
28844
28844
  if (!p) return null;
28845
- if (p.endsWith(".ts") || p.includes("node_modules")) return null;
28845
+ if (p.endsWith(".ts")) return null;
28846
+ if (p.includes("/node_modules/") && !isGjsifyGlobalLocation(p)) return null;
28846
28847
  return p;
28847
28848
  }
28849
+ function isGjsifyGlobalLocation(p) {
28850
+ const xdgData = process.env.XDG_DATA_HOME;
28851
+ const home = process.env.HOME;
28852
+ const candidates = [];
28853
+ if (xdgData) candidates.push(`${xdgData}/gjsify/global/`);
28854
+ if (home) candidates.push(`${home}/.local/share/gjsify/global/`);
28855
+ return candidates.some((root) => p.startsWith(root));
28856
+ }
28848
28857
  async function fetchJson(url) {
28849
28858
  const headers = {
28850
28859
  Accept: "application/vnd.github.v3+json",