firebase-tools-with-isolate 13.16.0 → 13.26.0

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.
Files changed (220) hide show
  1. package/lib/api.js +3 -1
  2. package/lib/apiv2.js +10 -3
  3. package/lib/appdistribution/client.js +62 -8
  4. package/lib/appdistribution/distribution.js +1 -1
  5. package/lib/apphosting/backend.js +299 -0
  6. package/lib/apphosting/config.js +31 -8
  7. package/lib/apphosting/githubConnections.js +70 -22
  8. package/lib/apphosting/index.js +3 -312
  9. package/lib/apphosting/rollout.js +138 -0
  10. package/lib/apphosting/secrets/index.js +70 -5
  11. package/lib/apphosting/utils.js +41 -0
  12. package/lib/apphosting/yaml.js +82 -0
  13. package/lib/archiveDirectory.js +1 -1
  14. package/lib/auth.js +31 -5
  15. package/lib/bin/firebase.js +2 -2
  16. package/lib/command.js +18 -4
  17. package/lib/commands/appdistribution-distribute.js +4 -4
  18. package/lib/commands/{appdistribution-group-create.js → appdistribution-groups-create.js} +2 -1
  19. package/lib/commands/{appdistribution-group-delete.js → appdistribution-groups-delete.js} +3 -2
  20. package/lib/commands/appdistribution-groups-list.js +55 -0
  21. package/lib/commands/appdistribution-testers-list.js +52 -0
  22. package/lib/commands/appdistribution-testers-remove.js +1 -1
  23. package/lib/commands/apphosting-backends-create.js +4 -4
  24. package/lib/commands/apphosting-backends-delete.js +7 -15
  25. package/lib/commands/apphosting-backends-get.js +1 -1
  26. package/lib/commands/apphosting-config-export.js +51 -0
  27. package/lib/commands/apphosting-repos-create.js +23 -0
  28. package/lib/commands/apphosting-rollouts-create.js +14 -15
  29. package/lib/commands/apphosting-secrets-grantaccess.js +2 -2
  30. package/lib/commands/database-import.js +4 -2
  31. package/lib/commands/database-push.js +4 -2
  32. package/lib/commands/database-set.js +4 -2
  33. package/lib/commands/database-settings-get.js +1 -1
  34. package/lib/commands/database-settings-set.js +1 -1
  35. package/lib/commands/dataconnect-sdk-generate.js +4 -1
  36. package/lib/commands/dataconnect-services-list.js +4 -3
  37. package/lib/commands/dataconnect-sql-diff.js +1 -1
  38. package/lib/commands/dataconnect-sql-grant.js +37 -0
  39. package/lib/commands/dataconnect-sql-migrate.js +1 -1
  40. package/lib/commands/dataconnect-sql-shell.js +115 -0
  41. package/lib/commands/deploy.js +2 -0
  42. package/lib/commands/emulators-start.js +4 -1
  43. package/lib/commands/ext-dev-init.js +2 -2
  44. package/lib/commands/ext-dev-list.js +1 -1
  45. package/lib/commands/ext-dev-register.js +2 -2
  46. package/lib/commands/ext-dev-upload.js +2 -2
  47. package/lib/commands/ext-dev-usage.js +2 -2
  48. package/lib/commands/ext-info.js +3 -1
  49. package/lib/commands/ext-install.js +2 -2
  50. package/lib/commands/ext-sdk-install.js +88 -0
  51. package/lib/commands/ext.js +1 -0
  52. package/lib/commands/firestore-databases-restore.js +39 -1
  53. package/lib/commands/functions-secrets-access.js +2 -4
  54. package/lib/commands/index.js +15 -2
  55. package/lib/commands/init.js +25 -15
  56. package/lib/commands/setup-emulators-dataconnect.js +0 -13
  57. package/lib/commands/use.js +1 -1
  58. package/lib/config.js +14 -4
  59. package/lib/crashlytics/buildToolsJarHelper.js +2 -2
  60. package/lib/dataconnect/client.js +1 -1
  61. package/lib/dataconnect/dataplaneClient.js +12 -9
  62. package/lib/dataconnect/ensureApis.js +6 -1
  63. package/lib/dataconnect/fileUtils.js +15 -39
  64. package/lib/dataconnect/freeTrial.js +45 -9
  65. package/lib/dataconnect/load.js +3 -1
  66. package/lib/dataconnect/provisionCloudSql.js +39 -26
  67. package/lib/dataconnect/schemaMigration.js +215 -74
  68. package/lib/dataconnect/types.js +4 -1
  69. package/lib/dataconnect/webhook.js +32 -0
  70. package/lib/deploy/dataconnect/deploy.js +18 -15
  71. package/lib/deploy/dataconnect/prepare.js +41 -0
  72. package/lib/deploy/dataconnect/release.js +16 -7
  73. package/lib/deploy/extensions/deploy.js +3 -1
  74. package/lib/deploy/extensions/deploymentSummary.js +7 -3
  75. package/lib/deploy/extensions/planner.js +44 -5
  76. package/lib/deploy/extensions/prepare.js +45 -73
  77. package/lib/deploy/extensions/release.js +11 -10
  78. package/lib/deploy/extensions/tasks.js +32 -21
  79. package/lib/deploy/firestore/prepare.js +9 -0
  80. package/lib/deploy/firestore/release.js +3 -6
  81. package/lib/deploy/functions/checkIam.js +7 -2
  82. package/lib/deploy/functions/ensure.js +11 -3
  83. package/lib/deploy/functions/prepare.js +10 -2
  84. package/lib/deploy/functions/release/planner.js +2 -1
  85. package/lib/deploy/functions/runtimes/discovery/index.js +6 -2
  86. package/lib/deploy/functions/runtimes/node/index.js +5 -0
  87. package/lib/deploy/functions/services/auth.js +34 -3
  88. package/lib/deploy/functions/services/index.js +2 -0
  89. package/lib/deploy/index.js +8 -5
  90. package/lib/deploy/lifecycleHooks.js +2 -1
  91. package/lib/emulator/apphosting/config.js +27 -0
  92. package/lib/emulator/apphosting/index.js +38 -0
  93. package/lib/emulator/apphosting/serve.js +50 -0
  94. package/lib/emulator/apphosting/utils.js +18 -0
  95. package/lib/emulator/auth/handlers.js +27 -0
  96. package/lib/emulator/auth/operations.js +41 -2
  97. package/lib/emulator/auth/state.js +2 -1
  98. package/lib/emulator/commandUtils.js +8 -3
  99. package/lib/emulator/constants.js +4 -1
  100. package/lib/emulator/controller.js +48 -5
  101. package/lib/emulator/dataconnect/pg-gateway/auth/base-auth-flow.js +11 -0
  102. package/lib/emulator/dataconnect/pg-gateway/auth/cert.js +58 -0
  103. package/lib/emulator/dataconnect/pg-gateway/auth/index.js +22 -0
  104. package/lib/emulator/dataconnect/pg-gateway/auth/md5.js +124 -0
  105. package/lib/emulator/dataconnect/pg-gateway/auth/password.js +54 -0
  106. package/lib/emulator/dataconnect/pg-gateway/auth/sasl/sasl-mechanism.js +34 -0
  107. package/lib/emulator/dataconnect/pg-gateway/auth/sasl/scram-sha-256.js +270 -0
  108. package/lib/emulator/dataconnect/pg-gateway/auth/trust.js +2 -0
  109. package/lib/emulator/dataconnect/pg-gateway/backend-error.js +75 -0
  110. package/lib/emulator/dataconnect/pg-gateway/buffer-reader.js +54 -0
  111. package/lib/emulator/dataconnect/pg-gateway/buffer-writer.js +79 -0
  112. package/lib/emulator/dataconnect/pg-gateway/connection.js +315 -0
  113. package/lib/emulator/dataconnect/pg-gateway/connection.types.js +8 -0
  114. package/lib/emulator/dataconnect/pg-gateway/crypto.js +40 -0
  115. package/lib/emulator/dataconnect/pg-gateway/duplex.js +53 -0
  116. package/lib/emulator/dataconnect/pg-gateway/index.js +27 -0
  117. package/lib/emulator/dataconnect/pg-gateway/message-buffer.js +82 -0
  118. package/lib/emulator/dataconnect/pg-gateway/message-codes.js +52 -0
  119. package/lib/emulator/dataconnect/pg-gateway/platforms/node/index.js +16 -0
  120. package/lib/emulator/dataconnect/pg-gateway/polyfills/readable-stream-async-iterator.js +35 -0
  121. package/lib/emulator/dataconnect/pg-gateway/utils.js +40 -0
  122. package/lib/emulator/dataconnect/pgliteServer.js +95 -0
  123. package/lib/emulator/dataconnectEmulator.js +58 -75
  124. package/lib/emulator/dataconnectToolkitController.js +44 -0
  125. package/lib/emulator/downloadableEmulators.js +27 -16
  126. package/lib/emulator/emulatorLogger.js +3 -0
  127. package/lib/emulator/eventarcEmulator.js +1 -1
  128. package/lib/emulator/extensionsEmulator.js +38 -6
  129. package/lib/emulator/functionsEmulator.js +85 -41
  130. package/lib/emulator/functionsEmulatorShared.js +2 -1
  131. package/lib/emulator/functionsRuntimeWorker.js +2 -1
  132. package/lib/emulator/hub.js +13 -9
  133. package/lib/emulator/hubExport.js +10 -3
  134. package/lib/emulator/loggingEmulator.js +2 -2
  135. package/lib/emulator/portUtils.js +10 -11
  136. package/lib/emulator/registry.js +1 -0
  137. package/lib/emulator/storage/persistence.js +2 -2
  138. package/lib/emulator/storage/rules/runtime.js +1 -1
  139. package/lib/emulator/tasksEmulator.js +5 -2
  140. package/lib/emulator/types.js +3 -0
  141. package/lib/emulator/ui.js +51 -25
  142. package/lib/error.js +31 -1
  143. package/lib/experiments.js +5 -0
  144. package/lib/extensions/emulator/triggerHelper.js +1 -1
  145. package/lib/extensions/extensionsApi.js +14 -10
  146. package/lib/extensions/extensionsHelper.js +15 -6
  147. package/lib/extensions/localHelper.js +31 -0
  148. package/lib/extensions/runtimes/common.js +179 -39
  149. package/lib/extensions/runtimes/node.js +401 -0
  150. package/lib/extensions/types.js +25 -14
  151. package/lib/extensions/warnings.js +5 -2
  152. package/lib/firestore/api.js +2 -1
  153. package/lib/firestore/checkDatabaseType.js +10 -3
  154. package/lib/firestore/delete.js +11 -0
  155. package/lib/firestore/options.js +7 -0
  156. package/lib/frameworks/angular/index.js +15 -3
  157. package/lib/frameworks/constants.js +1 -1
  158. package/lib/frameworks/flutter/index.js +6 -6
  159. package/lib/frameworks/flutter/utils.js +34 -1
  160. package/lib/frameworks/next/index.js +10 -2
  161. package/lib/frameworks/next/utils.js +8 -5
  162. package/lib/frameworks/vite/index.js +2 -2
  163. package/lib/fsutils.js +13 -1
  164. package/lib/functions/constants.js +4 -0
  165. package/lib/functions/events/v1.js +9 -2
  166. package/lib/gcp/apphosting.js +1 -1
  167. package/lib/gcp/cloudmonitoring.js +3 -3
  168. package/lib/gcp/cloudsql/cloudsqladmin.js +32 -20
  169. package/lib/gcp/cloudsql/connect.js +49 -37
  170. package/lib/gcp/cloudsql/interactive.js +49 -0
  171. package/lib/gcp/cloudsql/permissions.js +165 -0
  172. package/lib/gcp/devConnect.js +38 -1
  173. package/lib/gcp/firestore.js +5 -1
  174. package/lib/gcp/secretManager.js +12 -5
  175. package/lib/getProjectNumber.js +1 -1
  176. package/lib/init/features/apphosting.js +15 -0
  177. package/lib/init/features/dataconnect/index.js +159 -120
  178. package/lib/init/features/dataconnect/sdk.js +77 -84
  179. package/lib/init/features/emulators.js +2 -15
  180. package/lib/init/features/firestore/index.js +20 -1
  181. package/lib/init/features/firestore/indexes.js +4 -4
  182. package/lib/init/features/genkit/index.js +444 -0
  183. package/lib/init/features/hosting/index.js +2 -2
  184. package/lib/init/features/index.js +1 -1
  185. package/lib/init/features/project.js +6 -6
  186. package/lib/init/features/storage.js +0 -2
  187. package/lib/init/index.js +1 -0
  188. package/lib/init/spawn.js +23 -2
  189. package/lib/logger.js +2 -2
  190. package/lib/management/projects.js +24 -4
  191. package/lib/projectUtils.js +1 -1
  192. package/lib/prompt.js +1 -1
  193. package/lib/rc.js +1 -8
  194. package/lib/requireAuth.js +19 -5
  195. package/lib/requireDatabaseInstance.js +1 -1
  196. package/lib/requirePermissions.js +1 -1
  197. package/lib/responseToError.js +5 -2
  198. package/lib/rulesDeploy.js +1 -1
  199. package/lib/templates.js +2 -2
  200. package/lib/utils.js +16 -11
  201. package/lib/vsCodeUtils.js +8 -0
  202. package/package.json +7 -6
  203. package/schema/connector-yaml.json +57 -17
  204. package/schema/firebase-config.json +24 -0
  205. package/templates/extensions/javascript/package.lint.json +2 -2
  206. package/templates/extensions/javascript/package.nolint.json +2 -2
  207. package/templates/extensions/typescript/package.lint.json +2 -2
  208. package/templates/extensions/typescript/package.nolint.json +2 -2
  209. package/templates/genkit/firebase.0.9.0.template +57 -0
  210. package/templates/init/apphosting/apphosting.yaml +23 -0
  211. package/templates/init/dataconnect/connector.yaml +0 -1
  212. package/templates/init/dataconnect/dataconnect-fdccompatiblemode.yaml +12 -0
  213. package/templates/init/dataconnect/dataconnect.yaml +1 -1
  214. package/templates/init/dataconnect/queries.gql +1 -2
  215. package/templates/init/functions/javascript/package.lint.json +2 -2
  216. package/templates/init/functions/javascript/package.nolint.json +2 -2
  217. package/templates/init/functions/typescript/package.lint.json +2 -2
  218. package/templates/init/functions/typescript/package.nolint.json +2 -2
  219. package/lib/ensureCloudResourceLocation.js +0 -12
  220. package/lib/init/features/genkit.js +0 -53
