@onexapis/cli 1.1.12 → 1.1.14
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/cli.js +29 -41
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +29 -41
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +29 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -41
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -847,6 +847,35 @@ ${locations.join("\n")}`
|
|
|
847
847
|
}
|
|
848
848
|
} catch {
|
|
849
849
|
}
|
|
850
|
+
} else {
|
|
851
|
+
const coreDistCandidates = [
|
|
852
|
+
path7.join(themePath, "node_modules", "@onexapis", "core", "dist")
|
|
853
|
+
];
|
|
854
|
+
const resolvedDist = await resolveNodeModulesFile(
|
|
855
|
+
__dirname,
|
|
856
|
+
path7.join("@onexapis", "core", "dist")
|
|
857
|
+
);
|
|
858
|
+
if (resolvedDist) coreDistCandidates.push(resolvedDist);
|
|
859
|
+
for (const candidate of coreDistCandidates) {
|
|
860
|
+
try {
|
|
861
|
+
await fs6.access(candidate);
|
|
862
|
+
const mjsFiles = await glob("*.mjs", { cwd: candidate });
|
|
863
|
+
const importRegex = /import\s*\{([^}]+)\}\s*from\s*["']lucide-react["']/g;
|
|
864
|
+
for (const file of mjsFiles) {
|
|
865
|
+
const content = await fs6.readFile(path7.join(candidate, file), "utf-8");
|
|
866
|
+
for (const match of content.matchAll(importRegex)) {
|
|
867
|
+
for (const name of match[1].split(",")) {
|
|
868
|
+
const original = name.trim().split(/\s+as\s+/)[0].trim();
|
|
869
|
+
if (original && !original.startsWith("type ")) {
|
|
870
|
+
lucideIconNames.add(original);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
break;
|
|
876
|
+
} catch {
|
|
877
|
+
}
|
|
878
|
+
}
|
|
850
879
|
}
|
|
851
880
|
try {
|
|
852
881
|
const scanned = await scanImportsFromPackage(themePath, "lucide-react");
|
|
@@ -856,47 +885,6 @@ ${locations.join("\n")}`
|
|
|
856
885
|
} catch {
|
|
857
886
|
}
|
|
858
887
|
}
|
|
859
|
-
if (lucideIconNames.size === 0) {
|
|
860
|
-
const fallbackIcons = [
|
|
861
|
-
"Check",
|
|
862
|
-
"ChevronDown",
|
|
863
|
-
"XCircle",
|
|
864
|
-
"AlertTriangle",
|
|
865
|
-
"CheckCircle",
|
|
866
|
-
"Info",
|
|
867
|
-
"X",
|
|
868
|
-
"XIcon",
|
|
869
|
-
"CircleIcon",
|
|
870
|
-
"Star",
|
|
871
|
-
"ShoppingCart",
|
|
872
|
-
"ChevronRight",
|
|
873
|
-
"ChevronLeft",
|
|
874
|
-
"ChevronUp",
|
|
875
|
-
"Search",
|
|
876
|
-
"Menu",
|
|
877
|
-
"Heart",
|
|
878
|
-
"User",
|
|
879
|
-
"Trash2",
|
|
880
|
-
"Plus",
|
|
881
|
-
"Minus",
|
|
882
|
-
"Eye",
|
|
883
|
-
"EyeOff",
|
|
884
|
-
"ArrowRight",
|
|
885
|
-
"ArrowLeft",
|
|
886
|
-
"ExternalLink",
|
|
887
|
-
"Mail",
|
|
888
|
-
"Phone",
|
|
889
|
-
"MapPin",
|
|
890
|
-
"Calendar",
|
|
891
|
-
"Clock",
|
|
892
|
-
"Facebook",
|
|
893
|
-
"Twitter",
|
|
894
|
-
"Instagram",
|
|
895
|
-
"Linkedin",
|
|
896
|
-
"Github"
|
|
897
|
-
];
|
|
898
|
-
for (const icon of fallbackIcons) lucideIconNames.add(icon);
|
|
899
|
-
}
|
|
900
888
|
const iconExports = [...lucideIconNames].map((n) => `icon as ${n}`).join(", ");
|
|
901
889
|
return {
|
|
902
890
|
contents: `
|