@apounited/mac
v1.3.2
Published
Crawls and extracts data from the Mauve API.
Readme
@apounited/mac
Mauve API-Crawler (MAC)
Crawls and extracts data from the Mauve API
Commands
Crawl
The crawlers can be invoked via bunx, pnpx or npx with @apounited/mac.
Data is saved to
./storagerelative to the execution path.
Pin to specific version with
@apounited/[email protected].
Bun
bunx @apounited/mac@latest crawl customers --username demo --password 'demo'Node
npx -y @apounited/mac@latest crawl customers --username demo --password 'demo'Available crawl endpoints: categories, customers, documents, products.
You can use Query String Generator to generate query strings.
| Options | Short | Required | Values | Description |
| ---------------- | ----- | ---------- | ------------ | --------------------------------------------- |
| --username | -u | true | <string> | Mauve API username |
| --password | -p | true | <string> | Mauve API password |
| --query | -q | optional | <string> | A query to be appanded to the API request URL |
| --format | -f | optional | json csv | Export file format |
| --max-requests | -r | optional | <number> | Maximum number of crawl requests |
CI
Runs crawl command using Environment Variables instead of CLI arguments.
bunx @apounited/mac ci| Name | Required | Values | Description |
| -------------------------------- | ---------- | ----------------------------------------------- | --------------------------------------------- |
| MAUVE_API_CRAWLER_ENDPOINT | true | categories customers documents products | Mauve API crawl endpoint |
| MAUVE_API_CRAWLER_USERNAME | true | <string> | Mauve API username |
| MAUVE_API_CRAWLER_PASSWORD | true | <string> | Mauve API password |
| MAUVE_API_CRAWLER_QUERY | optional | <string> | A query to be appanded to the API request URL |
| MAUVE_API_CRAWLER_FORMAT | optional | json csv | Export file format |
| MAUVE_API_CRAWLER_MAX_REQUESTS | optional | <number> | Maximum number of crawl requests |
Clean
Deletes ./storage directory relative to the execution path.
bunx @apounited/mac cleanDevelopment
Run the main CLI entry point without building:
bun dev crawl customers --username demo --password 'demo'Production
Build dist files:
bun run build