rusteerio 1.0.0 → 1.1.0
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/Cargo.lock +42 -1
- package/Cargo.toml +8 -1
- package/README.md +90 -51
- package/THIRD_PARTY_NOTICES.md +138 -2
- package/dist/{chunk-DMRD3FGC.mjs → chunk-FPRP6UIX.mjs} +2233 -751
- package/dist/chunk-FPRP6UIX.mjs.map +1 -0
- package/dist/index.cjs +2232 -750
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/slim.cjs +2226 -745
- package/dist/slim.cjs.map +1 -1
- package/dist/slim.d.mts +2 -2
- package/dist/slim.d.ts +2 -2
- package/dist/slim.mjs +1 -1
- package/dist/{types-BP6TpxE5.d.mts → types-Cs9UP1Vv.d.mts} +3 -3
- package/dist/{types-BP6TpxE5.d.ts → types-Cs9UP1Vv.d.ts} +3 -3
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/native/src/arena.rs +231 -602
- package/native/src/attributes.rs +11 -5
- package/native/src/codec.rs +62 -18
- package/native/src/document_order.rs +711 -0
- package/native/src/extraction.rs +15 -3
- package/native/src/gc.rs +12 -3
- package/native/src/hook_sink.rs +77 -3
- package/native/src/id_hash.rs +42 -0
- package/native/src/immutable.rs +256 -0
- package/native/src/lib.rs +1097 -172
- package/native/src/markup_tokenizer.rs +668 -0
- package/native/src/runtime.rs +189 -33
- package/native/src/selector.rs +346 -44
- package/native/src/sink.rs +14 -1
- package/native/src/snapshot.rs +509 -0
- package/native/src/stream.rs +2 -2
- package/native/src/tokenizer.rs +377 -204
- package/native/vendor/README.md +3 -2
- package/native/vendor/html5ever-0.35.0/src/tokenizer/char_ref/mod.rs +79 -0
- package/native/vendor/html5ever-0.35.0/src/tokenizer/mod.rs +23 -13
- package/package.json +3 -1
- package/rusteerio.darwin-arm64.node +0 -0
- package/rusteerio.darwin-x64.node +0 -0
- package/rusteerio.linux-arm64-gnu.node +0 -0
- package/rusteerio.linux-arm64-musl.node +0 -0
- package/rusteerio.linux-x64-gnu.node +0 -0
- package/rusteerio.linux-x64-musl.node +0 -0
- package/rusteerio.win32-arm64-msvc.node +0 -0
- package/rusteerio.win32-x64-msvc.node +0 -0
- package/scripts/generate-notices.mjs +11 -0
- package/scripts/notices/htmlparser2-MIT.txt +18 -0
- package/scripts/notices/sources.json +6 -0
- package/src/attributes.ts +78 -44
- package/src/codec.ts +22 -3
- package/src/extract.ts +86 -2
- package/src/hooks.ts +148 -2
- package/src/index.ts +51 -40
- package/src/match.ts +207 -0
- package/src/native.ts +9 -1
- package/src/nodes.ts +531 -183
- package/src/router.ts +792 -229
- package/src/selection.ts +239 -125
- package/src/snapshot.ts +255 -0
- package/src/transport.ts +51 -42
- package/dist/chunk-DMRD3FGC.mjs.map +0 -1
package/dist/slim.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { contains, dom, merge } from './index.mjs';
|
|
2
|
-
import { L as LoadContent, C as CheerioOptions, a as CheerioAPI } from './types-
|
|
3
|
-
export { A as AcceptedElems, b as AcceptedFilters, c as AnyNode, B as BasicAcceptedElems, d as CDATA, type e as Cheerio, f as CheerioRequestOptions, g as ChildNode, h as Comment, D as DataNode, i as DecodeStreamOptions, j as Document, k as DocumentMode, E as Element, type l as ElementType, m as EncodingOptions, n as ExtractDescriptor, o as ExtractMap, p as ExtractedMap, q as ExtractedValue, r as ExtractionDescriptor, s as ExtractionMap, t as ExtractionResult, F as FilterFunction, u as FormDataLike, H as HTMLParser2Options, I as InternalOptions, N as NamespaceURI, v as Node, w as NodeWithChildren, P as ParallelOptions, x as ParentNode, y as ParserError, z as ParserErrorCode, G as ParserErrorHandler, J as ProcessingInstruction, S as SelectorType, K as SerializedField, M as SourceCodeLocation, T as TagSourceCodeLocation, O as Text, Q as Tokenizer, R as TokenizerCallbacks, U as TokenizerConstructor, V as TokenizerOptions, W as TreeAdapter, X as TreeAdapterAttribute } from './types-
|
|
2
|
+
import { L as LoadContent, C as CheerioOptions, a as CheerioAPI } from './types-Cs9UP1Vv.mjs';
|
|
3
|
+
export { A as AcceptedElems, b as AcceptedFilters, c as AnyNode, B as BasicAcceptedElems, d as CDATA, type e as Cheerio, f as CheerioRequestOptions, g as ChildNode, h as Comment, D as DataNode, i as DecodeStreamOptions, j as Document, k as DocumentMode, E as Element, type l as ElementType, m as EncodingOptions, n as ExtractDescriptor, o as ExtractMap, p as ExtractedMap, q as ExtractedValue, r as ExtractionDescriptor, s as ExtractionMap, t as ExtractionResult, F as FilterFunction, u as FormDataLike, H as HTMLParser2Options, I as InternalOptions, N as NamespaceURI, v as Node, w as NodeWithChildren, P as ParallelOptions, x as ParentNode, y as ParserError, z as ParserErrorCode, G as ParserErrorHandler, J as ProcessingInstruction, S as SelectorType, K as SerializedField, M as SourceCodeLocation, T as TagSourceCodeLocation, O as Text, Q as Tokenizer, R as TokenizerCallbacks, U as TokenizerConstructor, V as TokenizerOptions, W as TreeAdapter, X as TreeAdapterAttribute } from './types-Cs9UP1Vv.mjs';
|
|
4
4
|
import 'node:stream';
|
|
5
5
|
import 'node:querystring';
|
|
6
6
|
import 'node:buffer';
|
package/dist/slim.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { contains, dom, merge } from './index.js';
|
|
2
|
-
import { L as LoadContent, C as CheerioOptions, a as CheerioAPI } from './types-
|
|
3
|
-
export { A as AcceptedElems, b as AcceptedFilters, c as AnyNode, B as BasicAcceptedElems, d as CDATA, type e as Cheerio, f as CheerioRequestOptions, g as ChildNode, h as Comment, D as DataNode, i as DecodeStreamOptions, j as Document, k as DocumentMode, E as Element, type l as ElementType, m as EncodingOptions, n as ExtractDescriptor, o as ExtractMap, p as ExtractedMap, q as ExtractedValue, r as ExtractionDescriptor, s as ExtractionMap, t as ExtractionResult, F as FilterFunction, u as FormDataLike, H as HTMLParser2Options, I as InternalOptions, N as NamespaceURI, v as Node, w as NodeWithChildren, P as ParallelOptions, x as ParentNode, y as ParserError, z as ParserErrorCode, G as ParserErrorHandler, J as ProcessingInstruction, S as SelectorType, K as SerializedField, M as SourceCodeLocation, T as TagSourceCodeLocation, O as Text, Q as Tokenizer, R as TokenizerCallbacks, U as TokenizerConstructor, V as TokenizerOptions, W as TreeAdapter, X as TreeAdapterAttribute } from './types-
|
|
2
|
+
import { L as LoadContent, C as CheerioOptions, a as CheerioAPI } from './types-Cs9UP1Vv.js';
|
|
3
|
+
export { A as AcceptedElems, b as AcceptedFilters, c as AnyNode, B as BasicAcceptedElems, d as CDATA, type e as Cheerio, f as CheerioRequestOptions, g as ChildNode, h as Comment, D as DataNode, i as DecodeStreamOptions, j as Document, k as DocumentMode, E as Element, type l as ElementType, m as EncodingOptions, n as ExtractDescriptor, o as ExtractMap, p as ExtractedMap, q as ExtractedValue, r as ExtractionDescriptor, s as ExtractionMap, t as ExtractionResult, F as FilterFunction, u as FormDataLike, H as HTMLParser2Options, I as InternalOptions, N as NamespaceURI, v as Node, w as NodeWithChildren, P as ParallelOptions, x as ParentNode, y as ParserError, z as ParserErrorCode, G as ParserErrorHandler, J as ProcessingInstruction, S as SelectorType, K as SerializedField, M as SourceCodeLocation, T as TagSourceCodeLocation, O as Text, Q as Tokenizer, R as TokenizerCallbacks, U as TokenizerConstructor, V as TokenizerOptions, W as TreeAdapter, X as TreeAdapterAttribute } from './types-Cs9UP1Vv.js';
|
|
4
4
|
import 'node:stream';
|
|
5
5
|
import 'node:querystring';
|
|
6
6
|
import 'node:buffer';
|
package/dist/slim.mjs
CHANGED
|
@@ -69,14 +69,14 @@ interface AttributeMethods<T = AnyNode> {
|
|
|
69
69
|
serialize<U extends AnyNode>(this: Cheerio<U>): string;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
/** An array-like selection of
|
|
72
|
+
/** An array-like selection of native nodes. */
|
|
73
73
|
declare class Cheerio<T = AnyNode> implements ArrayLike<T>, Iterable<T> {
|
|
74
74
|
[index: number]: T;
|
|
75
|
+
length: number;
|
|
75
76
|
options: CheerioOptions;
|
|
76
77
|
_root: Cheerio<Document> | null;
|
|
77
78
|
prevObject: Cheerio<any> | undefined;
|
|
78
|
-
|
|
79
|
-
cheerio: "[cheerio object]";
|
|
79
|
+
cheerio: '[cheerio object]';
|
|
80
80
|
constructor(api: CheerioAPI, document: NativeDocument, ids?: number[], root?: Cheerio<Document> | null, options?: CheerioOptions, values?: T[]);
|
|
81
81
|
_make<R>(value: ArrayLike<R> | R | string, context?: BasicAcceptedElems<AnyNode>): Cheerio<R>;
|
|
82
82
|
_parse(content: any, options: CheerioOptions, isDocument: boolean, context: ParentNode | null): Document;
|
|
@@ -69,14 +69,14 @@ interface AttributeMethods<T = AnyNode> {
|
|
|
69
69
|
serialize<U extends AnyNode>(this: Cheerio<U>): string;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
/** An array-like selection of
|
|
72
|
+
/** An array-like selection of native nodes. */
|
|
73
73
|
declare class Cheerio<T = AnyNode> implements ArrayLike<T>, Iterable<T> {
|
|
74
74
|
[index: number]: T;
|
|
75
|
+
length: number;
|
|
75
76
|
options: CheerioOptions;
|
|
76
77
|
_root: Cheerio<Document> | null;
|
|
77
78
|
prevObject: Cheerio<any> | undefined;
|
|
78
|
-
|
|
79
|
-
cheerio: "[cheerio object]";
|
|
79
|
+
cheerio: '[cheerio object]';
|
|
80
80
|
constructor(api: CheerioAPI, document: NativeDocument, ids?: number[], root?: Cheerio<Document> | null, options?: CheerioOptions, values?: T[]);
|
|
81
81
|
_make<R>(value: ArrayLike<R> | R | string, context?: BasicAcceptedElems<AnyNode>): Cheerio<R>;
|
|
82
82
|
_parse(content: any, options: CheerioOptions, isDocument: boolean, context: ParentNode | null): Document;
|
package/dist/utils.d.mts
CHANGED
package/dist/utils.d.ts
CHANGED