Skip to content
This repository was archived by the owner on Feb 28, 2022. It is now read-only.

Commit c4fed2f

Browse files
committed
fix(dependencies): remove angular-base64 and ngstorage from osmAPI
the goal is to remove all most all dependencies if you want to read data from osm. Now if you want to write data, you have to call osmAPI.setAuthBackend(YOUR_BACKEND). The base64 backend has been moved to a osmBase64 module. BREAKING CHANGE: this break all apps, to check examples changes in this commit ecc0aed - osmAPI.setOauth(osmAuthService); + osmAPI.setAuthAdapter(osmAuthService);
1 parent e65fbd7 commit c4fed2f

19 files changed

+501
-477
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ Here is the dependencies table of angular-osm builds:
7878

7979
| dist | dependencies to install |
8080
|---------------|--------------------------------------------------|
81-
| osm-api | npm install --save angular-base64 x2js ngstorage |
81+
| osm-api | npm install --save x2js |
82+
| osm-base64 | npm install --save angular-base64 x2js |
83+
| osm-oauth | npm install --save osm-auth x2js |
8284
| osm-nominatim | |
83-
| osm-oauth | npm install --save osm-auth |
8485
| osm-overpass | npm install --save ngstorage |
8586
| osm-taginfo | |
8687
| osm-togeojson | |

karma/conf.js

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module.exports = {
22
basePath : '',
33
files : [
44
{pattern: '../node_modules/angular/angular.js', watched: true, included: true, nocache: true},
5-
{pattern: '../node_modules/ngstorage/ngStorage.min.js', watched: true, included: true, nocache: true},
65
{pattern: '../node_modules/angular-base64/angular-base64.min.js', watched: true, included: true, nocache: true},
76
{pattern: '../node_modules/x2js/x2js.js', watched: true, included: true, nocache: true},
87
{pattern: '../node_modules/angular-mocks/angular-mocks.js', watched: false, included: true, served: true},

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"dependencies": {
4040
"angular": "1.5.5",
4141
"angular-base64": "^2.0.5",
42-
"ngstorage": "0.3.10",
4342
"osm-auth": "0.2.8",
4443
"x2js": "^2.0.1"
4544
}

src/api/api.js

+4-11
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
1-
import base64 from 'angular-base64';
21
import osmAPI from './api.service';
3-
import osmSettingsModule from '../settings/settings';
42
import osmx2jsModule from '../x2js/x2js';
53

6-
//The base64 module is only available as IIFE
7-
84
var osmAPIModule = angular.module('osm.api', [
9-
osmSettingsModule.name,
10-
osmx2jsModule.name,
11-
'base64'
5+
osmx2jsModule.name
126
])
13-
.service('osmAPI', osmAPI)
147
.provider('osmAPI', function osmAPIProvider () {
158
this.options = {
169
url: 'http://api.openstreetmap.org/api'
1710
};
18-
this.$get = function osmAPIFactory($base64, $http, $q, osmSettingsService, osmx2js) {
19-
return new osmAPI($base64, $http, $q, osmSettingsService, osmx2js, this.options);
11+
this.$get = function osmAPIFactory($http, $q, osmx2js) {
12+
return new osmAPI($http, $q, osmx2js, this.options);
2013
};
21-
this.$get.$inject = ['$base64', '$http', '$q', 'osmSettingsService', 'osmx2js'];
14+
this.$get.$inject = ['$http', '$q', 'osmx2js'];
2215
});
2316

2417
export default osmAPIModule;

0 commit comments

Comments
 (0)