Skip to content

Commit

Permalink
delete map adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
Xziy committed Aug 7, 2023
1 parent d493494 commit b2aa050
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 131 deletions.
24 changes: 0 additions & 24 deletions adapters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,6 @@ import { Config } from "../interfaces/Config";
// import DiscountAdapter from "./discount/AbstractDiscountAdapter";
const WEBRESTO_MODULES_PATH = process.env.WEBRESTO_MODULES_PATH === undefined ? "@webresto" : process.env.WEBRESTO_MODULES_PATH;

/**
* retruns Map-adapter
*/
export class Map {
public static async getAdapter(adapterName: string): Promise<typeof MapAdapter> {

if(!adapterName) {
adapterName = await Settings.get("DEFAULT_MAP_ADAPTER") as string;
}

let adapterLocation = WEBRESTO_MODULES_PATH + "/" + adapterName.toLowerCase() + "-map-adapter";
adapterLocation = fs.existsSync(adapterLocation) ? adapterLocation : "@webresto/" + adapterName.toLowerCase() + "-map-adapter";
try {
const adapter: {
MapAdapter: { default: new (config) => MapAdapter };
} = require(adapterLocation);
return adapter.MapAdapter.default;
} catch (e) {
sails.log.error("CORE > getAdapter Map > error; ", e);
throw new Error("Module " + adapterLocation + " not found");
}
}
}

/**
* retruns Captcha-adapter
*/
Expand Down
11 changes: 0 additions & 11 deletions adapters/map/MapAdapter.d.ts

This file was deleted.

19 changes: 0 additions & 19 deletions adapters/map/MapAdapter.ts

This file was deleted.

8 changes: 0 additions & 8 deletions adapters/map/MapConfig.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions adapters/map/MapConfig.js

This file was deleted.

8 changes: 0 additions & 8 deletions adapters/map/MapConfig.ts

This file was deleted.

6 changes: 0 additions & 6 deletions adapters/map/Point.d.ts

This file was deleted.

13 changes: 0 additions & 13 deletions adapters/map/Point.ts

This file was deleted.

11 changes: 0 additions & 11 deletions adapters/map/Polygon.d.ts

This file was deleted.

29 changes: 0 additions & 29 deletions adapters/map/Polygon.ts

This file was deleted.

0 comments on commit b2aa050

Please sign in to comment.