Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLUID-6145: Update to latest version of dependencies #833

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
6 changes: 3 additions & 3 deletions gpii/node_modules/flowManager/src/PSPChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ gpii.pspChannel.generateDefaultSettingControls = function (defaultSettingsDataPr
// "settingControls" block.
fluid.each(defaultPreferences, function (defaultPrefsVal, defaultPrefsKey) {
var prefsInfo = gpii.pspChannel.getPreferenceInfo(schemas, defaultPrefsKey, defaultPrefsVal);
var schema = prefsInfo.schema;
var schema = fluid.copy(prefsInfo.schema);
if (schema) {
fluid.set(schema, ["default"], prefsInfo.prefsValue);
gpii.pspChannel.emitSettingControl(defaultSettingControls, schema, undefined, prefsInfo.prefsKeySegs, "live", prefsInfo.solutionName);
Expand Down Expand Up @@ -205,7 +205,7 @@ gpii.pspChannel.getPreferenceInfo = function (solutionSchemas, prefsKey, prefsVa
// When the inner pref key is a common term, use the schema of this common term.
// TODO: This if block should be removed at fixing https://issues.gpii.net/browse/GPII-4063
// when the support for "common terms scoped within applications" discontinues.
schema = fluid.get(solutionSchemas, [innerPrefsKey]);
schema = fluid.copy(fluid.get(solutionSchemas, [innerPrefsKey]));
delete schema.$schema;
presentedCommonTerm = innerPrefsKey;
} else {
Expand All @@ -224,7 +224,7 @@ gpii.pspChannel.getPreferenceInfo = function (solutionSchemas, prefsKey, prefsVa
});
} else {
// Handle common terms
var schema = fluid.get(solutionSchemas, [prefsKey]);
var schema = fluid.copy(fluid.get(solutionSchemas, [prefsKey]));
delete schema.$schema;
togo = {
schema: schema,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions gpii/node_modules/testing/src/Mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ gpii.test.integration.mockSettingsHandlerRegistry.populateOne = function (that,

gpii.test.integration.mockSettingsHandlerRegistry.depopulate = function (that) {
fluid.each(that.settingsHandlers, function (settingsHandler) {
if (fluid.isComponent(settingsHandler)) {
if (fluid.isComponent(settingsHandler) && !fluid.isDestroyed(settingsHandler)) {
// It may already be destroyed if it was one of the Journalling mocks created in place
settingsHandler.destroy();
}
});
Expand All @@ -375,7 +376,7 @@ gpii.test.integration.mockSettingsHandlerRegistry.depopulate = function (that) {

gpii.test.integration.mockSettingsHandlerRegistry.populate = function (that) {
fluid.each(that.options.settingsHandlers, function (options, key) {
var mock = options.noMock ?
var mock = options.noMock ? // TODO: Eliminate this sleazy scheme which creates free components and then bashes them into globals
fluid.getGlobalValue(key) : gpii.test.integration.mockSettingsHandler(options);
gpii.test.integration.mockSettingsHandlerRegistry.populateOne(that, mock, key);
});
Expand Down
6 changes: 4 additions & 2 deletions gpii/node_modules/userListeners/test/pcscTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ jqUnit.asyncTest("PC/SC listener - mock card", function () {
jqUnit.expect(gpii.tests.userListener.cardTests.length * 3 + 20);
var index = 0;

var listener = gpii.test.userListeners.pcsc();
var listener = gpii.test.userListeners.pcsc({
failDelay: 0
});
var reader;

var messageSuffix;
Expand Down Expand Up @@ -279,7 +281,7 @@ jqUnit.asyncTest("PC/SC listener - mock card", function () {
});

listener.monitorReader(reader);
listener.options.failDelay = 0;
// listener.options.failDelay = 0;

reader.removeCard();

Expand Down
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,50 @@
"bugs": "http://issues.gpii.net/browse/GPII",
"homepage": "http://gpii.net/",
"dependencies": {
"body-parser": "1.18.3",
"body-parser": "1.19.0",
"connect-ensure-login": "0.1.1",
"express": "4.16.4",
"express-handlebars": "3.0.0",
"express-session": "1.15.6",
"express": "4.17.1",
"express-handlebars": "3.1.0",
"express-session": "1.17.0",
"fluid-resolve": "1.3.0",
"glob": "7.1.3",
"glob": "7.1.6",
"@google-cloud/trace-agent": "3.4.0",
"gpii-couchdb-test-harness": "1.0.0-dev.20190627T080736Z.0e3a1fd.GPII-3531",
"gpii-json-schema": "2.1.2-dev.20190704T103720Z.3c177e5.GPII-4009",
"infusion": "3.0.0-dev.20190328T144119Z.ec44dbfab",
"ipaddr.js": "1.9.0",
"json5": "2.1.0",
"kettle": "1.10.1",
"gpii-couchdb-test-harness": "1.0.0-dev.20190827T101451Z.024d2c3.GPII-3531",
"gpii-json-schema": "2.1.2-dev.20191220T175037Z.5f4201b.GPII-4009-FLUID-6145",
"infusion": "3.0.0-dev.20191220T163226Z.db83ce0ef.FLUID-6145",
"ipaddr.js": "1.9.1",
"json5": "2.1.1",
"kettle": "1.12.0-dev.20191220T164344Z.f1fef17.FLUID-6145",
"mkdirp": "0.5.1",
"moment": "2.24.0",
"ndef": "0.2.0",
"nock": "10.0.4",
"nock": "11.7.0",
"node-jqunit": "1.1.8",
"node-uuid": "1.4.8",
"oauth2orize": "1.11.0",
"passport": "0.4.0",
"passport": "0.4.1",
"passport-local": "1.0.0",
"passport-oauth2-client-password": "0.1.2",
"request": "2.88.0",
"rimraf": "2.6.3",
"semver": "5.6.0",
"write-file-atomic": "2.4.2",
"rimraf": "3.0.0",
"semver": "7.1.1",
"write-file-atomic": "3.0.1",
"xml-mapping": "1.7.1",
"xregexp": "4.2.4"
},
"devDependencies": {
"browserify": "16.2.3",
"browserify": "16.5.0",
"gpii-express": "1.0.15",
"gpii-grunt-lint-all": "1.0.5",
"gpii-testem": "2.1.7",
"grunt": "1.0.3",
"grunt-markdownlint": "2.1.0",
"gpii-testem": "2.1.11",
"grunt": "1.0.4",
"grunt-markdownlint": "2.8.0",
"http-browserify": "1.7.0",
"https-browserify": "1.0.0",
"nyc": "13.1.0",
"recursive-copy": "2.0.9",
"supports-color": "5.5.0",
"testem": "2.10.0",
"recursive-copy": "2.0.10",
"supports-color": "7.1.0",
"testem": "3.0.2",
"url": "0.11.0"
},
"license": "BSD-3-Clause",
Expand Down
6 changes: 3 additions & 3 deletions tests/UntrustedPSPIntegrationTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,20 +190,20 @@ gpii.test.untrusted.pspIntegration.endSequence = [
];

gpii.test.untrusted.pspIntegration.verifyRawPrefsAtStart = function (that, preferences) {
that.options.initialPrefs = JSON.parse(preferences);
that.initialPrefs = JSON.parse(preferences);
jqUnit.assertValue("The initial preferences has been received", preferences);
};

gpii.test.untrusted.pspIntegration.verifyRawPrefsAtEnd = function (that, preferences, sequenceNum, expectedChange) {
fluid.log(that.options.name, ", number ", sequenceNum, " in the sequence");
var expectedPrefsChange = expectedChange ? expectedChange : gpii.test.untrusted.pspIntegration.expectedPrefsChange[sequenceNum];

var expected = fluid.extend(true, {}, that.options.initialPrefs, expectedPrefsChange);
var expected = fluid.extend(true, {}, that.initialPrefs, expectedPrefsChange);
jqUnit.assertDeepEq("The updated preferences have been saved to the cloud", expected, JSON.parse(preferences));
};

gpii.test.untrusted.pspIntegration.verifyRawPrefsAfterAutoSave = function (that, preferences) {
jqUnit.assertDeepEq("The preferences not in \"autosave\" metadata are not auto saved", that.options.initialPrefs, JSON.parse(preferences));
jqUnit.assertDeepEq("The preferences not in \"autosave\" metadata are not auto saved", that.initialPrefs, JSON.parse(preferences));
};

gpii.tests.pspIntegration.saveTestDefs = [
Expand Down
4 changes: 2 additions & 2 deletions tests/UntrustedUserLogonRequestTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ gpii.tests.untrusted.userLogonRequest.untrustedWithoutDbConnection = [{
"port": 8084,
"isError": true
},
"{lifecycleManager}.userErrors.options.trackedUserErrors",
"{lifecycleManager}.userErrors.trackedUserErrors",
{
"isError": true,
"messageKey": "NoConnection",
Expand Down Expand Up @@ -119,7 +119,7 @@ gpii.tests.untrusted.userLogonRequest.nonexistentKeyInTestDefs = [{
"isError": true,
"statusCode": 401
},
"{lifecycleManager}.userErrors.options.trackedUserErrors",
"{lifecycleManager}.userErrors.trackedUserErrors",
{
"isError": true,
"messageKey": "KeyInFail",
Expand Down
13 changes: 7 additions & 6 deletions tests/production/DeleteUserSettingsFromCouchTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ gpii.tests.productionConfigTesting.testGetThenSaveDocForDeletion = function (dat
var thisDoc = JSON.parse(data);
thisDoc._deleted = true;
// saved for the furthur use in getPrefsSafeDoc() for getting corresponding prefs safe of this GPII key
request.options.docToRemove = thisDoc;
request.docToRemove = thisDoc;
fluid.log("Will remove ", thisDoc.type, " ", thisDoc._id);
docsToRemove.push(thisDoc);
} else {
Expand All @@ -56,15 +56,16 @@ gpii.tests.productionConfigTesting.testGetThenSaveDocForDeletion = function (dat
};

gpii.tests.productionConfigTesting.getPrefsSafeDoc = function (prefsSafeRequest, gpiiKeyRequest) {
var gpiiKeyToRemove = gpiiKeyRequest.options.docToRemove;
var gpiiKeyToRemove = gpiiKeyRequest.docToRemove;
var path;
if (gpiiKeyToRemove && gpiiKeyToRemove.prefsSafeId) {
prefsSafeRequest.options.path = "/gpii/" + gpiiKeyToRemove.prefsSafeId;
path = "/gpii/" + gpiiKeyToRemove.prefsSafeId;
} else {
// This path should force a 404
prefsSafeRequest.options.path = "/gpii/prefsSafe-" + prefsSafeRequest.options.gpiiKey;
path = "/gpii/prefsSafe-" + prefsSafeRequest.options.gpiiKey;
fluid.log("No Prefs Safe to retrieve for GPII key " + prefsSafeRequest.options.gpiiKey);
}
prefsSafeRequest.sendToDatabase();
prefsSafeRequest.sendToDatabase(undefined, { path: path });
};

gpii.tests.productionConfigTesting.testGetExtraAccessTokens = function (data, accessTokensRequest, docsToRemove) {
Expand Down Expand Up @@ -264,7 +265,7 @@ gpii.tests.productionConfigTesting.deleteTestRecordsFromDatabaseTests = [{
gpiiKey: "nonexistent_gpii_key"
}
},
"getClientCredentialSchemaV01": {
getClientCredentialSchemaV01: {
type: "gpii.tests.productionConfigTesting.dataBaseRequest",
options: {
path: "/gpii/clientCredential-schemaV0.1"
Expand Down
15 changes: 9 additions & 6 deletions tests/production/ProductionTestsUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ fluid.defaults("gpii.tests.productionConfigTesting.dataBaseRequest", {
args: [
"{that}",
gpii.tests.productionConfigTesting.couchdbUrl.port,
"{arguments}.0" // payload (optional)
"{arguments}.0", // payload (optional)
"{arguments}.1" // directModel (optional)
]
}
}
Expand Down Expand Up @@ -74,7 +75,9 @@ fluid.defaults("gpii.tests.cloud.oauth2.accessTokensDeleteRequests", {
type: "gpii.tests.productionConfigTesting.dataBaseRequest",
options: {
path: "/gpii/_design/views/_view/findInfoByAccessToken",
tokensToRemove: [] // set by successful request.
members: {
tokensToRemove: [] // set by successful request.
}
}
},
bulkDeleteRequest: {
Expand All @@ -100,7 +103,7 @@ fluid.defaults("gpii.tests.productionConfigTesting.deleteAccessTokensSequence",
listener: "gpii.tests.productionConfigTesting.testGetAccessTokensForDeletion"
}, {
funcName: "gpii.tests.productionConfigTesting.bulkDelete",
args: ["{bulkDeleteRequest}", "{getAccessTokensRequest}.options.tokensToRemove"]
args: ["{bulkDeleteRequest}", "{getAccessTokensRequest}.tokensToRemove"]
}, {
event: "{bulkDeleteRequest}.events.onComplete",
listener: "gpii.tests.productionConfigTesting.afterAccessTokensDeletion"
Expand Down Expand Up @@ -161,7 +164,7 @@ gpii.tests.productionConfigTesting.testGetAccessTokensForDeletion = function (da
var aToken = aRow.value.authorization;
if (fluid.contains(gpii.test.cloudBased.oauth2.accessTokenCache, aToken.accessToken)) {
aToken._deleted = true;
accessTokensRequest.options.tokensToRemove.push(aToken);
accessTokensRequest.tokensToRemove.push(aToken);
fluid.log("Will remove ", aToken.type, " for ", aToken.gpiiKey);
}
});
Expand All @@ -182,6 +185,6 @@ gpii.tests.productionConfigTesting.afterAccessTokensDeletion = function (data, r
gpii.test.cloudBased.oauth2.clearAccessTokenCache();
};

gpii.tests.productionConfigTesting.sendToRemoteHost = function (request, remotePort, payload) {
request.send(payload, { port: remotePort });
gpii.tests.productionConfigTesting.sendToRemoteHost = function (request, remotePort, payload, directModel) {
request.send(payload, fluid.extend(true, { port: remotePort }, directModel));
};
6 changes: 3 additions & 3 deletions tests/shared/FlowManagerSettingsPutTestDefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ fluid.defaults("gpii.tests.cloud.oauth2.settingsPut.updateSnapsetSequence", {
null,
{
"headers": {
"Authorization": "{accessTokenUpdateSnapsetRequest}.options.stashedAuth"
"Authorization": "{accessTokenUpdateSnapsetRequest}.stashedAuth"
}
}
]
Expand All @@ -497,7 +497,7 @@ fluid.defaults("gpii.tests.cloud.oauth2.settingsPut.updateSnapsetSequence", {
gpii.tests.cloud.oauth2.settingsPut.updatedPrefsSet,
{
"headers": {
"Authorization": "{accessTokenUpdateSnapsetRequest}.options.stashedAuth"
"Authorization": "{accessTokenUpdateSnapsetRequest}.stashedAuth"
}
}
]
Expand Down Expand Up @@ -604,7 +604,7 @@ gpii.tests.cloud.oauth2.settingsPut.updateSnapset.testResponse = function (data,
gpii.tests.cloud.oauth2.settingsPut.updateSnapset.testAndStashAccessResponse = function (data, request) {
var token = gpii.test.cloudBased.oauth2.verifyResourceOwnerGpiiKeyAccessTokenInResponse(data, request);
var auth = "Bearer " + token.access_token;
request.options.stashedAuth = auth;
request.stashedAuth = auth;
};

gpii.tests.cloud.oauth2.settingsPut.updateSnapset.testLifecycleResponse = function (data, request) {
Expand Down
Loading