@@ -15,7 +15,7 @@ const metadataCallCache = new Map();
15
15
  async function defaultServiceAccount(e) {
16
16
  let metadataCall = metadataCallCache.get(e.project);
17
17
  if (!metadataCall) {
18
- metadataCall = (0, projects_1.getFirebaseProject)(e.project);
18
+ metadataCall = (0, projects_1.getProject)(e.project);
19
19
  metadataCallCache.set(e.project, metadataCall);
20
20
  }
21
21
  const metadata = await metadataCall;
@@ -78,10 +78,18 @@ async function secretsToServiceAccounts(b) {
78
78
  }
79
79
  return secretsToSa;
80
80
  }
81
- async function secretAccess(projectId, wantBackend, haveBackend) {
81
+ async function secretAccess(projectId, wantBackend, haveBackend, dryRun) {
82
82
  const ensureAccess = async (secret, serviceAccounts) => {
83
83
  (0, utils_1.logLabeledBullet)("functions", `ensuring ${clc.bold(serviceAccounts.join(", "))} access to secret ${clc.bold(secret)}.`);
84
- await (0, secretManager_1.ensureServiceAgentRole)({ name: secret, projectId }, serviceAccounts, "roles/secretmanager.secretAccessor");
84
+ if (dryRun) {
85
+ const check = await (0, secretManager_1.checkServiceAgentRole)({ name: secret, projectId }, serviceAccounts, "roles/secretmanager.secretAccessor");
86
+ if (check.length) {
87
+ (0, utils_1.logLabeledBullet)("functions", `On your next deploy, ${clc.bold(serviceAccounts.join(", "))} will be granted access to secret ${clc.bold(secret)}.`);
88
+ }
89
+ }
90
+ else {
91
+ await (0, secretManager_1.ensureServiceAgentRole)({ name: secret, projectId }, serviceAccounts, "roles/secretmanager.secretAccessor");
92
+ }
85
93
  (0, utils_1.logLabeledSuccess)("functions", `ensured ${clc.bold(serviceAccounts.join(", "))} access to ${clc.bold(secret)}.`);
86
94
  };
87
95
  const wantSecrets = await secretsToServiceAccounts(wantBackend);
@@ -27,6 +27,7 @@ const serviceusage_1 = require("../../gcp/serviceusage");
27
27
  const applyHash_1 = require("./cache/applyHash");
28
28
  const backend_1 = require("./backend");
29
29
  const functional_1 = require("../../functional");
30
+ const prepare_1 = require("../extensions/prepare");
30
31
  exports.EVENTARC_SOURCE_ENV = "EVENTARC_CLOUD_EVENT_SOURCE";
31
32
  async function prepare(context, options, payload) {
32
33
  const projectId = (0, projectUtils_1.needProjectId)(options);
@@ -54,6 +55,13 @@ async function prepare(context, options, payload) {
54
55
  }
55
56
  context.codebaseDeployEvents = {};
56
57
  const wantBuilds = await loadCodebases(context.config, options, firebaseConfig, runtimeConfig, context.filters);
58
+ if (Object.values(wantBuilds).some((b) => b.extensions)) {
59
+ const extContext = {};
60
+ const extPayload = {};
61
+ await (0, prepare_1.prepareDynamicExtensions)(extContext, options, extPayload, wantBuilds);
62
+ context.extensions = extContext;
63
+ payload.extensions = extPayload;
64
+ }
57
65
  const codebaseUsesEnvs = [];
58
66
  const wantBackends = {};
59
67
  for (const [codebase, wantBuild] of Object.entries(wantBuilds)) {
@@ -182,9 +190,9 @@ async function prepare(context, options, payload) {
182
190
  await (0, prompts_1.promptForFailurePolicies)(options, matchingBackend, haveBackend);
183
191
  await (0, prompts_1.promptForMinInstances)(options, matchingBackend, haveBackend);
184
192
  await backend.checkAvailability(context, matchingBackend);
185
- await (0, checkIam_1.ensureServiceAgentRoles)(projectId, projectNumber, matchingBackend, haveBackend);
186
193
  await validate.secretsAreValid(projectId, matchingBackend);
187
- await ensure.secretAccess(projectId, matchingBackend, haveBackend);
194
+ await (0, checkIam_1.ensureServiceAgentRoles)(projectId, projectNumber, matchingBackend, haveBackend, options.dryRun);
195
+ await ensure.secretAccess(projectId, matchingBackend, haveBackend, options.dryRun);
188
196
  updateEndpointTargetedStatus(wantBackends, context.filters || []);
189
197
  (0, applyHash_1.applyBackendHashToBackends)(wantBackends, context);
190
198
  }
@@ -206,7 +206,8 @@ function checkForIllegalUpdate(want, have) {
206
206
  exports.checkForIllegalUpdate = checkForIllegalUpdate;
207
207
  function checkForV2Upgrade(want, have) {
208
208
  if (want.platform === "gcfv2" && have.platform === "gcfv1") {
209
- throw new error_1.FirebaseError(`[${(0, functionsDeployHelper_1.getFunctionLabel)(have)}] Upgrading from GCFv1 to GCFv2 is not yet supported. Please delete your old function or wait for this feature to be ready.`);
209
+ throw new error_1.FirebaseError(`[${(0, functionsDeployHelper_1.getFunctionLabel)(have)}] Upgrading from 1st Gen to 2nd Gen is not yet supported. ` +
210
+ "See https://firebase.google.com/docs/functions/2nd-gen-upgrade before migrating to 2nd Gen.");
210
211
  }
211
212
  }
212
213
  exports.checkForV2Upgrade = checkForV2Upgrade;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.detectFromPort = exports.detectFromYaml = exports.yamlToBuild = exports.readFileAsync = void 0;
3
+ exports.detectFromPort = exports.detectFromYaml = exports.yamlToBuild = exports.getFunctionDiscoveryTimeout = exports.readFileAsync = void 0;
4
4
  const node_fetch_1 = require("node-fetch");
5
5
  const fs = require("fs");
6
6
  const path = require("path");
@@ -12,6 +12,10 @@ const v1alpha1 = require("./v1alpha1");
12
12
  const error_1 = require("../../../../error");
13
13
  exports.readFileAsync = (0, util_1.promisify)(fs.readFile);
14
14
  const TIMEOUT_OVERRIDE_ENV_VAR = "FUNCTIONS_DISCOVERY_TIMEOUT";
15
+ function getFunctionDiscoveryTimeout() {
16
+ return +(process.env[TIMEOUT_OVERRIDE_ENV_VAR] || 0) * 1000;
17
+ }
18
+ exports.getFunctionDiscoveryTimeout = getFunctionDiscoveryTimeout;
15
19
  function yamlToBuild(yaml, project, region, runtime) {
16
20
  try {
17
21
  if (!yaml.specVersion) {
@@ -51,7 +55,7 @@ async function detectFromPort(port, project, runtime, timeout = 10000) {
51
55
  const timedOut = new Promise((resolve, reject) => {
52
56
  setTimeout(() => {
53
57
  reject(new error_1.FirebaseError("User code failed to load. Cannot determine backend specification"));
54
- }, +(process.env[TIMEOUT_OVERRIDE_ENV_VAR] || 0) * 1000 || timeout);
58
+ }, getFunctionDiscoveryTimeout() || timeout);
55
59
  });
56
60
  while (true) {
57
61
  try {
@@ -19,6 +19,7 @@ const versioning = require("./versioning");
19
19
  const parseTriggers = require("./parseTriggers");
20
20
  const fsutils_1 = require("../../../../fsutils");
21
21
  const MIN_FUNCTIONS_SDK_VERSION = "3.20.0";
22
+ const MIN_FUNCTIONS_SDK_VERSION_FOR_EXTENSIONS_FEATURES = "5.1.0";
22
23
  async function tryCreateDelegate(context) {
23
24
  const packageJsonPath = path.join(context.sourceDir, "package.json");
24
25
  if (!(await (0, util_1.promisify)(fs.exists)(packageJsonPath))) {
@@ -163,6 +164,10 @@ class Delegate {
163
164
  `Please update firebase-functions SDK to >=${MIN_FUNCTIONS_SDK_VERSION}`);
164
165
  return parseTriggers.discoverBuild(this.projectId, this.sourceDir, this.runtime, config, env);
165
166
  }
167
+ if (semver.lt(this.sdkVersion, MIN_FUNCTIONS_SDK_VERSION_FOR_EXTENSIONS_FEATURES)) {
168
+ (0, utils_1.logLabeledBullet)("functions", `You are using a version of firebase-functions SDK (${this.sdkVersion}) that does not have support for the newest Firebase Extensions features. ` +
169
+ `Please update firebase-functions SDK to >=${MIN_FUNCTIONS_SDK_VERSION_FOR_EXTENSIONS_FEATURES} to use them correctly`);
170
+ }
166
171
  let discovered = await discovery.detectFromYaml(this.sourceDir, this.projectId, this.runtime);
167
172
  if (!discovered) {
168
173
  const basePort = 8000 + (0, utils_1.randomInt)(0, 1000);
@@ -29,7 +29,11 @@ class AuthBlockingService {
29
29
  configChanged(newConfig, config) {
30
30
  if (newConfig.triggers?.beforeCreate?.functionUri !==
31
31
  config.triggers?.beforeCreate?.functionUri ||
32
- newConfig.triggers?.beforeSignIn?.functionUri !== config.triggers?.beforeSignIn?.functionUri) {
32
+ newConfig.triggers?.beforeSignIn?.functionUri !==
33
+ config.triggers?.beforeSignIn?.functionUri ||
34
+ newConfig.triggers?.beforeSendEmail?.functionUri !==
35
+ config.triggers?.beforeSendEmail?.functionUri ||
36
+ newConfig.triggers?.beforeSendSms?.functionUri !== config.triggers?.beforeSendSms?.functionUri) {
33
37
  return true;
34
38
  }
35
39
  if (!!newConfig.forwardInboundCredentials?.accessToken !==
@@ -53,7 +57,7 @@ class AuthBlockingService {
53
57
  },
54
58
  };
55
59
  }
56
- else {
60
+ else if (endpoint.blockingTrigger.eventType === events.v1.BEFORE_SIGN_IN_EVENT) {
57
61
  newBlockingConfig.triggers = {
58
62
  ...newBlockingConfig.triggers,
59
63
  beforeSignIn: {
@@ -61,6 +65,25 @@ class AuthBlockingService {
61
65
  },
62
66
  };
63
67
  }
68
+ else if (endpoint.blockingTrigger.eventType === events.v1.BEFORE_SEND_EMAIL_EVENT) {
69
+ newBlockingConfig.triggers = {
70
+ ...newBlockingConfig.triggers,
71
+ beforeSendEmail: {
72
+ functionUri: endpoint.uri,
73
+ },
74
+ };
75
+ }
76
+ else if (endpoint.blockingTrigger.eventType === events.v1.BEFORE_SEND_SMS_EVENT) {
77
+ newBlockingConfig.triggers = {
78
+ ...newBlockingConfig.triggers,
79
+ beforeSendSms: {
80
+ functionUri: endpoint.uri,
81
+ },
82
+ };
83
+ }
84
+ else {
85
+ throw new error_1.FirebaseError(`Received invalid blocking trigger event type ${endpoint.blockingTrigger.eventType}`);
86
+ }
64
87
  newBlockingConfig.forwardInboundCredentials = {
65
88
  ...oldBlockingConfig.forwardInboundCredentials,
66
89
  ...endpoint.blockingTrigger.options,
@@ -80,7 +103,9 @@ class AuthBlockingService {
80
103
  async unregisterTriggerLocked(endpoint) {
81
104
  const blockingConfig = await identityPlatform.getBlockingFunctionsConfig(endpoint.project);
82
105
  if (endpoint.uri !== blockingConfig.triggers?.beforeCreate?.functionUri &&
83
- endpoint.uri !== blockingConfig.triggers?.beforeSignIn?.functionUri) {
106
+ endpoint.uri !== blockingConfig.triggers?.beforeSignIn?.functionUri &&
107
+ endpoint.uri !== blockingConfig.triggers?.beforeSendEmail?.functionUri &&
108
+ endpoint.uri !== blockingConfig.triggers?.beforeSendSms?.functionUri) {
84
109
  return;
85
110
  }
86
111
  if (endpoint.uri === blockingConfig.triggers?.beforeCreate?.functionUri) {
@@ -89,6 +114,12 @@ class AuthBlockingService {
89
114
  if (endpoint.uri === blockingConfig.triggers?.beforeSignIn?.functionUri) {
90
115
  delete blockingConfig.triggers?.beforeSignIn;
91
116
  }
117
+ if (endpoint.uri === blockingConfig.triggers?.beforeSendEmail?.functionUri) {
118
+ delete blockingConfig.triggers?.beforeSendEmail;
119
+ }
120
+ if (endpoint.uri === blockingConfig.triggers?.beforeSendSms?.functionUri) {
121
+ delete blockingConfig.triggers?.beforeSendSms;
122
+ }
92
123
  await identityPlatform.setBlockingFunctionsConfig(endpoint.project, blockingConfig);
93
124
  }
94
125
  unregisterTrigger(ep) {
@@ -94,6 +94,8 @@ const EVENT_SERVICE_MAPPING = {
94
94
  "google.firebase.firebasealerts.alerts.v1.published": firebaseAlertsService,
95
95
  "providers/cloud.auth/eventTypes/user.beforeCreate": authBlockingService,
96
96
  "providers/cloud.auth/eventTypes/user.beforeSignIn": authBlockingService,
97
+ "providers/cloud.auth/eventTypes/user.beforeSendEmail": authBlockingService,
98
+ "providers/cloud.auth/eventTypes/user.beforeSendSms": authBlockingService,
97
99
  "google.firebase.database.ref.v1.written": databaseService,
98
100
  "google.firebase.database.ref.v1.created": databaseService,
99
101
  "google.firebase.database.ref.v1.updated": databaseService,
@@ -85,9 +85,11 @@ const deploy = async function (targetNames, options, customContext = {}) {
85
85
  }
86
86
  predeploys.push((0, lifecycleHooks_1.lifecycleHooks)(targetName, "predeploy"));
87
87
  prepares.push(target.prepare);
88
- deploys.push(target.deploy);
89
- releases.push(target.release);
90
- postdeploys.push((0, lifecycleHooks_1.lifecycleHooks)(targetName, "postdeploy"));
88
+ if (!options.dryRun) {
89
+ deploys.push(target.deploy);
90
+ releases.push(target.release);
91
+ postdeploys.push((0, lifecycleHooks_1.lifecycleHooks)(targetName, "postdeploy"));
92
+ }
91
93
  }
92
94
  logger_1.logger.info();
93
95
  logger_1.logger.info((0, colorette_1.bold)((0, colorette_1.white)("===") + " Deploying to '" + projectId + "'..."));
@@ -110,11 +112,12 @@ const deploy = async function (targetNames, options, customContext = {}) {
110
112
  analyticsParams[t] = "true";
111
113
  }
112
114
  await (0, track_1.trackGA4)("product_deploy", analyticsParams, duration);
115
+ const successMessage = options.dryRun ? "Dry run complete!" : "Deploy complete!";
113
116
  logger_1.logger.info();
114
- (0, utils_1.logSuccess)((0, colorette_1.bold)((0, colorette_1.underline)("Deploy complete!")));
117
+ (0, utils_1.logSuccess)((0, colorette_1.bold)((0, colorette_1.underline)(successMessage)));
115
118
  logger_1.logger.info();
116
119
  const deployedHosting = (0, lodash_1.includes)(targetNames, "hosting");
117
- logger_1.logger.info((0, colorette_1.bold)("Project Console:"), (0, utils_1.consoleUrl)(options.project, "/overview"));
120
+ logger_1.logger.info((0, colorette_1.bold)("Project Console:"), (0, utils_1.consoleUrl)(options.project ?? "_", "/overview"));
118
121
  if (deployedHosting) {
119
122
  (0, lodash_1.each)(context.hosting.deploys, (deploy) => {
120
123
  logger_1.logger.info((0, colorette_1.bold)("Hosting URL:"), (0, utils_1.addSubdomain)((0, api_1.hostingOrigin)(), deploy.config.site));
@@ -8,9 +8,10 @@ const error_1 = require("../error");
8
8
  const needProjectId = require("../projectUtils").needProjectId;
9
9
  const logger_1 = require("../logger");
10
10
  const path = require("path");
11
+ const vsCodeUtils_1 = require("../vsCodeUtils");
11
12
  function runCommand(command, childOptions) {
12
13
  const escapedCommand = command.replace(/\"/g, '\\"');
13
- const isVSCode = utils.isVSCodeExtension();
14
+ const isVSCode = (0, vsCodeUtils_1.isVSCodeExtension)();
14
15
  const nodeExecutable = isVSCode ? "node" : process.execPath;
15
16
  const crossEnvShellPath = isVSCode
16
17
  ? path.resolve(__dirname, "./cross-env/dist/bin/cross-env-shell.js")
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getLocalAppHostingConfiguration = void 0;
4
+ const path_1 = require("path");
5
+ const config_1 = require("../../apphosting/config");
6
+ const yaml_1 = require("../../apphosting/yaml");
7
+ async function getLocalAppHostingConfiguration(backendDir) {
8
+ const appHostingConfigPaths = (0, config_1.listAppHostingFilesInPath)(backendDir);
9
+ const fileNameToPathMap = new Map();
10
+ for (const path of appHostingConfigPaths) {
11
+ const fileName = (0, path_1.basename)(path);
12
+ fileNameToPathMap.set(fileName, path);
13
+ }
14
+ const baseFilePath = fileNameToPathMap.get(config_1.APPHOSTING_BASE_YAML_FILE);
15
+ const localFilePath = fileNameToPathMap.get(config_1.APPHOSTING_LOCAL_YAML_FILE);
16
+ if (!baseFilePath && !localFilePath) {
17
+ return yaml_1.AppHostingYamlConfig.empty();
18
+ }
19
+ if (!baseFilePath || !localFilePath) {
20
+ return await yaml_1.AppHostingYamlConfig.loadFromFile((baseFilePath || localFilePath));
21
+ }
22
+ const localYamlConfig = await yaml_1.AppHostingYamlConfig.loadFromFile(localFilePath);
23
+ const baseConfig = await yaml_1.AppHostingYamlConfig.loadFromFile(baseFilePath);
24
+ baseConfig.merge(localYamlConfig);
25
+ return baseConfig;
26
+ }
27
+ exports.getLocalAppHostingConfiguration = getLocalAppHostingConfiguration;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppHostingEmulator = void 0;
4
+ const types_1 = require("../types");
5
+ const serve_1 = require("./serve");
6
+ const utils_1 = require("./utils");
7
+ class AppHostingEmulator {
8
+ constructor(args) {
9
+ this.args = args;
10
+ }
11
+ async start() {
12
+ const { hostname, port } = await (0, serve_1.start)({
13
+ startCommand: this.args.startCommandOverride,
14
+ rootDirectory: this.args.rootDirectory,
15
+ });
16
+ this.args.options.host = hostname;
17
+ this.args.options.port = port;
18
+ }
19
+ connect() {
20
+ utils_1.logger.logLabeled("INFO", types_1.Emulators.APPHOSTING, "connecting apphosting emulator");
21
+ return Promise.resolve();
22
+ }
23
+ stop() {
24
+ utils_1.logger.logLabeled("INFO", types_1.Emulators.APPHOSTING, "stopping apphosting emulator");
25
+ return Promise.resolve();
26
+ }
27
+ getInfo() {
28
+ return {
29
+ name: types_1.Emulators.APPHOSTING,
30
+ host: this.args.options.host,
31
+ port: this.args.options.port,
32
+ };
33
+ }
34
+ getName() {
35
+ return types_1.Emulators.APPHOSTING;
36
+ }
37
+ }
38
+ exports.AppHostingEmulator = AppHostingEmulator;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.start = void 0;
4
+ const net_1 = require("net");
5
+ const portUtils_1 = require("../portUtils");
6
+ const utils_1 = require("./utils");
7
+ const constants_1 = require("../constants");
8
+ const spawn_1 = require("../../init/spawn");
9
+ const utils_2 = require("./utils");
10
+ const types_1 = require("../types");
11
+ const config_1 = require("./config");
12
+ const projectPath_1 = require("../../projectPath");
13
+ async function start(options) {
14
+ const hostname = constants_1.DEFAULT_HOST;
15
+ let port = constants_1.DEFAULT_PORTS.apphosting;
16
+ while (!(await availablePort(hostname, port))) {
17
+ port += 1;
18
+ }
19
+ serve(port, options?.startCommand, options?.rootDirectory);
20
+ return { hostname, port };
21
+ }
22
+ exports.start = start;
23
+ async function serve(port, startCommand, backendRelativeDir) {
24
+ backendRelativeDir = backendRelativeDir ?? "./";
25
+ const backendRoot = (0, projectPath_1.resolveProjectPath)({}, backendRelativeDir);
26
+ const apphostingLocalConfig = await (0, config_1.getLocalAppHostingConfiguration)(backendRoot);
27
+ const environmentVariablesAsRecord = {};
28
+ for (const env of apphostingLocalConfig.environmentVariables) {
29
+ environmentVariablesAsRecord[env.variable] = env.value;
30
+ }
31
+ const environmentVariablesToInject = {
32
+ ...environmentVariablesAsRecord,
33
+ PORT: port.toString(),
34
+ };
35
+ if (startCommand) {
36
+ utils_2.logger.logLabeled("BULLET", types_1.Emulators.APPHOSTING, `running custom start command: '${startCommand}'`);
37
+ await (0, spawn_1.spawnWithCommandString)(startCommand, backendRoot, environmentVariablesToInject);
38
+ return;
39
+ }
40
+ const packageManager = await (0, utils_1.discoverPackageManager)(backendRoot);
41
+ utils_2.logger.logLabeled("BULLET", types_1.Emulators.APPHOSTING, `starting app with: '${packageManager} run dev'`);
42
+ await (0, spawn_1.wrapSpawn)(packageManager, ["run", "dev"], backendRoot, environmentVariablesToInject);
43
+ }
44
+ function availablePort(host, port) {
45
+ return (0, portUtils_1.checkListenable)({
46
+ address: host,
47
+ port,
48
+ family: (0, net_1.isIPv4)(host) ? "IPv4" : "IPv6",
49
+ });
50
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.discoverPackageManager = exports.logger = void 0;
4
+ const fs_extra_1 = require("fs-extra");
5
+ const path_1 = require("path");
6
+ const emulatorLogger_1 = require("../emulatorLogger");
7
+ const types_1 = require("../types");
8
+ exports.logger = emulatorLogger_1.EmulatorLogger.forEmulator(types_1.Emulators.APPHOSTING);
9
+ async function discoverPackageManager(rootdir) {
10
+ if (await (0, fs_extra_1.pathExists)((0, path_1.join)(rootdir, "pnpm-lock.yaml"))) {
11
+ return "pnpm";
12
+ }
13
+ if (await (0, fs_extra_1.pathExists)((0, path_1.join)(rootdir, "yarn.lock"))) {
14
+ return "yarn";
15
+ }
16
+ return "npm";
17
+ }
18
+ exports.discoverPackageManager = discoverPackageManager;
@@ -131,6 +131,33 @@ function registerHandlers(app, getProjectStateByApiKey) {
131
131
  }
132
132
  }
133
133
  }
134
+ case "verifyAndChangeEmail": {
135
+ try {
136
+ const { newEmail } = (0, operations_1.setAccountInfoImpl)(state, { oobCode });
137
+ if (continueUrl) {
138
+ return res.redirect(303, continueUrl);
139
+ }
140
+ else {
141
+ return res.status(200).json({
142
+ authEmulator: { success: `The email has been successfully changed.`, newEmail },
143
+ });
144
+ }
145
+ }
146
+ catch (e) {
147
+ if (e instanceof errors_1.NotImplementedError ||
148
+ (e instanceof errors_1.BadRequestError && e.message === "INVALID_OOB_CODE")) {
149
+ return res.status(400).json({
150
+ authEmulator: {
151
+ error: `Your request to change your email has expired or the link has already been used.`,
152
+ instructions: `Try changing your email again.`,
153
+ },
154
+ });
155
+ }
156
+ else {
157
+ throw e;
158
+ }
159
+ }
160
+ }
134
161
  case "signIn": {
135
162
  if (!continueUrl) {
136
163
  return res.status(400).json({
@@ -619,6 +619,7 @@ function resetPassword(state, reqBody) {
619
619
  kind: "identitytoolkit#ResetPasswordResponse",
620
620
  requestType: oob.requestType,
621
621
  email: oob.requestType === "EMAIL_SIGNIN" ? undefined : oob.email,
622
+ newEmail: oob.newEmail,
622
623
  };
623
624
  }
624
625
  exports.resetPassword = resetPassword;
@@ -632,6 +633,7 @@ function sendOobCode(state, reqBody, ctx) {
632
633
  (0, errors_1.assert)((0, utils_1.parseAbsoluteUri)(reqBody.continueUrl), "INVALID_CONTINUE_URI : ((expected an absolute URI with valid scheme and host))");
633
634
  }
634
635
  let email;
636
+ let newEmail;
635
637
  let mode;
636
638
  switch (reqBody.requestType) {
637
639
  case "EMAIL_SIGNIN":
@@ -667,6 +669,24 @@ function sendOobCode(state, reqBody, ctx) {
667
669
  email = user.email;
668
670
  }
669
671
  break;
672
+ case "VERIFY_AND_CHANGE_EMAIL":
673
+ mode = "verifyAndChangeEmail";
674
+ (0, errors_1.assert)(reqBody.newEmail, "MISSING_NEW_EMAIL");
675
+ newEmail = (0, utils_1.canonicalizeEmailAddress)(reqBody.newEmail);
676
+ if (reqBody.returnOobLink && !reqBody.idToken) {
677
+ (0, errors_1.assert)(reqBody.email, "MISSING_EMAIL");
678
+ email = (0, utils_1.canonicalizeEmailAddress)(reqBody.email);
679
+ const maybeUser = state.getUserByEmail(email);
680
+ (0, errors_1.assert)(maybeUser, "USER_NOT_FOUND");
681
+ }
682
+ else {
683
+ (0, errors_1.assert)(reqBody.idToken, "MISSING_ID_TOKEN");
684
+ const user = parseIdToken(state, reqBody.idToken).user;
685
+ (0, errors_1.assert)(user.email, "MISSING_EMAIL");
686
+ email = user.email;
687
+ }
688
+ (0, errors_1.assert)(!state.getUserByEmail(newEmail), "EMAIL_EXISTS");
689
+ break;
670
690
  default:
671
691
  throw new errors_1.NotImplementedError(reqBody.requestType);
672
692
  }
@@ -678,6 +698,7 @@ function sendOobCode(state, reqBody, ctx) {
678
698
  requestType: reqBody.requestType,
679
699
  mode,
680
700
  continueUrl: reqBody.continueUrl,
701
+ newEmail,
681
702
  });
682
703
  if (reqBody.returnOobLink) {
683
704
  return {
@@ -746,6 +767,7 @@ function setAccountInfoImpl(state, reqBody, { privileged = false, emulatorUrl =
746
767
  let user;
747
768
  let signInProvider;
748
769
  let isEmailUpdate = false;
770
+ let newEmail;
749
771
  if (reqBody.oobCode) {
750
772
  const oob = state.validateOobCode(reqBody.oobCode);
751
773
  (0, errors_1.assert)(oob, "INVALID_OOB_CODE");
@@ -762,6 +784,19 @@ function setAccountInfoImpl(state, reqBody, { privileged = false, emulatorUrl =
762
784
  }
763
785
  break;
764
786
  }
787
+ case "VERIFY_AND_CHANGE_EMAIL":
788
+ state.deleteOobCode(reqBody.oobCode);
789
+ const maybeUser = state.getUserByEmail(oob.email);
790
+ (0, errors_1.assert)(maybeUser, "INVALID_OOB_CODE");
791
+ (0, errors_1.assert)(oob.newEmail, "INVALID_OOB_CODE");
792
+ (0, errors_1.assert)(!state.getUserByEmail(oob.newEmail), "EMAIL_EXISTS");
793
+ user = maybeUser;
794
+ if (oob.newEmail !== user.email) {
795
+ updates.email = oob.newEmail;
796
+ updates.emailVerified = true;
797
+ newEmail = oob.newEmail;
798
+ }
799
+ break;
765
800
  case "RECOVER_EMAIL": {
766
801
  state.deleteOobCode(reqBody.oobCode);
767
802
  const maybeUser = state.getUserByInitialEmail(oob.email);
@@ -791,7 +826,7 @@ function setAccountInfoImpl(state, reqBody, { privileged = false, emulatorUrl =
791
826
  }
792
827
  if (reqBody.email) {
793
828
  (0, errors_1.assert)((0, utils_1.isValidEmailAddress)(reqBody.email), "INVALID_EMAIL");
794
- const newEmail = (0, utils_1.canonicalizeEmailAddress)(reqBody.email);
829
+ newEmail = (0, utils_1.canonicalizeEmailAddress)(reqBody.email);
795
830
  if (newEmail !== user.email) {
796
831
  (0, errors_1.assert)(!state.getUserByEmail(newEmail), "EMAIL_EXISTS");
797
832
  updates.email = newEmail;
@@ -889,6 +924,7 @@ function setAccountInfoImpl(state, reqBody, { privileged = false, emulatorUrl =
889
924
  email: user.email,
890
925
  displayName: user.displayName,
891
926
  photoUrl: user.photoUrl,
927
+ newEmail,
892
928
  passwordHash: user.passwordHash,
893
929
  ...(updates.validSince && signInProvider ? issueTokens(state, user, signInProvider) : {}),
894
930
  });
@@ -902,7 +938,7 @@ function sendOobForEmailReset(state, initialEmail, url) {
902
938
  logOobMessage(oobRecord);
903
939
  }
904
940
  function createOobRecord(state, email, url, params) {
905
- const oobRecord = state.createOob(email, params.requestType, (oobCode) => {
941
+ const oobRecord = state.createOob(email, params.newEmail, params.requestType, (oobCode) => {
906
942
  url.pathname = "/emulator/action";
907
943
  url.searchParams.set("mode", params.mode);
908
944
  url.searchParams.set("lang", "en");
@@ -932,6 +968,9 @@ function logOobMessage(oobRecord) {
932
968
  case "VERIFY_EMAIL":
933
969
  maybeMessage = `To verify the email address ${email}, follow this link: ${oobLink}`;
934
970
  break;
971
+ case "VERIFY_AND_CHANGE_EMAIL":
972
+ maybeMessage = `To verify and change the email address from ${email} to ${oobRecord.newEmail}, follow this link: ${oobLink}`;
973
+ break;
935
974
  case "RECOVER_EMAIL":
936
975
  maybeMessage = `To reset your email address to ${email}, follow this link: ${oobLink}`;
937
976
  break;
@@ -294,11 +294,12 @@ class ProjectState {
294
294
  secondFactor: record.secondFactor,
295
295
  };
296
296
  }
297
- createOob(email, requestType, generateLink) {
297
+ createOob(email, newEmail, requestType, generateLink) {
298
298
  const oobCode = (0, utils_1.randomBase64UrlStr)(54);
299
299
  const oobLink = generateLink(oobCode);
300
300
  const oob = {
301
301
  email,
302
+ newEmail,
302
303
  requestType,
303
304
  oobCode,
304
305
  oobLink,
@@ -20,6 +20,7 @@ const fsutils = require("../fsutils");
20
20
  const Table = require("cli-table");
21
21
  const track_1 = require("../track");
22
22
  const env_1 = require("./env");
23
+ const webhook_1 = require("../dataconnect/webhook");
23
24
  exports.FLAG_ONLY = "--only <emulators>";
24
25
  exports.DESC_ONLY = "only specific emulators. " +
25
26
  "This is a comma separated list of emulator names. " +
@@ -292,13 +293,17 @@ async function emulatorExec(script, options) {
292
293
  extraEnv[constants_1.Constants.FIREBASE_GA_SESSION] = JSON.stringify(session);
293
294
  }
294
295
  let exitCode = 0;
295
- let deprecationNotices;
296
+ let deprecationNotices = [];
296
297
  try {
297
298
  const showUI = !!options.ui;
298
299
  ({ deprecationNotices } = await controller.startAll(options, showUI, true));
300
+ await (0, webhook_1.sendVSCodeMessage)({ message: webhook_1.VSCODE_MESSAGE.EMULATORS_STARTED });
299
301
  exitCode = await runScript(script, extraEnv);
300
302
  await controller.onExit(options);
301
303
  }
304
+ catch {
305
+ await (0, webhook_1.sendVSCodeMessage)({ message: webhook_1.VSCODE_MESSAGE.EMULATORS_START_ERRORED });
306
+ }
302
307
  finally {
303
308
  await controller.cleanShutdown();
304
309
  }
@@ -379,5 +384,5 @@ async function checkJavaMajorVersion() {
379
384
  }
380
385
  exports.checkJavaMajorVersion = checkJavaMajorVersion;
381
386
  exports.MIN_SUPPORTED_JAVA_MAJOR_VERSION = 11;
382
- exports.JAVA_DEPRECATION_WARNING = "firebase-tools no longer supports Java version before 11. " +
383
- "Please upgrade to Java version 11 or above to continue using the emulators.";
387
+ exports.JAVA_DEPRECATION_WARNING = "firebase-tools no longer supports Java versions before 11. " +
388
+ "Please install a JDK at version 11 or above to get a compatible runtime.";
@@ -8,6 +8,7 @@ exports.DEFAULT_PORTS = {
8
8
  hosting: 5000,
9
9
  functions: 5001,
10
10
  extensions: 5001,
11
+ apphosting: 5002,
11
12
  firestore: 8080,
12
13
  pubsub: 8085,
13
14
  database: 9000,
@@ -22,6 +23,7 @@ exports.FIND_AVAILBLE_PORT_BY_DEFAULT = {
22
23
  hub: true,
23
24
  logging: true,
24
25
  hosting: true,
26
+ apphosting: true,
25
27
  functions: false,
26
28
  firestore: false,
27
29
  database: false,
@@ -30,7 +32,7 @@ exports.FIND_AVAILBLE_PORT_BY_DEFAULT = {
30
32
  storage: false,
31
33
  extensions: false,
32
34
  eventarc: true,
33
- dataconnect: true,
35
+ dataconnect: false,
34
36
  tasks: true,
35
37
  };
36
38
  exports.EMULATOR_DESCRIPTION = {
@@ -38,6 +40,7 @@ exports.EMULATOR_DESCRIPTION = {
38
40
  hub: "emulator hub",
39
41
  logging: "Logging Emulator",
40
42
  hosting: "Hosting Emulator",
43
+ apphosting: "App Hosting Emulator",
41
44
  functions: "Functions Emulator",
42
45
  firestore: "Firestore Emulator",
43
46
  database: "Database Emulator",