@hot-updater/firebase 0.16.3 → 0.16.5

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.
@@ -1626,10 +1626,8 @@ var __webpack_modules__ = {
1626
1626
  }
1627
1627
  constructor(comp, options) {
1628
1628
  options = parseOptions(options);
1629
- if (comp instanceof Comparator) {
1630
- if (!!options.loose === comp.loose) return comp;
1631
- comp = comp.value;
1632
- }
1629
+ if (comp instanceof Comparator) if (!!options.loose === comp.loose) return comp;
1630
+ else comp = comp.value;
1633
1631
  comp = comp.trim().split(/\s+/).join(" ");
1634
1632
  debug("comparator", comp, options);
1635
1633
  this.options = options;
@@ -1695,10 +1693,8 @@ var __webpack_modules__ = {
1695
1693
  class Range {
1696
1694
  constructor(range, options) {
1697
1695
  options = parseOptions(options);
1698
- if (range instanceof Range) {
1699
- if (!!options.loose === range.loose && !!options.includePrerelease === range.includePrerelease) return range;
1700
- return new Range(range.raw, options);
1701
- }
1696
+ if (range instanceof Range) if (!!options.loose === range.loose && !!options.includePrerelease === range.includePrerelease) return range;
1697
+ else return new Range(range.raw, options);
1702
1698
  if (range instanceof Comparator) {
1703
1699
  this.raw = range.value;
1704
1700
  this.set = [
@@ -1957,10 +1953,9 @@ var __webpack_modules__ = {
1957
1953
  class SemVer {
1958
1954
  constructor(version, options) {
1959
1955
  options = parseOptions(options);
1960
- if (version instanceof SemVer) {
1961
- if (!!options.loose === version.loose && !!options.includePrerelease === version.includePrerelease) return version;
1962
- version = version.version;
1963
- } else if ("string" != typeof version) throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
1956
+ if (version instanceof SemVer) if (!!options.loose === version.loose && !!options.includePrerelease === version.includePrerelease) return version;
1957
+ else version = version.version;
1958
+ else if ("string" != typeof version) throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
1964
1959
  if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
1965
1960
  debug("SemVer", version, options);
1966
1961
  this.options = options;
@@ -2804,12 +2799,10 @@ var __webpack_modules__ = {
2804
2799
  ]);
2805
2800
  const ranges = [];
2806
2801
  for (const [min, max] of set) if (min === max) ranges.push(min);
2807
- else if (max || min !== v[0]) {
2808
- if (max) {
2809
- if (min === v[0]) ranges.push(`<=${max}`);
2810
- else ranges.push(`${min} - ${max}`);
2811
- } else ranges.push(`>=${min}`);
2812
- } else ranges.push("*");
2802
+ else if (max || min !== v[0]) if (max) if (min === v[0]) ranges.push(`<=${max}`);
2803
+ else ranges.push(`${min} - ${max}`);
2804
+ else ranges.push(`>=${min}`);
2805
+ else ranges.push("*");
2813
2806
  const simplified = ranges.join(" || ");
2814
2807
  const original = "string" == typeof range.raw ? range.raw : String(range);
2815
2808
  return simplified.length < original.length ? simplified : range;
@@ -2844,14 +2837,10 @@ var __webpack_modules__ = {
2844
2837
  ];
2845
2838
  const simpleSubset = (sub, dom, options) => {
2846
2839
  if (sub === dom) return true;
2847
- if (1 === sub.length && sub[0].semver === ANY) {
2848
- if (1 === dom.length && dom[0].semver === ANY) return true;
2849
- sub = options.includePrerelease ? minimumVersionWithPreRelease : minimumVersion;
2850
- }
2851
- if (1 === dom.length && dom[0].semver === ANY) {
2852
- if (options.includePrerelease) return true;
2853
- dom = minimumVersion;
2854
- }
2840
+ if (1 === sub.length && sub[0].semver === ANY) if (1 === dom.length && dom[0].semver === ANY) return true;
2841
+ else sub = options.includePrerelease ? minimumVersionWithPreRelease : minimumVersion;
2842
+ if (1 === dom.length && dom[0].semver === ANY) if (options.includePrerelease) return true;
2843
+ else dom = minimumVersion;
2855
2844
  const eqSet = /* @__PURE__ */ new Set();
2856
2845
  let gt, lt;
2857
2846
  for (const c of sub) if (">" === c.operator || ">=" === c.operator) gt = higherGT(gt, c, options);
@@ -405,9 +405,9 @@ var require_path_key = __commonJS({
405
405
  }
406
406
  });
407
407
 
408
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js
408
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
409
409
  var require_resolveCommand = __commonJS({
410
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
410
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
411
411
  "use strict";
412
412
  var path7 = require("path");
413
413
  var which = require_which();
@@ -447,9 +447,9 @@ var require_resolveCommand = __commonJS({
447
447
  }
448
448
  });
449
449
 
450
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js
450
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
451
451
  var require_escape = __commonJS({
452
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
452
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
453
453
  "use strict";
454
454
  var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
455
455
  function escapeCommand(arg) {
@@ -458,8 +458,8 @@ var require_escape = __commonJS({
458
458
  }
459
459
  function escapeArgument(arg, doubleEscapeMetaChars) {
460
460
  arg = `${arg}`;
461
- arg = arg.replace(/(\\*)"/g, '$1$1\\"');
462
- arg = arg.replace(/(\\*)$/, "$1$1");
461
+ arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
462
+ arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
463
463
  arg = `"${arg}"`;
464
464
  arg = arg.replace(metaCharsRegExp, "^$1");
465
465
  if (doubleEscapeMetaChars) {
@@ -500,9 +500,9 @@ var require_shebang_command = __commonJS({
500
500
  }
501
501
  });
502
502
 
503
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js
503
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
504
504
  var require_readShebang = __commonJS({
505
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
505
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
506
506
  "use strict";
507
507
  var fs3 = require("fs");
508
508
  var shebangCommand = require_shebang_command();
@@ -522,9 +522,9 @@ var require_readShebang = __commonJS({
522
522
  }
523
523
  });
524
524
 
525
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js
525
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
526
526
  var require_parse = __commonJS({
527
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
527
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
528
528
  "use strict";
529
529
  var path7 = require("path");
530
530
  var resolveCommand = require_resolveCommand();
@@ -584,9 +584,9 @@ var require_parse = __commonJS({
584
584
  }
585
585
  });
586
586
 
587
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js
587
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
588
588
  var require_enoent = __commonJS({
589
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
589
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
590
590
  "use strict";
591
591
  var isWin = process.platform === "win32";
592
592
  function notFoundError(original, syscall) {
@@ -605,7 +605,7 @@ var require_enoent = __commonJS({
605
605
  const originalEmit = cp.emit;
606
606
  cp.emit = function(name, arg1) {
607
607
  if (name === "exit") {
608
- const err = verifyENOENT(arg1, parsed, "spawn");
608
+ const err = verifyENOENT(arg1, parsed);
609
609
  if (err) {
610
610
  return originalEmit.call(cp, "error", err);
611
611
  }
@@ -634,9 +634,9 @@ var require_enoent = __commonJS({
634
634
  }
635
635
  });
636
636
 
637
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js
637
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
638
638
  var require_cross_spawn = __commonJS({
639
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports2, module2) {
639
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports2, module2) {
640
640
  "use strict";
641
641
  var cp = require("child_process");
642
642
  var parse = require_parse();
@@ -8348,7 +8348,7 @@ var {
8348
8348
  // iac/select.ts
8349
8349
  var import_fs = __toESM(require("fs"), 1);
8350
8350
  var import_plugin_core = require("@hot-updater/plugin-core");
8351
- var CONFIG_TEMPLATE = `import { metro } from '@hot-updater/metro';
8351
+ var CONFIG_TEMPLATE = `import { bare } from '@hot-updater/bare';
8352
8352
  import {firebaseStorage, firebaseDatabase} from '@hot-updater/firebase';
8353
8353
  import * as admin from 'firebase-admin';
8354
8354
  import { defineConfig } from 'hot-updater';
@@ -8361,7 +8361,7 @@ import 'dotenv/config';
8361
8361
  const credential = admin.credential.applicationDefault();
8362
8362
 
8363
8363
  export default defineConfig({
8364
- build: metro({
8364
+ build: bare({
8365
8365
  enableHermes: true,
8366
8366
  }),
8367
8367
  storage: firebaseStorage({
@@ -8429,7 +8429,9 @@ var initFirebaseUser = async (cwd) => {
8429
8429
  handleError(err);
8430
8430
  }
8431
8431
  try {
8432
- const authList = await execa("gcloud", ["auth", "list", "--format=json"]);
8432
+ const authList = await execa("gcloud", ["auth", "list", "--format=json"], {
8433
+ shell: true
8434
+ });
8433
8435
  const authListJson = JSON.parse(authList.stdout);
8434
8436
  if (authListJson.length === 0) {
8435
8437
  await execa("gcloud", ["auth", "login"], {
@@ -8494,7 +8496,8 @@ var initFirebaseUser = async (cwd) => {
8494
8496
  task: async () => {
8495
8497
  try {
8496
8498
  await execa("npx", ["firebase", "use", "--add", projectId], {
8497
- cwd
8499
+ cwd,
8500
+ shell: true
8498
8501
  });
8499
8502
  } catch (error) {
8500
8503
  if (error instanceof ExecaError) {
@@ -8509,7 +8512,8 @@ var initFirebaseUser = async (cwd) => {
8509
8512
  ]);
8510
8513
  try {
8511
8514
  const indexes = await execa("npx", ["firebase", "firestore:indexes"], {
8512
- cwd
8515
+ cwd,
8516
+ shell: true
8513
8517
  });
8514
8518
  if (indexes.exitCode !== 0) {
8515
8519
  throw new Error(indexes.stderr);
@@ -8529,13 +8533,19 @@ var initFirebaseUser = async (cwd) => {
8529
8533
  {
8530
8534
  title: "Getting storage bucket...",
8531
8535
  task: async () => {
8532
- const buckets = await execa("gcloud", [
8533
- "storage",
8534
- "buckets",
8535
- "list",
8536
- `--project=${projectId}`,
8537
- "--format=json"
8538
- ]);
8536
+ const buckets = await execa(
8537
+ "gcloud",
8538
+ [
8539
+ "storage",
8540
+ "buckets",
8541
+ "list",
8542
+ `--project=${projectId}`,
8543
+ "--format=json"
8544
+ ],
8545
+ {
8546
+ shell: true
8547
+ }
8548
+ );
8539
8549
  const bucketsJson = JSON.parse(buckets.stdout);
8540
8550
  storageBucket = bucketsJson.find(
8541
8551
  (bucket) => bucket.name === `${projectId}.firebasestorage.app` || bucket.name === `${projectId}.appspot.com`
@@ -8560,12 +8570,13 @@ var initFirebaseUser = async (cwd) => {
8560
8570
  f2.error("Storage Bucket not found");
8561
8571
  process.exit(1);
8562
8572
  }
8563
- const project = await execa("gcloud", [
8564
- "projects",
8565
- "describe",
8566
- projectId,
8567
- "--format=json"
8568
- ]);
8573
+ const project = await execa(
8574
+ "gcloud",
8575
+ ["projects", "describe", projectId, "--format=json"],
8576
+ {
8577
+ shell: true
8578
+ }
8579
+ );
8569
8580
  const projectJson = JSON.parse(project.stdout);
8570
8581
  const projectNumber = Number(projectJson.projectNumber);
8571
8582
  if (Number.isNaN(projectNumber)) {
@@ -8638,7 +8649,8 @@ var mergeIndexes = (originalIndexes, newIndexes) => {
8638
8649
  };
8639
8650
  var deployFirestore = async (cwd) => {
8640
8651
  const original = await execa("npx", ["firebase", "firestore:indexes"], {
8641
- cwd
8652
+ cwd,
8653
+ shell: true
8642
8654
  });
8643
8655
  let originalIndexes = [];
8644
8656
  try {
@@ -8660,7 +8672,8 @@ var deployFirestore = async (cwd) => {
8660
8672
  try {
8661
8673
  await execa("npx", ["firebase", "deploy", "--only", "firestore"], {
8662
8674
  cwd,
8663
- stdio: "inherit"
8675
+ stdio: "inherit",
8676
+ shell: true
8664
8677
  });
8665
8678
  } catch (e2) {
8666
8679
  if (e2 instanceof ExecaError) {
@@ -8675,7 +8688,8 @@ var deployFunctions = async (cwd) => {
8675
8688
  try {
8676
8689
  await execa("npx", ["firebase", "deploy", "--only", "functions"], {
8677
8690
  cwd,
8678
- stdio: "inherit"
8691
+ stdio: "inherit",
8692
+ shell: true
8679
8693
  });
8680
8694
  } catch (e2) {
8681
8695
  if (e2 instanceof ExecaError) {
@@ -8688,16 +8702,22 @@ var deployFunctions = async (cwd) => {
8688
8702
  };
8689
8703
  var printTemplate = async (projectId, region) => {
8690
8704
  try {
8691
- const { stdout } = await execa("gcloud", [
8692
- "functions",
8693
- "describe",
8694
- "hot-updater",
8695
- "--project",
8696
- projectId,
8697
- "--region",
8698
- region,
8699
- "--format=json"
8700
- ]);
8705
+ const { stdout } = await execa(
8706
+ "gcloud",
8707
+ [
8708
+ "functions",
8709
+ "describe",
8710
+ "hot-updater",
8711
+ "--project",
8712
+ projectId,
8713
+ "--region",
8714
+ region,
8715
+ "--format=json"
8716
+ ],
8717
+ {
8718
+ shell: true
8719
+ }
8720
+ );
8701
8721
  const parsedData = JSON.parse(stdout);
8702
8722
  const url = parsedData?.serviceConfig?.uri ?? parsedData.url;
8703
8723
  const functionUrl = `${url}/api/check-update`;
@@ -8717,7 +8737,9 @@ var printTemplate = async (projectId, region) => {
8717
8737
  };
8718
8738
  var checkIfGcloudCliInstalled = async () => {
8719
8739
  try {
8720
- await execa("gcloud", ["--version"]);
8740
+ await execa("gcloud", ["--version"], {
8741
+ shell: true
8742
+ });
8721
8743
  return true;
8722
8744
  } catch (error) {
8723
8745
  return false;
@@ -8754,7 +8776,8 @@ var runInit = async () => {
8754
8776
  task: async () => {
8755
8777
  try {
8756
8778
  await execa("npm", ["install"], {
8757
- cwd: functionsDir
8779
+ cwd: functionsDir,
8780
+ shell: true
8758
8781
  });
8759
8782
  return "Installed dependencies";
8760
8783
  } catch (error) {
@@ -8776,7 +8799,8 @@ var runInit = async () => {
8776
8799
  "npx",
8777
8800
  ["firebase", "functions:list", "--json"],
8778
8801
  {
8779
- cwd: tmpDir
8802
+ cwd: tmpDir,
8803
+ shell: true
8780
8804
  }
8781
8805
  );
8782
8806
  const parsedData = JSON.parse(stdout);
@@ -8828,7 +8852,8 @@ var runInit = async () => {
8828
8852
  "npx",
8829
8853
  ["firebase", "functions:list", "--json"],
8830
8854
  {
8831
- cwd: tmpDir
8855
+ cwd: tmpDir,
8856
+ shell: true
8832
8857
  }
8833
8858
  );
8834
8859
  const functionsListJson = JSON.parse(functionsList.stdout);
@@ -8842,12 +8867,18 @@ var runInit = async () => {
8842
8867
  await removeTmpDir();
8843
8868
  process.exit(1);
8844
8869
  }
8845
- const checkIam = await execa("gcloud", [
8846
- "projects",
8847
- "get-iam-policy",
8848
- initializeVariable.projectId,
8849
- "--format=json"
8850
- ]);
8870
+ const checkIam = await execa(
8871
+ "gcloud",
8872
+ [
8873
+ "projects",
8874
+ "get-iam-policy",
8875
+ initializeVariable.projectId,
8876
+ "--format=json"
8877
+ ],
8878
+ {
8879
+ shell: true
8880
+ }
8881
+ );
8851
8882
  const iamJson = JSON.parse(checkIam.stdout);
8852
8883
  const hasTokenCreator = iamJson.bindings.some(
8853
8884
  (binding) => binding.role === "roles/iam.serviceAccountTokenCreator" && binding.members.includes(`serviceAccount:${account}`)
@@ -8900,7 +8931,7 @@ var runInit = async () => {
8900
8931
  await removeTmpDir();
8901
8932
  f2.message(
8902
8933
  `Next step: ${(0, import_plugin_core2.link)(
8903
- "https://gronxb.github.io/hot-updater/guide/getting-started/quick-start-with-firebase.html#step-4-add-hotupdater-to-your-project"
8934
+ "https://gronxb.github.io/hot-updater/guide/providers/4_firebase.html#step-3-generated-configurations"
8904
8935
  )}`
8905
8936
  );
8906
8937
  f2.message(
package/dist/iac/index.js CHANGED
@@ -405,9 +405,9 @@ var require_path_key = __commonJS({
405
405
  }
406
406
  });
407
407
 
408
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js
408
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
409
409
  var require_resolveCommand = __commonJS({
410
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
410
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
411
411
  "use strict";
412
412
  var path7 = __require("path");
413
413
  var which = require_which();
@@ -447,9 +447,9 @@ var require_resolveCommand = __commonJS({
447
447
  }
448
448
  });
449
449
 
450
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js
450
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
451
451
  var require_escape = __commonJS({
452
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
452
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
453
453
  "use strict";
454
454
  var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
455
455
  function escapeCommand(arg) {
@@ -458,8 +458,8 @@ var require_escape = __commonJS({
458
458
  }
459
459
  function escapeArgument(arg, doubleEscapeMetaChars) {
460
460
  arg = `${arg}`;
461
- arg = arg.replace(/(\\*)"/g, '$1$1\\"');
462
- arg = arg.replace(/(\\*)$/, "$1$1");
461
+ arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
462
+ arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
463
463
  arg = `"${arg}"`;
464
464
  arg = arg.replace(metaCharsRegExp, "^$1");
465
465
  if (doubleEscapeMetaChars) {
@@ -500,9 +500,9 @@ var require_shebang_command = __commonJS({
500
500
  }
501
501
  });
502
502
 
503
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js
503
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
504
504
  var require_readShebang = __commonJS({
505
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
505
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
506
506
  "use strict";
507
507
  var fs3 = __require("fs");
508
508
  var shebangCommand = require_shebang_command();
@@ -522,9 +522,9 @@ var require_readShebang = __commonJS({
522
522
  }
523
523
  });
524
524
 
525
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js
525
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
526
526
  var require_parse = __commonJS({
527
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports, module) {
527
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module) {
528
528
  "use strict";
529
529
  var path7 = __require("path");
530
530
  var resolveCommand = require_resolveCommand();
@@ -584,9 +584,9 @@ var require_parse = __commonJS({
584
584
  }
585
585
  });
586
586
 
587
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js
587
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
588
588
  var require_enoent = __commonJS({
589
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports, module) {
589
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports, module) {
590
590
  "use strict";
591
591
  var isWin = process.platform === "win32";
592
592
  function notFoundError(original, syscall) {
@@ -605,7 +605,7 @@ var require_enoent = __commonJS({
605
605
  const originalEmit = cp.emit;
606
606
  cp.emit = function(name, arg1) {
607
607
  if (name === "exit") {
608
- const err = verifyENOENT(arg1, parsed, "spawn");
608
+ const err = verifyENOENT(arg1, parsed);
609
609
  if (err) {
610
610
  return originalEmit.call(cp, "error", err);
611
611
  }
@@ -634,9 +634,9 @@ var require_enoent = __commonJS({
634
634
  }
635
635
  });
636
636
 
637
- // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js
637
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
638
638
  var require_cross_spawn = __commonJS({
639
- "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports, module) {
639
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports, module) {
640
640
  "use strict";
641
641
  var cp = __require("child_process");
642
642
  var parse = require_parse();
@@ -8353,7 +8353,7 @@ var {
8353
8353
  // iac/select.ts
8354
8354
  import fs from "fs";
8355
8355
  import { link, makeEnv } from "@hot-updater/plugin-core";
8356
- var CONFIG_TEMPLATE = `import { metro } from '@hot-updater/metro';
8356
+ var CONFIG_TEMPLATE = `import { bare } from '@hot-updater/bare';
8357
8357
  import {firebaseStorage, firebaseDatabase} from '@hot-updater/firebase';
8358
8358
  import * as admin from 'firebase-admin';
8359
8359
  import { defineConfig } from 'hot-updater';
@@ -8366,7 +8366,7 @@ import 'dotenv/config';
8366
8366
  const credential = admin.credential.applicationDefault();
8367
8367
 
8368
8368
  export default defineConfig({
8369
- build: metro({
8369
+ build: bare({
8370
8370
  enableHermes: true,
8371
8371
  }),
8372
8372
  storage: firebaseStorage({
@@ -8434,7 +8434,9 @@ var initFirebaseUser = async (cwd) => {
8434
8434
  handleError(err);
8435
8435
  }
8436
8436
  try {
8437
- const authList = await execa("gcloud", ["auth", "list", "--format=json"]);
8437
+ const authList = await execa("gcloud", ["auth", "list", "--format=json"], {
8438
+ shell: true
8439
+ });
8438
8440
  const authListJson = JSON.parse(authList.stdout);
8439
8441
  if (authListJson.length === 0) {
8440
8442
  await execa("gcloud", ["auth", "login"], {
@@ -8499,7 +8501,8 @@ var initFirebaseUser = async (cwd) => {
8499
8501
  task: async () => {
8500
8502
  try {
8501
8503
  await execa("npx", ["firebase", "use", "--add", projectId], {
8502
- cwd
8504
+ cwd,
8505
+ shell: true
8503
8506
  });
8504
8507
  } catch (error) {
8505
8508
  if (error instanceof ExecaError) {
@@ -8514,7 +8517,8 @@ var initFirebaseUser = async (cwd) => {
8514
8517
  ]);
8515
8518
  try {
8516
8519
  const indexes = await execa("npx", ["firebase", "firestore:indexes"], {
8517
- cwd
8520
+ cwd,
8521
+ shell: true
8518
8522
  });
8519
8523
  if (indexes.exitCode !== 0) {
8520
8524
  throw new Error(indexes.stderr);
@@ -8534,13 +8538,19 @@ var initFirebaseUser = async (cwd) => {
8534
8538
  {
8535
8539
  title: "Getting storage bucket...",
8536
8540
  task: async () => {
8537
- const buckets = await execa("gcloud", [
8538
- "storage",
8539
- "buckets",
8540
- "list",
8541
- `--project=${projectId}`,
8542
- "--format=json"
8543
- ]);
8541
+ const buckets = await execa(
8542
+ "gcloud",
8543
+ [
8544
+ "storage",
8545
+ "buckets",
8546
+ "list",
8547
+ `--project=${projectId}`,
8548
+ "--format=json"
8549
+ ],
8550
+ {
8551
+ shell: true
8552
+ }
8553
+ );
8544
8554
  const bucketsJson = JSON.parse(buckets.stdout);
8545
8555
  storageBucket = bucketsJson.find(
8546
8556
  (bucket) => bucket.name === `${projectId}.firebasestorage.app` || bucket.name === `${projectId}.appspot.com`
@@ -8565,12 +8575,13 @@ var initFirebaseUser = async (cwd) => {
8565
8575
  f2.error("Storage Bucket not found");
8566
8576
  process.exit(1);
8567
8577
  }
8568
- const project = await execa("gcloud", [
8569
- "projects",
8570
- "describe",
8571
- projectId,
8572
- "--format=json"
8573
- ]);
8578
+ const project = await execa(
8579
+ "gcloud",
8580
+ ["projects", "describe", projectId, "--format=json"],
8581
+ {
8582
+ shell: true
8583
+ }
8584
+ );
8574
8585
  const projectJson = JSON.parse(project.stdout);
8575
8586
  const projectNumber = Number(projectJson.projectNumber);
8576
8587
  if (Number.isNaN(projectNumber)) {
@@ -8643,7 +8654,8 @@ var mergeIndexes = (originalIndexes, newIndexes) => {
8643
8654
  };
8644
8655
  var deployFirestore = async (cwd) => {
8645
8656
  const original = await execa("npx", ["firebase", "firestore:indexes"], {
8646
- cwd
8657
+ cwd,
8658
+ shell: true
8647
8659
  });
8648
8660
  let originalIndexes = [];
8649
8661
  try {
@@ -8665,7 +8677,8 @@ var deployFirestore = async (cwd) => {
8665
8677
  try {
8666
8678
  await execa("npx", ["firebase", "deploy", "--only", "firestore"], {
8667
8679
  cwd,
8668
- stdio: "inherit"
8680
+ stdio: "inherit",
8681
+ shell: true
8669
8682
  });
8670
8683
  } catch (e2) {
8671
8684
  if (e2 instanceof ExecaError) {
@@ -8680,7 +8693,8 @@ var deployFunctions = async (cwd) => {
8680
8693
  try {
8681
8694
  await execa("npx", ["firebase", "deploy", "--only", "functions"], {
8682
8695
  cwd,
8683
- stdio: "inherit"
8696
+ stdio: "inherit",
8697
+ shell: true
8684
8698
  });
8685
8699
  } catch (e2) {
8686
8700
  if (e2 instanceof ExecaError) {
@@ -8693,16 +8707,22 @@ var deployFunctions = async (cwd) => {
8693
8707
  };
8694
8708
  var printTemplate = async (projectId, region) => {
8695
8709
  try {
8696
- const { stdout } = await execa("gcloud", [
8697
- "functions",
8698
- "describe",
8699
- "hot-updater",
8700
- "--project",
8701
- projectId,
8702
- "--region",
8703
- region,
8704
- "--format=json"
8705
- ]);
8710
+ const { stdout } = await execa(
8711
+ "gcloud",
8712
+ [
8713
+ "functions",
8714
+ "describe",
8715
+ "hot-updater",
8716
+ "--project",
8717
+ projectId,
8718
+ "--region",
8719
+ region,
8720
+ "--format=json"
8721
+ ],
8722
+ {
8723
+ shell: true
8724
+ }
8725
+ );
8706
8726
  const parsedData = JSON.parse(stdout);
8707
8727
  const url = parsedData?.serviceConfig?.uri ?? parsedData.url;
8708
8728
  const functionUrl = `${url}/api/check-update`;
@@ -8722,7 +8742,9 @@ var printTemplate = async (projectId, region) => {
8722
8742
  };
8723
8743
  var checkIfGcloudCliInstalled = async () => {
8724
8744
  try {
8725
- await execa("gcloud", ["--version"]);
8745
+ await execa("gcloud", ["--version"], {
8746
+ shell: true
8747
+ });
8726
8748
  return true;
8727
8749
  } catch (error) {
8728
8750
  return false;
@@ -8759,7 +8781,8 @@ var runInit = async () => {
8759
8781
  task: async () => {
8760
8782
  try {
8761
8783
  await execa("npm", ["install"], {
8762
- cwd: functionsDir
8784
+ cwd: functionsDir,
8785
+ shell: true
8763
8786
  });
8764
8787
  return "Installed dependencies";
8765
8788
  } catch (error) {
@@ -8781,7 +8804,8 @@ var runInit = async () => {
8781
8804
  "npx",
8782
8805
  ["firebase", "functions:list", "--json"],
8783
8806
  {
8784
- cwd: tmpDir
8807
+ cwd: tmpDir,
8808
+ shell: true
8785
8809
  }
8786
8810
  );
8787
8811
  const parsedData = JSON.parse(stdout);
@@ -8833,7 +8857,8 @@ var runInit = async () => {
8833
8857
  "npx",
8834
8858
  ["firebase", "functions:list", "--json"],
8835
8859
  {
8836
- cwd: tmpDir
8860
+ cwd: tmpDir,
8861
+ shell: true
8837
8862
  }
8838
8863
  );
8839
8864
  const functionsListJson = JSON.parse(functionsList.stdout);
@@ -8847,12 +8872,18 @@ var runInit = async () => {
8847
8872
  await removeTmpDir();
8848
8873
  process.exit(1);
8849
8874
  }
8850
- const checkIam = await execa("gcloud", [
8851
- "projects",
8852
- "get-iam-policy",
8853
- initializeVariable.projectId,
8854
- "--format=json"
8855
- ]);
8875
+ const checkIam = await execa(
8876
+ "gcloud",
8877
+ [
8878
+ "projects",
8879
+ "get-iam-policy",
8880
+ initializeVariable.projectId,
8881
+ "--format=json"
8882
+ ],
8883
+ {
8884
+ shell: true
8885
+ }
8886
+ );
8856
8887
  const iamJson = JSON.parse(checkIam.stdout);
8857
8888
  const hasTokenCreator = iamJson.bindings.some(
8858
8889
  (binding) => binding.role === "roles/iam.serviceAccountTokenCreator" && binding.members.includes(`serviceAccount:${account}`)
@@ -8905,7 +8936,7 @@ var runInit = async () => {
8905
8936
  await removeTmpDir();
8906
8937
  f2.message(
8907
8938
  `Next step: ${link2(
8908
- "https://gronxb.github.io/hot-updater/guide/getting-started/quick-start-with-firebase.html#step-4-add-hotupdater-to-your-project"
8939
+ "https://gronxb.github.io/hot-updater/guide/providers/4_firebase.html#step-3-generated-configurations"
8909
8940
  )}`
8910
8941
  );
8911
8942
  f2.message(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/firebase",
3
3
  "type": "module",
4
- "version": "0.16.3",
4
+ "version": "0.16.5",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "main": "dist/index.cjs",
7
7
  "types": "dist/index.d.ts",
@@ -33,16 +33,15 @@
33
33
  "package.json"
34
34
  ],
35
35
  "dependencies": {
36
- "@hot-updater/core": "0.16.3",
37
- "@hot-updater/plugin-core": "0.16.3",
38
- "firebase": "^11.3.1"
36
+ "firebase": "^11.3.1",
37
+ "@hot-updater/core": "0.16.5",
38
+ "@hot-updater/plugin-core": "0.16.5"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@clack/prompts": "^0.10.0",
45
- "@hot-updater/js": "0.16.3",
46
45
  "@types/node": "^22.13.5",
47
46
  "es-toolkit": "^1.32.0",
48
47
  "execa": "^9.5.2",
@@ -53,7 +52,8 @@
53
52
  "fkill": "^9.0.0",
54
53
  "hono": "^4.6.3",
55
54
  "mime": "^4.0.4",
56
- "picocolors": "^1.0.0"
55
+ "picocolors": "^1.0.0",
56
+ "@hot-updater/js": "0.16.5"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "firebase-admin": "*"