fullstacked 1.0.0-alpha.1789 → 1.0.0-alpha.1804
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/index.js +175 -31
- package/package.json +10 -7
- package/types/@types/config.d.ts +5 -0
- package/types/@types/index.d.ts +2 -2
- package/types/config/index.d.ts +21 -0
- package/types/run/index.d.ts +1 -0
package/index.js
CHANGED
|
@@ -507,9 +507,10 @@ var require_DOMParser = __commonJS({
|
|
|
507
507
|
}
|
|
508
508
|
var key;
|
|
509
509
|
var i;
|
|
510
|
-
function ParseError(message, locator) {
|
|
510
|
+
function ParseError(message, locator, cause) {
|
|
511
511
|
this.message = message;
|
|
512
512
|
this.locator = locator;
|
|
513
|
+
this.cause = cause;
|
|
513
514
|
if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError);
|
|
514
515
|
}
|
|
515
516
|
extendError(ParseError);
|
|
@@ -565,7 +566,7 @@ var require_DOMParser = __commonJS({
|
|
|
565
566
|
}
|
|
566
567
|
return isStr ? part : part.source;
|
|
567
568
|
}).join(""),
|
|
568
|
-
UNICODE_SUPPORT ? "
|
|
569
|
+
UNICODE_SUPPORT ? "u" : ""
|
|
569
570
|
);
|
|
570
571
|
}
|
|
571
572
|
function regg(args2) {
|
|
@@ -591,6 +592,7 @@ var require_DOMParser = __commonJS({
|
|
|
591
592
|
var NameStartChar_s = chars(NameStartChar);
|
|
592
593
|
var NameChar = reg("[", NameStartChar_s, chars(/[-.0-9\xB7]/), chars(/[\u0300-\u036F\u203F-\u2040]/), "]");
|
|
593
594
|
var Name = reg(NameStartChar, NameChar, "*");
|
|
595
|
+
var Name_exact = reg("^", Name, "$");
|
|
594
596
|
var Nmtoken = reg(NameChar, "+");
|
|
595
597
|
var EntityRef = reg("&", Name, ";");
|
|
596
598
|
var CharRef = regg(/&#[0-9]+;|&#x[0-9a-fA-F]+;/);
|
|
@@ -605,11 +607,12 @@ var require_DOMParser = __commonJS({
|
|
|
605
607
|
var NCNameStartChar = chars_without(NameStartChar, ":");
|
|
606
608
|
var NCNameChar = chars_without(NameChar, ":");
|
|
607
609
|
var NCName = reg(NCNameStartChar, NCNameChar, "*");
|
|
610
|
+
var NCName_exact = reg("^", NCName, "$");
|
|
608
611
|
var QName = reg(NCName, regg(":", NCName), "?");
|
|
609
612
|
var QName_exact = reg("^", QName, "$");
|
|
610
613
|
var QName_group = reg("(", QName, ")");
|
|
611
614
|
var SystemLiteral = regg(/"[^"]*"|'[^']*'/);
|
|
612
|
-
var PI = reg(/^<\?/, "(", Name, ")", regg(S, "(", Char, "*?)"), "?", /\?>/);
|
|
615
|
+
var PI = reg(/^<\?/, "(", Name, ")", regg(S, "(?!", _SChar, ")(", Char, "*?)"), "?", /\?>/);
|
|
613
616
|
var PubidChar = /[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/;
|
|
614
617
|
var PubidLiteral = regg('"', PubidChar, '*"', "|", "'", chars_without(PubidChar, "'"), "*'");
|
|
615
618
|
var COMMENT_START = "<!--";
|
|
@@ -698,6 +701,8 @@ var require_DOMParser = __commonJS({
|
|
|
698
701
|
exports2.ExternalID = ExternalID;
|
|
699
702
|
exports2.ExternalID_match = ExternalID_match;
|
|
700
703
|
exports2.Name = Name;
|
|
704
|
+
exports2.Name_exact = Name_exact;
|
|
705
|
+
exports2.NCName_exact = NCName_exact;
|
|
701
706
|
exports2.NotationDecl = NotationDecl;
|
|
702
707
|
exports2.Reference = Reference;
|
|
703
708
|
exports2.PEReference = PEReference;
|
|
@@ -987,6 +992,8 @@ var require_DOMParser = __commonJS({
|
|
|
987
992
|
};
|
|
988
993
|
_extends(LiveNodeList, NodeList);
|
|
989
994
|
function NamedNodeMap() {
|
|
995
|
+
this._nsIndex = /* @__PURE__ */ Object.create(null);
|
|
996
|
+
this._noNsIndex = /* @__PURE__ */ Object.create(null);
|
|
990
997
|
}
|
|
991
998
|
function _findNodeIndex(list, node) {
|
|
992
999
|
var i = 0;
|
|
@@ -997,6 +1004,30 @@ var require_DOMParser = __commonJS({
|
|
|
997
1004
|
i++;
|
|
998
1005
|
}
|
|
999
1006
|
}
|
|
1007
|
+
function _nnmBucket(map, namespaceURI, create) {
|
|
1008
|
+
if (!namespaceURI) {
|
|
1009
|
+
return map._noNsIndex;
|
|
1010
|
+
}
|
|
1011
|
+
var bucket = map._nsIndex[namespaceURI];
|
|
1012
|
+
if (!bucket && create) {
|
|
1013
|
+
bucket = map._nsIndex[namespaceURI] = /* @__PURE__ */ Object.create(null);
|
|
1014
|
+
}
|
|
1015
|
+
return bucket;
|
|
1016
|
+
}
|
|
1017
|
+
function _nnmIndexFind(map, namespaceURI, localName) {
|
|
1018
|
+
var bucket = _nnmBucket(map, namespaceURI, false);
|
|
1019
|
+
var found = bucket && bucket[localName];
|
|
1020
|
+
return found ? found : null;
|
|
1021
|
+
}
|
|
1022
|
+
function _nnmIndexAdd(map, attr) {
|
|
1023
|
+
_nnmBucket(map, attr.namespaceURI, true)[attr.localName] = attr;
|
|
1024
|
+
}
|
|
1025
|
+
function _nnmIndexRemove(map, attr) {
|
|
1026
|
+
var bucket = _nnmBucket(map, attr.namespaceURI, false);
|
|
1027
|
+
if (bucket) {
|
|
1028
|
+
delete bucket[attr.localName];
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1000
1031
|
function _addNamedNode(el, list, newAttr, oldAttr) {
|
|
1001
1032
|
if (oldAttr) {
|
|
1002
1033
|
list[_findNodeIndex(list, oldAttr)] = newAttr;
|
|
@@ -1004,6 +1035,7 @@ var require_DOMParser = __commonJS({
|
|
|
1004
1035
|
list[list.length] = newAttr;
|
|
1005
1036
|
list.length++;
|
|
1006
1037
|
}
|
|
1038
|
+
_nnmIndexAdd(list, newAttr);
|
|
1007
1039
|
if (el) {
|
|
1008
1040
|
newAttr.ownerElement = el;
|
|
1009
1041
|
var doc = el.ownerDocument;
|
|
@@ -1021,6 +1053,7 @@ var require_DOMParser = __commonJS({
|
|
|
1021
1053
|
list[i] = list[++i];
|
|
1022
1054
|
}
|
|
1023
1055
|
list.length = lastIndex;
|
|
1056
|
+
_nnmIndexRemove(list, attr);
|
|
1024
1057
|
if (el) {
|
|
1025
1058
|
var doc = el.ownerDocument;
|
|
1026
1059
|
if (doc) {
|
|
@@ -1076,7 +1109,7 @@ var require_DOMParser = __commonJS({
|
|
|
1076
1109
|
if (el && el !== this._ownerElement) {
|
|
1077
1110
|
throw new DOMException2(DOMException2.INUSE_ATTRIBUTE_ERR);
|
|
1078
1111
|
}
|
|
1079
|
-
var oldAttr = this
|
|
1112
|
+
var oldAttr = _nnmIndexFind(this, attr.namespaceURI, attr.localName);
|
|
1080
1113
|
if (oldAttr === attr) {
|
|
1081
1114
|
return attr;
|
|
1082
1115
|
}
|
|
@@ -1738,8 +1771,29 @@ var require_DOMParser = __commonJS({
|
|
|
1738
1771
|
while (child) {
|
|
1739
1772
|
var next = child.nextSibling;
|
|
1740
1773
|
if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) {
|
|
1741
|
-
|
|
1742
|
-
|
|
1774
|
+
var tail = [];
|
|
1775
|
+
var sibling = next;
|
|
1776
|
+
while (sibling !== null && sibling.nodeType === TEXT_NODE) {
|
|
1777
|
+
tail.push(sibling.data);
|
|
1778
|
+
sibling = sibling.nextSibling;
|
|
1779
|
+
}
|
|
1780
|
+
var removed = child.nextSibling;
|
|
1781
|
+
while (removed !== sibling) {
|
|
1782
|
+
var following = removed.nextSibling;
|
|
1783
|
+
removed.parentNode = null;
|
|
1784
|
+
removed.previousSibling = null;
|
|
1785
|
+
removed.nextSibling = null;
|
|
1786
|
+
removed = following;
|
|
1787
|
+
}
|
|
1788
|
+
child.nextSibling = sibling;
|
|
1789
|
+
if (sibling !== null) {
|
|
1790
|
+
sibling.previousSibling = child;
|
|
1791
|
+
} else {
|
|
1792
|
+
node.lastChild = child;
|
|
1793
|
+
}
|
|
1794
|
+
child.appendData(tail.join(""));
|
|
1795
|
+
_onUpdateChild(node.ownerDocument, node);
|
|
1796
|
+
child = sibling;
|
|
1743
1797
|
} else {
|
|
1744
1798
|
child = next;
|
|
1745
1799
|
}
|
|
@@ -2377,10 +2431,10 @@ var require_DOMParser = __commonJS({
|
|
|
2377
2431
|
* "InvalidCharacterError".
|
|
2378
2432
|
*
|
|
2379
2433
|
* Note: When the resulting document is serialized with `requireWellFormed: true`, the
|
|
2380
|
-
* serializer throws `InvalidStateError` if `.target`
|
|
2381
|
-
* case-insensitive match for `"xml"`, or if `.data` contains
|
|
2382
|
-
* XML Char production (W3C DOM Parsing §3.2.1.7). Without that
|
|
2383
|
-
* verbatim.
|
|
2434
|
+
* serializer throws `InvalidStateError` if `.target` is not a valid XML `NCName` (a `Name`
|
|
2435
|
+
* with no colon) or is an ASCII case-insensitive match for `"xml"`, or if `.data` contains
|
|
2436
|
+
* `?>` or characters outside the XML Char production (W3C DOM Parsing §3.2.1.7). Without that
|
|
2437
|
+
* option the target and data are emitted verbatim.
|
|
2384
2438
|
*
|
|
2385
2439
|
* @param {string} target
|
|
2386
2440
|
* @param {string} data
|
|
@@ -2435,19 +2489,29 @@ var require_DOMParser = __commonJS({
|
|
|
2435
2489
|
* The current implementation does not fill the `childNodes` with those of the corresponding
|
|
2436
2490
|
* `Entity`
|
|
2437
2491
|
*
|
|
2492
|
+
* The `name` is validated against the XML `Name` production at creation time; an invalid name
|
|
2493
|
+
* throws `InvalidCharacterError`. When the resulting node is serialized with
|
|
2494
|
+
* `requireWellFormed: true`, the serializer re-validates `nodeName` against the XML `Name`
|
|
2495
|
+
* production and throws `InvalidStateError` if a later `nodeName` mutation made it invalid;
|
|
2496
|
+
* without that option the name is emitted verbatim.
|
|
2497
|
+
*
|
|
2498
|
+
* __This implementation differs from the specification:__ xmldom does not expand entities —
|
|
2499
|
+
* the parser resolves entity references inline and never constructs `EntityReference` nodes,
|
|
2500
|
+
* so this method is the only producer.
|
|
2501
|
+
*
|
|
2438
2502
|
* @deprecated
|
|
2439
2503
|
* In DOM Level 4.
|
|
2440
2504
|
* @param {string} name
|
|
2441
2505
|
* The name of the entity to reference. No namespace well-formedness checks are performed.
|
|
2442
2506
|
* @returns {EntityReference}
|
|
2443
2507
|
* @throws {DOMException}
|
|
2444
|
-
* With code `INVALID_CHARACTER_ERR` when `name` is not valid
|
|
2508
|
+
* With code `INVALID_CHARACTER_ERR` when `name` is not a valid XML `Name`.
|
|
2445
2509
|
* @throws {DOMException}
|
|
2446
2510
|
* with code `NOT_SUPPORTED_ERR` when the document is of type `html`
|
|
2447
2511
|
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-392B75AE
|
|
2448
2512
|
*/
|
|
2449
2513
|
createEntityReference: function(name) {
|
|
2450
|
-
if (!g.
|
|
2514
|
+
if (!g.Name_exact.test(name)) {
|
|
2451
2515
|
throw new DOMException2(DOMException2.INVALID_CHARACTER_ERR, 'not a valid xml name "' + name + '"');
|
|
2452
2516
|
}
|
|
2453
2517
|
if (this.type === "html") {
|
|
@@ -2885,7 +2949,13 @@ var require_DOMParser = __commonJS({
|
|
|
2885
2949
|
}
|
|
2886
2950
|
return true;
|
|
2887
2951
|
}
|
|
2888
|
-
function addSerializedAttribute(buf, qualifiedName, value) {
|
|
2952
|
+
function addSerializedAttribute(buf, qualifiedName, value, requireWellFormed) {
|
|
2953
|
+
if (requireWellFormed && !g.QName_exact.test(qualifiedName)) {
|
|
2954
|
+
throw new DOMException2(
|
|
2955
|
+
'The attribute name "' + qualifiedName + '" is not a valid XML QName',
|
|
2956
|
+
DOMExceptionName.InvalidStateError
|
|
2957
|
+
);
|
|
2958
|
+
}
|
|
2889
2959
|
buf.push(" ", qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
|
|
2890
2960
|
}
|
|
2891
2961
|
function serializeToString(node, buf, visibleNamespaces, opts) {
|
|
@@ -2949,6 +3019,12 @@ var require_DOMParser = __commonJS({
|
|
|
2949
3019
|
}
|
|
2950
3020
|
}
|
|
2951
3021
|
}
|
|
3022
|
+
if (requireWellFormed && !g.QName_exact.test(prefixedNodeName)) {
|
|
3023
|
+
throw new DOMException2(
|
|
3024
|
+
'The element name "' + prefixedNodeName + '" is not a valid XML QName',
|
|
3025
|
+
DOMExceptionName.InvalidStateError
|
|
3026
|
+
);
|
|
3027
|
+
}
|
|
2952
3028
|
buf.push("<", prefixedNodeName);
|
|
2953
3029
|
var childNamespaces = namespaces.slice();
|
|
2954
3030
|
for (var i = 0; i < len; i++) {
|
|
@@ -2967,7 +3043,7 @@ var require_DOMParser = __commonJS({
|
|
|
2967
3043
|
if (needNamespaceDefine(attr, isHTML, childNamespaces)) {
|
|
2968
3044
|
var attrPrefix = attr.prefix || "";
|
|
2969
3045
|
var uri = attr.namespaceURI;
|
|
2970
|
-
addSerializedAttribute(buf, attrPrefix ? "xmlns:" + attrPrefix : "xmlns", uri);
|
|
3046
|
+
addSerializedAttribute(buf, attrPrefix ? "xmlns:" + attrPrefix : "xmlns", uri, requireWellFormed);
|
|
2971
3047
|
childNamespaces.push({ prefix: attrPrefix, namespace: uri });
|
|
2972
3048
|
}
|
|
2973
3049
|
var filteredAttr = nodeFilter ? nodeFilter(attr) : attr;
|
|
@@ -2975,14 +3051,14 @@ var require_DOMParser = __commonJS({
|
|
|
2975
3051
|
if (typeof filteredAttr === "string") {
|
|
2976
3052
|
buf.push(filteredAttr);
|
|
2977
3053
|
} else {
|
|
2978
|
-
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
|
|
3054
|
+
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value, requireWellFormed);
|
|
2979
3055
|
}
|
|
2980
3056
|
}
|
|
2981
3057
|
}
|
|
2982
3058
|
if (nodeName === prefixedNodeName && needNamespaceDefine(n, isHTML, childNamespaces)) {
|
|
2983
3059
|
var nodePrefix = n.prefix || "";
|
|
2984
3060
|
var uri = n.namespaceURI;
|
|
2985
|
-
addSerializedAttribute(buf, nodePrefix ? "xmlns:" + nodePrefix : "xmlns", uri);
|
|
3061
|
+
addSerializedAttribute(buf, nodePrefix ? "xmlns:" + nodePrefix : "xmlns", uri, requireWellFormed);
|
|
2986
3062
|
childNamespaces.push({ prefix: nodePrefix, namespace: uri });
|
|
2987
3063
|
}
|
|
2988
3064
|
var canCloseTag = !n.firstChild;
|
|
@@ -3015,7 +3091,7 @@ var require_DOMParser = __commonJS({
|
|
|
3015
3091
|
}
|
|
3016
3092
|
return { ns: namespaces };
|
|
3017
3093
|
case ATTRIBUTE_NODE:
|
|
3018
|
-
addSerializedAttribute(buf, n.name, n.value);
|
|
3094
|
+
addSerializedAttribute(buf, n.name, n.value, requireWellFormed);
|
|
3019
3095
|
return null;
|
|
3020
3096
|
case TEXT_NODE:
|
|
3021
3097
|
if (requireWellFormed && g.InvalidChar.test(n.data)) {
|
|
@@ -3057,6 +3133,12 @@ var require_DOMParser = __commonJS({
|
|
|
3057
3133
|
var pubid = n.publicId;
|
|
3058
3134
|
var sysid = n.systemId;
|
|
3059
3135
|
if (requireWellFormed) {
|
|
3136
|
+
if (!g.Name_exact.test(n.name)) {
|
|
3137
|
+
throw new DOMException2(
|
|
3138
|
+
'The doctype name "' + n.name + '" is not a valid XML Name',
|
|
3139
|
+
DOMExceptionName.InvalidStateError
|
|
3140
|
+
);
|
|
3141
|
+
}
|
|
3060
3142
|
if (pubid && !g.PubidLiteral_match.test(pubid)) {
|
|
3061
3143
|
throw new DOMException2("DocumentType publicId is not a valid PubidLiteral", DOMExceptionName.InvalidStateError);
|
|
3062
3144
|
}
|
|
@@ -3083,8 +3165,11 @@ var require_DOMParser = __commonJS({
|
|
|
3083
3165
|
return null;
|
|
3084
3166
|
case PROCESSING_INSTRUCTION_NODE:
|
|
3085
3167
|
if (requireWellFormed) {
|
|
3086
|
-
if (n.target
|
|
3087
|
-
throw new DOMException2(
|
|
3168
|
+
if (!g.NCName_exact.test(n.target) || n.target.toLowerCase() === "xml") {
|
|
3169
|
+
throw new DOMException2(
|
|
3170
|
+
'The processing instruction target "' + n.target + '" is not a valid XML NCName or is reserved',
|
|
3171
|
+
DOMExceptionName.InvalidStateError
|
|
3172
|
+
);
|
|
3088
3173
|
}
|
|
3089
3174
|
if (g.InvalidChar.test(n.data)) {
|
|
3090
3175
|
throw new DOMException2(
|
|
@@ -3099,6 +3184,12 @@ var require_DOMParser = __commonJS({
|
|
|
3099
3184
|
buf.push("<?", n.target, " ", n.data, "?>");
|
|
3100
3185
|
return null;
|
|
3101
3186
|
case ENTITY_REFERENCE_NODE:
|
|
3187
|
+
if (requireWellFormed && !g.Name_exact.test(n.nodeName)) {
|
|
3188
|
+
throw new DOMException2(
|
|
3189
|
+
'The entity reference name "' + n.nodeName + '" is not a valid XML Name',
|
|
3190
|
+
DOMExceptionName.InvalidStateError
|
|
3191
|
+
);
|
|
3192
|
+
}
|
|
3102
3193
|
buf.push("&", n.nodeName, ";");
|
|
3103
3194
|
return null;
|
|
3104
3195
|
//case ENTITY_NODE:
|
|
@@ -3236,6 +3327,25 @@ var require_DOMParser = __commonJS({
|
|
|
3236
3327
|
}
|
|
3237
3328
|
}
|
|
3238
3329
|
});
|
|
3330
|
+
Object.defineProperty(CharacterData.prototype, "data", {
|
|
3331
|
+
get: function() {
|
|
3332
|
+
return this._data != null ? this._data : "";
|
|
3333
|
+
},
|
|
3334
|
+
set: function(v) {
|
|
3335
|
+
this._data = v;
|
|
3336
|
+
this.length = typeof v === "string" ? v.length : 0;
|
|
3337
|
+
}
|
|
3338
|
+
});
|
|
3339
|
+
Object.defineProperty(CharacterData.prototype, "nodeValue", {
|
|
3340
|
+
get: function() {
|
|
3341
|
+
return this.data;
|
|
3342
|
+
},
|
|
3343
|
+
set: function(v) {
|
|
3344
|
+
this.data = v;
|
|
3345
|
+
},
|
|
3346
|
+
enumerable: true,
|
|
3347
|
+
configurable: true
|
|
3348
|
+
});
|
|
3239
3349
|
Object.defineProperty(Element.prototype, "children", {
|
|
3240
3350
|
get: function() {
|
|
3241
3351
|
return new LiveNodeList(this, childrenRefresh);
|
|
@@ -5545,9 +5655,26 @@ var require_DOMParser = __commonJS({
|
|
|
5545
5655
|
if (!tagNameRaw) {
|
|
5546
5656
|
return errorHandler.fatalError("end tag name missing");
|
|
5547
5657
|
}
|
|
5548
|
-
var
|
|
5658
|
+
var endTagNameStrict = g.reg("^", g.QName_group, g.S_OPT, "$");
|
|
5659
|
+
var tagNameMatch = end > 0 && endTagNameStrict.exec(tagNameRaw);
|
|
5549
5660
|
if (!tagNameMatch) {
|
|
5550
|
-
|
|
5661
|
+
var leadingTagNameMatch = end > 0 && g.reg("^", g.QName_group).exec(tagNameRaw);
|
|
5662
|
+
if (isHTML && leadingTagNameMatch) {
|
|
5663
|
+
errorHandler.warning('end tag name contains invalid trailing characters: "' + tagNameRaw + '"');
|
|
5664
|
+
tagNameMatch = leadingTagNameMatch;
|
|
5665
|
+
} else if (
|
|
5666
|
+
// Backward compatibility, remove this whole `else if` arm in the next breaking release
|
|
5667
|
+
// (XML then falls through to the `fatalError` below, for a clean mode split: XML fatal,
|
|
5668
|
+
// HTML warning). A valid end-tag name followed by a line break and trailing content was
|
|
5669
|
+
// silently accepted while `reg` still used the `m` flag; re-adding `m` here matches exactly
|
|
5670
|
+
// those inputs, kept recoverable and reported.
|
|
5671
|
+
leadingTagNameMatch && new RegExp(endTagNameStrict.source, endTagNameStrict.flags + "m").test(tagNameRaw)
|
|
5672
|
+
) {
|
|
5673
|
+
errorHandler.error('end tag name is followed by a line break and trailing content: "' + tagNameRaw + '"');
|
|
5674
|
+
tagNameMatch = leadingTagNameMatch;
|
|
5675
|
+
} else {
|
|
5676
|
+
return errorHandler.fatalError('end tag name contains invalid characters: "' + tagNameRaw + '"');
|
|
5677
|
+
}
|
|
5551
5678
|
}
|
|
5552
5679
|
if (!domBuilder.currentElement && !domBuilder.doc.documentElement) {
|
|
5553
5680
|
return;
|
|
@@ -5621,7 +5748,7 @@ var require_DOMParser = __commonJS({
|
|
|
5621
5748
|
if (e instanceof ParseError) {
|
|
5622
5749
|
throw e;
|
|
5623
5750
|
} else if (e instanceof DOMException2) {
|
|
5624
|
-
|
|
5751
|
+
return errorHandler.fatalError("Error constructing the DOM: " + e.name + ": " + e.message, e);
|
|
5625
5752
|
}
|
|
5626
5753
|
errorHandler.error("element parse error: " + e);
|
|
5627
5754
|
end = -1;
|
|
@@ -5662,6 +5789,9 @@ var require_DOMParser = __commonJS({
|
|
|
5662
5789
|
var s = S_TAG;
|
|
5663
5790
|
while (true) {
|
|
5664
5791
|
var c = source.charAt(p);
|
|
5792
|
+
if (s === S_TAG && c === "<") {
|
|
5793
|
+
throw new Error("unexpected < in tag name: " + source.slice(start, p));
|
|
5794
|
+
}
|
|
5665
5795
|
switch (c) {
|
|
5666
5796
|
case "=":
|
|
5667
5797
|
if (s === S_ATTR) {
|
|
@@ -5837,7 +5967,7 @@ var require_DOMParser = __commonJS({
|
|
|
5837
5967
|
if (nsPrefix !== false) {
|
|
5838
5968
|
if (localNSMap == null) {
|
|
5839
5969
|
localNSMap = /* @__PURE__ */ Object.create(null);
|
|
5840
|
-
|
|
5970
|
+
currentNSMap = Object.create(currentNSMap);
|
|
5841
5971
|
}
|
|
5842
5972
|
currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
|
|
5843
5973
|
a.uri = NAMESPACE.XMLNS;
|
|
@@ -5884,7 +6014,13 @@ var require_DOMParser = __commonJS({
|
|
|
5884
6014
|
function parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) {
|
|
5885
6015
|
var isEscapableRaw = isHTMLEscapableRawTextElement(tagName);
|
|
5886
6016
|
if (isEscapableRaw || isHTMLRawTextElement(tagName)) {
|
|
5887
|
-
var
|
|
6017
|
+
var closeTag = new RegExp("</" + tagName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + ">", "ig");
|
|
6018
|
+
closeTag.lastIndex = elStartEnd;
|
|
6019
|
+
var match = closeTag.exec(source);
|
|
6020
|
+
var elEndStart = match ? match.index : -1;
|
|
6021
|
+
if (elEndStart < 0) {
|
|
6022
|
+
return elStartEnd + 1;
|
|
6023
|
+
}
|
|
5888
6024
|
var text = source.substring(elStartEnd + 1, elEndStart);
|
|
5889
6025
|
if (isEscapableRaw) {
|
|
5890
6026
|
text = text.replace(ENTITY_REG, entityReplacer);
|
|
@@ -6386,14 +6522,16 @@ var require_DOMParser = __commonJS({
|
|
|
6386
6522
|
*
|
|
6387
6523
|
* @param {string} message
|
|
6388
6524
|
* - The message to be used for reporting and throwing the error.
|
|
6525
|
+
* @param {Error} [cause]
|
|
6526
|
+
* The error that caused this fatal error, preserved as the thrown `ParseError`'s `cause`.
|
|
6389
6527
|
* @returns {never}
|
|
6390
6528
|
* This function always throws an error and never returns a value.
|
|
6391
6529
|
* @throws {ParseError}
|
|
6392
6530
|
* Always throws a ParseError with the provided message.
|
|
6393
6531
|
*/
|
|
6394
|
-
fatalError: function(message) {
|
|
6532
|
+
fatalError: function(message, cause) {
|
|
6395
6533
|
this.reportError("fatalError", message);
|
|
6396
|
-
throw new ParseError(message, this.locator);
|
|
6534
|
+
throw new ParseError(message, this.locator, cause);
|
|
6397
6535
|
}
|
|
6398
6536
|
};
|
|
6399
6537
|
function _locator(l) {
|
|
@@ -8090,7 +8228,7 @@ var Exit = 5;
|
|
|
8090
8228
|
init_isWorker();
|
|
8091
8229
|
|
|
8092
8230
|
// ../../core/internal/bundle/lib/process/version.json
|
|
8093
|
-
var version_default = { major: "1", minor: "0", patch: "0-alpha", branch: "v1", build: "
|
|
8231
|
+
var version_default = { major: "1", minor: "0", patch: "0-alpha", branch: "v1", build: "1804", hash: "ac2b3e1d237ddbb5538d1f42fe7ec23ad7df9c21" };
|
|
8094
8232
|
|
|
8095
8233
|
// ../../core/internal/bundle/lib/timers/index.ts
|
|
8096
8234
|
var setTimeout2 = globalThis.setTimeout.bind(globalThis);
|
|
@@ -9153,11 +9291,12 @@ function bundleFile(entryPoint) {
|
|
|
9153
9291
|
async function run(directoryOrOptions) {
|
|
9154
9292
|
const directory = typeof directoryOrOptions === "string" ? directoryOrOptions : directoryOrOptions?.directory;
|
|
9155
9293
|
const env2 = typeof directoryOrOptions === "object" ? directoryOrOptions.env : void 0;
|
|
9294
|
+
const safe = typeof directoryOrOptions === "object" ? directoryOrOptions.safe : void 0;
|
|
9156
9295
|
const resolved = path_default.resolve(directory ?? ".");
|
|
9157
9296
|
const newCtx = await globalThis.fullstacked.bridge({
|
|
9158
9297
|
mod: Core,
|
|
9159
9298
|
fn: Run,
|
|
9160
|
-
data: [resolved, env2]
|
|
9299
|
+
data: [resolved, env2, safe]
|
|
9161
9300
|
});
|
|
9162
9301
|
return newCtx;
|
|
9163
9302
|
}
|
|
@@ -9472,7 +9611,8 @@ function getPositionalArgs(args2) {
|
|
|
9472
9611
|
["-v", "--version"],
|
|
9473
9612
|
["-o", "--open"],
|
|
9474
9613
|
["-n", "--no-open"],
|
|
9475
|
-
["-b", "--build"]
|
|
9614
|
+
["-b", "--build"],
|
|
9615
|
+
["-s", "--safe"]
|
|
9476
9616
|
];
|
|
9477
9617
|
for (let i = 0; i < args2.length; i++) {
|
|
9478
9618
|
const arg = args2[i];
|
|
@@ -9520,6 +9660,7 @@ function getExtraArgs(args2) {
|
|
|
9520
9660
|
["-v", "--version"],
|
|
9521
9661
|
["-o", "--open"],
|
|
9522
9662
|
["-n", "--no-open"],
|
|
9663
|
+
["-s", "--safe"],
|
|
9523
9664
|
["-b", "--build"]
|
|
9524
9665
|
];
|
|
9525
9666
|
for (let i = 0; i < args2.length; i++) {
|
|
@@ -9668,7 +9809,7 @@ async function runFile(file, extraArgs, writeOut, writeErr) {
|
|
|
9668
9809
|
}
|
|
9669
9810
|
}
|
|
9670
9811
|
}
|
|
9671
|
-
async function runDirectory(positionals, pluginsArgs, buildOnly, noOpen, env2, writeOut, writeErr) {
|
|
9812
|
+
async function runDirectory(positionals, pluginsArgs, buildOnly, noOpen, env2, safe, writeOut, writeErr) {
|
|
9672
9813
|
const targetDirectory = path_default.resolve(positionals.at(-1) || ".");
|
|
9673
9814
|
const buildPlugins = [];
|
|
9674
9815
|
const tempPluginFiles = [];
|
|
@@ -9733,7 +9874,7 @@ async function runDirectory(positionals, pluginsArgs, buildOnly, noOpen, env2, w
|
|
|
9733
9874
|
await cleanupPlugins();
|
|
9734
9875
|
return 0;
|
|
9735
9876
|
}
|
|
9736
|
-
const newCtx = await run_default({ directory: targetDirectory, env: env2 });
|
|
9877
|
+
const newCtx = await run_default({ directory: targetDirectory, env: env2, safe });
|
|
9737
9878
|
await cleanupPlugins();
|
|
9738
9879
|
if (!noOpen && typeof newCtx === "number") {
|
|
9739
9880
|
globalThis.fullstacked.open?.(newCtx);
|
|
@@ -9807,6 +9948,7 @@ Options:
|
|
|
9807
9948
|
-o, --open Directly open the browser
|
|
9808
9949
|
-b, --build Only bundle the project, don't run it afterward
|
|
9809
9950
|
-f, --file Bundle and execute a single script file
|
|
9951
|
+
-s, --safe Skip the initialDirectory config check
|
|
9810
9952
|
-h, --help Display this help message
|
|
9811
9953
|
|
|
9812
9954
|
Directory:
|
|
@@ -9820,6 +9962,7 @@ Directory:
|
|
|
9820
9962
|
const noOpen = hasArgFlag(["-n", "--no-open"], args2);
|
|
9821
9963
|
const envArgs = findArgValues(["-e", "--env"], args2);
|
|
9822
9964
|
const pluginsArgs = findArgValues(["-p", "--plugin"], args2);
|
|
9965
|
+
const safe = hasArgFlag(["-s", "--safe"], args2);
|
|
9823
9966
|
const positionals = getPositionalArgs(args2);
|
|
9824
9967
|
const env2 = {};
|
|
9825
9968
|
for (const val of envArgs) {
|
|
@@ -9840,6 +9983,7 @@ Directory:
|
|
|
9840
9983
|
buildOnly,
|
|
9841
9984
|
noOpen,
|
|
9842
9985
|
env2,
|
|
9986
|
+
safe,
|
|
9843
9987
|
writeOut,
|
|
9844
9988
|
writeErr
|
|
9845
9989
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fullstacked",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.1804",
|
|
4
4
|
"bin": {
|
|
5
5
|
"fullstacked": "index.js"
|
|
6
6
|
},
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"node-addon-api": "^8.9.0"
|
|
20
20
|
},
|
|
21
21
|
"optionalDependencies": {
|
|
22
|
-
"@fullstacked/darwin-arm64": "1.0.0-alpha.
|
|
23
|
-
"@fullstacked/darwin-x64": "1.0.0-alpha.
|
|
24
|
-
"@fullstacked/linux-arm64": "1.0.0-alpha.
|
|
25
|
-
"@fullstacked/linux-x64": "1.0.0-alpha.
|
|
26
|
-
"@fullstacked/win32-arm64": "1.0.0-alpha.
|
|
27
|
-
"@fullstacked/win32-x64": "1.0.0-alpha.
|
|
22
|
+
"@fullstacked/darwin-arm64": "1.0.0-alpha.1804",
|
|
23
|
+
"@fullstacked/darwin-x64": "1.0.0-alpha.1804",
|
|
24
|
+
"@fullstacked/linux-arm64": "1.0.0-alpha.1804",
|
|
25
|
+
"@fullstacked/linux-x64": "1.0.0-alpha.1804",
|
|
26
|
+
"@fullstacked/win32-arm64": "1.0.0-alpha.1804",
|
|
27
|
+
"@fullstacked/win32-x64": "1.0.0-alpha.1804"
|
|
28
28
|
},
|
|
29
29
|
"author": "FullStacked",
|
|
30
30
|
"license": "MIT",
|
|
@@ -44,6 +44,9 @@
|
|
|
44
44
|
"./bundle": {
|
|
45
45
|
"types": "./types/bundle/index.d.ts"
|
|
46
46
|
},
|
|
47
|
+
"./config": {
|
|
48
|
+
"types": "./types/config/index.d.ts"
|
|
49
|
+
},
|
|
47
50
|
"./git": {
|
|
48
51
|
"types": "./types/git/index.d.ts"
|
|
49
52
|
},
|
package/types/@types/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare const Packages: CoreModule;
|
|
|
15
15
|
export declare const Dgram: CoreModule;
|
|
16
16
|
export declare const Plugin: CoreModule;
|
|
17
17
|
export declare const WebSocket: CoreModule;
|
|
18
|
+
export declare const Config: CoreModule;
|
|
18
19
|
export type ModuleSwitch = any;
|
|
19
20
|
export type CoreCallResponseType = number;
|
|
20
21
|
export declare const CoreResponseError: CoreCallResponseType;
|
|
@@ -86,7 +87,6 @@ export interface Context {
|
|
|
86
87
|
[key: string]: string;
|
|
87
88
|
};
|
|
88
89
|
Cwd: string;
|
|
89
|
-
NodePaths: string[];
|
|
90
90
|
Responses: {
|
|
91
91
|
[key: number]: string;
|
|
92
92
|
};
|
|
@@ -105,7 +105,7 @@ export interface Context {
|
|
|
105
105
|
[key: string]: GitAuth | undefined;
|
|
106
106
|
};
|
|
107
107
|
GitAuthsMutex?: any;
|
|
108
|
-
|
|
108
|
+
Exited: boolean;
|
|
109
109
|
}
|
|
110
110
|
export type SerializableData = any;
|
|
111
111
|
export type SerializableDataType = number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function get(key?: string): Promise<string | undefined>;
|
|
2
|
+
export declare function set(key: string, value: string): Promise<void>;
|
|
3
|
+
export declare function list(): Promise<Record<string, string>>;
|
|
4
|
+
export declare function del(key: string): Promise<void>;
|
|
5
|
+
export { del as delete };
|
|
6
|
+
export declare const getConfig: typeof get;
|
|
7
|
+
export declare const setConfig: typeof set;
|
|
8
|
+
export declare const listConfig: typeof list;
|
|
9
|
+
export declare const deleteConfig: typeof del;
|
|
10
|
+
declare const config: {
|
|
11
|
+
get: typeof get;
|
|
12
|
+
set: typeof set;
|
|
13
|
+
list: typeof list;
|
|
14
|
+
delete: typeof del;
|
|
15
|
+
del: typeof del;
|
|
16
|
+
getConfig: typeof get;
|
|
17
|
+
setConfig: typeof set;
|
|
18
|
+
listConfig: typeof list;
|
|
19
|
+
deleteConfig: typeof del;
|
|
20
|
+
};
|
|
21
|
+
export default config;
|