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.

prepare.js 879B

1234567891011121314151617181920212223
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const projectUtils_1 = require("../../projectUtils");
  4. const loadCJSON_1 = require("../../loadCJSON");
  5. const functions_1 = require("./functions");
  6. const functions_2 = require("./functions");
  7. async function default_1(context, options) {
  8. var _a;
  9. if (!context) {
  10. return;
  11. }
  12. const filePath = (_a = options.config.src.remoteconfig) === null || _a === void 0 ? void 0 : _a.template;
  13. if (!filePath) {
  14. return;
  15. }
  16. const template = (0, loadCJSON_1.loadCJSON)(filePath);
  17. const projectNumber = await (0, projectUtils_1.needProjectNumber)(options);
  18. template.etag = await (0, functions_1.getEtag)(projectNumber);
  19. (0, functions_2.validateInputRemoteConfigTemplate)(template);
  20. context.remoteconfigTemplate = template;
  21. return;
  22. }
  23. exports.default = default_1;