No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

validate.js 862B

1234567891011121314151617
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.checkBilling = void 0;
  4. const cloudbilling_1 = require("../../gcp/cloudbilling");
  5. const checkProjectBilling_1 = require("../../extensions/checkProjectBilling");
  6. const error_1 = require("../../error");
  7. async function checkBilling(projectId, nonInteractive) {
  8. const enabled = await (0, cloudbilling_1.checkBillingEnabled)(projectId);
  9. if (!enabled && nonInteractive) {
  10. throw new error_1.FirebaseError(`Extensions require the Blaze plan, but project ${projectId} is not on the Blaze plan. ` +
  11. `Please visit https://console.cloud.google.com/billing/linkedaccount?project=${projectId} to upgrade your project.`);
  12. }
  13. else if (!enabled) {
  14. await (0, checkProjectBilling_1.enableBilling)(projectId);
  15. }
  16. }
  17. exports.checkBilling = checkBilling;