brepjs-bim 0.3.0 → 0.4.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/dist/bcf/bcfXml.d.ts +9 -3
- package/dist/brepjs-bim.cjs +378 -139
- package/dist/brepjs-bim.js +377 -139
- package/dist/familiesAdapter.d.ts +22 -0
- package/dist/index.d.ts +1 -0
- package/dist/model/bimModel.d.ts +9 -4
- package/package.json +5 -2
package/dist/bcf/bcfXml.d.ts
CHANGED
|
@@ -24,9 +24,15 @@ export interface XmlNode {
|
|
|
24
24
|
readonly text: string;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Parse an XML string into a tree. Tolerant of the XML declaration,
|
|
28
|
-
* whitespace, self-closing tags, and CDATA-free text.
|
|
29
|
-
*
|
|
27
|
+
* Parse an XML string into a tree. Tolerant of the XML declaration, processing
|
|
28
|
+
* instructions, comments, whitespace, self-closing tags, and CDATA-free text.
|
|
29
|
+
* Throws on malformed or unbalanced structure; callers wrap this in a `Result`.
|
|
30
|
+
*
|
|
31
|
+
* This is a hand-written cursor scan rather than a single tokenizing regex: the
|
|
32
|
+
* input is an untrusted `.bcfzip` payload, and a backtracking regex over
|
|
33
|
+
* uncontrolled data is a polynomial-ReDoS vector. Every construct here is
|
|
34
|
+
* consumed by an `indexOf` or a single-character advance, so the parse is linear
|
|
35
|
+
* in the input length. The sibling `ids/idsXml.ts` parser scans the same way.
|
|
30
36
|
*/
|
|
31
37
|
export declare function parseXml(xml: string): XmlNode;
|
|
32
38
|
export declare function findChild(node: XmlNode, tag: string): XmlNode | undefined;
|