Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return;
}
if (fluid.model.transform.hasWildcard(preference)) {
// explode wildcard preference to paths, and set all of these in toTransform
var paths = fluid.model.transform.collectInputPaths(transformSpec);
var prefix = preference.substring(0, preference.indexOf("*"));
for (var i in paths) {
var path = paths[i];
// each matching path should be added to toTransform for trannsform
if (path.indexOf(prefix) === 0) {
fluid.set(toTransform, path, true, fluid.model.escapedSetConfig);
}
}
return;
}
fluid.set(toTransform, preference, true, fluid.model.escapedSetConfig);
});
// transform to new ontology and collect all paths with 'true' value - these equal
}
if (disruption.expected) {
testDef.expected = disruption.expected;
}
if (disruption.name) {
testDef.name += " - " + disruption.name;
}
testDef.gradeNames = testDef.gradeNames.concat(fluid.makeArray(options.testCaseGradeNames));
testDef.sequence = gpii.test.elementsBetween(fluid.getGlobalValue(options.sequenceName));
testDef.expectedStatusCode = disruption.expectedStatusCode || options.expectedStatusCode;
testDef = gpii.test.pouch.addPouchFixturesToTestDef(testDef);
fluid.log("oauth2.buildDisruptedFixture issuing sequence" + JSON.stringify(testDef.sequence, null, 2));
var changes = fluid.makeArray(options.changes).concat(fluid.makeArray(disruption.changes));
fluid.set(testDef, [options.recordName, "changes"], changes);
return testDef;
};
gpii.tests.errors.preferencesFilter = function (payload, testCaseHolder) {
fluid.set(payload, ["contexts", "gpii-default", "preferences",
"http://registry.gpii.net/applications/net.gpii.explode", "explodeMethod"], testCaseHolder.options.explodeMethod);
return payload;
};
gpii.tests.universal.solutionsRegistry.indexSingleSolution = function (indexObject, pathToSetting, settingDef) {
var existingEntry = fluid.get(indexObject, pathToSetting);
if (existingEntry) {
existingEntry.push(settingDef);
}
else {
fluid.set(indexObject, pathToSetting, [settingDef]);
}
};
fluid.each(JSON.parse(data), function (aDoc) {
fluid.set(request.options.docsToPurge, aDoc.id, [aDoc.rev]);
});
fluid.log(request.options.docsToPurge);
var untrustedFlowManagerConfig = fluid.copy(fluid.defaults(kettle.config.createDefaults({
configName: untrustedFlowManagerConfigName,
configPath: untrustedFlowManagerConfigPath
})));
var cloudBasedFlowManagerConfig = fluid.copy(fluid.defaults(kettle.config.createDefaults({
configName: cloudBasedFlowManagerConfigName,
configPath: cloudBasedFlowManagerConfigPath
})));
delete untrustedFlowManagerConfig.gradeNames;
delete cloudBasedFlowManagerConfig.gradeNames;
var config = fluid.copy(gpii.test.untrustedFlowManager.combinedConfig.template);
fluid.set(config, "options.components.server.options.components.localConfig.options",
untrustedFlowManagerConfig);
fluid.set(config, "options.components.server.options.components.cloudBasedConfig.options",
cloudBasedFlowManagerConfig);
return config;
};
gpii.iniFile.read.sectionBegin = function (state, sectionPath) {
var existing = sectionPath.length && fluid.get(state.result, sectionPath);
if (existing) {
if (fluid.isPlainObject(existing)) {
fluid.log("iniFile - Warning: Merging sections with duplicate name: ",
sectionPath.join("."));
} else {
fluid.log("iniFile - Warning: Overwriting key=value with section of the same name: ",
sectionPath.join("."));
fluid.set(state.result, sectionPath, {});
}
}
};
gpii.settingsHandlers.webSockets.addClient = function (that, solutionId, client) {
var initialSettings = fluid.get(that.model.settings, [solutionId]);
var currentValue = fluid.get(that.clients, [solutionId, client.id]);
if (!currentValue) {
fluid.set(that.clients, [solutionId, client.id], client);
client.sendTypedMessage("connectionSucceeded", initialSettings);
client.events.onDestroy.addListener(function () {
that.removeClient(client);
});
}
};
fluid.each(defaultPreferences, function (defaultPrefsVal, defaultPrefsKey) {
var prefsInfo = gpii.pspChannel.getPreferenceInfo(schemas, defaultPrefsKey, defaultPrefsVal);
var schema = prefsInfo.schema;
if (schema) {
fluid.set(schema, ["default"], prefsInfo.prefsValue);
gpii.pspChannel.emitSettingControl(defaultSettingControls, schema, undefined, prefsInfo.prefsKeySegs, "live");
}
});
promiseTogo.resolve(defaultSettingControls);