@opencraw/core 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access/access-broker.use-case.d.ts +43 -0
- package/dist/access/access-config.error.d.ts +5 -0
- package/dist/access/access-config.repository.d.ts +11 -0
- package/dist/access/access-json-schema.mapper.d.ts +8 -0
- package/dist/access/access-plugin.contract.d.ts +48 -0
- package/dist/access/access-preset.store.d.ts +19 -0
- package/dist/access/access-profile.contract.d.ts +95 -0
- package/dist/access/index.d.ts +11 -0
- package/dist/access/render-access.mapper.d.ts +41 -0
- package/dist/access/session-id.algorithm.d.ts +8 -0
- package/dist/api-steps/extract-from-document.use-case.d.ts +41 -0
- package/dist/api-steps/index.d.ts +4 -0
- package/dist/api-steps/run-api-step.use-case.d.ts +20 -0
- package/dist/api-steps/send-request.use-case.d.ts +23 -0
- package/dist/browser-session/browser-profile.store.d.ts +52 -0
- package/dist/browser-session/browser-session.config.d.ts +21 -0
- package/dist/browser-session/browser.client.d.ts +75 -0
- package/dist/browser-session/index.d.ts +6 -0
- package/dist/captcha/captcha-budget.model.d.ts +21 -0
- package/dist/captcha/captcha-detection.client.d.ts +28 -0
- package/dist/captcha/captcha-guard.use-case.d.ts +64 -0
- package/dist/captcha/captcha-solver-registry.store.d.ts +19 -0
- package/dist/captcha/captcha-solver.contract.d.ts +47 -0
- package/dist/captcha/captcha.error.d.ts +13 -0
- package/dist/captcha/index.d.ts +10 -0
- package/dist/captcha/resolve-captcha.use-case.d.ts +40 -0
- package/dist/crawl-events/crawl-event.contract.d.ts +169 -0
- package/dist/crawl-events/event-bus.store.d.ts +10 -0
- package/dist/crawl-events/index.d.ts +4 -0
- package/dist/crawl-events/trace-line.mapper.d.ts +14 -0
- package/dist/crawl-execution/bootstrap-session.use-case.d.ts +79 -0
- package/dist/crawl-execution/crawl-options.config.d.ts +67 -0
- package/dist/crawl-execution/crawl-report.model.d.ts +33 -0
- package/dist/crawl-execution/create-crawler.use-case.d.ts +20 -0
- package/dist/crawl-execution/index.d.ts +8 -0
- package/dist/crawl-execution/rotating-runner.use-case.d.ts +66 -0
- package/dist/crawl-execution/run-crawl.use-case.d.ts +17 -0
- package/dist/crawl-execution/run-input-recipe.use-case.d.ts +51 -0
- package/dist/deck-document/deck-document.model.d.ts +58 -0
- package/dist/deck-document/deck-table.algorithm.d.ts +35 -0
- package/dist/deck-document/index.d.ts +6 -0
- package/dist/deck-document/read-pptx.client.d.ts +16 -0
- package/dist/docx-document/index.d.ts +2 -0
- package/dist/docx-document/read-docx-html.client.d.ts +23 -0
- package/dist/extraction-scope/extraction-scope.model.d.ts +77 -0
- package/dist/extraction-scope/index.d.ts +5 -0
- package/dist/extraction-scope/live-element.model.d.ts +28 -0
- package/dist/hooks/hook-registry.store.d.ts +16 -0
- package/dist/hooks/hook.contract.d.ts +17 -0
- package/dist/hooks/hook.error.d.ts +7 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/http-session/http-response.contract.d.ts +58 -0
- package/dist/http-session/http.client.d.ts +42 -0
- package/dist/http-session/index.d.ts +5 -0
- package/dist/http-session/text-decoding.algorithm.d.ts +35 -0
- package/dist/index.esm.js +649 -25
- package/dist/markdown-document/index.d.ts +3 -0
- package/dist/markdown-document/read-markdown.client.d.ts +39 -0
- package/dist/output-mapping/coerce-field.mapper.d.ts +19 -0
- package/dist/output-mapping/generated-field.mapper.d.ts +16 -0
- package/dist/output-mapping/index.d.ts +9 -0
- package/dist/output-mapping/map-record.use-case.d.ts +27 -0
- package/dist/output-mapping/mapping.error.d.ts +17 -0
- package/dist/output-mapping/missing-value.policy.d.ts +14 -0
- package/dist/output-mapping/output-field.validator.d.ts +10 -0
- package/dist/output-mapping/output-record.model.d.ts +20 -0
- package/dist/pdf-document/index.d.ts +7 -0
- package/dist/pdf-document/pdf-document.model.d.ts +51 -0
- package/dist/pdf-document/pdf-table.algorithm.d.ts +43 -0
- package/dist/pdf-document/read-pdf.client.d.ts +18 -0
- package/dist/pdf-document/row-assembly.algorithm.d.ts +26 -0
- package/dist/recipe-loading/index.d.ts +9 -0
- package/dist/recipe-loading/load-recipe-set.use-case.d.ts +45 -0
- package/dist/recipe-loading/read-recipe-source.use-case.d.ts +14 -0
- package/dist/recipe-loading/recipe-binding.error.d.ts +14 -0
- package/dist/recipe-loading/recipe-binding.validator.d.ts +34 -0
- package/dist/recipe-loading/recipe-file.repository.d.ts +11 -0
- package/dist/recipe-loading/recipe-set.model.d.ts +12 -0
- package/dist/recipe-loading/recipe-source.contract.d.ts +28 -0
- package/dist/recipe-loading/recipe-text.mapper.d.ts +14 -0
- package/dist/recipe-schema/index.d.ts +15 -0
- package/dist/recipe-schema/input-recipe.contract.d.ts +156 -0
- package/dist/recipe-schema/json-schema.mapper.d.ts +15 -0
- package/dist/recipe-schema/output-recipe.contract.d.ts +47 -0
- package/dist/recipe-schema/recipe-kind.enum.d.ts +35 -0
- package/dist/recipe-schema/recipe-validation.error.d.ts +17 -0
- package/dist/recipe-schema/recipe.validator.d.ts +28 -0
- package/dist/recipe-schema/step.contract.d.ts +206 -0
- package/dist/recipe-schema/transform-rule.contract.d.ts +120 -0
- package/dist/record-diff/index.d.ts +4 -0
- package/dist/record-diff/record-diff.algorithm.d.ts +82 -0
- package/dist/record-diff/records-file.repository.d.ts +10 -0
- package/dist/record-sink/dedupe.policy.d.ts +29 -0
- package/dist/record-sink/index.d.ts +9 -0
- package/dist/record-sink/json-lines-sink.repository.d.ts +19 -0
- package/dist/record-sink/memory-sink.repository.d.ts +9 -0
- package/dist/record-sink/record-sink.contract.d.ts +17 -0
- package/dist/selection/html-selector.algorithm.d.ts +19 -0
- package/dist/selection/index.d.ts +8 -0
- package/dist/selection/json-path.algorithm.d.ts +9 -0
- package/dist/selection/json-text.algorithm.d.ts +58 -0
- package/dist/selection/regex.algorithm.d.ts +12 -0
- package/dist/selection/take-value.mapper.d.ts +27 -0
- package/dist/src/api-steps/extract-from-document.use-case.d.ts +5 -5
- package/dist/src/docx-document/index.d.ts +2 -0
- package/dist/src/docx-document/read-docx-html.client.d.ts +23 -0
- package/dist/src/extraction-scope/extraction-scope.model.d.ts +2 -1
- package/dist/src/http-session/http-response.contract.d.ts +2 -1
- package/dist/src/index.d.ts +4 -0
- package/dist/src/markdown-document/index.d.ts +1 -1
- package/dist/src/markdown-document/read-markdown.client.d.ts +10 -0
- package/dist/src/recipe-schema/recipe-kind.enum.d.ts +1 -1
- package/dist/src/recipe-schema/step.contract.d.ts +4 -0
- package/dist/src/record-diff/index.d.ts +4 -0
- package/dist/src/record-diff/record-diff.algorithm.d.ts +82 -0
- package/dist/src/record-diff/records-file.repository.d.ts +10 -0
- package/dist/src/selection/html-selector.algorithm.d.ts +2 -1
- package/dist/src/xml-document/index.d.ts +6 -0
- package/dist/src/xml-document/xml-document.model.d.ts +13 -0
- package/dist/src/xml-document/xml-parser.client.d.ts +49 -0
- package/dist/src/xml-document/xpath.algorithm.d.ts +30 -0
- package/dist/step-flow/block-rule.policy.d.ts +21 -0
- package/dist/step-flow/blocked.error.d.ts +9 -0
- package/dist/step-flow/for-each.use-case.d.ts +20 -0
- package/dist/step-flow/host-throttle.policy.d.ts +49 -0
- package/dist/step-flow/index.d.ts +15 -0
- package/dist/step-flow/paginate.use-case.d.ts +17 -0
- package/dist/step-flow/retry.policy.d.ts +21 -0
- package/dist/step-flow/run-gate.policy.d.ts +50 -0
- package/dist/step-flow/run-steps.use-case.d.ts +39 -0
- package/dist/step-flow/step-failure.error.d.ts +14 -0
- package/dist/step-flow/step-runner.contract.d.ts +52 -0
- package/dist/step-flow/transport-retry.policy.d.ts +76 -0
- package/dist/template/expression.algorithm.d.ts +53 -0
- package/dist/template/index.d.ts +7 -0
- package/dist/template/template.algorithm.d.ts +53 -0
- package/dist/template/value-path.algorithm.d.ts +29 -0
- package/dist/template/value-text.algorithm.d.ts +18 -0
- package/dist/transformation/apply-transform-chain.use-case.d.ts +17 -0
- package/dist/transformation/collection.algorithm.d.ts +15 -0
- package/dist/transformation/currency.algorithm.d.ts +15 -0
- package/dist/transformation/date.algorithm.d.ts +13 -0
- package/dist/transformation/index.d.ts +10 -0
- package/dist/transformation/lookup.algorithm.d.ts +24 -0
- package/dist/transformation/number.algorithm.d.ts +30 -0
- package/dist/transformation/string.algorithm.d.ts +18 -0
- package/dist/transformation/transform-registry.store.d.ts +36 -0
- package/dist/transformation/transform.error.d.ts +8 -0
- package/dist/transformation/url.algorithm.d.ts +20 -0
- package/dist/web-steps/evaluate-script.use-case.d.ts +10 -0
- package/dist/web-steps/extract-from-page.use-case.d.ts +10 -0
- package/dist/web-steps/index.d.ts +2 -0
- package/dist/web-steps/interact.use-case.d.ts +36 -0
- package/dist/web-steps/navigate.use-case.d.ts +15 -0
- package/dist/web-steps/run-web-step.use-case.d.ts +37 -0
- package/dist/web-steps/snapshot-elements.use-case.d.ts +13 -0
- package/dist/workbook-document/csv-parser.algorithm.d.ts +26 -0
- package/dist/workbook-document/csv-workbook.mapper.d.ts +24 -0
- package/dist/workbook-document/grid-table.algorithm.d.ts +53 -0
- package/dist/workbook-document/html-tables.mapper.d.ts +14 -0
- package/dist/workbook-document/index.d.ts +9 -0
- package/dist/workbook-document/read-xlsx.client.d.ts +18 -0
- package/dist/workbook-document/workbook-document.model.d.ts +51 -0
- package/dist/xml-document/index.d.ts +6 -0
- package/dist/xml-document/xml-document.model.d.ts +13 -0
- package/dist/xml-document/xml-parser.client.d.ts +49 -0
- package/dist/xml-document/xpath.algorithm.d.ts +30 -0
- package/dist/yaml-document/index.d.ts +3 -0
- package/dist/yaml-document/read-yaml.client.d.ts +25 -0
- package/package.json +4 -2
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { OutputRecipe } from '../recipe-schema/index.js';
|
|
2
|
+
/** A record as a JSON Lines file holds it: the data, plus the sink's `_source` (and `_key` in append mode). */
|
|
3
|
+
export type StoredRecord = Record<string, unknown>;
|
|
4
|
+
/** One field whose value changed; nested objects are compared field by field (`price.amount`). */
|
|
5
|
+
export interface FieldChange {
|
|
6
|
+
field: string;
|
|
7
|
+
before: unknown;
|
|
8
|
+
after: unknown;
|
|
9
|
+
}
|
|
10
|
+
export type RecordChange = {
|
|
11
|
+
change: 'added';
|
|
12
|
+
key: string;
|
|
13
|
+
after: StoredRecord;
|
|
14
|
+
} | {
|
|
15
|
+
change: 'removed';
|
|
16
|
+
key: string;
|
|
17
|
+
before: StoredRecord;
|
|
18
|
+
} | {
|
|
19
|
+
change: 'changed';
|
|
20
|
+
key: string;
|
|
21
|
+
before: StoredRecord;
|
|
22
|
+
after: StoredRecord;
|
|
23
|
+
fields: FieldChange[];
|
|
24
|
+
};
|
|
25
|
+
/** How two runs differ, by record key. */
|
|
26
|
+
export interface RecordDiff {
|
|
27
|
+
added: number;
|
|
28
|
+
removed: number;
|
|
29
|
+
changed: number;
|
|
30
|
+
unchanged: number;
|
|
31
|
+
/** Every change, removed first, then changed, then added, each in file order. */
|
|
32
|
+
changes: RecordChange[];
|
|
33
|
+
/** Records on either side the key cannot tell apart from an earlier one: only the first counts. */
|
|
34
|
+
repeated: number;
|
|
35
|
+
/** How many records each side holds. */
|
|
36
|
+
counts: {
|
|
37
|
+
previous: number;
|
|
38
|
+
current: number;
|
|
39
|
+
};
|
|
40
|
+
/** Set when the current run holds far fewer records: the usual sign a site changed and a recipe broke quietly. */
|
|
41
|
+
shrunk?: {
|
|
42
|
+
previous: number;
|
|
43
|
+
current: number;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export interface DiffOptions {
|
|
47
|
+
/** The fields that identify a record. Default: the `_key` each line carries (a sink in append mode writes it). */
|
|
48
|
+
key?: readonly string[];
|
|
49
|
+
/** Fields not compared (their dotted paths match nested ones too). `_source` and `_key` never are. */
|
|
50
|
+
ignore?: readonly string[];
|
|
51
|
+
/** The share of records a run may lose before `shrunk` is set; default 0.5 (half). */
|
|
52
|
+
shrink?: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Compares two runs' records by key: what was added, what was removed, and
|
|
56
|
+
* for the records in both, which fields changed, before and after. Like a
|
|
57
|
+
* `git diff` of a price list, but row by row instead of line by line, so a
|
|
58
|
+
* reordered file is not a change.
|
|
59
|
+
*
|
|
60
|
+
* @param previous - The earlier run's records.
|
|
61
|
+
* @param current - The later run's records.
|
|
62
|
+
* @param options - The key fields, the fields to ignore, the shrink threshold.
|
|
63
|
+
* @returns The differences.
|
|
64
|
+
* @throws Error when records carry no key: without `key`, every line needs `_key`.
|
|
65
|
+
*/
|
|
66
|
+
export declare function diffRecords(previous: readonly StoredRecord[], current: readonly StoredRecord[], options?: DiffOptions): RecordDiff;
|
|
67
|
+
/**
|
|
68
|
+
* The diff options an output recipe implies: its key fields, and its fields
|
|
69
|
+
* the engine fills differently every run (`generated: now`, `uuid`).
|
|
70
|
+
*
|
|
71
|
+
* @param output - The output recipe.
|
|
72
|
+
* @returns The key and the fields to ignore.
|
|
73
|
+
*/
|
|
74
|
+
export declare function diffOptionsFor(output: OutputRecipe): Required<Pick<DiffOptions, 'key' | 'ignore'>>;
|
|
75
|
+
/**
|
|
76
|
+
* A key as people read it: the key fields' values joined (`Pandina · 1.0 Hybrid`).
|
|
77
|
+
*
|
|
78
|
+
* @param key - A record key (a JSON array of the key values).
|
|
79
|
+
* @returns The readable form.
|
|
80
|
+
*/
|
|
81
|
+
export declare function readableKey(key: string): string;
|
|
82
|
+
//# sourceMappingURL=record-diff.algorithm.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StoredRecord } from './record-diff.algorithm.js';
|
|
2
|
+
/**
|
|
3
|
+
* The records of a JSON Lines file, as a sink wrote them.
|
|
4
|
+
*
|
|
5
|
+
* @param path - The file.
|
|
6
|
+
* @returns One record per non-empty line.
|
|
7
|
+
* @throws Error naming the file and the line that is not a JSON object.
|
|
8
|
+
*/
|
|
9
|
+
export declare function readRecordsFile(path: string): Promise<StoredRecord[]>;
|
|
10
|
+
//# sourceMappingURL=records-file.repository.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { OutputRecord } from '../output-mapping/index.js';
|
|
2
|
+
/** How far de-duplication reaches: the whole run, one input recipe, or not at all. */
|
|
3
|
+
export type DedupeScope = 'run' | 'recipe' | 'off';
|
|
4
|
+
/** One input recipe's view of de-duplication: whether a record repeats a key already seen. */
|
|
5
|
+
export interface RecipeDedupe {
|
|
6
|
+
/**
|
|
7
|
+
* @param record - A validated record.
|
|
8
|
+
* @returns `true` when the record repeats an earlier key and must be dropped.
|
|
9
|
+
*/
|
|
10
|
+
isDuplicate: (record: OutputRecord) => boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Drops records whose key was already seen. First record wins; keyless
|
|
14
|
+
* records always pass. Recipes running in parallel each get their own view:
|
|
15
|
+
* under `recipe` scope they never see each other's keys, under `run` scope
|
|
16
|
+
* they share them (and whichever emits a key first keeps it).
|
|
17
|
+
*/
|
|
18
|
+
export declare class DedupePolicy {
|
|
19
|
+
readonly scope: DedupeScope;
|
|
20
|
+
private readonly shared;
|
|
21
|
+
constructor(scope?: DedupeScope);
|
|
22
|
+
/**
|
|
23
|
+
* The de-duplication one input recipe run uses.
|
|
24
|
+
*
|
|
25
|
+
* @returns Its view: keys shared with the run, its own, or none checked.
|
|
26
|
+
*/
|
|
27
|
+
forRecipe(): RecipeDedupe;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=dedupe.policy.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { RecordSink, SinkSummary } from './record-sink.contract.js';
|
|
2
|
+
export { memorySink } from './memory-sink.repository.js';
|
|
3
|
+
export type { MemorySink } from './memory-sink.repository.js';
|
|
4
|
+
export { jsonLinesSink } from './json-lines-sink.repository.js';
|
|
5
|
+
export type { JsonLinesSinkOptions } from './json-lines-sink.repository.js';
|
|
6
|
+
export { DedupePolicy } from './dedupe.policy.js';
|
|
7
|
+
export type { RecipeDedupe } from './dedupe.policy.js';
|
|
8
|
+
export type { DedupeScope } from './dedupe.policy.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RecordSink } from './record-sink.contract.js';
|
|
2
|
+
export interface JsonLinesSinkOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Keep what the file holds and add to it. Each line then carries the record
|
|
5
|
+
* key as `_key`, and `open` reads the keys already there so a resumed run
|
|
6
|
+
* (`CrawlOptions.resume`) can skip them.
|
|
7
|
+
*/
|
|
8
|
+
append?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A sink that writes one JSON object per line to a file (JSON Lines). Each line
|
|
12
|
+
* is the record's `data` plus a `_source` member (and `_key` in append mode).
|
|
13
|
+
*
|
|
14
|
+
* @param path - The file to write; created with its directories, truncated on open unless `append`.
|
|
15
|
+
* @param options - Append mode.
|
|
16
|
+
* @returns The sink.
|
|
17
|
+
*/
|
|
18
|
+
export declare function jsonLinesSink(path: string, options?: JsonLinesSinkOptions): RecordSink;
|
|
19
|
+
//# sourceMappingURL=json-lines-sink.repository.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OutputRecord } from '../output-mapping/index.js';
|
|
2
|
+
import type { RecordSink } from './record-sink.contract.js';
|
|
3
|
+
/** A sink that keeps records in memory; `records` is readable at any time. */
|
|
4
|
+
export interface MemorySink extends RecordSink {
|
|
5
|
+
readonly records: OutputRecord[];
|
|
6
|
+
}
|
|
7
|
+
/** @returns A new in-memory sink. */
|
|
8
|
+
export declare function memorySink(): MemorySink;
|
|
9
|
+
//# sourceMappingURL=memory-sink.repository.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { OutputRecord } from '../output-mapping/index.js';
|
|
2
|
+
import type { OutputRecipe } from '../recipe-schema/index.js';
|
|
3
|
+
/** What a sink reports when closed. */
|
|
4
|
+
export interface SinkSummary {
|
|
5
|
+
written: number;
|
|
6
|
+
/** Where the records went, when the sink has a location. */
|
|
7
|
+
location?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Where validated records go. Opened once per run, written per record, closed once. */
|
|
10
|
+
export interface RecordSink {
|
|
11
|
+
open: (output: OutputRecipe) => Promise<void>;
|
|
12
|
+
write: (record: OutputRecord) => Promise<void>;
|
|
13
|
+
close: () => Promise<SinkSummary>;
|
|
14
|
+
/** Whether a record with this key is already there; what a resumed run asks before writing. */
|
|
15
|
+
has?: (key: string) => Promise<boolean>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=record-sink.contract.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Cheerio, CheerioAPI } from 'cheerio';
|
|
2
|
+
import type { AnyNode } from 'domhandler';
|
|
3
|
+
/** A matched HTML element together with the document it belongs to. */
|
|
4
|
+
export interface HtmlMatch {
|
|
5
|
+
api: CheerioAPI;
|
|
6
|
+
element: Cheerio<AnyNode>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Runs a CSS selector on static HTML. A whole document is parsed as one; anything
|
|
10
|
+
* else (a table row, a list item taken with `take: "html"`) is parsed as a
|
|
11
|
+
* fragment, so cells and rows outside a table survive instead of being dropped.
|
|
12
|
+
*
|
|
13
|
+
* @param html - The markup (a whole document or a fragment).
|
|
14
|
+
* @param selector - A CSS selector.
|
|
15
|
+
* @param xml - Read the markup as XML: names keep their case, `take: "html"` gives XML.
|
|
16
|
+
* @returns Every match, in document order.
|
|
17
|
+
*/
|
|
18
|
+
export declare function selectHtml(html: string, selector: string, xml?: boolean): HtmlMatch[];
|
|
19
|
+
//# sourceMappingURL=html-selector.algorithm.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { selectJson } from './json-path.algorithm.js';
|
|
2
|
+
export { selectRegex } from './regex.algorithm.js';
|
|
3
|
+
export { selectHtml } from './html-selector.algorithm.js';
|
|
4
|
+
export type { HtmlMatch } from './html-selector.algorithm.js';
|
|
5
|
+
export { takeFromHtml, takeFromJson, collapse } from './take-value.mapper.js';
|
|
6
|
+
export type { Take } from './take-value.mapper.js';
|
|
7
|
+
export { tryParseJson, parseJsonText, dataItemsOf, parseJsonLike, parseJsonLines } from './json-text.algorithm.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Evaluates a JSONPath expression on a decoded JSON document.
|
|
3
|
+
*
|
|
4
|
+
* @param document - The JSON value.
|
|
5
|
+
* @param path - A JSONPath such as `$.items[*].url`.
|
|
6
|
+
* @returns Every match, in document order.
|
|
7
|
+
*/
|
|
8
|
+
export declare function selectJson(document: unknown, path: string): unknown[];
|
|
9
|
+
//# sourceMappingURL=json-path.algorithm.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON that arrives as text: a `<script type="application/ld+json">` body, a
|
|
3
|
+
* `data-*` attribute, a fetched document read as text. Sites wrap JSON in
|
|
4
|
+
* things that are not JSON: comment guards around inline JSON-LD, prefixes
|
|
5
|
+
* that stop a page from loading an API as a script, a JSONP callback, an
|
|
6
|
+
* assignment in an inline script. Those wrappers are removed, but only after
|
|
7
|
+
* the text failed to parse as it is, and what is left must still be strict
|
|
8
|
+
* JSON: nothing is evaluated.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Parses text as JSON, or as JSON inside one of the wrappers sites put around
|
|
12
|
+
* it: comment guards, an anti-hijacking prefix, a JSONP call, an assignment.
|
|
13
|
+
* Valid JSON is always read as it is; a wrapper is only removed when that
|
|
14
|
+
* fails.
|
|
15
|
+
*
|
|
16
|
+
* @param text - The text.
|
|
17
|
+
* @returns The value, or the error the text as it is gave.
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseJsonLike(text: string): {
|
|
20
|
+
value: unknown;
|
|
21
|
+
} | {
|
|
22
|
+
error: Error;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Parses JSON Lines (NDJSON): one JSON value per non-blank line.
|
|
26
|
+
*
|
|
27
|
+
* @param text - The text.
|
|
28
|
+
* @param source - Where it came from, for the error.
|
|
29
|
+
* @returns The values, in order.
|
|
30
|
+
* @throws Error naming the source and the line that does not parse.
|
|
31
|
+
*/
|
|
32
|
+
export declare function parseJsonLines(text: string, source: string): unknown[];
|
|
33
|
+
/**
|
|
34
|
+
* Parses text as JSON, wrappers removed (see {@link parseJsonLike}).
|
|
35
|
+
*
|
|
36
|
+
* @param text - The text.
|
|
37
|
+
* @returns The value, or `undefined` when it is not JSON.
|
|
38
|
+
*/
|
|
39
|
+
export declare function tryParseJson(text: string): unknown;
|
|
40
|
+
/**
|
|
41
|
+
* Parses text that must be JSON.
|
|
42
|
+
*
|
|
43
|
+
* @param text - The text.
|
|
44
|
+
* @param id - What the text is, for the error.
|
|
45
|
+
* @returns The value.
|
|
46
|
+
* @throws Error when it is not JSON.
|
|
47
|
+
*/
|
|
48
|
+
export declare function parseJsonText(text: string, id: string): unknown;
|
|
49
|
+
/**
|
|
50
|
+
* The data a value holds, whatever shape it arrived in: JSON text is parsed, a
|
|
51
|
+
* list of texts becomes the list of its parsable entries, and an entry that
|
|
52
|
+
* parses to a list is spliced in. Data that is not text is kept as is.
|
|
53
|
+
*
|
|
54
|
+
* @param value - A bound value: data, text, or a list of either.
|
|
55
|
+
* @returns A list of items.
|
|
56
|
+
*/
|
|
57
|
+
export declare function dataItemsOf(value: unknown): unknown[];
|
|
58
|
+
//# sourceMappingURL=json-text.algorithm.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Evaluates a regular expression on text: the extract kind for values that
|
|
3
|
+
* live in inline scripts, attributes or prose rather than in elements or JSON.
|
|
4
|
+
*
|
|
5
|
+
* @param text - The document text.
|
|
6
|
+
* @param pattern - A regular expression source; group 1 is returned when the
|
|
7
|
+
* pattern has a capturing group, else the whole match.
|
|
8
|
+
* @returns Every match, in document order.
|
|
9
|
+
* @throws When the pattern is not a valid regular expression.
|
|
10
|
+
*/
|
|
11
|
+
export declare function selectRegex(text: string, pattern: string): string[];
|
|
12
|
+
//# sourceMappingURL=regex.algorithm.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { HtmlMatch } from './html-selector.algorithm.js';
|
|
2
|
+
/** What `extract` takes from a match: text, inner HTML, an attribute, an input's value, or the node as data. */
|
|
3
|
+
export type Take = 'text' | 'html' | 'value' | 'json' | `attr:${string}`;
|
|
4
|
+
/**
|
|
5
|
+
* The value of an HTML match.
|
|
6
|
+
*
|
|
7
|
+
* @param match - A selected element.
|
|
8
|
+
* @param take - What to take; `text` collapses whitespace.
|
|
9
|
+
* @returns The value; `undefined` for a missing attribute.
|
|
10
|
+
*/
|
|
11
|
+
export declare function takeFromHtml(match: HtmlMatch, take: Take): unknown;
|
|
12
|
+
/**
|
|
13
|
+
* The value of a JSON match.
|
|
14
|
+
*
|
|
15
|
+
* @param node - A JSONPath result.
|
|
16
|
+
* @param take - `json` keeps the node; `text` stringifies scalars.
|
|
17
|
+
* @returns The value.
|
|
18
|
+
*/
|
|
19
|
+
export declare function takeFromJson(node: unknown, take: Take): unknown;
|
|
20
|
+
/**
|
|
21
|
+
* Text as a human reads it: runs of whitespace collapsed, ends trimmed.
|
|
22
|
+
*
|
|
23
|
+
* @param text - Raw text content.
|
|
24
|
+
* @returns The collapsed text.
|
|
25
|
+
*/
|
|
26
|
+
export declare function collapse(text: string): string;
|
|
27
|
+
//# sourceMappingURL=take-value.mapper.d.ts.map
|
|
@@ -2,11 +2,11 @@ import type { ExtractionScope, ScopeDocument } from '../extraction-scope/index.j
|
|
|
2
2
|
import type { ExtractStep } from '../recipe-schema/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Runs an `extract` step against a static document: the value bound under
|
|
5
|
-
* `from`, else the scope's current document. `css` reads HTML,
|
|
6
|
-
* reads
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* `from`, else the scope's current document. `css` reads HTML (or XML),
|
|
6
|
+
* `xpath` reads XML (a feed, a sitemap) or HTML parsed as a browser parses
|
|
7
|
+
* it, `jsonpath` reads JSON (or a read PDF, workbook or deck as data), `table`
|
|
8
|
+
* reads the tables of a PDF, a workbook (a spreadsheet, a CSV), a deck (a
|
|
9
|
+
* presentation) or HTML (its `<table>`s), `regex` reads any document as text.
|
|
10
10
|
*
|
|
11
11
|
* A `jsonpath` extract whose `from` is text parses that text as JSON, and a
|
|
12
12
|
* list of texts (every `<script type="application/ld+json">` of a page) becomes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads a `.docx` Word document into HTML, through `@opencraw/office-reader`,
|
|
3
|
+
* so every selector that reads a page reads a Word document too:
|
|
4
|
+
*
|
|
5
|
+
* - headings become `<h1>`…`<h6>` inside `<section data-heading="…">`, as in
|
|
6
|
+
* rendered Markdown;
|
|
7
|
+
* - list items become nested `<ul>` / `<ol>`;
|
|
8
|
+
* - tables become `<table>`s with their merged cells as `colspan` / `rowspan`,
|
|
9
|
+
* so a `table` extract reads them like any HTML table;
|
|
10
|
+
* - a paragraph keeps its style as `data-style` and its links as `<a href>`;
|
|
11
|
+
* - headers, footers and notes follow the body, in `<header>`, `<footer>`
|
|
12
|
+
* and `<aside data-part="notes">`; the title goes to `<title>`.
|
|
13
|
+
*
|
|
14
|
+
* The reader is imported on first use.
|
|
15
|
+
*
|
|
16
|
+
* @param bytes - The file.
|
|
17
|
+
* @param source - Where it came from, for messages.
|
|
18
|
+
* @returns The HTML document.
|
|
19
|
+
* @throws Error naming the source, and saying what to do, for a file that is
|
|
20
|
+
* not a readable Word document (a legacy `.doc`, a password-protected file, an `.odt`…).
|
|
21
|
+
*/
|
|
22
|
+
export declare function readDocxHtml(bytes: Uint8Array, source: string): Promise<string>;
|
|
23
|
+
//# sourceMappingURL=read-docx-html.client.d.ts.map
|
|
@@ -7,11 +7,12 @@
|
|
|
7
7
|
* Page state (the current URL, page number and the document `extract` reads by
|
|
8
8
|
* default) is scope state too, bound in the innermost scope that navigated.
|
|
9
9
|
*/
|
|
10
|
+
import type { XmlDocument } from '../xml-document/index.js';
|
|
10
11
|
import type { DeckDocument } from '../deck-document/index.js';
|
|
11
12
|
import type { PdfDocument } from '../pdf-document/index.js';
|
|
12
13
|
import type { WorkbookDocument } from '../workbook-document/index.js';
|
|
13
14
|
/** A fetched or rendered document a later `extract` can read. */
|
|
14
|
-
export type ScopeDocument = PdfDocument | WorkbookDocument | DeckDocument | {
|
|
15
|
+
export type ScopeDocument = PdfDocument | WorkbookDocument | DeckDocument | XmlDocument | {
|
|
15
16
|
kind: 'json';
|
|
16
17
|
data: unknown;
|
|
17
18
|
} | {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DeckDocument } from '../deck-document/index.js';
|
|
2
2
|
import type { PdfDocument } from '../pdf-document/index.js';
|
|
3
3
|
import type { WorkbookDocument } from '../workbook-document/index.js';
|
|
4
|
+
import type { XmlDocument } from '../xml-document/index.js';
|
|
4
5
|
import type { BodyKind, HttpMethod } from '../recipe-schema/index.js';
|
|
5
6
|
/** One HTTP request as the api runner sends it, templates already rendered. */
|
|
6
7
|
export interface HttpRequest {
|
|
@@ -20,7 +21,7 @@ export interface HttpRequest {
|
|
|
20
21
|
timeoutMs?: number;
|
|
21
22
|
}
|
|
22
23
|
/** A parsed response body. Structurally the same as a scope document, on purpose. */
|
|
23
|
-
export type HttpBody = PdfDocument | WorkbookDocument | DeckDocument | {
|
|
24
|
+
export type HttpBody = PdfDocument | WorkbookDocument | DeckDocument | XmlDocument | {
|
|
24
25
|
kind: 'json';
|
|
25
26
|
data: unknown;
|
|
26
27
|
} | {
|
package/dist/src/index.d.ts
CHANGED
|
@@ -24,12 +24,16 @@ export type { PdfDocument, PdfPage, PdfRow, PdfCell, PdfTable, TableQuery, Table
|
|
|
24
24
|
export { parseCsv, detectDelimiter, csvWorkbook, findGridTables, fillDown, workbookText, isWorkbookDocument, htmlTableSheets } from './workbook-document/index.js';
|
|
25
25
|
export { readMarkdown } from './markdown-document/index.js';
|
|
26
26
|
export { readYaml } from './yaml-document/index.js';
|
|
27
|
+
export { parseXml, selectXpath, takeFromXml, isXmlDocument } from './xml-document/index.js';
|
|
28
|
+
export type { XmlDocument, XpathOptions, XpathValue } from './xml-document/index.js';
|
|
27
29
|
export { findDeckTables, deckText, isDeckDocument } from './deck-document/index.js';
|
|
28
30
|
export type { DeckDocument, DeckSlide, DeckShape, DeckChart, DeckTable, DeckTableQuery } from './deck-document/index.js';
|
|
29
31
|
export type { WorkbookDocument, WorkbookCell, Sheet, CsvFormat, GridTable, GridTableQuery } from './workbook-document/index.js';
|
|
30
32
|
export { StepFailure, HostThrottle, DEFAULT_RETRY_RULE } from './step-flow/index.js';
|
|
31
33
|
export type { ThrottleConfig, HostRule } from './step-flow/index.js';
|
|
32
34
|
export { TransformError } from './transformation/index.js';
|
|
35
|
+
export { diffRecords, diffOptionsFor, readableKey, readRecordsFile } from './record-diff/index.js';
|
|
36
|
+
export type { RecordDiff, RecordChange, FieldChange, DiffOptions, StoredRecord } from './record-diff/index.js';
|
|
33
37
|
export { CaptchaError, DEFAULT_CAPTCHA_SELECTOR, detectChallenge } from './captcha/index.js';
|
|
34
38
|
export type { CaptchaSolver, CaptchaChallenge, CaptchaContext, CaptchaOutcome, CaptchaKind, CaptchaLog } from './captcha/index.js';
|
|
35
39
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -26,4 +26,14 @@ export interface MarkdownRead {
|
|
|
26
26
|
* @throws Error naming the source when the front matter is not YAML.
|
|
27
27
|
*/
|
|
28
28
|
export declare function readMarkdown(text: string, source: string): Promise<MarkdownRead>;
|
|
29
|
+
/**
|
|
30
|
+
* Wraps each heading and what follows it, up to the next heading of the same
|
|
31
|
+
* or a higher level, in `<section data-heading="…" data-level="…">`, sections
|
|
32
|
+
* nesting; headings get slug ids. Rendered Markdown and Word documents both go
|
|
33
|
+
* through it, so one selector finds "the table under *Prezzi*" in either.
|
|
34
|
+
*
|
|
35
|
+
* @param html - Top-level HTML: headings among paragraphs, lists, tables.
|
|
36
|
+
* @returns The same content, sectioned.
|
|
37
|
+
*/
|
|
38
|
+
export declare function sectioned(html: string): string;
|
|
29
39
|
//# sourceMappingURL=read-markdown.client.d.ts.map
|
|
@@ -4,7 +4,7 @@ export declare const CRAWL_MODES: readonly ["web", "api"];
|
|
|
4
4
|
export declare const SELECTOR_KINDS: readonly ["css", "xpath", "jsonpath", "regex", "table"];
|
|
5
5
|
/** `take` also accepts `attr:<name>`, which is validated by pattern rather than listed. */
|
|
6
6
|
export declare const TAKE_KINDS: readonly ["text", "html", "value", "json"];
|
|
7
|
-
export declare const BODY_KINDS: readonly ["json", "jsonl", "html", "text", "pdf", "csv", "xlsx", "pptx", "yaml", "markdown"];
|
|
7
|
+
export declare const BODY_KINDS: readonly ["json", "jsonl", "html", "text", "pdf", "csv", "xlsx", "pptx", "yaml", "markdown", "xml", "docx"];
|
|
8
8
|
export declare const YAML_SCALARS: readonly ["typed", "text"];
|
|
9
9
|
/** How a PDF table aligns a row's values against a cell wrapped over several lines. */
|
|
10
10
|
export declare const TABLE_ALIGNS: readonly ["auto", "top", "center", "bottom"];
|
|
@@ -119,6 +119,10 @@ export interface ExtractStep extends StepBaseFields {
|
|
|
119
119
|
slide?: string;
|
|
120
120
|
/** `table` only: read text boxes laid out as a table instead of native tables (deck). */
|
|
121
121
|
shapes?: boolean;
|
|
122
|
+
/** `xpath` on XML only: prefix to namespace URI (`{ "atom": "http://www.w3.org/2005/Atom" }`). Prefixes the root declares are known already. */
|
|
123
|
+
namespaces?: Record<string, string>;
|
|
124
|
+
/** `xpath` on XML only: drop the document's namespaces, so `//entry/title` matches `<entry xmlns="…">`. */
|
|
125
|
+
ignoreNamespaces?: boolean;
|
|
122
126
|
}
|
|
123
127
|
export interface SetStep extends StepBaseFields {
|
|
124
128
|
type: 'set';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { diffRecords, diffOptionsFor, readableKey } from './record-diff.algorithm.js';
|
|
2
|
+
export type { RecordDiff, RecordChange, FieldChange, DiffOptions, StoredRecord } from './record-diff.algorithm.js';
|
|
3
|
+
export { readRecordsFile } from './records-file.repository.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { OutputRecipe } from '../recipe-schema/index.js';
|
|
2
|
+
/** A record as a JSON Lines file holds it: the data, plus the sink's `_source` (and `_key` in append mode). */
|
|
3
|
+
export type StoredRecord = Record<string, unknown>;
|
|
4
|
+
/** One field whose value changed; nested objects are compared field by field (`price.amount`). */
|
|
5
|
+
export interface FieldChange {
|
|
6
|
+
field: string;
|
|
7
|
+
before: unknown;
|
|
8
|
+
after: unknown;
|
|
9
|
+
}
|
|
10
|
+
export type RecordChange = {
|
|
11
|
+
change: 'added';
|
|
12
|
+
key: string;
|
|
13
|
+
after: StoredRecord;
|
|
14
|
+
} | {
|
|
15
|
+
change: 'removed';
|
|
16
|
+
key: string;
|
|
17
|
+
before: StoredRecord;
|
|
18
|
+
} | {
|
|
19
|
+
change: 'changed';
|
|
20
|
+
key: string;
|
|
21
|
+
before: StoredRecord;
|
|
22
|
+
after: StoredRecord;
|
|
23
|
+
fields: FieldChange[];
|
|
24
|
+
};
|
|
25
|
+
/** How two runs differ, by record key. */
|
|
26
|
+
export interface RecordDiff {
|
|
27
|
+
added: number;
|
|
28
|
+
removed: number;
|
|
29
|
+
changed: number;
|
|
30
|
+
unchanged: number;
|
|
31
|
+
/** Every change, removed first, then changed, then added, each in file order. */
|
|
32
|
+
changes: RecordChange[];
|
|
33
|
+
/** Records on either side the key cannot tell apart from an earlier one: only the first counts. */
|
|
34
|
+
repeated: number;
|
|
35
|
+
/** How many records each side holds. */
|
|
36
|
+
counts: {
|
|
37
|
+
previous: number;
|
|
38
|
+
current: number;
|
|
39
|
+
};
|
|
40
|
+
/** Set when the current run holds far fewer records: the usual sign a site changed and a recipe broke quietly. */
|
|
41
|
+
shrunk?: {
|
|
42
|
+
previous: number;
|
|
43
|
+
current: number;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export interface DiffOptions {
|
|
47
|
+
/** The fields that identify a record. Default: the `_key` each line carries (a sink in append mode writes it). */
|
|
48
|
+
key?: readonly string[];
|
|
49
|
+
/** Fields not compared (their dotted paths match nested ones too). `_source` and `_key` never are. */
|
|
50
|
+
ignore?: readonly string[];
|
|
51
|
+
/** The share of records a run may lose before `shrunk` is set; default 0.5 (half). */
|
|
52
|
+
shrink?: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Compares two runs' records by key: what was added, what was removed, and
|
|
56
|
+
* for the records in both, which fields changed, before and after. Like a
|
|
57
|
+
* `git diff` of a price list, but row by row instead of line by line, so a
|
|
58
|
+
* reordered file is not a change.
|
|
59
|
+
*
|
|
60
|
+
* @param previous - The earlier run's records.
|
|
61
|
+
* @param current - The later run's records.
|
|
62
|
+
* @param options - The key fields, the fields to ignore, the shrink threshold.
|
|
63
|
+
* @returns The differences.
|
|
64
|
+
* @throws Error when records carry no key: without `key`, every line needs `_key`.
|
|
65
|
+
*/
|
|
66
|
+
export declare function diffRecords(previous: readonly StoredRecord[], current: readonly StoredRecord[], options?: DiffOptions): RecordDiff;
|
|
67
|
+
/**
|
|
68
|
+
* The diff options an output recipe implies: its key fields, and its fields
|
|
69
|
+
* the engine fills differently every run (`generated: now`, `uuid`).
|
|
70
|
+
*
|
|
71
|
+
* @param output - The output recipe.
|
|
72
|
+
* @returns The key and the fields to ignore.
|
|
73
|
+
*/
|
|
74
|
+
export declare function diffOptionsFor(output: OutputRecipe): Required<Pick<DiffOptions, 'key' | 'ignore'>>;
|
|
75
|
+
/**
|
|
76
|
+
* A key as people read it: the key fields' values joined (`Pandina · 1.0 Hybrid`).
|
|
77
|
+
*
|
|
78
|
+
* @param key - A record key (a JSON array of the key values).
|
|
79
|
+
* @returns The readable form.
|
|
80
|
+
*/
|
|
81
|
+
export declare function readableKey(key: string): string;
|
|
82
|
+
//# sourceMappingURL=record-diff.algorithm.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StoredRecord } from './record-diff.algorithm.js';
|
|
2
|
+
/**
|
|
3
|
+
* The records of a JSON Lines file, as a sink wrote them.
|
|
4
|
+
*
|
|
5
|
+
* @param path - The file.
|
|
6
|
+
* @returns One record per non-empty line.
|
|
7
|
+
* @throws Error naming the file and the line that is not a JSON object.
|
|
8
|
+
*/
|
|
9
|
+
export declare function readRecordsFile(path: string): Promise<StoredRecord[]>;
|
|
10
|
+
//# sourceMappingURL=records-file.repository.d.ts.map
|
|
@@ -12,7 +12,8 @@ export interface HtmlMatch {
|
|
|
12
12
|
*
|
|
13
13
|
* @param html - The markup (a whole document or a fragment).
|
|
14
14
|
* @param selector - A CSS selector.
|
|
15
|
+
* @param xml - Read the markup as XML: names keep their case, `take: "html"` gives XML.
|
|
15
16
|
* @returns Every match, in document order.
|
|
16
17
|
*/
|
|
17
|
-
export declare function selectHtml(html: string, selector: string): HtmlMatch[];
|
|
18
|
+
export declare function selectHtml(html: string, selector: string, xml?: boolean): HtmlMatch[];
|
|
18
19
|
//# sourceMappingURL=html-selector.algorithm.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { XmlDocument } from './xml-document.model.js';
|
|
2
|
+
export { isXmlDocument } from './xml-document.model.js';
|
|
3
|
+
export { parseXml, htmlAsXml, withoutNamespaces, serializeXml, gunzipIfNeeded } from './xml-parser.client.js';
|
|
4
|
+
export { selectXpath, takeFromXml } from './xpath.algorithm.js';
|
|
5
|
+
export type { XpathValue, XpathOptions } from './xpath.algorithm.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** A fetched XML document: a feed, a sitemap, an open-data export. Kept as text; queries parse it once. */
|
|
2
|
+
export interface XmlDocument {
|
|
3
|
+
kind: 'xml';
|
|
4
|
+
xml: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Whether a value is a read XML document.
|
|
8
|
+
*
|
|
9
|
+
* @param value - Anything bound in a scope.
|
|
10
|
+
* @returns `true` for an `XmlDocument`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isXmlDocument(value: unknown): value is XmlDocument;
|
|
13
|
+
//# sourceMappingURL=xml-document.model.d.ts.map
|