diff --git a/lib/Adaptor.js b/lib/Adaptor.js index 7cf3935..5e8fcdf 100644 --- a/lib/Adaptor.js +++ b/lib/Adaptor.js @@ -138,11 +138,9 @@ function configMigrationHelper(state) { apiUrl = _state$configuration.apiUrl; if (!hostUrl) { - return _objectSpread({}, state, { - configuration: _objectSpread({}, state.configruation, { - hostUrl: apiUrl - }) - }); + console.log('DEPRECATION WARNING: Please migrate instance address from `apiUrl` to `hostUrl`.'); + state.configuration.hostUrl = apiUrl; + return state; } return state; diff --git a/package.json b/package.json index 9a0d355..55541fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "language-dhis2", - "version": "1.1.1", + "version": "1.1.2", "description": "DHIS2 Language Pack for OpenFn", "main": "lib/index.js", "scripts": { diff --git a/src/Adaptor.js b/src/Adaptor.js index 88c8c92..d906980 100644 --- a/src/Adaptor.js +++ b/src/Adaptor.js @@ -43,10 +43,9 @@ export function execute(...operations) { function configMigrationHelper(state) { const { hostUrl, apiUrl } = state.configuration; if (!hostUrl) { - return { - ...state, - configuration: { ...state.configruation, hostUrl: apiUrl }, - }; + console.log('DEPRECATION WARNING: Please migrate instance address from `apiUrl` to `hostUrl`.') + state.configuration.hostUrl = apiUrl; + return state; } return state; }