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