@axlsdk/axl 0.17.0 → 0.17.2

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/index.cjs CHANGED
@@ -8091,15 +8091,23 @@ var tsxRegistered;
8091
8091
  async function ensureTsxRegistered() {
8092
8092
  if (tsxRegistered !== void 0) return tsxRegistered;
8093
8093
  try {
8094
- const mod = await import("tsx/esm/api");
8095
- if (typeof mod.register === "function") {
8096
- mod.register();
8097
- tsxRegistered = true;
8098
- } else {
8094
+ const esm = await import("tsx/esm/api");
8095
+ if (typeof esm.register !== "function") {
8099
8096
  tsxRegistered = false;
8097
+ return tsxRegistered;
8100
8098
  }
8099
+ esm.register();
8100
+ tsxRegistered = true;
8101
8101
  } catch {
8102
8102
  tsxRegistered = false;
8103
+ return tsxRegistered;
8104
+ }
8105
+ try {
8106
+ const cjs = await import("tsx/cjs/api");
8107
+ if (typeof cjs.register === "function") {
8108
+ cjs.register();
8109
+ }
8110
+ } catch {
8103
8111
  }
8104
8112
  return tsxRegistered;
8105
8113
  }
@@ -8109,7 +8117,9 @@ async function importModule(filePath, _parentURL) {
8109
8117
  if (!registered) {
8110
8118
  throw new Error(
8111
8119
  `Cannot load TypeScript file ${filePath}: tsx is not installed.
8112
- Install it as a dev dependency: npm install -D tsx (or pnpm add -D tsx)`
8120
+ tsx is declared by @axlsdk/eval / @axlsdk/studio so pnpm 8+ and npm 7+
8121
+ install it automatically. On Yarn Classic or with auto-install-peers
8122
+ disabled, install it explicitly: npm install -D tsx`
8113
8123
  );
8114
8124
  }
8115
8125
  }