1 |
|
2 | import { Readable, ReadableOptions, TransformOptions } from 'stream';
|
3 | import { SitemapItem, ErrorLevel, SitemapItemLoose, ErrorHandler } from './types';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export declare function validateSMIOptions(conf: SitemapItem, level?: ErrorLevel, errorHandler?: ErrorHandler): SitemapItem;
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export declare function mergeStreams(streams: Readable[], options?: TransformOptions): Readable;
|
16 | export interface ReadlineStreamOptions extends ReadableOptions {
|
17 | input: Readable;
|
18 | }
|
19 |
|
20 |
|
21 |
|
22 | export declare class ReadlineStream extends Readable {
|
23 | private _source;
|
24 | constructor(options: ReadlineStreamOptions);
|
25 | _read(size: number): void;
|
26 | }
|
27 | /**
|
28 | * Takes a stream likely from fs.createReadStream('./path') and returns a stream
|
29 | * of sitemap items
|
30 | * @param stream a stream of line separated urls.
|
31 | * @param opts.isJSON is the stream line separated JSON. leave undefined to guess
|
32 | */
|
33 | export declare function lineSeparatedURLsToSitemapOptions(stream: Readable, { isJSON }?: {
|
34 | isJSON?: boolean;
|
35 | }): Readable;
|
36 | /**
|
37 | * Based on lodash's implementation of chunk.
|
38 | *
|
39 | * Copyright JS Foundation and other contributors <https://js.foundation/>
|
40 | *
|
41 | * Based on Underscore.js, copyright Jeremy Ashkenas,
|
42 | * DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
43 | *
|
44 | * This software consists of voluntary contributions made by many
|
45 | * individuals. For exact contribution history, see the revision history
|
46 | * available at https://github.com/lodash/lodash
|
47 | */
|
48 | export declare function chunk(array: any[], size?: number): any[];
|
49 | /**
|
50 | * Converts the passed in sitemap entry into one capable of being consumed by SitemapItem
|
51 | * @param {string | SitemapItemLoose} elem the string or object to be converted
|
52 | * @param {string} hostname
|
53 | * @returns SitemapItemOptions a strict sitemap item option
|
54 | */
|
55 | export declare function normalizeURL(elem: string | SitemapItemLoose, hostname?: string, lastmodDateOnly?: boolean): SitemapItem;
|