How to use the infusion.set function in infusion

To help you get started, we’ve selected a few infusion examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GPII / universal / gpii / node_modules / ontologyHandler / src / ontologyHandler.js View on Github external
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
github GPII / universal / gpii / node_modules / testing / src / CloudBasedOAuth2TestsUtils.js View on Github external
}
    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;
};
github GPII / universal / tests / ErrorTests.js View on Github external
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;
};
github GPII / universal / tests / SolutionsRegistryTests.js View on Github external
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]);
    }
};
github GPII / universal / tests / ProductionConfigTests.js View on Github external
fluid.each(JSON.parse(data), function (aDoc) {
            fluid.set(request.options.docsToPurge, aDoc.id, [aDoc.rev]);
        });
        fluid.log(request.options.docsToPurge);
github GPII / universal / gpii / node_modules / testing / src / UntrustedFlowManager.js View on Github external
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;
};
github GPII / universal / gpii / node_modules / gpii-ini-file / index.js View on Github external
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, {});
        }
    }
};
github GPII / universal / gpii / node_modules / settingsHandlers / src / WebSocketsSettingsHandler.js View on Github external
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);
        });
    }

};
github GPII / universal / gpii / node_modules / flowManager / src / PSPChannel.js View on Github external
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);