@hot-updater/firebase 0.21.1 → 0.21.3

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.
@@ -7920,21 +7920,25 @@ const initFirebaseUser = async (cwd) => {
7920
7920
  }
7921
7921
  }]);
7922
7922
  try {
7923
- const indexes = await execa("npx", ["firebase", "firestore:indexes"], {
7924
- cwd,
7925
- shell: true
7926
- });
7927
- if (indexes.exitCode !== 0) throw new Error(indexes.stderr);
7928
- } catch {
7929
- await execa("gcloud", [
7923
+ const databases = await execa("gcloud", [
7930
7924
  "firestore",
7931
7925
  "databases",
7932
- "describe",
7933
- `--project=${projectId}`
7926
+ "list",
7927
+ `--project=${projectId}`,
7928
+ "--format=json"
7934
7929
  ], {
7935
- stdio: "inherit",
7936
- shell: true
7930
+ shell: true,
7931
+ input: "N\n"
7937
7932
  });
7933
+ if (JSON.parse(databases.stdout).length === 0) {
7934
+ f.warning("Firestore Database not found");
7935
+ f.step("Please enable Firestore in the Firebase Console:");
7936
+ f.step((0, __hot_updater_plugin_core.link)(`https://console.firebase.google.com/project/${projectId}/firestore`));
7937
+ f.step("After enabling Firestore, please run 'npx hot-updater init' again.");
7938
+ process.exit(1);
7939
+ }
7940
+ } catch (err) {
7941
+ handleError(err);
7938
7942
  }
7939
7943
  let storageBucket = null;
7940
7944
  await Te([{
package/dist/iac/index.js CHANGED
@@ -7904,21 +7904,25 @@ const initFirebaseUser = async (cwd) => {
7904
7904
  }
7905
7905
  }]);
7906
7906
  try {
7907
- const indexes = await execa("npx", ["firebase", "firestore:indexes"], {
7908
- cwd,
7909
- shell: true
7910
- });
7911
- if (indexes.exitCode !== 0) throw new Error(indexes.stderr);
7912
- } catch {
7913
- await execa("gcloud", [
7907
+ const databases = await execa("gcloud", [
7914
7908
  "firestore",
7915
7909
  "databases",
7916
- "describe",
7917
- `--project=${projectId}`
7910
+ "list",
7911
+ `--project=${projectId}`,
7912
+ "--format=json"
7918
7913
  ], {
7919
- stdio: "inherit",
7920
- shell: true
7914
+ shell: true,
7915
+ input: "N\n"
7921
7916
  });
7917
+ if (JSON.parse(databases.stdout).length === 0) {
7918
+ f.warning("Firestore Database not found");
7919
+ f.step("Please enable Firestore in the Firebase Console:");
7920
+ f.step(link(`https://console.firebase.google.com/project/${projectId}/firestore`));
7921
+ f.step("After enabling Firestore, please run 'npx hot-updater init' again.");
7922
+ process.exit(1);
7923
+ }
7924
+ } catch (err) {
7925
+ handleError(err);
7922
7926
  }
7923
7927
  let storageBucket = null;
7924
7928
  await Te([{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/firebase",
3
3
  "type": "module",
4
- "version": "0.21.1",
4
+ "version": "0.21.3",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "main": "dist/index.cjs",
7
7
  "types": "dist/index.d.ts",
@@ -35,8 +35,8 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "firebase": "^11.3.1",
38
- "@hot-updater/core": "0.21.1",
39
- "@hot-updater/plugin-core": "0.21.1"
38
+ "@hot-updater/core": "0.21.3",
39
+ "@hot-updater/plugin-core": "0.21.3"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
@@ -54,8 +54,8 @@
54
54
  "hono": "^4.6.3",
55
55
  "mime": "^4.0.4",
56
56
  "picocolors": "1.1.1",
57
- "@hot-updater/js": "0.21.1",
58
- "@hot-updater/test-utils": "0.21.1"
57
+ "@hot-updater/test-utils": "0.21.3",
58
+ "@hot-updater/js": "0.21.3"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "firebase-admin": "*"