firebase-tools 13.15.1 → 13.15.2

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.
@@ -46,20 +46,20 @@ const EMULATOR_UPDATE_DETAILS = {
46
46
  },
47
47
  dataconnect: process.platform === "darwin"
48
48
  ? {
49
- version: "1.3.4",
50
- expectedSize: 24216320,
51
- expectedChecksum: "f57bc0b9a10837ecb4f2808c49ae3ff5",
49
+ version: "1.3.5",
50
+ expectedSize: 24232704,
51
+ expectedChecksum: "4eabf613a4a5feeaa173e1375b62bde0",
52
52
  }
53
53
  : process.platform === "win32"
54
54
  ? {
55
- version: "1.3.4",
56
- expectedSize: 24631296,
57
- expectedChecksum: "c8f1433fbff26f5e9da30cf205f2af78",
55
+ version: "1.3.5",
56
+ expectedSize: 24651264,
57
+ expectedChecksum: "c7b2b7168ff7226f4e5626ae7d13e0ca",
58
58
  }
59
59
  : {
60
- version: "1.3.4",
61
- expectedSize: 24125592,
62
- expectedChecksum: "a7b9a79d66fa5ebfb1a0f65e535d5c33",
60
+ version: "1.3.5",
61
+ expectedSize: 24146072,
62
+ expectedChecksum: "1457937751ce25fa332cdc16b561d64b",
63
63
  },
64
64
  };
65
65
  exports.DownloadDetails = {
@@ -22,6 +22,7 @@ const constants_1 = require("../constants");
22
22
  const constants_2 = require("./constants");
23
23
  const api_1 = require("../../hosting/api");
24
24
  const logger_1 = require("../../logger");
25
+ const env_1 = require("../../functions/env");
25
26
  const DEFAULT_BUILD_SCRIPT = ["next build"];
26
27
  const PUBLIC_DIR = "public";
27
28
  exports.supportedRange = "12 - 14.0";
@@ -50,7 +51,14 @@ async function build(dir, target, context) {
50
51
  if (reactVersion && (0, semver_1.gte)(reactVersion, "18.0.0")) {
51
52
  process.env.__NEXT_REACT_ROOT = "true";
52
53
  }
53
- const env = Object.assign({}, process.env);
54
+ let env = Object.assign({}, process.env);
55
+ if (context === null || context === void 0 ? void 0 : context.projectId) {
56
+ const projectEnvPath = (0, path_1.join)(dir, `.env.${context.projectId}`);
57
+ if (await (0, fs_extra_1.pathExists)(projectEnvPath)) {
58
+ const projectEnvVars = (0, env_1.parseStrict)((await (0, fs_extra_1.readFile)(projectEnvPath)).toString());
59
+ env = Object.assign(Object.assign({}, projectEnvVars), env);
60
+ }
61
+ }
54
62
  if ((context === null || context === void 0 ? void 0 : context.projectId) && (context === null || context === void 0 ? void 0 : context.site)) {
55
63
  const deploymentDomain = await (0, api_1.getDeploymentDomain)(context.projectId, context.site, context.hostingChannel);
56
64
  if (deploymentDomain) {
@@ -244,9 +244,13 @@ async function whichNextConfigFile(dir) {
244
244
  }
245
245
  exports.whichNextConfigFile = whichNextConfigFile;
246
246
  function findEsbuildPath() {
247
+ var _a;
247
248
  try {
248
- const esbuildBinPath = (0, child_process_1.execSync)("npx which esbuild", { encoding: "utf8" }).trim();
249
- const globalVersion = getGlobalEsbuildVersion();
249
+ const esbuildBinPath = (_a = (0, child_process_1.execSync)("npx which esbuild", { encoding: "utf8" })) === null || _a === void 0 ? void 0 : _a.trim();
250
+ if (!esbuildBinPath) {
251
+ return null;
252
+ }
253
+ const globalVersion = getGlobalEsbuildVersion(esbuildBinPath);
250
254
  if (globalVersion && !(0, semver_1.satisfies)(globalVersion, constants_1.ESBUILD_VERSION)) {
251
255
  console.warn(`Warning: Global esbuild version (${globalVersion}) does not match the required version (${constants_1.ESBUILD_VERSION}).`);
252
256
  }
@@ -258,9 +262,13 @@ function findEsbuildPath() {
258
262
  }
259
263
  }
260
264
  exports.findEsbuildPath = findEsbuildPath;
261
- function getGlobalEsbuildVersion() {
265
+ function getGlobalEsbuildVersion(binPath) {
266
+ var _a;
262
267
  try {
263
- const versionOutput = (0, child_process_1.execSync)("esbuild --version", { encoding: "utf8" }).trim();
268
+ const versionOutput = (_a = (0, child_process_1.execSync)(`${binPath} --version`, { encoding: "utf8" })) === null || _a === void 0 ? void 0 : _a.trim();
269
+ if (!versionOutput) {
270
+ return null;
271
+ }
264
272
  const versionMatch = versionOutput.match(/(\d+\.\d+\.\d+)/);
265
273
  return versionMatch ? versionMatch[0] : null;
266
274
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-tools",
3
- "version": "13.15.1",
3
+ "version": "13.15.2",
4
4
  "description": "Command-Line Interface for Firebase",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {