firebase-tools 12.6.0 → 12.6.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.
@@ -40,7 +40,7 @@ class AppDistributionClient {
40
40
  method: "POST",
41
41
  path: `/upload/v1/${appName}/releases:upload`,
42
42
  headers: {
43
- "X-Goog-Upload-File-Name": distribution.getFileName(),
43
+ "X-Goog-Upload-File-Name": encodeURIComponent(distribution.getFileName()),
44
44
  "X-Goog-Upload-Protocol": "raw",
45
45
  "Content-Type": "application/octet-stream",
46
46
  },
@@ -185,7 +185,7 @@ function toBackend(build, paramValues) {
185
185
  throw new error_1.FirebaseError("platform can't be undefined");
186
186
  }
187
187
  const bkEndpoint = Object.assign({ id: endpointId, project: bdEndpoint.project, region: region, entryPoint: bdEndpoint.entryPoint, platform: bdEndpoint.platform, runtime: bdEndpoint.runtime }, trigger);
188
- proto.copyIfPresent(bkEndpoint, bdEndpoint, "environmentVariables", "labels", "secretEnvironmentVariables", "serviceAccount");
188
+ proto.copyIfPresent(bkEndpoint, bdEndpoint, "environmentVariables", "labels", "secretEnvironmentVariables");
189
189
  proto.convertIfPresent(bkEndpoint, bdEndpoint, "ingressSettings", (from) => {
190
190
  if (from !== null && !backend.AllIngressSettings.includes(from)) {
191
191
  throw new error_1.FirebaseError(`Cannot set ingress settings to invalid value ${from}`);
@@ -199,6 +199,7 @@ function toBackend(build, paramValues) {
199
199
  }
200
200
  return mem || null;
201
201
  });
202
+ r.resolveStrings(bkEndpoint, bdEndpoint, "serviceAccount");
202
203
  r.resolveInts(bkEndpoint, bdEndpoint, "timeoutSeconds", "maxInstances", "minInstances", "concurrency");
203
204
  proto.convertIfPresent(bkEndpoint, bdEndpoint, "cpu", (0, functional_1.nullsafeVisitor)((cpu) => (cpu === "gcf_gen1" ? cpu : r.resolveInt(cpu))));
204
205
  if (bdEndpoint.vpc) {
@@ -91,7 +91,7 @@ async function createFunction(cloudFunction) {
91
91
  const components = cloudFunction.name.split("/");
92
92
  const functionId = components.splice(-1, 1)[0];
93
93
  cloudFunction.buildConfig.environmentVariables = Object.assign(Object.assign({}, cloudFunction.buildConfig.environmentVariables), { GOOGLE_NODE_RUN_SCRIPTS: "" });
94
- cloudFunction.serviceConfig.environmentVariables = Object.assign(Object.assign({}, cloudFunction.serviceConfig.environmentVariables), { FUNCTION_TARGET: functionId });
94
+ cloudFunction.serviceConfig.environmentVariables = Object.assign(Object.assign({}, cloudFunction.serviceConfig.environmentVariables), { FUNCTION_TARGET: functionId.replaceAll("-", ".") });
95
95
  try {
96
96
  const res = await client.post(components.join("/"), cloudFunction, { queryParams: { functionId } });
97
97
  return res.body;
@@ -149,7 +149,7 @@ async function updateFunction(cloudFunction) {
149
149
  const fieldMasks = proto.fieldMasks(cloudFunction, "labels", "serviceConfig.environmentVariables", "serviceConfig.secretEnvironmentVariables");
150
150
  cloudFunction.buildConfig.environmentVariables = Object.assign(Object.assign({}, cloudFunction.buildConfig.environmentVariables), { GOOGLE_NODE_RUN_SCRIPTS: "" });
151
151
  fieldMasks.push("buildConfig.buildEnvironmentVariables");
152
- cloudFunction.serviceConfig.environmentVariables = Object.assign(Object.assign({}, cloudFunction.serviceConfig.environmentVariables), { FUNCTION_TARGET: functionId });
152
+ cloudFunction.serviceConfig.environmentVariables = Object.assign(Object.assign({}, cloudFunction.serviceConfig.environmentVariables), { FUNCTION_TARGET: functionId.replaceAll("-", ".") });
153
153
  try {
154
154
  const queryParams = {
155
155
  updateMask: fieldMasks.join(","),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-tools",
3
- "version": "12.6.0",
3
+ "version": "12.6.2",
4
4
  "description": "Command-Line Interface for Firebase",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {