-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move hasCoordinates to Mediawiki singleton
- Loading branch information
1 parent
77a064a
commit 7c2bd3f
Showing
9 changed files
with
57 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ describe('Downloader class', () => { | |
downloader = new Downloader({ uaString: `${config.userAgent} ([email protected])`, speed: 1, reqTimeout: 1000 * 60, webp: true, optimisationCacheUrl: '' }) | ||
|
||
await MediaWiki.getMwMetaData(downloader) | ||
await MediaWiki.hasCoordinates(downloader) | ||
await MediaWiki.hasWikimediaDesktopRestApi() | ||
await MediaWiki.hasVisualEditorApi() | ||
await downloader.setBaseUrls() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,9 +23,9 @@ describe('mwApi', () => { | |
downloader = new Downloader({ uaString: `${config.userAgent} ([email protected])`, speed: 1, reqTimeout: 1000 * 60, webp: false, optimisationCacheUrl: '' }) | ||
|
||
await MediaWiki.getMwMetaData(downloader) | ||
await MediaWiki.hasCoordinates(downloader) | ||
await MediaWiki.hasWikimediaDesktopRestApi() | ||
await MediaWiki.hasVisualEditorApi() | ||
await downloader.checkCoordinatesAvailability() | ||
|
||
await MediaWiki.getNamespaces([], downloader) | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,9 +36,9 @@ export async function setupScrapeClasses({ mwUrl = 'https://en.wikipedia.org', f | |
const downloader = new Downloader({ uaString: `${config.userAgent} ([email protected])`, speed: 1, reqTimeout: 1000 * 60, webp: false, optimisationCacheUrl: '' }) | ||
|
||
await MediaWiki.getMwMetaData(downloader) | ||
await MediaWiki.hasCoordinates(downloader) | ||
await MediaWiki.hasWikimediaDesktopRestApi() | ||
await MediaWiki.hasVisualEditorApi() | ||
await downloader.checkCoordinatesAvailability() | ||
|
||
const dump = new Dump(format, {} as any, MediaWiki.metaData) | ||
|
||
|