Ei kuvausta
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.

release.js 767B

123456789101112131415161718
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const _ = require("lodash");
  4. const rulesDeploy_1 = require("../../rulesDeploy");
  5. const error_1 = require("../../error");
  6. async function default_1(context, options) {
  7. var _a;
  8. const rulesDeploy = _.get(context, "firestore.rulesDeploy");
  9. if (!context.firestoreRules || !rulesDeploy) {
  10. return;
  11. }
  12. const rulesFile = (_a = options.config.src.firestore) === null || _a === void 0 ? void 0 : _a.rules;
  13. if (!rulesFile) {
  14. throw new error_1.FirebaseError(`Invalid firestore config: ${JSON.stringify(options.config.src.firestore)}`);
  15. }
  16. await rulesDeploy.release(rulesFile, rulesDeploy_1.RulesetServiceType.CLOUD_FIRESTORE);
  17. }
  18. exports.default = default_1;