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