@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/index.js
CHANGED
|
@@ -884,6 +884,35 @@ ${locations.join("\n")}`
|
|
|
884
884
|
}
|
|
885
885
|
} catch {
|
|
886
886
|
}
|
|
887
|
+
} else {
|
|
888
|
+
const coreDistCandidates = [
|
|
889
|
+
path7__default.default.join(themePath, "node_modules", "@onexapis", "core", "dist")
|
|
890
|
+
];
|
|
891
|
+
const resolvedDist = await resolveNodeModulesFile(
|
|
892
|
+
__dirname,
|
|
893
|
+
path7__default.default.join("@onexapis", "core", "dist")
|
|
894
|
+
);
|
|
895
|
+
if (resolvedDist) coreDistCandidates.push(resolvedDist);
|
|
896
|
+
for (const candidate of coreDistCandidates) {
|
|
897
|
+
try {
|
|
898
|
+
await fs6__default.default.access(candidate);
|
|
899
|
+
const mjsFiles = await glob.glob("*.mjs", { cwd: candidate });
|
|
900
|
+
const importRegex = /import\s*\{([^}]+)\}\s*from\s*["']lucide-react["']/g;
|
|
901
|
+
for (const file of mjsFiles) {
|
|
902
|
+
const content = await fs6__default.default.readFile(path7__default.default.join(candidate, file), "utf-8");
|
|
903
|
+
for (const match of content.matchAll(importRegex)) {
|
|
904
|
+
for (const name of match[1].split(",")) {
|
|
905
|
+
const original = name.trim().split(/\s+as\s+/)[0].trim();
|
|
906
|
+
if (original && !original.startsWith("type ")) {
|
|
907
|
+
lucideIconNames.add(original);
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
break;
|
|
913
|
+
} catch {
|
|
914
|
+
}
|
|
915
|
+
}
|
|
887
916
|
}
|
|
888
917
|
try {
|
|
889
918
|
const scanned = await scanImportsFromPackage(themePath, "lucide-react");
|
|
@@ -893,47 +922,6 @@ ${locations.join("\n")}`
|
|
|
893
922
|
} catch {
|
|
894
923
|
}
|
|
895
924
|
}
|
|
896
|
-
if (lucideIconNames.size === 0) {
|
|
897
|
-
const fallbackIcons = [
|
|
898
|
-
"Check",
|
|
899
|
-
"ChevronDown",
|
|
900
|
-
"XCircle",
|
|
901
|
-
"AlertTriangle",
|
|
902
|
-
"CheckCircle",
|
|
903
|
-
"Info",
|
|
904
|
-
"X",
|
|
905
|
-
"XIcon",
|
|
906
|
-
"CircleIcon",
|
|
907
|
-
"Star",
|
|
908
|
-
"ShoppingCart",
|
|
909
|
-
"ChevronRight",
|
|
910
|
-
"ChevronLeft",
|
|
911
|
-
"ChevronUp",
|
|
912
|
-
"Search",
|
|
913
|
-
"Menu",
|
|
914
|
-
"Heart",
|
|
915
|
-
"User",
|
|
916
|
-
"Trash2",
|
|
917
|
-
"Plus",
|
|
918
|
-
"Minus",
|
|
919
|
-
"Eye",
|
|
920
|
-
"EyeOff",
|
|
921
|
-
"ArrowRight",
|
|
922
|
-
"ArrowLeft",
|
|
923
|
-
"ExternalLink",
|
|
924
|
-
"Mail",
|
|
925
|
-
"Phone",
|
|
926
|
-
"MapPin",
|
|
927
|
-
"Calendar",
|
|
928
|
-
"Clock",
|
|
929
|
-
"Facebook",
|
|
930
|
-
"Twitter",
|
|
931
|
-
"Instagram",
|
|
932
|
-
"Linkedin",
|
|
933
|
-
"Github"
|
|
934
|
-
];
|
|
935
|
-
for (const icon of fallbackIcons) lucideIconNames.add(icon);
|
|
936
|
-
}
|
|
937
925
|
const iconExports = [...lucideIconNames].map((n) => `icon as ${n}`).join(", ");
|
|
938
926
|
return {
|
|
939
927
|
contents: `
|