Нема описа
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.

123456789101112131415161718192021222324
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.generateServiceIdentity = void 0;
  4. const colorette_1 = require("colorette");
  5. const api_1 = require("../api");
  6. const apiv2_1 = require("../apiv2");
  7. const error_1 = require("../error");
  8. const utils = require("../utils");
  9. const apiClient = new apiv2_1.Client({
  10. urlPrefix: api_1.serviceUsageOrigin,
  11. apiVersion: "v1beta1",
  12. });
  13. async function generateServiceIdentity(projectNumber, service, prefix) {
  14. utils.logLabeledBullet(prefix, `generating the service identity for ${(0, colorette_1.bold)(service)}...`);
  15. try {
  16. return await apiClient.post(`projects/${projectNumber}/services/${service}:generateServiceIdentity`);
  17. }
  18. catch (err) {
  19. throw new error_1.FirebaseError(`Error generating the service identity for ${service}.`, {
  20. original: err,
  21. });
  22. }
  23. }
  24. exports.generateServiceIdentity = generateServiceIdentity;