diff --git a/CHANGELOG.md b/CHANGELOG.md index 813b4b9..cd5ef3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # @nodecfdi/xml-resource-retriever ChangeLog +## 1.0.2 +- Resolve bad encoded for files xml (need utf-8) +- Updated sat-urls.txt and fixes xsl-retriever test (works :3) +- Update GitHub workflow only one worker for jest test (no access to same time to same files) +- Fixed tsconfig.json not any and strict mode on tests files + ## 1.0.1 - Update dependencies - Small fixes on async functions diff --git a/docs/classes/AbstractBaseRetriever.html b/docs/classes/AbstractBaseRetriever.html index 504aa7e..69370ed 100644 --- a/docs/classes/AbstractBaseRetriever.html +++ b/docs/classes/AbstractBaseRetriever.html @@ -1,21 +1,21 @@ -
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverClass AbstractBaseRetriever
Hierarchy
Implements
Index
Constructors
Properties
Methods
Constructors
Protected constructor
Retriever constructor
-Parameters
basePath: string
downloader: null | DownloaderInterface = null
Returns AbstractBaseRetriever
Properties
Private Readonly _base Path
Private _downloader
Private _history
Parameters
basePath: string
downloader: null | DownloaderInterface = null
Returns AbstractBaseRetriever
Properties
Private Readonly _base Path
Private _downloader
Private _history
This variable stores the list of retrieved resources to avoid infinite recursion
-Methods
Protected add To History
Parameters
source: string
localPath: string
Returns void
build Path
Methods
Protected add To History
Parameters
source: string
localPath: string
Returns void
build Path
Return the path where an url would be located
-Parameters
url: string
Returns string
Protected Abstract check Is Valid Downloaded File
Parameters
source: string
localPath: string
Returns Promise<void>
Protected clear History
Returns void
download
Parameters
url: string
Returns string
Protected Abstract check Is Valid Downloaded File
Parameters
source: string
localPath: string
Returns Promise<void>
Protected clear History
Returns void
download
Download an url without its related resources Return the path where the resource is located (as in buildPath)
-Parameters
url: string
Returns Promise<string>
get Base Path
Parameters
url: string
Returns Promise<string>
get Base Path
Must return the base path where the elements will be downloaded
-Returns string
get Downloader
Returns DownloaderInterface
Abstract retrieve
Returns string
get Downloader
Returns DownloaderInterface
Abstract retrieve
Retrieve an url and all its related resources Return the path where the resource is located (as in buildPath)
-Parameters
url: string
Returns Promise<string>
retrieve History
Parameters
url: string
Returns Promise<string>
retrieve History
Returns the history of the last retrieve operation The return is un record of key value pairs where the key is the url retrieved and the value is the path
-Returns Record<string, string>
set Downloader
Parameters
downloader: DownloaderInterface
Returns void
Protected url Parts
Returns Record<string, string>
set Downloader
Parameters
downloader: DownloaderInterface
Returns void
Protected url Parts
Retrieve url parts If url is malformed return false
Parameters
url: string
Returns undefined | Record<string, string>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverClass AbstractXmlRetriever
Hierarchy
Implements
Index
Constructors
Methods
Constructors
constructor
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverClass AbstractXmlRetriever
Hierarchy
Implements
Index
Constructors
Methods
Constructors
constructor
Retriever constructor
-Parameters
basePath: string
downloader: null | DownloaderInterface = null
Returns AbstractXmlRetriever
Methods
Protected add To History
Parameters
source: string
localPath: string
Returns void
build Path
Parameters
basePath: string
downloader: null | DownloaderInterface = null
Returns AbstractXmlRetriever
Methods
Protected add To History
Parameters
source: string
localPath: string
Returns void
build Path
Return the path where an url would be located
-Parameters
url: string
Returns string
Protected check Is Valid Downloaded File
Parameters
url: string
Returns string
Protected check Is Valid Downloaded File
This method checks if the recently downloaded file from source located at path is a valid resource, if not will remove the file and throw an exception
-Parameters
source: string
localPath: string
Returns Promise<void>
Protected clear History
Returns void
Private do Retrieve
Parameters
resource: string
Returns Promise<string>
download
Parameters
source: string
localPath: string
Returns Promise<void>
Protected clear History
Returns void
Private do Retrieve
Parameters
resource: string
Returns Promise<string>
download
Download an url without its related resources Return the path where the resource is located (as in buildPath)
-Parameters
url: string
Returns Promise<string>
get Base Path
Parameters
url: string
Returns Promise<string>
get Base Path
Must return the base path where the elements will be downloaded
-Returns string
get Downloader
Returns DownloaderInterface
Private recursive Retrieve
Parameters
document: Document
tagName: string
attributeName: string
currentUrl: string
currentFile: string
Returns Promise<boolean>
Private relative To Absolute Url
Parameters
url: string
currentUrl: string
Returns string
retrieve
Returns string
get Downloader
Returns DownloaderInterface
Private recursive Retrieve
Parameters
document: Document
tagName: string
attributeName: string
currentUrl: string
currentFile: string
Returns Promise<boolean>
Private relative To Absolute Url
Parameters
url: string
currentUrl: string
Returns string
retrieve
Retrieve an url and all its related resources Return the path where the resource is located (as in buildPath)
-Parameters
url: string
Returns Promise<string>
retrieve History
Parameters
url: string
Returns Promise<string>
retrieve History
Returns the history of the last retrieve operation The return is un record of key value pairs where the key is the url retrieved and the value is the path
-Returns Record<string, string>
Protected Abstract search Elements
Returns Record<string, string>
Protected Abstract search Elements
Must return a table with rows (array of records) every row must contain the keys element and attribute "element" is the tag name to search for "attribute" is the attribute name that contains the url
-Returns Record<string, string>[]
Protected Abstract search Namespace
Returns Record<string, string>[]
Protected Abstract search Namespace
Must return a string with the namespace to search for
-Returns string
set Downloader
Parameters
downloader: DownloaderInterface
Returns void
Protected url Parts
Returns string
set Downloader
Parameters
downloader: DownloaderInterface
Returns void
Protected url Parts
Retrieve url parts If url is malformed return false
Parameters
url: string
Returns undefined | Record<string, string>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverClass NodeDownloader
Hierarchy
Implements
Index
Constructors
Methods
Constructors
constructor
Returns NodeDownloader
Methods
Protected adapter For
Parameters
inputUrl: string
Returns __module | __module
download To
Parameters
source: string
destination: string
Returns Promise<void>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverClass NodeDownloader
Hierarchy
Implements
Index
Constructors
Methods
Constructors
constructor
Returns NodeDownloader
Methods
Protected adapter For
Parameters
inputUrl: string
Returns __module | __module
download To
Parameters
source: string
destination: string
Returns Promise<void>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverClass Utils
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Utils
Methods
Static relative Path
Parameters
sourceFile: string
destinationFile: string
Returns string
Static simplify Path
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverClass Utils
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Returns Utils
Methods
Static relative Path
Parameters
sourceFile: string
destinationFile: string
Returns string
Static simplify Path
Simplify a path and return it parts is an array
Parameters
path: string
Returns string[]
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverClass XsdRetriever
Hierarchy
Index
Constructors
Methods
Constructors
constructor
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverClass XsdRetriever
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Retriever constructor
-Parameters
basePath: string
downloader: null | DownloaderInterface = null
Returns XsdRetriever
Methods
Protected add To History
Parameters
source: string
localPath: string
Returns void
build Path
Parameters
basePath: string
downloader: null | DownloaderInterface = null
Returns XsdRetriever
Methods
Protected add To History
Parameters
source: string
localPath: string
Returns void
build Path
Return the path where an url would be located
-Parameters
url: string
Returns string
Protected check Is Valid Downloaded File
Parameters
url: string
Returns string
Protected check Is Valid Downloaded File
This method checks if the recently downloaded file from source located at path is a valid resource, if not will remove the file and throw an exception
-Parameters
source: string
localPath: string
Returns Promise<void>
Protected clear History
Returns void
download
Parameters
source: string
localPath: string
Returns Promise<void>
Protected clear History
Returns void
download
Download an url without its related resources Return the path where the resource is located (as in buildPath)
-Parameters
url: string
Returns Promise<string>
get Base Path
Parameters
url: string
Returns Promise<string>
get Base Path
Must return the base path where the elements will be downloaded
-Returns string
get Downloader
Returns DownloaderInterface
retrieve
Returns string
get Downloader
Returns DownloaderInterface
retrieve
Retrieve an url and all its related resources Return the path where the resource is located (as in buildPath)
-Parameters
url: string
Returns Promise<string>
retrieve History
Parameters
url: string
Returns Promise<string>
retrieve History
Returns the history of the last retrieve operation The return is un record of key value pairs where the key is the url retrieved and the value is the path
-Returns Record<string, string>
Protected search Elements
Returns Record<string, string>
Protected search Elements
Must return a table with rows (array of records) every row must contain the keys element and attribute "element" is the tag name to search for "attribute" is the attribute name that contains the url
-Returns Record<string, string>[]
Protected search Namespace
Returns Record<string, string>[]
Protected search Namespace
Must return a string with the namespace to search for
-Returns string
set Downloader
Parameters
downloader: DownloaderInterface
Returns void
Protected url Parts
Returns string
set Downloader
Parameters
downloader: DownloaderInterface
Returns void
Protected url Parts
Retrieve url parts If url is malformed return false
Parameters
url: string
Returns undefined | Record<string, string>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverClass XsltRetriever
Hierarchy
Index
Constructors
Methods
Constructors
constructor
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverClass XsltRetriever
Hierarchy
Index
Constructors
Methods
Constructors
constructor
Retriever constructor
-Parameters
basePath: string
downloader: null | DownloaderInterface = null
Returns XsltRetriever
Methods
Protected add To History
Parameters
source: string
localPath: string
Returns void
build Path
Parameters
basePath: string
downloader: null | DownloaderInterface = null
Returns XsltRetriever
Methods
Protected add To History
Parameters
source: string
localPath: string
Returns void
build Path
Return the path where an url would be located
-Parameters
url: string
Returns string
Protected check Is Valid Downloaded File
Parameters
url: string
Returns string
Protected check Is Valid Downloaded File
This method checks if the recently downloaded file from source located at path is a valid resource, if not will remove the file and throw an exception
-Parameters
source: string
localPath: string
Returns Promise<void>
Protected clear History
Returns void
download
Parameters
source: string
localPath: string
Returns Promise<void>
Protected clear History
Returns void
download
Download an url without its related resources Return the path where the resource is located (as in buildPath)
-Parameters
url: string
Returns Promise<string>
get Base Path
Parameters
url: string
Returns Promise<string>
get Base Path
Must return the base path where the elements will be downloaded
-Returns string
get Downloader
Returns DownloaderInterface
retrieve
Returns string
get Downloader
Returns DownloaderInterface
retrieve
Retrieve an url and all its related resources Return the path where the resource is located (as in buildPath)
-Parameters
url: string
Returns Promise<string>
retrieve History
Parameters
url: string
Returns Promise<string>
retrieve History
Returns the history of the last retrieve operation The return is un record of key value pairs where the key is the url retrieved and the value is the path
-Returns Record<string, string>
Protected search Elements
Returns Record<string, string>
Protected search Elements
Must return a table with rows (array of records) every row must contain the keys element and attribute "element" is the tag name to search for "attribute" is the attribute name that contains the url
-Returns Record<string, string>[]
Protected search Namespace
Returns Record<string, string>[]
Protected search Namespace
Must return a string with the namespace to search for
-Returns string
set Downloader
Parameters
downloader: DownloaderInterface
Returns void
Protected url Parts
Returns string
set Downloader
Parameters
downloader: DownloaderInterface
Returns void
Protected url Parts
Retrieve url parts If url is malformed return false
Parameters
url: string
Returns undefined | Record<string, string>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverInterface DownloaderInterface
Hierarchy
Implemented by
Index
Methods
Methods
download To
Parameters
source: string
destination: string
Returns Promise<void>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverInterface DownloaderInterface
Hierarchy
Implemented by
Index
Methods
Methods
download To
Parameters
source: string
destination: string
Returns Promise<void>
Generated using TypeDoc
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverInterface RetrieverInterface
Hierarchy
Implemented by
Index
Methods
Methods
build Path
- Preparing search index...
- The search index is not available
@nodecfdi/xml-resource-retrieverInterface RetrieverInterface
Hierarchy
Implemented by
Index
Methods
Methods
build Path
Return the path where an url would be located
Parameters
url: string
Returns string
download
Returns string
download
Download an url without its related resources Return the path where the resource is located (as in buildPath)
Parameters
url: string
Returns Promise<string>
get Base Path
Returns Promise<string>
get Base Path
Must return the base path where the elements will be downloaded
-Returns string
retrieve
Returns string
retrieve
Retrieve an url and all its related resources Return the path where the resource is located (as in buildPath)
Parameters
url: string
Returns Promise<string>
retrieve History
Returns Promise<string>
retrieve History
Returns the history of the last retrieve operation The return is un record of key value pairs where the key is the url retrieved and the value is the path
Returns Record<string, string>
Generated using TypeDoc