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.
@@ -0,0 +1,9 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(cat:*)"
5
+ ],
6
+ "deny": [],
7
+ "ask": []
8
+ }
9
+ }
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/main/index.json"
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/main/index.lock.json"
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bl-theme",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "CLI tool to scaffold Better Lyrics themes",
5
5
  "type": "module",
6
6
  "bin": {