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.
23 lines
879 B
23 lines
879 B
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const projectUtils_1 = require("../../projectUtils");
|
|
const loadCJSON_1 = require("../../loadCJSON");
|
|
const functions_1 = require("./functions");
|
|
const functions_2 = require("./functions");
|
|
async function default_1(context, options) {
|
|
var _a;
|
|
if (!context) {
|
|
return;
|
|
}
|
|
const filePath = (_a = options.config.src.remoteconfig) === null || _a === void 0 ? void 0 : _a.template;
|
|
if (!filePath) {
|
|
return;
|
|
}
|
|
const template = (0, loadCJSON_1.loadCJSON)(filePath);
|
|
const projectNumber = await (0, projectUtils_1.needProjectNumber)(options);
|
|
template.etag = await (0, functions_1.getEtag)(projectNumber);
|
|
(0, functions_2.validateInputRemoteConfigTemplate)(template);
|
|
context.remoteconfigTemplate = template;
|
|
return;
|
|
}
|
|
exports.default = default_1;
|