create-bl-theme 1.0.6 → 1.0.7
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/.claude/settings.local.json +9 -0
- package/bin/cli.js +8 -3
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -762,11 +762,16 @@ function getGitRemote(themePath) {
|
|
|
762
762
|
async function checkThemeRegistered(repo) {
|
|
763
763
|
try {
|
|
764
764
|
const response = await fetch(
|
|
765
|
-
"https://raw.githubusercontent.com/better-lyrics/themes/
|
|
765
|
+
"https://raw.githubusercontent.com/better-lyrics/themes/master/index.json"
|
|
766
766
|
);
|
|
767
|
+
if (!response.ok) {
|
|
768
|
+
console.log(pc.dim(` (Could not fetch registry: ${response.status})`));
|
|
769
|
+
return false;
|
|
770
|
+
}
|
|
767
771
|
const index = await response.json();
|
|
768
772
|
return index.themes?.some((t) => t.repo === repo) ?? false;
|
|
769
|
-
} catch {
|
|
773
|
+
} catch (e) {
|
|
774
|
+
console.log(pc.dim(` (Could not fetch registry: ${e.message})`));
|
|
770
775
|
return false;
|
|
771
776
|
}
|
|
772
777
|
}
|
|
@@ -774,7 +779,7 @@ async function checkThemeRegistered(repo) {
|
|
|
774
779
|
async function checkLockStatus(repo) {
|
|
775
780
|
try {
|
|
776
781
|
const response = await fetch(
|
|
777
|
-
"https://raw.githubusercontent.com/better-lyrics/themes/
|
|
782
|
+
"https://raw.githubusercontent.com/better-lyrics/themes/master/index.lock.json"
|
|
778
783
|
);
|
|
779
784
|
const lock = await response.json();
|
|
780
785
|
return lock.themes?.find((t) => t.repo === repo) ?? null;
|