@stencil/core 4.45.2 → 4.45.3-dev.1794546358.f4fe940
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/cli/index.cjs +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +234 -149
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/app-globals/package.json +1 -1
- package/internal/client/index.js +78 -39
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +77 -39
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +18 -12
- package/internal/package.json +1 -1
- package/internal/stencil-public-runtime.d.ts +1 -1
- package/internal/testing/index.js +76 -38
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +18 -12
- package/mock-doc/index.d.ts +13 -3
- package/mock-doc/index.js +18 -12
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/autoprefixer.js +1 -1
- package/sys/node/index.js +1 -1
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +1 -1
- package/testing/package.json +1 -1
package/compiler/stencil.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Compiler v4.45.
|
|
2
|
+
Stencil Compiler v4.45.3-dev.1794546358.f4fe940 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __create = Object.create;
|
|
@@ -214945,10 +214945,9 @@ var require_source_map_generator2 = __commonJS({
|
|
|
214945
214945
|
next = "";
|
|
214946
214946
|
if (mapping.generatedLine !== previousGeneratedLine) {
|
|
214947
214947
|
previousGeneratedColumn = 0;
|
|
214948
|
-
|
|
214949
|
-
|
|
214950
|
-
|
|
214951
|
-
}
|
|
214948
|
+
var lineDelta = mapping.generatedLine - previousGeneratedLine;
|
|
214949
|
+
next += lineDelta === 1 ? ";" : ";".repeat(lineDelta);
|
|
214950
|
+
previousGeneratedLine = mapping.generatedLine;
|
|
214952
214951
|
} else {
|
|
214953
214952
|
if (i > 0) {
|
|
214954
214953
|
if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
|
|
@@ -215109,9 +215108,17 @@ var require_quick_sort2 = __commonJS({
|
|
|
215109
215108
|
let templateFn = new Function(`return ${template}`)();
|
|
215110
215109
|
return templateFn(comparator);
|
|
215111
215110
|
}
|
|
215111
|
+
var isEvalAllowed = (function() {
|
|
215112
|
+
try {
|
|
215113
|
+
new Function("return 0")();
|
|
215114
|
+
return true;
|
|
215115
|
+
} catch {
|
|
215116
|
+
return false;
|
|
215117
|
+
}
|
|
215118
|
+
})();
|
|
215112
215119
|
var sortCache = /* @__PURE__ */ new WeakMap();
|
|
215113
215120
|
exports2.quickSort = function(ary, comparator, start = 0) {
|
|
215114
|
-
let doQuickSort = sortCache.get(comparator);
|
|
215121
|
+
let doQuickSort = isEvalAllowed ? sortCache.get(comparator) : SortTemplate(comparator);
|
|
215115
215122
|
if (doQuickSort === void 0) {
|
|
215116
215123
|
doQuickSort = cloneSort(comparator);
|
|
215117
215124
|
sortCache.set(comparator, doQuickSort);
|
|
@@ -215130,6 +215137,7 @@ var require_source_map_consumer2 = __commonJS({
|
|
|
215130
215137
|
var ArraySet = require_array_set2().ArraySet;
|
|
215131
215138
|
var base64VLQ = require_base64_vlq2();
|
|
215132
215139
|
var quickSort = require_quick_sort2().quickSort;
|
|
215140
|
+
var MAX_SECTION_OFFSET_LINE = 1e7;
|
|
215133
215141
|
function SourceMapConsumer2(aSourceMap, aSourceMapURL) {
|
|
215134
215142
|
var sourceMap = aSourceMap;
|
|
215135
215143
|
if (typeof aSourceMap === "string") {
|
|
@@ -215622,6 +215630,7 @@ var require_source_map_consumer2 = __commonJS({
|
|
|
215622
215630
|
line: -1,
|
|
215623
215631
|
column: 0
|
|
215624
215632
|
};
|
|
215633
|
+
var maxOffsetLine = 0;
|
|
215625
215634
|
this._sections = sections.map(function(s) {
|
|
215626
215635
|
if (s.url) {
|
|
215627
215636
|
throw new Error("Support for url field in sections not implemented.");
|
|
@@ -215629,10 +215638,24 @@ var require_source_map_consumer2 = __commonJS({
|
|
|
215629
215638
|
var offset = util.getArg(s, "offset");
|
|
215630
215639
|
var offsetLine = util.getArg(offset, "line");
|
|
215631
215640
|
var offsetColumn = util.getArg(offset, "column");
|
|
215641
|
+
if (!isValidOffset(offsetLine) || !isValidOffset(offsetColumn)) {
|
|
215642
|
+
throw new Error("Section offset line and column must be non-negative integers.");
|
|
215643
|
+
}
|
|
215644
|
+
if (offsetLine > MAX_SECTION_OFFSET_LINE) {
|
|
215645
|
+
throw new Error("Section offset line must not exceed " + MAX_SECTION_OFFSET_LINE + ".");
|
|
215646
|
+
}
|
|
215632
215647
|
if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
|
|
215633
215648
|
throw new Error("Section offsets must be ordered and non-overlapping.");
|
|
215634
215649
|
}
|
|
215635
215650
|
lastOffset = offset;
|
|
215651
|
+
var consumer = new SourceMapConsumer2(util.getArg(s, "map"), aSourceMapURL);
|
|
215652
|
+
var totalOffsetLine = offsetLine + (consumer._maxOffsetLine || 0);
|
|
215653
|
+
if (totalOffsetLine > MAX_SECTION_OFFSET_LINE) {
|
|
215654
|
+
throw new Error("Section offset line must not exceed " + MAX_SECTION_OFFSET_LINE + ", including offsets of nested sections.");
|
|
215655
|
+
}
|
|
215656
|
+
if (totalOffsetLine > maxOffsetLine) {
|
|
215657
|
+
maxOffsetLine = totalOffsetLine;
|
|
215658
|
+
}
|
|
215636
215659
|
return {
|
|
215637
215660
|
generatedOffset: {
|
|
215638
215661
|
// The offset fields are 0-based, but we use 1-based indices when
|
|
@@ -215640,9 +215663,14 @@ var require_source_map_consumer2 = __commonJS({
|
|
|
215640
215663
|
generatedLine: offsetLine + 1,
|
|
215641
215664
|
generatedColumn: offsetColumn + 1
|
|
215642
215665
|
},
|
|
215643
|
-
consumer
|
|
215666
|
+
consumer
|
|
215644
215667
|
};
|
|
215645
215668
|
});
|
|
215669
|
+
this._maxOffsetLine = maxOffsetLine;
|
|
215670
|
+
}
|
|
215671
|
+
function isValidOffset(aValue) {
|
|
215672
|
+
return typeof aValue === "number" && aValue >= 0 && aValue <= 9007199254740991 && // Number.MAX_SAFE_INTEGER
|
|
215673
|
+
Math.floor(aValue) === aValue;
|
|
215646
215674
|
}
|
|
215647
215675
|
IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer2.prototype);
|
|
215648
215676
|
IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer2;
|
|
@@ -215651,8 +215679,9 @@ var require_source_map_consumer2 = __commonJS({
|
|
|
215651
215679
|
get: function() {
|
|
215652
215680
|
var sources = [];
|
|
215653
215681
|
for (var i = 0; i < this._sections.length; i++) {
|
|
215654
|
-
|
|
215655
|
-
|
|
215682
|
+
var sectionSources = this._sections[i].consumer.sources;
|
|
215683
|
+
for (var j = 0; j < sectionSources.length; j++) {
|
|
215684
|
+
sources.push(sectionSources[j]);
|
|
215656
215685
|
}
|
|
215657
215686
|
}
|
|
215658
215687
|
return sources;
|
|
@@ -215819,6 +215848,10 @@ var require_source_node2 = __commonJS({
|
|
|
215819
215848
|
}
|
|
215820
215849
|
}
|
|
215821
215850
|
while (lastGeneratedLine < mapping.generatedLine) {
|
|
215851
|
+
if (remainingLinesIndex >= remainingLines.length) {
|
|
215852
|
+
lastGeneratedLine = mapping.generatedLine;
|
|
215853
|
+
break;
|
|
215854
|
+
}
|
|
215822
215855
|
node.add(shiftNextLine());
|
|
215823
215856
|
lastGeneratedLine++;
|
|
215824
215857
|
}
|
|
@@ -219251,10 +219284,14 @@ var require_container2 = __commonJS({
|
|
|
219251
219284
|
return this._stringify(options, 0, (0, util_1.resolveMaxNestingDepth)(options.maxNestingDepth));
|
|
219252
219285
|
};
|
|
219253
219286
|
Container3.prototype._stringify = function(options, depth, max) {
|
|
219287
|
+
var _this = this;
|
|
219254
219288
|
return this.map(function(child) {
|
|
219255
|
-
return
|
|
219289
|
+
return _this._stringifyChild(child, options, depth, max);
|
|
219256
219290
|
}).join("");
|
|
219257
219291
|
};
|
|
219292
|
+
Container3.prototype._stringifyChild = function(child, options, depth, max) {
|
|
219293
|
+
return typeof child._stringify === "function" ? child._stringify(options, depth, max) : String(child);
|
|
219294
|
+
};
|
|
219258
219295
|
return Container3;
|
|
219259
219296
|
})(node_1.default)
|
|
219260
219297
|
);
|
|
@@ -219302,8 +219339,9 @@ var require_root2 = __commonJS({
|
|
|
219302
219339
|
return _this;
|
|
219303
219340
|
}
|
|
219304
219341
|
Root3.prototype._stringify = function(options, depth, max) {
|
|
219342
|
+
var _this = this;
|
|
219305
219343
|
var str = this.reduce(function(memo, selector) {
|
|
219306
|
-
memo.push(
|
|
219344
|
+
memo.push(_this._stringifyChild(selector, options, depth, max));
|
|
219307
219345
|
return memo;
|
|
219308
219346
|
}, []).join(",");
|
|
219309
219347
|
return this.trailingComma ? str + "," : str;
|
|
@@ -219870,11 +219908,12 @@ var require_pseudo = __commonJS({
|
|
|
219870
219908
|
return _this;
|
|
219871
219909
|
}
|
|
219872
219910
|
Pseudo2.prototype._stringify = function(options, depth, max) {
|
|
219911
|
+
var _this = this;
|
|
219873
219912
|
if (depth >= max) {
|
|
219874
219913
|
throw new Error("Cannot serialize selector: nesting depth exceeds the maximum of ".concat(max, "."));
|
|
219875
219914
|
}
|
|
219876
219915
|
var params = this.length ? "(" + this.map(function(child) {
|
|
219877
|
-
return
|
|
219916
|
+
return _this._stringifyChild(child, options, depth + 1, max);
|
|
219878
219917
|
}).join(",") + ")" : "";
|
|
219879
219918
|
return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join("");
|
|
219880
219919
|
};
|
|
@@ -220905,10 +220944,7 @@ var require_parser2 = __commonJS({
|
|
|
220905
220944
|
return indexes;
|
|
220906
220945
|
}
|
|
220907
220946
|
function uniqs() {
|
|
220908
|
-
|
|
220909
|
-
return list2.filter(function(item, i) {
|
|
220910
|
-
return i === list2.indexOf(item);
|
|
220911
|
-
});
|
|
220947
|
+
return Array.from(new Set(Array.prototype.concat.apply([], arguments)));
|
|
220912
220948
|
}
|
|
220913
220949
|
var Parser = (
|
|
220914
220950
|
/** @class */
|
|
@@ -220956,6 +220992,9 @@ var require_parser2 = __commonJS({
|
|
|
220956
220992
|
attr.push(this.currToken);
|
|
220957
220993
|
this.position++;
|
|
220958
220994
|
}
|
|
220995
|
+
if (!this.currToken) {
|
|
220996
|
+
return this.expected("closing square bracket", startingToken[tokenize_1.FIELDS.START_POS]);
|
|
220997
|
+
}
|
|
220959
220998
|
if (this.currToken[tokenize_1.FIELDS.TYPE] !== tokens.closeSquare) {
|
|
220960
220999
|
return this.expected("closing square bracket", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
220961
221000
|
}
|
|
@@ -221007,7 +221046,7 @@ var require_parser2 = __commonJS({
|
|
|
221007
221046
|
}
|
|
221008
221047
|
if (commentBefore) {
|
|
221009
221048
|
(0, util_1.ensureObject)(node, "raws", "spaces", "attribute");
|
|
221010
|
-
node.raws.spaces.attribute.before =
|
|
221049
|
+
node.raws.spaces.attribute.before = commentBefore;
|
|
221011
221050
|
commentBefore = "";
|
|
221012
221051
|
}
|
|
221013
221052
|
node.namespace = (node.namespace || "") + content;
|
|
@@ -221384,7 +221423,11 @@ var require_parser2 = __commonJS({
|
|
|
221384
221423
|
return this.error("Unexpected '|'.", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
221385
221424
|
};
|
|
221386
221425
|
Parser2.prototype.namespace = function() {
|
|
221387
|
-
var
|
|
221426
|
+
var prev = this.prevToken;
|
|
221427
|
+
var before = prev && (prev[tokenize_1.FIELDS.TYPE] === tokens.word || prev[tokenize_1.FIELDS.TYPE] === tokens.asterisk || prev[tokenize_1.FIELDS.TYPE] === tokens.ampersand) ? this.content(prev) : true;
|
|
221428
|
+
if (!this.nextToken) {
|
|
221429
|
+
return this.unexpectedPipe();
|
|
221430
|
+
}
|
|
221388
221431
|
if (this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.word) {
|
|
221389
221432
|
this.position++;
|
|
221390
221433
|
return this.word(before);
|
|
@@ -221413,6 +221456,7 @@ var require_parser2 = __commonJS({
|
|
|
221413
221456
|
Parser2.prototype.parentheses = function() {
|
|
221414
221457
|
var last = this.current.last;
|
|
221415
221458
|
var unbalanced = 1;
|
|
221459
|
+
var openingToken = this.currToken;
|
|
221416
221460
|
this.position++;
|
|
221417
221461
|
if (last && last.type === types2.PSEUDO) {
|
|
221418
221462
|
var selector = new selector_1.default({
|
|
@@ -221472,7 +221516,7 @@ var require_parser2 = __commonJS({
|
|
|
221472
221516
|
}
|
|
221473
221517
|
}
|
|
221474
221518
|
if (unbalanced) {
|
|
221475
|
-
return this.expected("closing parenthesis", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
221519
|
+
return this.expected("closing parenthesis", (this.currToken || openingToken)[tokenize_1.FIELDS.START_POS]);
|
|
221476
221520
|
}
|
|
221477
221521
|
};
|
|
221478
221522
|
Parser2.prototype.pseudo = function() {
|
|
@@ -221568,10 +221612,13 @@ var require_parser2 = __commonJS({
|
|
|
221568
221612
|
});
|
|
221569
221613
|
var interpolations = indexesOf(word, "#{");
|
|
221570
221614
|
if (interpolations.length) {
|
|
221615
|
+
var interpolationIndexes_1 = new Set(interpolations);
|
|
221571
221616
|
hasId = hasId.filter(function(hashIndex) {
|
|
221572
|
-
return
|
|
221617
|
+
return !interpolationIndexes_1.has(hashIndex);
|
|
221573
221618
|
});
|
|
221574
221619
|
}
|
|
221620
|
+
var classIndexes = new Set(hasClass);
|
|
221621
|
+
var idIndexes = new Set(hasId);
|
|
221575
221622
|
var indices = (0, sortAscending_1.default)(uniqs(__spreadArray(__spreadArray([0], __read(hasClass), false), __read(hasId), false)));
|
|
221576
221623
|
indices.forEach(function(ind, i) {
|
|
221577
221624
|
var index2 = indices[i + 1] || word.length;
|
|
@@ -221583,14 +221630,14 @@ var require_parser2 = __commonJS({
|
|
|
221583
221630
|
var current2 = _this.currToken;
|
|
221584
221631
|
var sourceIndex2 = current2[tokenize_1.FIELDS.START_POS] + indices[i];
|
|
221585
221632
|
var source = getSource(current2[1], current2[2] + ind, current2[3], current2[2] + (index2 - 1));
|
|
221586
|
-
if (
|
|
221633
|
+
if (classIndexes.has(ind)) {
|
|
221587
221634
|
var classNameOpts = {
|
|
221588
221635
|
value: value.slice(1),
|
|
221589
221636
|
source,
|
|
221590
221637
|
sourceIndex: sourceIndex2
|
|
221591
221638
|
};
|
|
221592
221639
|
node = new className_1.default(unescapeProp(classNameOpts, "value"));
|
|
221593
|
-
} else if (
|
|
221640
|
+
} else if (idIndexes.has(ind)) {
|
|
221594
221641
|
var idOpts = {
|
|
221595
221642
|
value: value.slice(1),
|
|
221596
221643
|
source,
|
|
@@ -247912,7 +247959,7 @@ var import_typescript72 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
|
247912
247959
|
|
|
247913
247960
|
// src/version.ts
|
|
247914
247961
|
init_import_meta_url();
|
|
247915
|
-
var buildId = "
|
|
247962
|
+
var buildId = "1794546358";
|
|
247916
247963
|
var minfyJsId = "terser5.37.0_7";
|
|
247917
247964
|
var optimizeCssId = "autoprefixer10.4.19_postcss8.5.13_7";
|
|
247918
247965
|
var parse5Version = "7.2.1";
|
|
@@ -247920,8 +247967,8 @@ var rollupVersion = "4.44.0";
|
|
|
247920
247967
|
var jqueryVersion = "4.0.0-pre";
|
|
247921
247968
|
var terserVersion = "5.37.0";
|
|
247922
247969
|
var typescriptVersion = "5.8.3";
|
|
247923
|
-
var vermoji = "\u{
|
|
247924
|
-
var version = "4.45.
|
|
247970
|
+
var vermoji = "\u{1F3AA}";
|
|
247971
|
+
var version = "4.45.3-dev.1794546358.f4fe940";
|
|
247925
247972
|
var versions = {
|
|
247926
247973
|
stencil: version,
|
|
247927
247974
|
parse5: parse5Version,
|
|
@@ -252232,20 +252279,30 @@ var updateLazyComponentConstructor = (classMembers, classNode, moduleFile, cmp)
|
|
|
252232
252279
|
import_typescript5.default.factory.createParameterDeclaration(void 0, void 0, import_typescript5.default.factory.createIdentifier(HOST_REF_ARG))
|
|
252233
252280
|
];
|
|
252234
252281
|
const cstrStatements = [
|
|
252235
|
-
registerInstanceStatement(moduleFile),
|
|
252282
|
+
registerInstanceStatement(moduleFile, classNode),
|
|
252236
252283
|
...addCreateEvents(moduleFile, cmp),
|
|
252237
252284
|
...createLazyAttachInternalsBinding(cmp)
|
|
252238
252285
|
];
|
|
252239
252286
|
updateConstructor(classNode, classMembers, cstrStatements, cstrMethodArgs);
|
|
252240
252287
|
};
|
|
252241
|
-
var registerInstanceStatement = (moduleFile) => {
|
|
252288
|
+
var registerInstanceStatement = (moduleFile, classNode) => {
|
|
252242
252289
|
addCoreRuntimeApi(moduleFile, RUNTIME_APIS.registerInstance);
|
|
252243
|
-
|
|
252290
|
+
const registerCall = import_typescript5.default.factory.createExpressionStatement(
|
|
252244
252291
|
import_typescript5.default.factory.createCallExpression(import_typescript5.default.factory.createIdentifier(REGISTER_INSTANCE), void 0, [
|
|
252245
252292
|
import_typescript5.default.factory.createThis(),
|
|
252246
252293
|
import_typescript5.default.factory.createIdentifier(HOST_REF_ARG)
|
|
252247
252294
|
])
|
|
252248
252295
|
);
|
|
252296
|
+
if (!classNode.name) {
|
|
252297
|
+
return registerCall;
|
|
252298
|
+
}
|
|
252299
|
+
return import_typescript5.default.factory.createIfStatement(
|
|
252300
|
+
import_typescript5.default.factory.createStrictEquality(
|
|
252301
|
+
import_typescript5.default.factory.createMetaProperty(import_typescript5.default.SyntaxKind.NewKeyword, import_typescript5.default.factory.createIdentifier("target")),
|
|
252302
|
+
import_typescript5.default.factory.createIdentifier(classNode.name.text)
|
|
252303
|
+
),
|
|
252304
|
+
registerCall
|
|
252305
|
+
);
|
|
252249
252306
|
};
|
|
252250
252307
|
|
|
252251
252308
|
// src/compiler/transformers/remove-static-meta-properties.ts
|
|
@@ -252294,19 +252351,82 @@ var STATIC_GETTERS_TO_REMOVE = [
|
|
|
252294
252351
|
// src/compiler/transformers/type-library.ts
|
|
252295
252352
|
init_import_meta_url();
|
|
252296
252353
|
var import_typescript7 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
252354
|
+
|
|
252355
|
+
// src/compiler/sys/resolve/resolve-utils.ts
|
|
252356
|
+
init_import_meta_url();
|
|
252357
|
+
var COMMON_DIR_MODULE_EXTS = [".tsx", ".ts", ".mts", ".cts", ".mjs", ".js", ".cjs", ".jsx", ".json", ".md"];
|
|
252358
|
+
var isCommonDirModuleFile = (p) => COMMON_DIR_MODULE_EXTS.some((ext2) => p.endsWith(ext2));
|
|
252359
|
+
var setPackageVersion = (pkgVersions, pkgName, pkgVersion) => {
|
|
252360
|
+
pkgVersions.set(pkgName, pkgVersion);
|
|
252361
|
+
};
|
|
252362
|
+
var setPackageVersionByContent = (pkgVersions, pkgContent) => {
|
|
252363
|
+
try {
|
|
252364
|
+
const pkg = JSON.parse(pkgContent);
|
|
252365
|
+
if (pkg.name && pkg.version) {
|
|
252366
|
+
setPackageVersion(pkgVersions, pkg.name, pkg.version);
|
|
252367
|
+
}
|
|
252368
|
+
} catch (e) {
|
|
252369
|
+
}
|
|
252370
|
+
};
|
|
252371
|
+
var isLocalModule = (p) => p.startsWith(".") || p.startsWith("/");
|
|
252372
|
+
var isNodeModulePath = (p) => normalizePath(p).split("/").includes("node_modules");
|
|
252373
|
+
var getModuleId = (orgImport) => {
|
|
252374
|
+
if (orgImport.startsWith("~")) {
|
|
252375
|
+
orgImport = orgImport.substring(1);
|
|
252376
|
+
}
|
|
252377
|
+
const splt = orgImport.split("/");
|
|
252378
|
+
const m = {
|
|
252379
|
+
moduleId: null,
|
|
252380
|
+
filePath: null,
|
|
252381
|
+
scope: null,
|
|
252382
|
+
scopeSubModuleId: null
|
|
252383
|
+
};
|
|
252384
|
+
if (orgImport.startsWith("@") && splt.length > 1) {
|
|
252385
|
+
m.moduleId = splt.slice(0, 2).join("/");
|
|
252386
|
+
m.filePath = splt.slice(2).join("/");
|
|
252387
|
+
m.scope = splt[0];
|
|
252388
|
+
m.scopeSubModuleId = splt[1];
|
|
252389
|
+
} else {
|
|
252390
|
+
m.moduleId = splt[0];
|
|
252391
|
+
m.filePath = splt.slice(1).join("/");
|
|
252392
|
+
}
|
|
252393
|
+
return m;
|
|
252394
|
+
};
|
|
252395
|
+
var getPackageDirPath = (p, moduleId) => {
|
|
252396
|
+
const parts = normalizePath(p).split("/");
|
|
252397
|
+
const m = getModuleId(moduleId);
|
|
252398
|
+
for (let i = parts.length - 1; i >= 1; i--) {
|
|
252399
|
+
if (parts[i - 1] === "node_modules") {
|
|
252400
|
+
if (m.scope) {
|
|
252401
|
+
if (parts[i] === m.scope && parts[i + 1] === m.scopeSubModuleId) {
|
|
252402
|
+
return parts.slice(0, i + 2).join("/");
|
|
252403
|
+
}
|
|
252404
|
+
} else if (parts[i] === m.moduleId) {
|
|
252405
|
+
return parts.slice(0, i + 1).join("/");
|
|
252406
|
+
}
|
|
252407
|
+
}
|
|
252408
|
+
}
|
|
252409
|
+
return null;
|
|
252410
|
+
};
|
|
252411
|
+
|
|
252412
|
+
// src/compiler/transformers/type-library.ts
|
|
252297
252413
|
var TYPE_LIBRARY = {};
|
|
252298
|
-
function addToLibrary(type, typeName, checker, pathToTypeModule) {
|
|
252414
|
+
function addToLibrary(type, typeName, checker, pathToTypeModule, symbol) {
|
|
252415
|
+
var _a3, _b, _c, _d;
|
|
252299
252416
|
pathToTypeModule = relative(process.cwd(), pathToTypeModule);
|
|
252300
252417
|
if (pathToTypeModule.startsWith("node_modules")) {
|
|
252301
252418
|
return "node_modules::" + typeName;
|
|
252302
252419
|
}
|
|
252303
252420
|
const id = getTypeId(pathToTypeModule, typeName);
|
|
252304
252421
|
if (!type.isTypeParameter() && !(id in TYPE_LIBRARY)) {
|
|
252305
|
-
const
|
|
252422
|
+
const alias = (_a3 = symbol == null ? void 0 : symbol.declarations) == null ? void 0 : _a3.find(import_typescript7.default.isTypeAliasDeclaration);
|
|
252423
|
+
const resolvedFile = (_d = (_c = (_b = getSymbolForType(type)) == null ? void 0 : _b.declarations) == null ? void 0 : _c[0]) == null ? void 0 : _d.getSourceFile();
|
|
252424
|
+
const useAlias = alias && resolvedFile && (resolvedFile.hasNoDefaultLib || isNodeModulePath(resolvedFile.fileName));
|
|
252425
|
+
const declaration = useAlias ? alias.getText() : getTypeDeclaration(checker, type);
|
|
252306
252426
|
if (declaration !== "") {
|
|
252307
252427
|
TYPE_LIBRARY[id] = {
|
|
252308
252428
|
declaration,
|
|
252309
|
-
docstring: getTypeDocstring(type, checker),
|
|
252429
|
+
docstring: getTypeDocstring(type, checker, useAlias ? symbol : void 0),
|
|
252310
252430
|
path: pathToTypeModule
|
|
252311
252431
|
};
|
|
252312
252432
|
}
|
|
@@ -252367,7 +252487,13 @@ function addFileToLibrary(config, filePath) {
|
|
|
252367
252487
|
for (const node of exportedTypesInSourceFile(sourceFile)) {
|
|
252368
252488
|
const type = checker.getTypeAtLocation(node);
|
|
252369
252489
|
const typeName = node.name.getText();
|
|
252370
|
-
addToLibrary(
|
|
252490
|
+
addToLibrary(
|
|
252491
|
+
type,
|
|
252492
|
+
typeName,
|
|
252493
|
+
checker,
|
|
252494
|
+
normalizePath(node.getSourceFile().fileName, false),
|
|
252495
|
+
checker.getSymbolAtLocation(node.name)
|
|
252496
|
+
);
|
|
252371
252497
|
}
|
|
252372
252498
|
}
|
|
252373
252499
|
function getHomeModule(importer, importPath, options, compilerHost, program3) {
|
|
@@ -252418,8 +252544,8 @@ function getTypeDeclaration(checker, type) {
|
|
|
252418
252544
|
return typeToString(checker, type);
|
|
252419
252545
|
}
|
|
252420
252546
|
}
|
|
252421
|
-
function getTypeDocstring(type, checker) {
|
|
252422
|
-
const symbol = type == null ? void 0 : type.symbol;
|
|
252547
|
+
function getTypeDocstring(type, checker, aliasSymbol) {
|
|
252548
|
+
const symbol = aliasSymbol != null ? aliasSymbol : type == null ? void 0 : type.symbol;
|
|
252423
252549
|
return symbol ? import_typescript7.default.displayPartsToString(symbol.getDocumentationComment(checker)) : "";
|
|
252424
252550
|
}
|
|
252425
252551
|
var getTypeId = (pathToTypeModule, typeName) => {
|
|
@@ -252947,7 +253073,13 @@ var getTypeReferenceLocation = (typeName, type, sourceFile, checker, program3) =
|
|
|
252947
253073
|
}
|
|
252948
253074
|
}
|
|
252949
253075
|
const typeSourceFile = (_d = enumOrClassDeclaration == null ? void 0 : enumOrClassDeclaration.getSourceFile()) != null ? _d : importHomeModule;
|
|
252950
|
-
const id = addToLibrary(
|
|
253076
|
+
const id = addToLibrary(
|
|
253077
|
+
type,
|
|
253078
|
+
originalTypeName,
|
|
253079
|
+
checker,
|
|
253080
|
+
normalizePath(typeSourceFile.fileName, false),
|
|
253081
|
+
importedSymbol
|
|
253082
|
+
);
|
|
252951
253083
|
return {
|
|
252952
253084
|
location: "import",
|
|
252953
253085
|
path: localImportPath,
|
|
@@ -252995,7 +253127,14 @@ var getTypeReferenceLocation = (typeName, type, sourceFile, checker, program3) =
|
|
|
252995
253127
|
void 0
|
|
252996
253128
|
);
|
|
252997
253129
|
if (localExport) {
|
|
252998
|
-
const
|
|
253130
|
+
const localDecl = findTypeWithName(sourceFile, typeName);
|
|
253131
|
+
const id = addToLibrary(
|
|
253132
|
+
type,
|
|
253133
|
+
typeName,
|
|
253134
|
+
checker,
|
|
253135
|
+
sourceFile.fileName,
|
|
253136
|
+
localDecl && checker.getSymbolAtLocation(localDecl.name)
|
|
253137
|
+
);
|
|
252999
253138
|
return {
|
|
253000
253139
|
location: "local",
|
|
253001
253140
|
// If this is a local import, we know the path to the type
|
|
@@ -253035,7 +253174,8 @@ var getTypeReferenceLocation = (typeName, type, sourceFile, checker, program3) =
|
|
|
253035
253174
|
type,
|
|
253036
253175
|
originalTypeName,
|
|
253037
253176
|
checker,
|
|
253038
|
-
normalizePath(declaration.getSourceFile().fileName, false)
|
|
253177
|
+
normalizePath(declaration.getSourceFile().fileName, false),
|
|
253178
|
+
importedSymbol
|
|
253039
253179
|
);
|
|
253040
253180
|
return {
|
|
253041
253181
|
location: "import",
|
|
@@ -253232,7 +253372,7 @@ function foundSuper(constructorBodyStatements) {
|
|
|
253232
253372
|
(s) => import_typescript9.default.isExpressionStatement(s) && import_typescript9.default.isCallExpression(s.expression) && (s.expression.expression.kind === import_typescript9.default.SyntaxKind.SuperKeyword || import_typescript9.default.isIdentifier(s.expression.expression) && s.expression.expression.escapedText === "super")
|
|
253233
253373
|
);
|
|
253234
253374
|
}
|
|
253235
|
-
var updateConstructor = (classNode, classMembers, statements, parameters,
|
|
253375
|
+
var updateConstructor = (classNode, classMembers, statements, parameters, superArgs) => {
|
|
253236
253376
|
var _a3, _b;
|
|
253237
253377
|
const constructorIndex = classMembers.findIndex((m) => import_typescript9.default.isConstructorDeclaration(m) && m.body != null);
|
|
253238
253378
|
const constructorMethod = classMembers[constructorIndex];
|
|
@@ -253241,12 +253381,12 @@ var updateConstructor = (classNode, classMembers, statements, parameters, includ
|
|
|
253241
253381
|
const constructorBodyStatements = (_a3 = constructorMethod.body) == null ? void 0 : _a3.statements;
|
|
253242
253382
|
let foundSuperCall = foundSuper(constructorBodyStatements);
|
|
253243
253383
|
if (!foundSuperCall && needsSuper(classNode)) {
|
|
253244
|
-
statements = [createConstructorBodyWithSuper(
|
|
253384
|
+
statements = [createConstructorBodyWithSuper(superArgs), ...statements, ...constructorBodyStatements];
|
|
253245
253385
|
} else {
|
|
253246
253386
|
const updatedStatements = constructorBodyStatements.filter((s) => s !== foundSuperCall);
|
|
253247
253387
|
if (foundSuperCall) {
|
|
253248
|
-
if (
|
|
253249
|
-
foundSuperCall = createConstructorBodyWithSuper(
|
|
253388
|
+
if (superArgs === "false") {
|
|
253389
|
+
foundSuperCall = createConstructorBodyWithSuper(superArgs);
|
|
253250
253390
|
}
|
|
253251
253391
|
statements = [foundSuperCall, ...statements, ...updatedStatements];
|
|
253252
253392
|
} else {
|
|
@@ -253261,7 +253401,7 @@ var updateConstructor = (classNode, classMembers, statements, parameters, includ
|
|
|
253261
253401
|
);
|
|
253262
253402
|
} else {
|
|
253263
253403
|
if (needsSuper(classNode)) {
|
|
253264
|
-
statements = [createConstructorBodyWithSuper(
|
|
253404
|
+
statements = [createConstructorBodyWithSuper(superArgs), ...statements];
|
|
253265
253405
|
}
|
|
253266
253406
|
classMembers.unshift(
|
|
253267
253407
|
import_typescript9.default.factory.createConstructorDeclaration(void 0, parameters != null ? parameters : [], import_typescript9.default.factory.createBlock(statements, true))
|
|
@@ -253276,13 +253416,10 @@ var needsSuper = (classDeclaration3) => {
|
|
|
253276
253416
|
}
|
|
253277
253417
|
return false;
|
|
253278
253418
|
};
|
|
253279
|
-
var createConstructorBodyWithSuper = (
|
|
253419
|
+
var createConstructorBodyWithSuper = (superArgs) => {
|
|
253420
|
+
const args = superArgs === "false" ? [import_typescript9.default.factory.createFalse()] : superArgs === "forward" ? [import_typescript9.default.factory.createSpreadElement(import_typescript9.default.factory.createIdentifier("arguments"))] : void 0;
|
|
253280
253421
|
return import_typescript9.default.factory.createExpressionStatement(
|
|
253281
|
-
import_typescript9.default.factory.createCallExpression(
|
|
253282
|
-
import_typescript9.default.factory.createIdentifier("super"),
|
|
253283
|
-
void 0,
|
|
253284
|
-
includeFalseArg ? [import_typescript9.default.factory.createFalse()] : void 0
|
|
253285
|
-
)
|
|
253422
|
+
import_typescript9.default.factory.createCallExpression(import_typescript9.default.factory.createIdentifier("super"), void 0, args)
|
|
253286
253423
|
);
|
|
253287
253424
|
};
|
|
253288
253425
|
var tsPropDeclName = (node, typeChecker) => {
|
|
@@ -258870,65 +259007,6 @@ init_import_meta_url();
|
|
|
258870
259007
|
|
|
258871
259008
|
// src/compiler/sys/fetch/fetch-utils.ts
|
|
258872
259009
|
init_import_meta_url();
|
|
258873
|
-
|
|
258874
|
-
// src/compiler/sys/resolve/resolve-utils.ts
|
|
258875
|
-
init_import_meta_url();
|
|
258876
|
-
var COMMON_DIR_MODULE_EXTS = [".tsx", ".ts", ".mts", ".cts", ".mjs", ".js", ".cjs", ".jsx", ".json", ".md"];
|
|
258877
|
-
var isCommonDirModuleFile = (p) => COMMON_DIR_MODULE_EXTS.some((ext2) => p.endsWith(ext2));
|
|
258878
|
-
var setPackageVersion = (pkgVersions, pkgName, pkgVersion) => {
|
|
258879
|
-
pkgVersions.set(pkgName, pkgVersion);
|
|
258880
|
-
};
|
|
258881
|
-
var setPackageVersionByContent = (pkgVersions, pkgContent) => {
|
|
258882
|
-
try {
|
|
258883
|
-
const pkg = JSON.parse(pkgContent);
|
|
258884
|
-
if (pkg.name && pkg.version) {
|
|
258885
|
-
setPackageVersion(pkgVersions, pkg.name, pkg.version);
|
|
258886
|
-
}
|
|
258887
|
-
} catch (e) {
|
|
258888
|
-
}
|
|
258889
|
-
};
|
|
258890
|
-
var isLocalModule = (p) => p.startsWith(".") || p.startsWith("/");
|
|
258891
|
-
var isNodeModulePath = (p) => normalizePath(p).split("/").includes("node_modules");
|
|
258892
|
-
var getModuleId = (orgImport) => {
|
|
258893
|
-
if (orgImport.startsWith("~")) {
|
|
258894
|
-
orgImport = orgImport.substring(1);
|
|
258895
|
-
}
|
|
258896
|
-
const splt = orgImport.split("/");
|
|
258897
|
-
const m = {
|
|
258898
|
-
moduleId: null,
|
|
258899
|
-
filePath: null,
|
|
258900
|
-
scope: null,
|
|
258901
|
-
scopeSubModuleId: null
|
|
258902
|
-
};
|
|
258903
|
-
if (orgImport.startsWith("@") && splt.length > 1) {
|
|
258904
|
-
m.moduleId = splt.slice(0, 2).join("/");
|
|
258905
|
-
m.filePath = splt.slice(2).join("/");
|
|
258906
|
-
m.scope = splt[0];
|
|
258907
|
-
m.scopeSubModuleId = splt[1];
|
|
258908
|
-
} else {
|
|
258909
|
-
m.moduleId = splt[0];
|
|
258910
|
-
m.filePath = splt.slice(1).join("/");
|
|
258911
|
-
}
|
|
258912
|
-
return m;
|
|
258913
|
-
};
|
|
258914
|
-
var getPackageDirPath = (p, moduleId) => {
|
|
258915
|
-
const parts = normalizePath(p).split("/");
|
|
258916
|
-
const m = getModuleId(moduleId);
|
|
258917
|
-
for (let i = parts.length - 1; i >= 1; i--) {
|
|
258918
|
-
if (parts[i - 1] === "node_modules") {
|
|
258919
|
-
if (m.scope) {
|
|
258920
|
-
if (parts[i] === m.scope && parts[i + 1] === m.scopeSubModuleId) {
|
|
258921
|
-
return parts.slice(0, i + 2).join("/");
|
|
258922
|
-
}
|
|
258923
|
-
} else if (parts[i] === m.moduleId) {
|
|
258924
|
-
return parts.slice(0, i + 1).join("/");
|
|
258925
|
-
}
|
|
258926
|
-
}
|
|
258927
|
-
}
|
|
258928
|
-
return null;
|
|
258929
|
-
};
|
|
258930
|
-
|
|
258931
|
-
// src/compiler/sys/fetch/fetch-utils.ts
|
|
258932
259010
|
var httpFetch = (sys, input, init) => {
|
|
258933
259011
|
if (sys && isFunction(sys.fetch)) {
|
|
258934
259012
|
return sys.fetch(input, init);
|
|
@@ -260476,7 +260554,7 @@ var tsGetSourceFile = (config, module2) => {
|
|
|
260476
260554
|
return null;
|
|
260477
260555
|
}
|
|
260478
260556
|
const compilerOptions = { ...config.tsCompilerOptions };
|
|
260479
|
-
const host = import_typescript15.default.createCompilerHost(compilerOptions);
|
|
260557
|
+
const host = import_typescript15.default.createCompilerHost(compilerOptions, true);
|
|
260480
260558
|
const program3 = import_typescript15.default.createProgram([module2.resolvedModule.resolvedFileName], compilerOptions, host);
|
|
260481
260559
|
return program3.getSourceFile(module2.resolvedModule.resolvedFileName);
|
|
260482
260560
|
};
|
|
@@ -270596,7 +270674,13 @@ var updateNativeConstructor = (classMembers, moduleFile, cmp, classNode) => {
|
|
|
270596
270674
|
...addCreateEvents(moduleFile, cmp),
|
|
270597
270675
|
...createNativeAttachInternalsBinding(cmp)
|
|
270598
270676
|
];
|
|
270599
|
-
updateConstructor(
|
|
270677
|
+
updateConstructor(
|
|
270678
|
+
classNode,
|
|
270679
|
+
classMembers,
|
|
270680
|
+
nativeCstrStatements,
|
|
270681
|
+
cstrMethodArgs,
|
|
270682
|
+
cmp.doesExtend ? "false" : void 0
|
|
270683
|
+
);
|
|
270600
270684
|
};
|
|
270601
270685
|
var nativeInit = (cmp) => {
|
|
270602
270686
|
const initStatements = [nativeRegisterHostStatement()];
|
|
@@ -270845,7 +270929,7 @@ var updateNativeExtendedClass = (node, moduleFile, transformOpts) => {
|
|
|
270845
270929
|
withHeritageClauses.name,
|
|
270846
270930
|
withHeritageClauses.typeParameters,
|
|
270847
270931
|
withHeritageClauses.heritageClauses,
|
|
270848
|
-
updateConstructor(withHeritageClauses, Array.from(withHeritageClauses.members), [], params,
|
|
270932
|
+
updateConstructor(withHeritageClauses, Array.from(withHeritageClauses.members), [], params, "false")
|
|
270849
270933
|
);
|
|
270850
270934
|
}
|
|
270851
270935
|
return updateComponentClass(
|
|
@@ -273312,7 +273396,7 @@ var generateLazyModules = async (config, compilerCtx, buildCtx, outputTargetType
|
|
|
273312
273396
|
})
|
|
273313
273397
|
);
|
|
273314
273398
|
await Promise.all(
|
|
273315
|
-
results
|
|
273399
|
+
getAssetsToWrite(results).map((r) => {
|
|
273316
273400
|
return Promise.all(
|
|
273317
273401
|
destinations.map((dest) => {
|
|
273318
273402
|
return compilerCtx.fs.writeFile(join(dest, r.fileName), r.content);
|
|
@@ -273322,6 +273406,14 @@ var generateLazyModules = async (config, compilerCtx, buildCtx, outputTargetType
|
|
|
273322
273406
|
);
|
|
273323
273407
|
return bundleModules;
|
|
273324
273408
|
};
|
|
273409
|
+
var getAssetsToWrite = (results) => {
|
|
273410
|
+
const chunkSourceMapFileNames = new Set(
|
|
273411
|
+
results.filter((r) => r.type === "chunk").map((r) => `${r.fileName}.map`)
|
|
273412
|
+
);
|
|
273413
|
+
return results.filter(
|
|
273414
|
+
(r) => r.type === "asset" && !chunkSourceMapFileNames.has(r.fileName)
|
|
273415
|
+
);
|
|
273416
|
+
};
|
|
273325
273417
|
var addStaticImports = (rollupChunkResults, bundleModules) => {
|
|
273326
273418
|
rollupChunkResults.filter(isStencilCoreResult).forEach((index2) => {
|
|
273327
273419
|
const generateCjs2 = isCjsFormat(index2) ? generateCaseClauseCjs : generateCaseClause;
|
|
@@ -273570,23 +273662,30 @@ var lazyBundleIdPlugin = (buildCtx, config, shouldHash, suffix, isBrowserBuild)
|
|
|
273570
273662
|
}
|
|
273571
273663
|
if (!map2.size) return;
|
|
273572
273664
|
for (const [_key, file] of files) {
|
|
273573
|
-
if (
|
|
273665
|
+
if (file.type !== "chunk") continue;
|
|
273574
273666
|
const newFileName = map2.get(file.fileName);
|
|
273575
|
-
if (
|
|
273576
|
-
|
|
273577
|
-
|
|
273578
|
-
|
|
273579
|
-
|
|
273580
|
-
const replaced = map2.get(imported);
|
|
273581
|
-
if (replaced) {
|
|
273582
|
-
magicString.replaceAll(imported, replaced);
|
|
273583
|
-
file.imports[i] = replaced;
|
|
273667
|
+
if (newFileName) {
|
|
273668
|
+
file.facadeModuleId = newFileName;
|
|
273669
|
+
file.fileName = newFileName;
|
|
273670
|
+
if (config.sourceMap && file.map) {
|
|
273671
|
+
file.map.file = newFileName;
|
|
273584
273672
|
}
|
|
273585
|
-
});
|
|
273586
|
-
file.code = magicString.toString();
|
|
273587
|
-
if (config.sourceMap && file.map) {
|
|
273588
|
-
file.map.file = newFileName;
|
|
273589
273673
|
}
|
|
273674
|
+
const renamedImports = new Set(
|
|
273675
|
+
[...file.imports, ...file.dynamicImports].filter((imported) => map2.has(imported))
|
|
273676
|
+
);
|
|
273677
|
+
if (!renamedImports.size) continue;
|
|
273678
|
+
const magicString = new MagicString(file.code);
|
|
273679
|
+
renamedImports.forEach((imported) => magicString.replaceAll(imported, map2.get(imported)));
|
|
273680
|
+
file.code = magicString.toString();
|
|
273681
|
+
file.imports = file.imports.map((imported) => {
|
|
273682
|
+
var _a3;
|
|
273683
|
+
return (_a3 = map2.get(imported)) != null ? _a3 : imported;
|
|
273684
|
+
});
|
|
273685
|
+
file.dynamicImports = file.dynamicImports.map((imported) => {
|
|
273686
|
+
var _a3;
|
|
273687
|
+
return (_a3 = map2.get(imported)) != null ? _a3 : imported;
|
|
273688
|
+
});
|
|
273590
273689
|
}
|
|
273591
273690
|
}
|
|
273592
273691
|
};
|
|
@@ -280724,7 +280823,13 @@ var visitClassDeclaration = (config, diagnostics, typeChecker, program3, classNo
|
|
|
280724
280823
|
}
|
|
280725
280824
|
validateMethods(diagnostics, classMembers);
|
|
280726
280825
|
const currentDecorators = retrieveTsDecorators(classNode);
|
|
280727
|
-
const updatedClassFields = updateConstructor(
|
|
280826
|
+
const updatedClassFields = updateConstructor(
|
|
280827
|
+
classNode,
|
|
280828
|
+
filteredMethodsAndFields,
|
|
280829
|
+
[],
|
|
280830
|
+
void 0,
|
|
280831
|
+
"forward"
|
|
280832
|
+
);
|
|
280728
280833
|
return import_typescript56.default.factory.updateClassDeclaration(
|
|
280729
280834
|
classNode,
|
|
280730
280835
|
[
|
|
@@ -282285,7 +282390,9 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
|
|
|
282285
282390
|
if (isExportableMixinClass(node)) {
|
|
282286
282391
|
moduleFile.hasExportableMixins = true;
|
|
282287
282392
|
}
|
|
282288
|
-
|
|
282393
|
+
if (getComponentTagName(node.members.filter(isStaticGetter)) != null) {
|
|
282394
|
+
return;
|
|
282395
|
+
}
|
|
282289
282396
|
} else if (import_typescript65.default.isImportDeclaration(node)) {
|
|
282290
282397
|
parseModuleImport(config, compilerCtx, buildCtx, moduleFile, srcDirPath, node, true);
|
|
282291
282398
|
return;
|
|
@@ -282293,28 +282400,6 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
|
|
|
282293
282400
|
parseCallExpression(moduleFile, node, typeChecker);
|
|
282294
282401
|
} else if (import_typescript65.default.isStringLiteral(node)) {
|
|
282295
282402
|
parseStringLiteral(moduleFile, node);
|
|
282296
|
-
} else if (import_typescript65.default.isVariableStatement(node)) {
|
|
282297
|
-
node.declarationList.declarations.forEach((declaration) => {
|
|
282298
|
-
if (declaration.initializer) {
|
|
282299
|
-
if (import_typescript65.default.isArrowFunction(declaration.initializer) || import_typescript65.default.isFunctionExpression(declaration.initializer)) {
|
|
282300
|
-
const funcBody = declaration.initializer.body;
|
|
282301
|
-
if (import_typescript65.default.isBlock(funcBody)) {
|
|
282302
|
-
funcBody.statements.forEach((statement) => {
|
|
282303
|
-
if (import_typescript65.default.isClassDeclaration(statement)) {
|
|
282304
|
-
if (isExportableMixinClass(statement)) {
|
|
282305
|
-
moduleFile.hasExportableMixins = true;
|
|
282306
|
-
}
|
|
282307
|
-
statement.members.forEach((member2) => {
|
|
282308
|
-
if (import_typescript65.default.isPropertyDeclaration(member2) && member2.initializer) {
|
|
282309
|
-
import_typescript65.default.forEachChild(member2.initializer, visitNode);
|
|
282310
|
-
}
|
|
282311
|
-
});
|
|
282312
|
-
}
|
|
282313
|
-
});
|
|
282314
|
-
}
|
|
282315
|
-
}
|
|
282316
|
-
}
|
|
282317
|
-
});
|
|
282318
282403
|
}
|
|
282319
282404
|
node.forEachChild(visitNode);
|
|
282320
282405
|
};
|