@tscircuit/cli 0.1.595 → 0.1.596
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 +19 -4
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -77467,13 +77467,28 @@ function resolveNodeModuleImport({
|
|
|
77467
77467
|
}
|
|
77468
77468
|
}
|
|
77469
77469
|
}
|
|
77470
|
+
const resolveExportValue = (value) => {
|
|
77471
|
+
if (typeof value === "string")
|
|
77472
|
+
return value;
|
|
77473
|
+
if (value && typeof value === "object" && "default" in value) {
|
|
77474
|
+
const defaultVal = value.default;
|
|
77475
|
+
if (typeof defaultVal === "string")
|
|
77476
|
+
return defaultVal;
|
|
77477
|
+
if (defaultVal && typeof defaultVal === "object" && "default" in defaultVal) {
|
|
77478
|
+
const nestedDefault = defaultVal.default;
|
|
77479
|
+
if (typeof nestedDefault === "string")
|
|
77480
|
+
return nestedDefault;
|
|
77481
|
+
}
|
|
77482
|
+
}
|
|
77483
|
+
return;
|
|
77484
|
+
};
|
|
77470
77485
|
const entryPoints = [
|
|
77471
77486
|
packageJson.main,
|
|
77472
77487
|
packageJson.module,
|
|
77473
|
-
packageJson.exports?.["."]?.default,
|
|
77474
|
-
packageJson.exports?.["."]?.import,
|
|
77475
|
-
packageJson.exports?.["."]?.require
|
|
77476
|
-
].filter(
|
|
77488
|
+
resolveExportValue(packageJson.exports?.["."]?.default),
|
|
77489
|
+
resolveExportValue(packageJson.exports?.["."]?.import),
|
|
77490
|
+
resolveExportValue(packageJson.exports?.["."]?.require)
|
|
77491
|
+
].filter((entry) => typeof entry === "string");
|
|
77477
77492
|
for (const entry of entryPoints) {
|
|
77478
77493
|
const entryPath = path20.join(packageDir, entry);
|
|
77479
77494
|
if (fs19.existsSync(entryPath) && fs19.statSync(entryPath).isFile()) {
|