@stencil/core 4.43.5 → 4.44.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/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 +232 -128
- 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 +61 -30
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +44 -26
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +1 -1
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +7 -0
- package/internal/stencil-public-compiler.d.ts +4 -0
- package/internal/stencil-public-runtime.d.ts +11 -0
- package/internal/testing/index.js +43 -25
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.js +1 -1
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/readme.md +1 -1
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +30 -30
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +6 -1
- package/testing/package.json +1 -1
- /package/{LICENSE.md → LICENSE} +0 -0
package/compiler/stencil.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Compiler v4.
|
|
2
|
+
Stencil Compiler v4.44.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __create = Object.create;
|
|
@@ -215959,7 +215959,7 @@ var require_previous_map = __commonJS({
|
|
|
215959
215959
|
"use strict";
|
|
215960
215960
|
init_import_meta_url();
|
|
215961
215961
|
var { existsSync: existsSync2, readFileSync: readFileSync2 } = require("fs");
|
|
215962
|
-
var { dirname:
|
|
215962
|
+
var { dirname: dirname40, join: join3 } = require("path");
|
|
215963
215963
|
var { SourceMapConsumer: SourceMapConsumer2, SourceMapGenerator: SourceMapGenerator2 } = require_source_map2();
|
|
215964
215964
|
function fromBase64(str) {
|
|
215965
215965
|
if (Buffer) {
|
|
@@ -215979,7 +215979,7 @@ var require_previous_map = __commonJS({
|
|
|
215979
215979
|
if (!this.mapFile && opts.from) {
|
|
215980
215980
|
this.mapFile = opts.from;
|
|
215981
215981
|
}
|
|
215982
|
-
if (this.mapFile) this.root =
|
|
215982
|
+
if (this.mapFile) this.root = dirname40(this.mapFile);
|
|
215983
215983
|
if (text) this.text = text;
|
|
215984
215984
|
}
|
|
215985
215985
|
consumer() {
|
|
@@ -216027,7 +216027,7 @@ var require_previous_map = __commonJS({
|
|
|
216027
216027
|
return void 0;
|
|
216028
216028
|
}
|
|
216029
216029
|
}
|
|
216030
|
-
this.root =
|
|
216030
|
+
this.root = dirname40(path7);
|
|
216031
216031
|
if (existsSync2(path7)) {
|
|
216032
216032
|
this.mapFile = path7;
|
|
216033
216033
|
return readFileSync2(path7, "utf-8").toString().trim();
|
|
@@ -216064,7 +216064,7 @@ var require_previous_map = __commonJS({
|
|
|
216064
216064
|
return this.decodeInline(this.annotation);
|
|
216065
216065
|
} else if (this.annotation) {
|
|
216066
216066
|
let map2 = this.annotation;
|
|
216067
|
-
if (file) map2 = join3(
|
|
216067
|
+
if (file) map2 = join3(dirname40(file), map2);
|
|
216068
216068
|
let unknown = this.loadFile(map2, file, false);
|
|
216069
216069
|
if (unknown) {
|
|
216070
216070
|
try {
|
|
@@ -216522,12 +216522,12 @@ var require_map_generator = __commonJS({
|
|
|
216522
216522
|
"node_modules/postcss/lib/map-generator.js"(exports2, module2) {
|
|
216523
216523
|
"use strict";
|
|
216524
216524
|
init_import_meta_url();
|
|
216525
|
-
var { dirname:
|
|
216525
|
+
var { dirname: dirname40, relative: relative7, resolve: resolve10, sep: sep5 } = require("path");
|
|
216526
216526
|
var { SourceMapConsumer: SourceMapConsumer2, SourceMapGenerator: SourceMapGenerator2 } = require_source_map2();
|
|
216527
216527
|
var { pathToFileURL: pathToFileURL2 } = require("url");
|
|
216528
216528
|
var Input2 = require_input();
|
|
216529
216529
|
var sourceMapAvailable = Boolean(SourceMapConsumer2 && SourceMapGenerator2);
|
|
216530
|
-
var pathAvailable = Boolean(
|
|
216530
|
+
var pathAvailable = Boolean(dirname40 && resolve10 && relative7 && sep5);
|
|
216531
216531
|
var MapGenerator = class {
|
|
216532
216532
|
constructor(stringify4, root2, opts, cssString) {
|
|
216533
216533
|
this.stringify = stringify4;
|
|
@@ -216559,7 +216559,7 @@ var require_map_generator = __commonJS({
|
|
|
216559
216559
|
applyPrevMaps() {
|
|
216560
216560
|
for (let prev of this.previous()) {
|
|
216561
216561
|
let from = this.toUrl(this.path(prev.file));
|
|
216562
|
-
let root2 = prev.root ||
|
|
216562
|
+
let root2 = prev.root || dirname40(prev.file);
|
|
216563
216563
|
let map2;
|
|
216564
216564
|
if (this.mapOpts.sourcesContent === false) {
|
|
216565
216565
|
map2 = new SourceMapConsumer2(prev.text);
|
|
@@ -216754,9 +216754,9 @@ var require_map_generator = __commonJS({
|
|
|
216754
216754
|
if (/^\w+:\/\//.test(file)) return file;
|
|
216755
216755
|
let cached = this.memoizedPaths.get(file);
|
|
216756
216756
|
if (cached) return cached;
|
|
216757
|
-
let from = this.opts.to ?
|
|
216757
|
+
let from = this.opts.to ? dirname40(this.opts.to) : ".";
|
|
216758
216758
|
if (typeof this.mapOpts.annotation === "string") {
|
|
216759
|
-
from =
|
|
216759
|
+
from = dirname40(resolve10(from, this.mapOpts.annotation));
|
|
216760
216760
|
}
|
|
216761
216761
|
let path7 = relative7(from, file);
|
|
216762
216762
|
this.memoizedPaths.set(file, path7);
|
|
@@ -247771,7 +247771,7 @@ var import_typescript72 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
|
247771
247771
|
|
|
247772
247772
|
// src/version.ts
|
|
247773
247773
|
init_import_meta_url();
|
|
247774
|
-
var buildId = "
|
|
247774
|
+
var buildId = "1786460741";
|
|
247775
247775
|
var minfyJsId = "terser5.37.0_7";
|
|
247776
247776
|
var optimizeCssId = "autoprefixer10.4.19_postcss8.5.13_7";
|
|
247777
247777
|
var parse5Version = "7.2.1";
|
|
@@ -247779,8 +247779,8 @@ var rollupVersion = "4.44.0";
|
|
|
247779
247779
|
var jqueryVersion = "4.0.0-pre";
|
|
247780
247780
|
var terserVersion = "5.37.0";
|
|
247781
247781
|
var typescriptVersion = "5.8.3";
|
|
247782
|
-
var vermoji = "\u{
|
|
247783
|
-
var version = "4.
|
|
247782
|
+
var vermoji = "\u{1F413}";
|
|
247783
|
+
var version = "4.44.0";
|
|
247784
247784
|
var versions = {
|
|
247785
247785
|
stencil: version,
|
|
247786
247786
|
parse5: parse5Version,
|
|
@@ -251543,6 +251543,7 @@ var getModuleLegacy = (compilerCtx, sourceFilePath) => {
|
|
|
251543
251543
|
htmlAttrNames: [],
|
|
251544
251544
|
htmlTagNames: [],
|
|
251545
251545
|
htmlParts: [],
|
|
251546
|
+
htmlSlots: [],
|
|
251546
251547
|
isCollectionDependency: false,
|
|
251547
251548
|
isLegacy: false,
|
|
251548
251549
|
localImports: [],
|
|
@@ -252616,7 +252617,10 @@ var objectLiteralToObjectMap = (objectLiteral, typeChecker, diagnostics, errorNo
|
|
|
252616
252617
|
};
|
|
252617
252618
|
var resolveVarInObjectLiteral = (node, typeChecker, _diagnostics, _errorNode) => {
|
|
252618
252619
|
if (import_typescript9.default.isIdentifier(node)) {
|
|
252619
|
-
|
|
252620
|
+
let symbol = typeChecker.getSymbolAtLocation(node);
|
|
252621
|
+
if (symbol && symbol.flags & import_typescript9.default.SymbolFlags.Alias) {
|
|
252622
|
+
symbol = typeChecker.getAliasedSymbol(symbol);
|
|
252623
|
+
}
|
|
252620
252624
|
if (!symbol || !symbol.valueDeclaration) {
|
|
252621
252625
|
throw new Error(
|
|
252622
252626
|
`resolveVar() cannot resolve the value of "${node.text}" at compile time. Only const variables and object properties with string literal values are supported.`
|
|
@@ -253032,7 +253036,7 @@ function foundSuper(constructorBodyStatements) {
|
|
|
253032
253036
|
}
|
|
253033
253037
|
var updateConstructor = (classNode, classMembers, statements, parameters, includeFalseArg) => {
|
|
253034
253038
|
var _a3, _b;
|
|
253035
|
-
const constructorIndex = classMembers.findIndex((m) =>
|
|
253039
|
+
const constructorIndex = classMembers.findIndex((m) => import_typescript9.default.isConstructorDeclaration(m) && m.body != null);
|
|
253036
253040
|
const constructorMethod = classMembers[constructorIndex];
|
|
253037
253041
|
if (constructorIndex < 0 && !(statements == null ? void 0 : statements.length) && !needsSuper(classNode)) return classMembers;
|
|
253038
253042
|
if (constructorIndex >= 0 && import_typescript9.default.isConstructorDeclaration(constructorMethod)) {
|
|
@@ -258681,6 +258685,7 @@ var setPackageVersionByContent = (pkgVersions, pkgContent) => {
|
|
|
258681
258685
|
}
|
|
258682
258686
|
};
|
|
258683
258687
|
var isLocalModule = (p) => p.startsWith(".") || p.startsWith("/");
|
|
258688
|
+
var isNodeModulePath = (p) => normalizePath(p).split("/").includes("node_modules");
|
|
258684
258689
|
var getModuleId = (orgImport) => {
|
|
258685
258690
|
if (orgImport.startsWith("~")) {
|
|
258686
258691
|
orgImport = orgImport.substring(1);
|
|
@@ -260327,6 +260332,7 @@ var createModule = (staticSourceFile, staticSourceFileText, emitFilepath) => ({
|
|
|
260327
260332
|
hasVdomXlink: false,
|
|
260328
260333
|
htmlAttrNames: [],
|
|
260329
260334
|
htmlParts: [],
|
|
260335
|
+
htmlSlots: [],
|
|
260330
260336
|
htmlTagNames: [],
|
|
260331
260337
|
isCollectionDependency: false,
|
|
260332
260338
|
isLegacy: false,
|
|
@@ -268979,6 +268985,16 @@ var MINIFY_CHAR_BREAK = /* @__PURE__ */ new Set([
|
|
|
268979
268985
|
]);
|
|
268980
268986
|
|
|
268981
268987
|
// src/compiler/optimize/optimize-module.ts
|
|
268988
|
+
/**
|
|
268989
|
+
* Matches the comments that must survive minification. This extends Terser's default
|
|
268990
|
+
* `comments: 'some'` behavior (`@license`, `@preserve`, etc.) with bundler directive
|
|
268991
|
+
* comments — `@vite-ignore` and webpack magic comments (e.g. `webpackInclude:`,
|
|
268992
|
+
* `webpackMode:`) — which downstream bundlers read from inside dynamic `import()`
|
|
268993
|
+
* calls in the emitted output (e.g. `esm-es5`). Without this, Vite warns that the
|
|
268994
|
+
* runtime's dynamic import cannot be analyzed and webpack ignores the lazy-loading
|
|
268995
|
+
* hints entirely.
|
|
268996
|
+
*/
|
|
268997
|
+
var PRESERVED_COMMENTS = /^\**!|@preserve|@license|@cc_on|@vite-ignore|webpack[A-Z][a-zA-Z]+:/i;
|
|
268982
268998
|
var optimizeModule = async (config, compilerCtx, opts) => {
|
|
268983
268999
|
if (!opts.minify && opts.sourceTarget !== "es5" || opts.input === "") {
|
|
268984
269000
|
return {
|
|
@@ -269061,6 +269077,7 @@ var getTerserOptions = (config, sourceTarget, prettyOutput) => {
|
|
|
269061
269077
|
if (sourceTarget === "es5") {
|
|
269062
269078
|
opts.ecma = opts.format.ecma = 5;
|
|
269063
269079
|
opts.compress = false;
|
|
269080
|
+
opts.format.comments = PRESERVED_COMMENTS;
|
|
269064
269081
|
opts.mangle = {
|
|
269065
269082
|
properties: getTerserManglePropertiesConfig()
|
|
269066
269083
|
};
|
|
@@ -275239,6 +275256,7 @@ var validateConfig = (userConfig = {}, bootstrapConfig) => {
|
|
|
275239
275256
|
setBooleanConfig(validatedConfig, "validateTypes", null, !validatedConfig._isTesting);
|
|
275240
275257
|
setBooleanConfig(validatedConfig, "allowInlineScripts", null, true);
|
|
275241
275258
|
setBooleanConfig(validatedConfig, "suppressReservedPublicNameWarnings", null, false);
|
|
275259
|
+
setBooleanConfig(validatedConfig, "suppressReservedEventNameWarnings", null, false);
|
|
275242
275260
|
if (!isString(validatedConfig.taskQueue)) {
|
|
275243
275261
|
validatedConfig.taskQueue = "async";
|
|
275244
275262
|
}
|
|
@@ -275538,7 +275556,7 @@ var getDocsComponents = async (config, compilerCtx, buildCtx) => {
|
|
|
275538
275556
|
methods: getDocsMethods(cmp.methods),
|
|
275539
275557
|
events: getDocsEvents(cmp.events),
|
|
275540
275558
|
styles: getDocsStyles(cmp),
|
|
275541
|
-
slots: getDocsSlots(cmp.docs.tags),
|
|
275559
|
+
slots: getDocsSlots(cmp.htmlSlots, cmp.docs.tags),
|
|
275542
275560
|
parts: getDocsParts(cmp.htmlParts, cmp.docs.tags),
|
|
275543
275561
|
customStates: getDocsCustomStates(cmp),
|
|
275544
275562
|
listeners: getDocsListeners(cmp.listeners)
|
|
@@ -275725,9 +275743,12 @@ var getDocsDeprecationText = (tags) => {
|
|
|
275725
275743
|
}
|
|
275726
275744
|
return void 0;
|
|
275727
275745
|
};
|
|
275728
|
-
var
|
|
275746
|
+
var DEFAULT_SLOT_DOCS = "The default slot";
|
|
275747
|
+
var getDocsSlots = (vdom, tags) => {
|
|
275748
|
+
const docsSlots = getNameText("slot", tags).map(([name, docs]) => ({ name, docs }));
|
|
275749
|
+
const vdomSlots = vdom.map((name) => ({ name, docs: name === "" ? DEFAULT_SLOT_DOCS : "" }));
|
|
275729
275750
|
return sortBy(
|
|
275730
|
-
|
|
275751
|
+
unique([...docsSlots, ...vdomSlots], (s) => s.name),
|
|
275731
275752
|
(a) => a.name
|
|
275732
275753
|
);
|
|
275733
275754
|
};
|
|
@@ -277475,6 +277496,7 @@ var updateImportReferenceFactory = (typeCounts, filePath, config) => {
|
|
|
277475
277496
|
};
|
|
277476
277497
|
|
|
277477
277498
|
// src/compiler/types/generate-app-types.ts
|
|
277499
|
+
var MAX_ONE_OF_REQUIRED_PROPS = 8;
|
|
277478
277500
|
var generateAppTypes = async (config, compilerCtx, buildCtx, destination) => {
|
|
277479
277501
|
const timespan = buildCtx.createTimeSpan(`generated app types started`, true);
|
|
277480
277502
|
const areTypesInternal = destination === "src";
|
|
@@ -277567,10 +277589,12 @@ var generateComponentTypesFile = (config, buildCtx, areTypesInternal) => {
|
|
|
277567
277589
|
c.push(` }`);
|
|
277568
277590
|
c.push(`}`);
|
|
277569
277591
|
c.push(`declare namespace LocalJSX {`);
|
|
277570
|
-
const hasAnyRequiredProps = modules.some(
|
|
277592
|
+
const hasAnyRequiredProps = modules.some(
|
|
277593
|
+
(m) => m.requiredProps && m.requiredProps.length > 0 && m.requiredProps.length <= MAX_ONE_OF_REQUIRED_PROPS
|
|
277594
|
+
);
|
|
277571
277595
|
if (hasAnyRequiredProps) {
|
|
277572
277596
|
c.push(
|
|
277573
|
-
` type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in \`attr:\${K}\`
|
|
277597
|
+
` type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in \`attr:\${K}\`]?: never } | { [P in \`attr:\${K}\`]: AttrT } & { [P in K]?: never };`
|
|
277574
277598
|
);
|
|
277575
277599
|
c.push(``);
|
|
277576
277600
|
}
|
|
@@ -277591,7 +277615,7 @@ var generateComponentTypesFile = (config, buildCtx, areTypesInternal) => {
|
|
|
277591
277615
|
...modules.map((m) => {
|
|
277592
277616
|
if (m.explicitAttributes) {
|
|
277593
277617
|
const baseOptional = `Omit<${m.tagNameAsPascal}, keyof ${m.tagNameAsPascal}Attributes> & { [K in keyof ${m.tagNameAsPascal} & keyof ${m.tagNameAsPascal}Attributes]?: ${m.tagNameAsPascal}[K] } & { [K in keyof ${m.tagNameAsPascal} & keyof ${m.tagNameAsPascal}Attributes as \`attr:\${K}\`]?: ${m.tagNameAsPascal}Attributes[K] } & { [K in keyof ${m.tagNameAsPascal} & keyof ${m.tagNameAsPascal}Attributes as \`prop:\${K}\`]?: ${m.tagNameAsPascal}[K] }`;
|
|
277594
|
-
if (m.requiredProps && m.requiredProps.length > 0) {
|
|
277618
|
+
if (m.requiredProps && m.requiredProps.length > 0 && m.requiredProps.length <= MAX_ONE_OF_REQUIRED_PROPS) {
|
|
277595
277619
|
const requiredUnions = m.requiredProps.map((prop) => {
|
|
277596
277620
|
return `OneOf<"${prop.name}", ${m.tagNameAsPascal}["${prop.name}"], ${m.tagNameAsPascal}Attributes["${prop.name}"]>`;
|
|
277597
277621
|
}).join(" & ");
|
|
@@ -278484,7 +278508,7 @@ var hasChangedImportContent = async (config, compilerCtx, buildCtx, filePath, co
|
|
|
278484
278508
|
|
|
278485
278509
|
// src/compiler/transpile/run-program.ts
|
|
278486
278510
|
init_import_meta_url();
|
|
278487
|
-
var
|
|
278511
|
+
var import_path54 = require("path");
|
|
278488
278512
|
|
|
278489
278513
|
// src/compiler/entries/resolve-component-dependencies.ts
|
|
278490
278514
|
init_import_meta_url();
|
|
@@ -278689,7 +278713,10 @@ var getDecoratorParameter = (arg, typeChecker, diagnostics, errorNode) => {
|
|
|
278689
278713
|
};
|
|
278690
278714
|
var resolveVariableValue = (node, typeChecker, diagnostics, errorNode) => {
|
|
278691
278715
|
if (import_typescript43.default.isIdentifier(node)) {
|
|
278692
|
-
|
|
278716
|
+
let symbol = typeChecker.getSymbolAtLocation(node);
|
|
278717
|
+
if (symbol && symbol.flags & import_typescript43.default.SymbolFlags.Alias) {
|
|
278718
|
+
symbol = typeChecker.getAliasedSymbol(symbol);
|
|
278719
|
+
}
|
|
278693
278720
|
if (!symbol || !symbol.valueDeclaration) {
|
|
278694
278721
|
const err4 = buildError(diagnostics);
|
|
278695
278722
|
err4.messageText = `resolveVar() cannot resolve the value of "${node.text}" at compile time. Only const variables and object properties with string literal values are supported.`;
|
|
@@ -279105,13 +279132,13 @@ var parseElementDecorator = (prop, decoratorName) => {
|
|
|
279105
279132
|
// src/compiler/transformers/decorators-to-static/event-decorator.ts
|
|
279106
279133
|
init_import_meta_url();
|
|
279107
279134
|
var import_typescript48 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
279108
|
-
var eventDecoratorsToStatic = (diagnostics, decoratedProps, typeChecker, program3, newMembers, decoratorName) => {
|
|
279109
|
-
const events = decoratedProps.filter(import_typescript48.default.isPropertyDeclaration).map((prop) => parseEventDecorator(diagnostics, typeChecker, program3, prop, decoratorName)).filter((ev) => !!ev);
|
|
279135
|
+
var eventDecoratorsToStatic = (config, diagnostics, decoratedProps, typeChecker, program3, newMembers, decoratorName) => {
|
|
279136
|
+
const events = decoratedProps.filter(import_typescript48.default.isPropertyDeclaration).map((prop) => parseEventDecorator(config, diagnostics, typeChecker, program3, prop, decoratorName)).filter((ev) => !!ev);
|
|
279110
279137
|
if (events.length > 0) {
|
|
279111
279138
|
newMembers.push(createStaticGetter("events", convertValueToLiteral(events)));
|
|
279112
279139
|
}
|
|
279113
279140
|
};
|
|
279114
|
-
var parseEventDecorator = (diagnostics, typeChecker, program3, prop, decoratorName) => {
|
|
279141
|
+
var parseEventDecorator = (config, diagnostics, typeChecker, program3, prop, decoratorName) => {
|
|
279115
279142
|
var _a3;
|
|
279116
279143
|
const eventDecorator = (_a3 = retrieveTsDecorators(prop)) == null ? void 0 : _a3.find(isDecoratorNamed(decoratorName));
|
|
279117
279144
|
if (eventDecorator == null) {
|
|
@@ -279124,7 +279151,7 @@ var parseEventDecorator = (diagnostics, typeChecker, program3, prop, decoratorNa
|
|
|
279124
279151
|
const [eventOpts] = getDecoratorParameters(eventDecorator, typeChecker, diagnostics);
|
|
279125
279152
|
const symbol = typeChecker.getSymbolAtLocation(prop.name);
|
|
279126
279153
|
const eventName = getEventName(eventOpts, memberName);
|
|
279127
|
-
validateEventName(diagnostics, prop.name, eventName);
|
|
279154
|
+
validateEventName(config, diagnostics, prop.name, eventName);
|
|
279128
279155
|
const eventMeta = {
|
|
279129
279156
|
method: memberName,
|
|
279130
279157
|
name: eventName,
|
|
@@ -279157,7 +279184,7 @@ var getEventType2 = (type) => {
|
|
|
279157
279184
|
}
|
|
279158
279185
|
return null;
|
|
279159
279186
|
};
|
|
279160
|
-
var validateEventName = (diagnostics, node, eventName) => {
|
|
279187
|
+
var validateEventName = (config, diagnostics, node, eventName) => {
|
|
279161
279188
|
if (/^[A-Z]/.test(eventName)) {
|
|
279162
279189
|
const diagnostic = buildWarn(diagnostics);
|
|
279163
279190
|
diagnostic.messageText = [
|
|
@@ -279175,7 +279202,7 @@ var validateEventName = (diagnostics, node, eventName) => {
|
|
|
279175
279202
|
augmentDiagnosticWithNode(warn, node);
|
|
279176
279203
|
return;
|
|
279177
279204
|
}
|
|
279178
|
-
if (DOM_EVENT_NAMES.has(eventName.toLowerCase())) {
|
|
279205
|
+
if (!config.suppressReservedEventNameWarnings && DOM_EVENT_NAMES.has(eventName.toLowerCase())) {
|
|
279179
279206
|
const diagnostic = buildWarn(diagnostics);
|
|
279180
279207
|
diagnostic.messageText = `The event name conflicts with the "${eventName}" native DOM event name.`;
|
|
279181
279208
|
augmentDiagnosticWithNode(diagnostic, node);
|
|
@@ -280412,6 +280439,7 @@ var visitClassDeclaration = (config, diagnostics, typeChecker, program3, classNo
|
|
|
280412
280439
|
);
|
|
280413
280440
|
stateDecoratorsToStatic(decoratedMembers, filteredMethodsAndFields, typeChecker, importAliasMap.get("State"));
|
|
280414
280441
|
eventDecoratorsToStatic(
|
|
280442
|
+
config,
|
|
280415
280443
|
diagnostics,
|
|
280416
280444
|
decoratedMembers,
|
|
280417
280445
|
typeChecker,
|
|
@@ -280534,7 +280562,7 @@ var filterDecorators = (decorators, excludeList) => {
|
|
|
280534
280562
|
|
|
280535
280563
|
// src/compiler/transformers/static-to-meta/parse-static.ts
|
|
280536
280564
|
init_import_meta_url();
|
|
280537
|
-
var
|
|
280565
|
+
var import_path53 = require("path");
|
|
280538
280566
|
var import_typescript65 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
280539
280567
|
|
|
280540
280568
|
// src/compiler/transformers/static-to-meta/call-expression.ts
|
|
@@ -280544,9 +280572,22 @@ var import_typescript58 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
|
280544
280572
|
// src/compiler/transformers/static-to-meta/vdom.ts
|
|
280545
280573
|
init_import_meta_url();
|
|
280546
280574
|
var import_typescript57 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
280547
|
-
var
|
|
280575
|
+
var resolveStaticStringValue = (expr, typeChecker) => {
|
|
280576
|
+
if (import_typescript57.default.isStringLiteralLike(expr)) {
|
|
280577
|
+
return expr.text;
|
|
280578
|
+
}
|
|
280579
|
+
if (typeChecker) {
|
|
280580
|
+
const type = typeChecker.getTypeAtLocation(expr);
|
|
280581
|
+
if (type.isStringLiteral()) {
|
|
280582
|
+
return type.value;
|
|
280583
|
+
}
|
|
280584
|
+
}
|
|
280585
|
+
return void 0;
|
|
280586
|
+
};
|
|
280587
|
+
var gatherVdomMeta = (m, args, typeChecker) => {
|
|
280548
280588
|
m.hasVdomRender = true;
|
|
280549
280589
|
const hTag = args[0];
|
|
280590
|
+
const isSlotTag = import_typescript57.default.isStringLiteral(hTag) && hTag.text === "slot";
|
|
280550
280591
|
if (!import_typescript57.default.isStringLiteral(hTag) && (!import_typescript57.default.isIdentifier(hTag) || hTag.text !== "Host")) {
|
|
280551
280592
|
m.hasVdomFunctional = true;
|
|
280552
280593
|
}
|
|
@@ -280562,6 +280603,8 @@ var gatherVdomMeta = (m, args) => {
|
|
|
280562
280603
|
m.hasVdomStyle = true;
|
|
280563
280604
|
m.hasVdomXlink = true;
|
|
280564
280605
|
} else if (import_typescript57.default.isObjectLiteralExpression(objectLiteral)) {
|
|
280606
|
+
let slotName;
|
|
280607
|
+
let hasDynamicSlotName = false;
|
|
280565
280608
|
objectLiteral.properties.forEach((prop) => {
|
|
280566
280609
|
m.hasVdomAttribute = true;
|
|
280567
280610
|
if (import_typescript57.default.isSpreadAssignment(prop) || import_typescript57.default.isComputedPropertyName(prop.name)) {
|
|
@@ -280572,6 +280615,7 @@ var gatherVdomMeta = (m, args) => {
|
|
|
280572
280615
|
m.hasVdomRef = true;
|
|
280573
280616
|
m.hasVdomStyle = true;
|
|
280574
280617
|
m.hasVdomXlink = true;
|
|
280618
|
+
hasDynamicSlotName = isSlotTag || hasDynamicSlotName;
|
|
280575
280619
|
} else if (prop.name && prop.name.text && prop.name.text.length > 0) {
|
|
280576
280620
|
const attrName = prop.name.text;
|
|
280577
280621
|
if (attrName === "key") {
|
|
@@ -280591,15 +280635,31 @@ var gatherVdomMeta = (m, args) => {
|
|
|
280591
280635
|
m.hasVdomPropOrAttr = true;
|
|
280592
280636
|
}
|
|
280593
280637
|
import_typescript57.default.SyntaxKind.StringLiteral;
|
|
280594
|
-
if (attrName === "part" && import_typescript57.default.isPropertyAssignment(prop)
|
|
280595
|
-
|
|
280596
|
-
|
|
280597
|
-
|
|
280638
|
+
if (attrName === "part" && import_typescript57.default.isPropertyAssignment(prop)) {
|
|
280639
|
+
const partValue = resolveStaticStringValue(prop.initializer, typeChecker);
|
|
280640
|
+
if (partValue !== void 0) {
|
|
280641
|
+
m.htmlParts.push(...partValue.split(" ").filter((part) => part.length > 0));
|
|
280642
|
+
}
|
|
280643
|
+
}
|
|
280644
|
+
if (isSlotTag && attrName === "name" && import_typescript57.default.isPropertyAssignment(prop)) {
|
|
280645
|
+
const resolvedSlotName = resolveStaticStringValue(prop.initializer, typeChecker);
|
|
280646
|
+
if (resolvedSlotName !== void 0) {
|
|
280647
|
+
slotName = resolvedSlotName;
|
|
280648
|
+
} else {
|
|
280649
|
+
hasDynamicSlotName = true;
|
|
280650
|
+
}
|
|
280598
280651
|
}
|
|
280599
280652
|
m.htmlAttrNames.push(attrName);
|
|
280600
280653
|
}
|
|
280601
280654
|
});
|
|
280655
|
+
if (isSlotTag && !hasDynamicSlotName) {
|
|
280656
|
+
m.htmlSlots.push(slotName != null ? slotName : "");
|
|
280657
|
+
}
|
|
280658
|
+
} else if (isSlotTag) {
|
|
280659
|
+
m.htmlSlots.push("");
|
|
280602
280660
|
}
|
|
280661
|
+
} else if (isSlotTag) {
|
|
280662
|
+
m.htmlSlots.push("");
|
|
280603
280663
|
}
|
|
280604
280664
|
if (!m.hasVdomText) {
|
|
280605
280665
|
for (let i = 2; i < args.length; i++) {
|
|
@@ -280647,11 +280707,11 @@ var visitCallExpressionArgs = (m, callExpressionName, args, typeChecker) => {
|
|
|
280647
280707
|
if (fnName === "h" || fnName === H2 || fnName === "createElement") {
|
|
280648
280708
|
visitCallExpressionArg(m, args[0], typeChecker);
|
|
280649
280709
|
if (fnName === "h" || fnName === H2) {
|
|
280650
|
-
gatherVdomMeta(m, args);
|
|
280710
|
+
gatherVdomMeta(m, args, typeChecker);
|
|
280651
280711
|
}
|
|
280652
280712
|
} else if (fnName === "jsx" || fnName === "jsxs" || fnName === "jsxDEV" || fnName === "_jsx" || fnName === "_jsxs" || fnName === "_jsxDEV") {
|
|
280653
280713
|
visitCallExpressionArg(m, args[0], typeChecker);
|
|
280654
|
-
gatherVdomMeta(m, args);
|
|
280714
|
+
gatherVdomMeta(m, args, typeChecker);
|
|
280655
280715
|
if (args.length > 2 && args[2]) {
|
|
280656
280716
|
m.hasVdomKey = true;
|
|
280657
280717
|
}
|
|
@@ -280704,7 +280764,7 @@ var resolveFunctionalComponentDep = (m, identifier3, typeChecker) => {
|
|
|
280704
280764
|
|
|
280705
280765
|
// src/compiler/transformers/static-to-meta/component.ts
|
|
280706
280766
|
init_import_meta_url();
|
|
280707
|
-
var
|
|
280767
|
+
var import_path49 = require("path");
|
|
280708
280768
|
var import_typescript62 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
280709
280769
|
|
|
280710
280770
|
// src/compiler/transformers/add-component-meta-static.ts
|
|
@@ -281028,6 +281088,7 @@ var parseStyleIdentifier = (parsedStyle, modeName) => {
|
|
|
281028
281088
|
|
|
281029
281089
|
// src/compiler/transformers/static-to-meta/class-extension.ts
|
|
281030
281090
|
init_import_meta_url();
|
|
281091
|
+
var import_path48 = require("path");
|
|
281031
281092
|
var import_typescript61 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
281032
281093
|
|
|
281033
281094
|
// src/compiler/transformers/static-to-meta/events.ts
|
|
@@ -281121,6 +281182,21 @@ var parseStaticProps = (staticMembers) => {
|
|
|
281121
281182
|
});
|
|
281122
281183
|
};
|
|
281123
281184
|
|
|
281185
|
+
// src/compiler/transformers/static-to-meta/serializers.ts
|
|
281186
|
+
init_import_meta_url();
|
|
281187
|
+
var parseStaticSerializers = (staticMembers, translateType) => {
|
|
281188
|
+
const parsedSerializers = getStaticValue(staticMembers, translateType);
|
|
281189
|
+
if (!parsedSerializers || parsedSerializers.length === 0) {
|
|
281190
|
+
return [];
|
|
281191
|
+
}
|
|
281192
|
+
return parsedSerializers.map((parsedSerial) => {
|
|
281193
|
+
return {
|
|
281194
|
+
propName: parsedSerial.propName,
|
|
281195
|
+
methodName: parsedSerial.methodName
|
|
281196
|
+
};
|
|
281197
|
+
});
|
|
281198
|
+
};
|
|
281199
|
+
|
|
281124
281200
|
// src/compiler/transformers/static-to-meta/states.ts
|
|
281125
281201
|
init_import_meta_url();
|
|
281126
281202
|
var parseStaticStates = (staticMembers) => {
|
|
@@ -281155,21 +281231,6 @@ var parseStaticWatchers = (staticMembers) => {
|
|
|
281155
281231
|
});
|
|
281156
281232
|
};
|
|
281157
281233
|
|
|
281158
|
-
// src/compiler/transformers/static-to-meta/serializers.ts
|
|
281159
|
-
init_import_meta_url();
|
|
281160
|
-
var parseStaticSerializers = (staticMembers, translateType) => {
|
|
281161
|
-
const parsedSerializers = getStaticValue(staticMembers, translateType);
|
|
281162
|
-
if (!parsedSerializers || parsedSerializers.length === 0) {
|
|
281163
|
-
return [];
|
|
281164
|
-
}
|
|
281165
|
-
return parsedSerializers.map((parsedSerial) => {
|
|
281166
|
-
return {
|
|
281167
|
-
propName: parsedSerial.propName,
|
|
281168
|
-
methodName: parsedSerial.methodName
|
|
281169
|
-
};
|
|
281170
|
-
});
|
|
281171
|
-
};
|
|
281172
|
-
|
|
281173
281234
|
// src/compiler/transformers/static-to-meta/class-extension.ts
|
|
281174
281235
|
var deDupeMembers = (dedupeMembers, staticMembers) => {
|
|
281175
281236
|
return dedupeMembers.filter(
|
|
@@ -281403,6 +281464,35 @@ function buildExtendsTree(compilerCtx, classDeclaration3, dependentClasses, type
|
|
|
281403
281464
|
});
|
|
281404
281465
|
return dependentClasses;
|
|
281405
281466
|
}
|
|
281467
|
+
var ensureRelativeSpecifier = (specifier) => {
|
|
281468
|
+
return specifier.startsWith(".") ? specifier : `./${specifier}`;
|
|
281469
|
+
};
|
|
281470
|
+
var reanchorInheritedTypeReferences = (members, extendedClassFileName, cmpSourceFilePath) => {
|
|
281471
|
+
const extendedClassDir = (0, import_path48.dirname)(normalizePath(extendedClassFileName, false));
|
|
281472
|
+
const cmpDir = (0, import_path48.dirname)(normalizePath(cmpSourceFilePath, false));
|
|
281473
|
+
if (extendedClassDir === cmpDir || isNodeModulePath(extendedClassFileName)) {
|
|
281474
|
+
return members;
|
|
281475
|
+
}
|
|
281476
|
+
members.forEach((member2) => {
|
|
281477
|
+
var _a3;
|
|
281478
|
+
const references = (_a3 = member2.complexType) == null ? void 0 : _a3.references;
|
|
281479
|
+
if (!references) {
|
|
281480
|
+
return;
|
|
281481
|
+
}
|
|
281482
|
+
Object.values(references).forEach((reference) => {
|
|
281483
|
+
var _a4;
|
|
281484
|
+
if (reference.location === "import" && ((_a4 = reference.path) == null ? void 0 : _a4.startsWith("."))) {
|
|
281485
|
+
const typeModulePath = join(extendedClassDir, reference.path);
|
|
281486
|
+
reference.path = ensureRelativeSpecifier(relative(cmpDir, typeModulePath));
|
|
281487
|
+
} else if (reference.location === "local") {
|
|
281488
|
+
const extendedClassModule = normalizePath(extendedClassFileName, false).replace(/\.(tsx|ts)$/, "");
|
|
281489
|
+
reference.location = "import";
|
|
281490
|
+
reference.path = ensureRelativeSpecifier(relative(cmpDir, extendedClassModule));
|
|
281491
|
+
}
|
|
281492
|
+
});
|
|
281493
|
+
});
|
|
281494
|
+
return members;
|
|
281495
|
+
};
|
|
281406
281496
|
function mergeExtendedClassMeta(compilerCtx, typeChecker, buildCtx, cmpNode, staticMembers, moduleFile) {
|
|
281407
281497
|
const tree = buildExtendsTree(compilerCtx, cmpNode, [], typeChecker, buildCtx, moduleFile);
|
|
281408
281498
|
let hasMixin = false;
|
|
@@ -281419,10 +281509,22 @@ function mergeExtendedClassMeta(compilerCtx, typeChecker, buildCtx, cmpNode, sta
|
|
|
281419
281509
|
tree.forEach((extendedClass) => {
|
|
281420
281510
|
var _a3, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
281421
281511
|
const extendedStaticMembers = extendedClass.classNode.members.filter(isStaticGetter);
|
|
281422
|
-
const mixinProps = (
|
|
281512
|
+
const mixinProps = reanchorInheritedTypeReferences(
|
|
281513
|
+
(_a3 = parseStaticProps(extendedStaticMembers)) != null ? _a3 : [],
|
|
281514
|
+
extendedClass.fileName,
|
|
281515
|
+
moduleFile.sourceFilePath
|
|
281516
|
+
);
|
|
281423
281517
|
const mixinStates = (_b = parseStaticStates(extendedStaticMembers)) != null ? _b : [];
|
|
281424
|
-
const mixinMethods = (
|
|
281425
|
-
|
|
281518
|
+
const mixinMethods = reanchorInheritedTypeReferences(
|
|
281519
|
+
(_c = parseStaticMethods(extendedStaticMembers)) != null ? _c : [],
|
|
281520
|
+
extendedClass.fileName,
|
|
281521
|
+
moduleFile.sourceFilePath
|
|
281522
|
+
);
|
|
281523
|
+
const mixinEvents = reanchorInheritedTypeReferences(
|
|
281524
|
+
(_d = parseStaticEvents(extendedStaticMembers)) != null ? _d : [],
|
|
281525
|
+
extendedClass.fileName,
|
|
281526
|
+
moduleFile.sourceFilePath
|
|
281527
|
+
);
|
|
281426
281528
|
const isMixin = mixinProps.length > 0 || mixinStates.length > 0 || mixinMethods.length > 0 || mixinEvents.length > 0;
|
|
281427
281529
|
const module2 = compilerCtx.moduleMap.get(extendedClass.fileName);
|
|
281428
281530
|
if (!module2) return;
|
|
@@ -281583,6 +281685,7 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, b
|
|
|
281583
281685
|
htmlAttrNames: [],
|
|
281584
281686
|
htmlTagNames: [],
|
|
281585
281687
|
htmlParts: [],
|
|
281688
|
+
htmlSlots: [],
|
|
281586
281689
|
isUpdateable: false,
|
|
281587
281690
|
potentialCmpRefs: [],
|
|
281588
281691
|
dependents: [],
|
|
@@ -281604,6 +281707,7 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, b
|
|
|
281604
281707
|
cmp.hasModernPropertyDecls = detectModernPropDeclarations(cmpNode) || doesExtend;
|
|
281605
281708
|
cmp.htmlAttrNames = unique(cmp.htmlAttrNames);
|
|
281606
281709
|
cmp.htmlTagNames = unique(cmp.htmlTagNames);
|
|
281710
|
+
cmp.htmlSlots = unique(cmp.htmlSlots);
|
|
281607
281711
|
cmp.hasSlot = cmp.hasSlot || cmp.htmlTagNames.includes("slot");
|
|
281608
281712
|
cmp.potentialCmpRefs = unique(cmp.potentialCmpRefs);
|
|
281609
281713
|
setComponentBuildConditionals(cmp);
|
|
@@ -281657,12 +281761,12 @@ var parseVirtualProp = (tag) => {
|
|
|
281657
281761
|
};
|
|
281658
281762
|
var parseAssetsDirs = (staticMembers, componentFilePath) => {
|
|
281659
281763
|
const dirs = getStaticValue(staticMembers, "assetsDirs") || [];
|
|
281660
|
-
const componentDir = normalizePath((0,
|
|
281764
|
+
const componentDir = normalizePath((0, import_path49.dirname)(componentFilePath));
|
|
281661
281765
|
return dirs.map((dir) => {
|
|
281662
281766
|
dir = normalizePath(dir.trim());
|
|
281663
281767
|
let absolutePath = dir;
|
|
281664
281768
|
let cmpRelativePath = dir;
|
|
281665
|
-
if ((0,
|
|
281769
|
+
if ((0, import_path49.isAbsolute)(dir)) {
|
|
281666
281770
|
cmpRelativePath = relative(componentDir, dir);
|
|
281667
281771
|
} else {
|
|
281668
281772
|
absolutePath = join(componentDir, dir);
|
|
@@ -281677,16 +281781,16 @@ var parseAssetsDirs = (staticMembers, componentFilePath) => {
|
|
|
281677
281781
|
|
|
281678
281782
|
// src/compiler/transformers/static-to-meta/import.ts
|
|
281679
281783
|
init_import_meta_url();
|
|
281680
|
-
var
|
|
281784
|
+
var import_path52 = require("path");
|
|
281681
281785
|
var import_typescript64 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
281682
281786
|
|
|
281683
281787
|
// src/compiler/transformers/collections/add-external-import.ts
|
|
281684
281788
|
init_import_meta_url();
|
|
281685
|
-
var
|
|
281789
|
+
var import_path51 = require("path");
|
|
281686
281790
|
|
|
281687
281791
|
// src/compiler/transformers/collections/parse-collection-module.ts
|
|
281688
281792
|
init_import_meta_url();
|
|
281689
|
-
var
|
|
281793
|
+
var import_path50 = require("path");
|
|
281690
281794
|
|
|
281691
281795
|
// src/compiler/transformers/collections/parse-collection-manifest.ts
|
|
281692
281796
|
init_import_meta_url();
|
|
@@ -281767,7 +281871,7 @@ var parseCollection = (config, compilerCtx, buildCtx, moduleId, pkgJsonFilePath,
|
|
|
281767
281871
|
if (collection != null) {
|
|
281768
281872
|
return collection;
|
|
281769
281873
|
}
|
|
281770
|
-
const collectionPackageRootDir = (0,
|
|
281874
|
+
const collectionPackageRootDir = (0, import_path50.dirname)(pkgJsonFilePath);
|
|
281771
281875
|
const collectionFilePath = join(collectionPackageRootDir, pkgData.collection);
|
|
281772
281876
|
const relPath = relative(config.rootDir, collectionFilePath);
|
|
281773
281877
|
config.logger.debug(`load collection: ${collectionName}, ${relPath}`);
|
|
@@ -281775,7 +281879,7 @@ var parseCollection = (config, compilerCtx, buildCtx, moduleId, pkgJsonFilePath,
|
|
|
281775
281879
|
if (!collectionJsonStr) {
|
|
281776
281880
|
return null;
|
|
281777
281881
|
}
|
|
281778
|
-
const collectionDir = normalizePath((0,
|
|
281882
|
+
const collectionDir = normalizePath((0, import_path50.dirname)(collectionFilePath));
|
|
281779
281883
|
collection = parseCollectionManifest(config, compilerCtx, buildCtx, collectionName, collectionDir, collectionJsonStr);
|
|
281780
281884
|
collection.moduleId = moduleId;
|
|
281781
281885
|
if (pkgData.module && pkgData.module !== pkgData.main) {
|
|
@@ -281842,7 +281946,7 @@ var addExternalImport = (config, compilerCtx, buildCtx, moduleFile, containingFi
|
|
|
281842
281946
|
buildCtx.collections.push(collection);
|
|
281843
281947
|
if (Array.isArray(collection.dependencies)) {
|
|
281844
281948
|
collection.dependencies.forEach((dependencyModuleId) => {
|
|
281845
|
-
const resolveFromDir = (0,
|
|
281949
|
+
const resolveFromDir = (0, import_path51.dirname)(pkgJsonFilePath);
|
|
281846
281950
|
addExternalImport(
|
|
281847
281951
|
config,
|
|
281848
281952
|
compilerCtx,
|
|
@@ -281863,7 +281967,7 @@ var parseModuleImport = (config, compilerCtx, buildCtx, moduleFile, dirPath, imp
|
|
|
281863
281967
|
if (!moduleFile.originalImports.includes(importPath)) {
|
|
281864
281968
|
moduleFile.originalImports.push(importPath);
|
|
281865
281969
|
}
|
|
281866
|
-
if ((0,
|
|
281970
|
+
if ((0, import_path52.isAbsolute)(importPath)) {
|
|
281867
281971
|
importPath = normalizePath(importPath);
|
|
281868
281972
|
moduleFile.localImports.push(importPath);
|
|
281869
281973
|
} else if (importPath.startsWith(".")) {
|
|
@@ -281912,8 +282016,8 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
|
|
|
281912
282016
|
if (prevModuleFile && prevModuleFile.staticSourceFileText === sourceFileText) {
|
|
281913
282017
|
return prevModuleFile;
|
|
281914
282018
|
}
|
|
281915
|
-
const srcDirPath = (0,
|
|
281916
|
-
const emitFileName = (0,
|
|
282019
|
+
const srcDirPath = (0, import_path53.dirname)(sourceFilePath);
|
|
282020
|
+
const emitFileName = (0, import_path53.basename)(emitFilePath);
|
|
281917
282021
|
emitFilePath = normalizePath(join(srcDirPath, emitFileName));
|
|
281918
282022
|
const moduleFile = createModule(tsSourceFile, sourceFileText, emitFilePath);
|
|
281919
282023
|
if (prevModuleFile == null ? void 0 : prevModuleFile.cmps) moduleFile.cmps = prevModuleFile.cmps;
|
|
@@ -282138,7 +282242,7 @@ var getRelativeDts = (config, srcPath, emitDtsPath) => {
|
|
|
282138
282242
|
if (normalizePath(config.srcDir) === srcPath) {
|
|
282139
282243
|
break;
|
|
282140
282244
|
}
|
|
282141
|
-
const b = (0,
|
|
282245
|
+
const b = (0, import_path54.basename)(emitDtsPath);
|
|
282142
282246
|
parts.push(b);
|
|
282143
282247
|
emitDtsPath = normalizePath(join(emitDtsPath, ".."));
|
|
282144
282248
|
srcPath = normalizePath(join(normalizePath(srcPath), ".."));
|
|
@@ -282154,7 +282258,7 @@ init_import_meta_url();
|
|
|
282154
282258
|
|
|
282155
282259
|
// src/compiler/build/build-hmr.ts
|
|
282156
282260
|
init_import_meta_url();
|
|
282157
|
-
var
|
|
282261
|
+
var import_path55 = require("path");
|
|
282158
282262
|
var generateHmr = (config, compilerCtx, buildCtx) => {
|
|
282159
282263
|
var _a3;
|
|
282160
282264
|
if (((_a3 = config.devServer) == null ? void 0 : _a3.reloadStrategy) == null) {
|
|
@@ -282287,7 +282391,7 @@ var getExternalStylesUpdated = (buildCtx, outputTargetsWww) => {
|
|
|
282287
282391
|
if (cssFiles.length === 0) {
|
|
282288
282392
|
return null;
|
|
282289
282393
|
}
|
|
282290
|
-
return cssFiles.map((cssFile) => (0,
|
|
282394
|
+
return cssFiles.map((cssFile) => (0, import_path55.basename)(cssFile)).sort();
|
|
282291
282395
|
};
|
|
282292
282396
|
var getImagesUpdated = (buildCtx, outputTargetsWww) => {
|
|
282293
282397
|
if (outputTargetsWww.length === 0) {
|
|
@@ -282295,7 +282399,7 @@ var getImagesUpdated = (buildCtx, outputTargetsWww) => {
|
|
|
282295
282399
|
}
|
|
282296
282400
|
const imageFiles = buildCtx.filesChanged.reduce((arr, filePath) => {
|
|
282297
282401
|
if (IMAGE_EXT.some((ext2) => filePath.toLowerCase().endsWith(ext2))) {
|
|
282298
|
-
const fileName = (0,
|
|
282402
|
+
const fileName = (0, import_path55.basename)(filePath);
|
|
282299
282403
|
if (!arr.includes(fileName)) {
|
|
282300
282404
|
arr.push(fileName);
|
|
282301
282405
|
}
|
|
@@ -282322,7 +282426,7 @@ var excludeHmrFiles = (config, excludeHmr, filesChanged2) => {
|
|
|
282322
282426
|
}
|
|
282323
282427
|
if (shouldExclude) {
|
|
282324
282428
|
config.logger.debug(`excludeHmr: ${fileChanged}`);
|
|
282325
|
-
excludeFiles.push((0,
|
|
282429
|
+
excludeFiles.push((0, import_path55.basename)(fileChanged));
|
|
282326
282430
|
}
|
|
282327
282431
|
return shouldExclude;
|
|
282328
282432
|
}).some((r) => r);
|
|
@@ -282651,7 +282755,7 @@ init_import_meta_url();
|
|
|
282651
282755
|
|
|
282652
282756
|
// src/compiler/html/validate-manifest-json.ts
|
|
282653
282757
|
init_import_meta_url();
|
|
282654
|
-
var
|
|
282758
|
+
var import_path56 = require("path");
|
|
282655
282759
|
var validateManifestJson = (config, compilerCtx, buildCtx) => {
|
|
282656
282760
|
if (config.devMode) {
|
|
282657
282761
|
return null;
|
|
@@ -282696,7 +282800,7 @@ var validateManifestJsonIcon = async (compilerCtx, buildCtx, manifestFilePath, m
|
|
|
282696
282800
|
if (iconSrc.startsWith("/")) {
|
|
282697
282801
|
iconSrc = iconSrc.slice(1);
|
|
282698
282802
|
}
|
|
282699
|
-
const manifestDir = (0,
|
|
282803
|
+
const manifestDir = (0, import_path56.dirname)(manifestFilePath);
|
|
282700
282804
|
const iconPath = join(manifestDir, iconSrc);
|
|
282701
282805
|
const hasAccess = await compilerCtx.fs.access(iconPath);
|
|
282702
282806
|
if (!hasAccess) {
|
|
@@ -282707,7 +282811,7 @@ var validateManifestJsonIcon = async (compilerCtx, buildCtx, manifestFilePath, m
|
|
|
282707
282811
|
|
|
282708
282812
|
// src/compiler/types/validate-build-package-json.ts
|
|
282709
282813
|
init_import_meta_url();
|
|
282710
|
-
var
|
|
282814
|
+
var import_path57 = require("path");
|
|
282711
282815
|
|
|
282712
282816
|
// src/compiler/types/package-json-log-utils.ts
|
|
282713
282817
|
init_import_meta_url();
|
|
@@ -282883,7 +282987,7 @@ var validatePackageFiles = async (config, compilerCtx, buildCtx, outputTarget) =
|
|
|
282883
282987
|
await Promise.all(
|
|
282884
282988
|
buildCtx.packageJson.files.map(async (pkgFile) => {
|
|
282885
282989
|
if (!isGlob(pkgFile)) {
|
|
282886
|
-
const packageJsonDir = (0,
|
|
282990
|
+
const packageJsonDir = (0, import_path57.dirname)(config.packageJsonFilePath);
|
|
282887
282991
|
const absPath = join(packageJsonDir, pkgFile);
|
|
282888
282992
|
const hasAccess = await compilerCtx.fs.access(absPath);
|
|
282889
282993
|
if (!hasAccess) {
|
|
@@ -283095,11 +283199,11 @@ var createFullBuild = async (config, compilerCtx) => {
|
|
|
283095
283199
|
|
|
283096
283200
|
// src/compiler/build/watch-build.ts
|
|
283097
283201
|
init_import_meta_url();
|
|
283098
|
-
var
|
|
283202
|
+
var import_path60 = require("path");
|
|
283099
283203
|
|
|
283100
283204
|
// src/compiler/bundle/dev-module.ts
|
|
283101
283205
|
init_import_meta_url();
|
|
283102
|
-
var
|
|
283206
|
+
var import_path58 = require("path");
|
|
283103
283207
|
var compilerRequest = async (config, compilerCtx, data) => {
|
|
283104
283208
|
const results = {
|
|
283105
283209
|
path: data.path,
|
|
@@ -283205,7 +283309,7 @@ var bundleDevModule = async (config, compilerCtx, parsedUrl, results) => {
|
|
|
283205
283309
|
var useDevModuleCache = async (config, p) => {
|
|
283206
283310
|
if (config.enableCache) {
|
|
283207
283311
|
for (let i = 0; i < 10; i++) {
|
|
283208
|
-
const n3 = (0,
|
|
283312
|
+
const n3 = (0, import_path58.basename)(p);
|
|
283209
283313
|
if (n3 === "node_modules") {
|
|
283210
283314
|
return true;
|
|
283211
283315
|
}
|
|
@@ -283213,7 +283317,7 @@ var useDevModuleCache = async (config, p) => {
|
|
|
283213
283317
|
if (isSymbolicLink) {
|
|
283214
283318
|
return false;
|
|
283215
283319
|
}
|
|
283216
|
-
p = (0,
|
|
283320
|
+
p = (0, import_path58.dirname)(p);
|
|
283217
283321
|
}
|
|
283218
283322
|
}
|
|
283219
283323
|
return false;
|
|
@@ -283234,7 +283338,7 @@ var parseDevModuleUrl = (config, u) => {
|
|
|
283234
283338
|
};
|
|
283235
283339
|
if (u && u.includes(DEV_MODULE_DIR) && u.endsWith(".js")) {
|
|
283236
283340
|
const url = new URL(u, "https://stenciljs.com");
|
|
283237
|
-
let reqPath = (0,
|
|
283341
|
+
let reqPath = (0, import_path58.basename)(url.pathname);
|
|
283238
283342
|
reqPath = reqPath.substring(0, reqPath.length - 3);
|
|
283239
283343
|
const splt = reqPath.split("@");
|
|
283240
283344
|
if (splt.length === 2) {
|
|
@@ -283258,11 +283362,11 @@ var getDevModuleCachePath = (config, parsedUrl) => {
|
|
|
283258
283362
|
|
|
283259
283363
|
// src/compiler/fs-watch/fs-watch-rebuild.ts
|
|
283260
283364
|
init_import_meta_url();
|
|
283261
|
-
var
|
|
283365
|
+
var import_path59 = require("path");
|
|
283262
283366
|
var filesChanged = (buildCtx) => {
|
|
283263
283367
|
return unique([...buildCtx.filesUpdated, ...buildCtx.filesAdded, ...buildCtx.filesDeleted]).sort();
|
|
283264
283368
|
};
|
|
283265
|
-
var unaryBasename = (filePath) => (0,
|
|
283369
|
+
var unaryBasename = (filePath) => (0, import_path59.basename)(filePath);
|
|
283266
283370
|
var getExt = (filePath) => {
|
|
283267
283371
|
const fileParts = filePath.split(".");
|
|
283268
283372
|
return fileParts.length > 1 ? fileParts.pop().toLowerCase() : null;
|
|
@@ -283593,7 +283697,7 @@ var updateCompilerCtxCache = (config, compilerCtx, path7, kind) => {
|
|
|
283593
283697
|
} else if (kind === "dirDelete") {
|
|
283594
283698
|
const fsRootDir = resolve("/");
|
|
283595
283699
|
compilerCtx.moduleMap.forEach((_, moduleFilePath) => {
|
|
283596
|
-
let moduleAncestorDir = (0,
|
|
283700
|
+
let moduleAncestorDir = (0, import_path60.dirname)(moduleFilePath);
|
|
283597
283701
|
for (let i = 0; i < 50; i++) {
|
|
283598
283702
|
if (moduleAncestorDir === config.rootDir || moduleAncestorDir === fsRootDir) {
|
|
283599
283703
|
break;
|
|
@@ -283604,7 +283708,7 @@ var updateCompilerCtxCache = (config, compilerCtx, path7, kind) => {
|
|
|
283604
283708
|
compilerCtx.changedFiles.add(moduleFilePath);
|
|
283605
283709
|
break;
|
|
283606
283710
|
}
|
|
283607
|
-
moduleAncestorDir = (0,
|
|
283711
|
+
moduleAncestorDir = (0, import_path60.dirname)(moduleAncestorDir);
|
|
283608
283712
|
}
|
|
283609
283713
|
});
|
|
283610
283714
|
}
|
|
@@ -283793,7 +283897,7 @@ var getConfig = (userConfig) => {
|
|
|
283793
283897
|
|
|
283794
283898
|
// src/compiler/sys/in-memory-fs.ts
|
|
283795
283899
|
init_import_meta_url();
|
|
283796
|
-
var
|
|
283900
|
+
var import_path61 = require("path");
|
|
283797
283901
|
var createInMemoryFs = (sys) => {
|
|
283798
283902
|
const items = /* @__PURE__ */ new Map();
|
|
283799
283903
|
const outputTargetTypes = /* @__PURE__ */ new Map();
|
|
@@ -283918,7 +284022,7 @@ var createInMemoryFs = (sys) => {
|
|
|
283918
284022
|
const shouldExcludeFromReaddir = (opts, item) => {
|
|
283919
284023
|
if (item.isDirectory) {
|
|
283920
284024
|
if (Array.isArray(opts.excludeDirNames)) {
|
|
283921
|
-
const base2 = (0,
|
|
284025
|
+
const base2 = (0, import_path61.basename)(item.absPath);
|
|
283922
284026
|
if (opts.excludeDirNames.some((dir) => base2 === dir)) {
|
|
283923
284027
|
return true;
|
|
283924
284028
|
}
|
|
@@ -284166,12 +284270,12 @@ var createInMemoryFs = (sys) => {
|
|
|
284166
284270
|
};
|
|
284167
284271
|
const ensureDir = async (path7, inMemoryOnly) => {
|
|
284168
284272
|
if (!inMemoryOnly) {
|
|
284169
|
-
await sys.createDir((0,
|
|
284273
|
+
await sys.createDir((0, import_path61.dirname)(path7), { recursive: true });
|
|
284170
284274
|
return;
|
|
284171
284275
|
}
|
|
284172
284276
|
const allDirs = [];
|
|
284173
284277
|
while (true) {
|
|
284174
|
-
path7 = (0,
|
|
284278
|
+
path7 = (0, import_path61.dirname)(path7);
|
|
284175
284279
|
if (typeof path7 === "string" && path7.length > 0 && path7 !== "/" && path7.endsWith(":/") === false && path7.endsWith(":\\") === false) {
|
|
284176
284280
|
allDirs.push(path7);
|
|
284177
284281
|
} else {
|
|
@@ -284370,7 +284474,7 @@ var getCommitInstructions = (items) => {
|
|
|
284370
284474
|
if (item.queueWriteToDisk === true) {
|
|
284371
284475
|
if (item.isFile === true) {
|
|
284372
284476
|
instructions.filesToWrite.push(itemPath);
|
|
284373
|
-
const dir = normalizePath((0,
|
|
284477
|
+
const dir = normalizePath((0, import_path61.dirname)(itemPath));
|
|
284374
284478
|
if (!instructions.dirsToEnsure.includes(dir)) {
|
|
284375
284479
|
instructions.dirsToEnsure.push(dir);
|
|
284376
284480
|
}
|
|
@@ -284401,7 +284505,7 @@ var getCommitInstructions = (items) => {
|
|
|
284401
284505
|
const src = itemPath;
|
|
284402
284506
|
const dest = item.queueCopyFileToDest;
|
|
284403
284507
|
instructions.filesToCopy.push([src, dest]);
|
|
284404
|
-
const dir = normalizePath((0,
|
|
284508
|
+
const dir = normalizePath((0, import_path61.dirname)(dest));
|
|
284405
284509
|
if (!instructions.dirsToEnsure.includes(dir)) {
|
|
284406
284510
|
instructions.dirsToEnsure.push(dir);
|
|
284407
284511
|
}
|
|
@@ -285398,7 +285502,7 @@ var optimizeCss2 = async (inputOpts) => {
|
|
|
285398
285502
|
|
|
285399
285503
|
// src/compiler/prerender/prerender-worker.ts
|
|
285400
285504
|
init_import_meta_url();
|
|
285401
|
-
var
|
|
285505
|
+
var import_path62 = require("path");
|
|
285402
285506
|
|
|
285403
285507
|
// src/compiler/prerender/crawl-urls.ts
|
|
285404
285508
|
init_import_meta_url();
|
|
@@ -286145,7 +286249,7 @@ var prerenderWorker = async (sys, prerenderRequest) => {
|
|
|
286145
286249
|
prerenderEnsureDir(sys, prerenderCtx2, results.filePath);
|
|
286146
286250
|
const writePromise = sys.writeFile(results.filePath, html);
|
|
286147
286251
|
if (Array.isArray(hydrateResults.staticData) && hydrateResults.staticData.length > 0) {
|
|
286148
|
-
const pageDir = (0,
|
|
286252
|
+
const pageDir = (0, import_path62.dirname)(results.filePath);
|
|
286149
286253
|
await Promise.all(
|
|
286150
286254
|
hydrateResults.staticData.map(async (s) => {
|
|
286151
286255
|
if (s.type === "application/json") {
|
|
@@ -286206,7 +286310,7 @@ var prerenderEnsureDir = (sys, prerenderCtx2, p) => {
|
|
|
286206
286310
|
|
|
286207
286311
|
// src/compiler/style/css-to-esm.ts
|
|
286208
286312
|
init_import_meta_url();
|
|
286209
|
-
var
|
|
286313
|
+
var import_path63 = __toESM(require("path"));
|
|
286210
286314
|
var CSS_IMPORT_RE = /(@import)\s+(url\()?\s?(.*?)\s?\)?([^;]*);?/gi;
|
|
286211
286315
|
var transformCssToEsm = async (input) => {
|
|
286212
286316
|
const results = transformCssToEsmModule(input);
|
|
@@ -286273,7 +286377,7 @@ var transformCssToEsmModule = (input) => {
|
|
|
286273
286377
|
};
|
|
286274
286378
|
var generateTransformCssToEsm = (input, results) => {
|
|
286275
286379
|
const s = new MagicString("");
|
|
286276
|
-
results.styleText = results.styleText.replace(
|
|
286380
|
+
results.styleText = results.styleText.replace(/\\/g, "\\\\").replace(/\n/g, " ").replace(/\r/g, " ").replace(/\t/g, " ").replace(/\u000c/g, "\\\\f").replace(/\u0008/g, "\\\\b").replace(/\u000b/g, "\\\\v").replace(/\0/g, "\\\\0").replace(/`/g, "\\`").replace(/\$\{/g, "\\${");
|
|
286277
286381
|
if (input.addTagTransformers) {
|
|
286278
286382
|
results.styleText = addTagTransformToCssString(results.styleText, input.tags);
|
|
286279
286383
|
}
|
|
@@ -286320,7 +286424,7 @@ var getCssToEsmImports = (varNames, cssText, filePath, modeName) => {
|
|
|
286320
286424
|
return cssImports;
|
|
286321
286425
|
}
|
|
286322
286426
|
cssText = stripCssComments(cssText);
|
|
286323
|
-
const dir =
|
|
286427
|
+
const dir = import_path63.default.dirname(filePath);
|
|
286324
286428
|
let r;
|
|
286325
286429
|
while (r = CSS_IMPORT_RE.exec(cssText)) {
|
|
286326
286430
|
const cssImportData = {
|
|
@@ -286335,7 +286439,7 @@ var getCssToEsmImports = (varNames, cssText, filePath, modeName) => {
|
|
|
286335
286439
|
} else if (isCssNodeModule2(cssImportData.url)) {
|
|
286336
286440
|
cssImportData.filePath = cssImportData.url.substring(1);
|
|
286337
286441
|
cssImportData.isNodeModule = true;
|
|
286338
|
-
} else if (
|
|
286442
|
+
} else if (import_path63.default.isAbsolute(cssImportData.url)) {
|
|
286339
286443
|
cssImportData.filePath = normalizePath(cssImportData.url);
|
|
286340
286444
|
} else {
|
|
286341
286445
|
cssImportData.filePath = normalizePath(resolve(dir, cssImportData.url));
|
|
@@ -286365,7 +286469,7 @@ var isLocalCssImport2 = (srcImport) => {
|
|
|
286365
286469
|
return true;
|
|
286366
286470
|
};
|
|
286367
286471
|
var createCssVarName = (filePath, modeName) => {
|
|
286368
|
-
let varName =
|
|
286472
|
+
let varName = import_path63.default.basename(filePath);
|
|
286369
286473
|
if (modeName && modeName !== DEFAULT_STYLE_MODE && !varName.includes(modeName)) {
|
|
286370
286474
|
varName = modeName + "-" + varName;
|
|
286371
286475
|
}
|
|
@@ -286441,11 +286545,11 @@ var createCompiler = async (userConfig) => {
|
|
|
286441
286545
|
// src/compiler/config/load-config.ts
|
|
286442
286546
|
init_import_meta_url();
|
|
286443
286547
|
var import_sys_api_node3 = require("../sys/node/index.js");
|
|
286444
|
-
var
|
|
286548
|
+
var import_path65 = require("path");
|
|
286445
286549
|
|
|
286446
286550
|
// src/compiler/sys/typescript/typescript-config.ts
|
|
286447
286551
|
init_import_meta_url();
|
|
286448
|
-
var
|
|
286552
|
+
var import_path64 = require("path");
|
|
286449
286553
|
var import_typescript69 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
286450
286554
|
var validateTsConfig = async (config, sys, init) => {
|
|
286451
286555
|
var _a3;
|
|
@@ -286548,7 +286652,7 @@ var getTsConfigPath = async (config, sys, init) => {
|
|
|
286548
286652
|
content: ""
|
|
286549
286653
|
};
|
|
286550
286654
|
if (isString(config.tsconfig)) {
|
|
286551
|
-
if (!(0,
|
|
286655
|
+
if (!(0, import_path64.isAbsolute)(config.tsconfig)) {
|
|
286552
286656
|
tsconfig.path = join(config.rootDir, config.tsconfig);
|
|
286553
286657
|
} else {
|
|
286554
286658
|
tsconfig.path = config.tsconfig;
|
|
@@ -286619,7 +286723,7 @@ var loadConfig = async (init = {}) => {
|
|
|
286619
286723
|
configPath = loadedConfigFile.configPath;
|
|
286620
286724
|
unknownConfig.config = { ...loadedConfigFile, ...config };
|
|
286621
286725
|
unknownConfig.config.configPath = configPath;
|
|
286622
|
-
unknownConfig.config.rootDir = typeof config.rootDir === "string" ? config.rootDir : normalizePath((0,
|
|
286726
|
+
unknownConfig.config.rootDir = typeof config.rootDir === "string" ? config.rootDir : normalizePath((0, import_path65.dirname)(configPath));
|
|
286623
286727
|
} else {
|
|
286624
286728
|
unknownConfig.config = { ...config };
|
|
286625
286729
|
unknownConfig.config.configPath = null;
|
|
@@ -286682,7 +286786,7 @@ var evaluateConfigFile = async (diagnostics, configFilePath) => {
|
|
|
286682
286786
|
|
|
286683
286787
|
// src/compiler/prerender/prerender-main.ts
|
|
286684
286788
|
init_import_meta_url();
|
|
286685
|
-
var
|
|
286789
|
+
var import_path67 = require("path");
|
|
286686
286790
|
|
|
286687
286791
|
// src/hydrate/runner/render-utils.ts
|
|
286688
286792
|
init_import_meta_url();
|
|
@@ -286704,7 +286808,7 @@ init_import_meta_url();
|
|
|
286704
286808
|
|
|
286705
286809
|
// src/compiler/prerender/prerendered-write-path.ts
|
|
286706
286810
|
init_import_meta_url();
|
|
286707
|
-
var
|
|
286811
|
+
var import_path66 = __toESM(require("path"));
|
|
286708
286812
|
var getWriteFilePathFromUrlPath = (manager, inputHref) => {
|
|
286709
286813
|
const baseUrl = new URL(manager.outputTarget.baseUrl, manager.devServerHostUrl);
|
|
286710
286814
|
const basePathname = baseUrl.pathname.toLowerCase();
|
|
@@ -286715,7 +286819,7 @@ var getWriteFilePathFromUrlPath = (manager, inputHref) => {
|
|
|
286715
286819
|
const isPrerrenderRoot = basePathname === inputPathname;
|
|
286716
286820
|
let fileName;
|
|
286717
286821
|
if (isPrerrenderRoot) {
|
|
286718
|
-
fileName =
|
|
286822
|
+
fileName = import_path66.default.basename(manager.outputTarget.indexHtml);
|
|
286719
286823
|
} else {
|
|
286720
286824
|
fileName = "index.html";
|
|
286721
286825
|
}
|
|
@@ -287105,7 +287209,7 @@ var runPrerender = async (config, hydrateAppFilePath, componentGraph, srcIndexHt
|
|
|
287105
287209
|
diagnostic.header = `Prerender Error`;
|
|
287106
287210
|
diagnostic.messageText = `Build results missing "hydrateAppFilePath"`;
|
|
287107
287211
|
} else {
|
|
287108
|
-
if (!(0,
|
|
287212
|
+
if (!(0, import_path67.isAbsolute)(hydrateAppFilePath)) {
|
|
287109
287213
|
hydrateAppFilePath = join(config.sys.getCurrentDirectory(), hydrateAppFilePath);
|
|
287110
287214
|
}
|
|
287111
287215
|
const hydrateAppExists = await config.sys.access(hydrateAppFilePath);
|
|
@@ -287292,7 +287396,7 @@ var getComponentPathContent = (componentGraph, outputTarget) => {
|
|
|
287292
287396
|
init_import_meta_url();
|
|
287293
287397
|
var import_sys_api_node4 = require("../sys/node/index.js");
|
|
287294
287398
|
var os = __toESM(require("os"));
|
|
287295
|
-
var
|
|
287399
|
+
var import_path68 = __toESM(require("path"));
|
|
287296
287400
|
var process2 = __toESM(require("process"));
|
|
287297
287401
|
var createSystem = (c) => {
|
|
287298
287402
|
var _a3;
|
|
@@ -287322,8 +287426,8 @@ var createSystem = (c) => {
|
|
|
287322
287426
|
if (p === "/" || p === "") {
|
|
287323
287427
|
return "/";
|
|
287324
287428
|
}
|
|
287325
|
-
const dir = (0,
|
|
287326
|
-
const base2 = (0,
|
|
287429
|
+
const dir = (0, import_path68.dirname)(p);
|
|
287430
|
+
const base2 = (0, import_path68.basename)(p);
|
|
287327
287431
|
if (dir.endsWith("/")) {
|
|
287328
287432
|
return normalizePath(`${dir}${base2}`);
|
|
287329
287433
|
}
|
|
@@ -287348,8 +287452,8 @@ var createSystem = (c) => {
|
|
|
287348
287452
|
const createDirSync = (p, opts) => {
|
|
287349
287453
|
p = normalize4(p);
|
|
287350
287454
|
const results = {
|
|
287351
|
-
basename: (0,
|
|
287352
|
-
dirname: (0,
|
|
287455
|
+
basename: (0, import_path68.basename)(p),
|
|
287456
|
+
dirname: (0, import_path68.dirname)(p),
|
|
287353
287457
|
path: p,
|
|
287354
287458
|
newDirs: [],
|
|
287355
287459
|
error: null
|
|
@@ -287358,14 +287462,14 @@ var createSystem = (c) => {
|
|
|
287358
287462
|
return results;
|
|
287359
287463
|
};
|
|
287360
287464
|
const createDirRecursiveSync = (p, opts, results) => {
|
|
287361
|
-
const parentDir = (0,
|
|
287465
|
+
const parentDir = (0, import_path68.dirname)(p);
|
|
287362
287466
|
if (opts && opts.recursive && !isRootPath(parentDir)) {
|
|
287363
287467
|
createDirRecursiveSync(parentDir, opts, results);
|
|
287364
287468
|
}
|
|
287365
287469
|
const item = items.get(p);
|
|
287366
287470
|
if (!item) {
|
|
287367
287471
|
items.set(p, {
|
|
287368
|
-
basename: (0,
|
|
287472
|
+
basename: (0, import_path68.basename)(p),
|
|
287369
287473
|
dirname: parentDir,
|
|
287370
287474
|
isDirectory: true,
|
|
287371
287475
|
isFile: false,
|
|
@@ -287471,7 +287575,7 @@ var createSystem = (c) => {
|
|
|
287471
287575
|
const itemStat = statSync2(oldPath);
|
|
287472
287576
|
if (!itemStat.error && !results.error) {
|
|
287473
287577
|
if (itemStat.isFile) {
|
|
287474
|
-
const newFileParentDir = (0,
|
|
287578
|
+
const newFileParentDir = (0, import_path68.dirname)(newPath);
|
|
287475
287579
|
const createDirResults = createDirSync(newFileParentDir, { recursive: true });
|
|
287476
287580
|
const fileContent = items.get(oldPath).data;
|
|
287477
287581
|
const writeResults = writeFileSync(newPath, fileContent);
|
|
@@ -287507,8 +287611,8 @@ var createSystem = (c) => {
|
|
|
287507
287611
|
const resolvePath = (p) => normalize4(p);
|
|
287508
287612
|
const removeDirSync = (p, opts = {}) => {
|
|
287509
287613
|
const results = {
|
|
287510
|
-
basename: (0,
|
|
287511
|
-
dirname: (0,
|
|
287614
|
+
basename: (0, import_path68.basename)(p),
|
|
287615
|
+
dirname: (0, import_path68.dirname)(p),
|
|
287512
287616
|
path: p,
|
|
287513
287617
|
removedDirs: [],
|
|
287514
287618
|
removedFiles: [],
|
|
@@ -287573,8 +287677,8 @@ var createSystem = (c) => {
|
|
|
287573
287677
|
const removeFileSync = (p) => {
|
|
287574
287678
|
p = normalize4(p);
|
|
287575
287679
|
const results = {
|
|
287576
|
-
basename: (0,
|
|
287577
|
-
dirname: (0,
|
|
287680
|
+
basename: (0, import_path68.basename)(p),
|
|
287681
|
+
dirname: (0, import_path68.dirname)(p),
|
|
287578
287682
|
path: p,
|
|
287579
287683
|
error: null
|
|
287580
287684
|
};
|
|
@@ -287611,8 +287715,8 @@ var createSystem = (c) => {
|
|
|
287611
287715
|
item.watcherCallbacks.push(dirWatcherCallback);
|
|
287612
287716
|
} else {
|
|
287613
287717
|
items.set(p, {
|
|
287614
|
-
basename: (0,
|
|
287615
|
-
dirname: (0,
|
|
287718
|
+
basename: (0, import_path68.basename)(p),
|
|
287719
|
+
dirname: (0, import_path68.dirname)(p),
|
|
287616
287720
|
isDirectory: true,
|
|
287617
287721
|
isFile: false,
|
|
287618
287722
|
watcherCallbacks: [dirWatcherCallback],
|
|
@@ -287646,8 +287750,8 @@ var createSystem = (c) => {
|
|
|
287646
287750
|
item.watcherCallbacks.push(fileWatcherCallback);
|
|
287647
287751
|
} else {
|
|
287648
287752
|
items.set(p, {
|
|
287649
|
-
basename: (0,
|
|
287650
|
-
dirname: (0,
|
|
287753
|
+
basename: (0, import_path68.basename)(p),
|
|
287754
|
+
dirname: (0, import_path68.dirname)(p),
|
|
287651
287755
|
isDirectory: false,
|
|
287652
287756
|
isFile: true,
|
|
287653
287757
|
watcherCallbacks: [fileWatcherCallback],
|
|
@@ -287662,7 +287766,7 @@ var createSystem = (c) => {
|
|
|
287662
287766
|
};
|
|
287663
287767
|
};
|
|
287664
287768
|
const emitDirectoryWatch = (p, emitted) => {
|
|
287665
|
-
const parentDir = normalize4((0,
|
|
287769
|
+
const parentDir = normalize4((0, import_path68.dirname)(p));
|
|
287666
287770
|
const dirItem = items.get(parentDir);
|
|
287667
287771
|
if (dirItem && dirItem.isDirectory && dirItem.watcherCallbacks) {
|
|
287668
287772
|
for (const watcherCallback of dirItem.watcherCallbacks) {
|
|
@@ -287691,8 +287795,8 @@ var createSystem = (c) => {
|
|
|
287691
287795
|
}
|
|
287692
287796
|
} else {
|
|
287693
287797
|
items.set(p, {
|
|
287694
|
-
basename: (0,
|
|
287695
|
-
dirname: (0,
|
|
287798
|
+
basename: (0, import_path68.basename)(p),
|
|
287799
|
+
dirname: (0, import_path68.dirname)(p),
|
|
287696
287800
|
isDirectory: false,
|
|
287697
287801
|
isFile: true,
|
|
287698
287802
|
watcherCallbacks: null,
|
|
@@ -287760,7 +287864,7 @@ var createSystem = (c) => {
|
|
|
287760
287864
|
isSymbolicLink,
|
|
287761
287865
|
nextTick: nextTick2,
|
|
287762
287866
|
normalizePath: normalize4,
|
|
287763
|
-
platformPath:
|
|
287867
|
+
platformPath: import_path68.default,
|
|
287764
287868
|
readDir,
|
|
287765
287869
|
readDirSync,
|
|
287766
287870
|
readFile: readFile2,
|
|
@@ -287954,7 +288058,7 @@ var import_typescript71 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
|
287954
288058
|
|
|
287955
288059
|
// src/compiler/transformers/static-to-meta/visitor.ts
|
|
287956
288060
|
init_import_meta_url();
|
|
287957
|
-
var
|
|
288061
|
+
var import_path69 = require("path");
|
|
287958
288062
|
var import_typescript70 = __toESM(require_typescript_5_8_3_bundle_cache_min());
|
|
287959
288063
|
var convertStaticToMeta = (config, compilerCtx, buildCtx, typeChecker, collection, transformOpts) => {
|
|
287960
288064
|
return (transformCtx) => {
|
|
@@ -287973,7 +288077,7 @@ var convertStaticToMeta = (config, compilerCtx, buildCtx, typeChecker, collectio
|
|
|
287973
288077
|
return import_typescript70.default.visitEachChild(node, visitNode, transformCtx);
|
|
287974
288078
|
};
|
|
287975
288079
|
return (tsSourceFile) => {
|
|
287976
|
-
dirPath = (0,
|
|
288080
|
+
dirPath = (0, import_path69.dirname)(tsSourceFile.fileName);
|
|
287977
288081
|
moduleFile = getModuleLegacy(compilerCtx, tsSourceFile.fileName);
|
|
287978
288082
|
resetModuleLegacy(moduleFile);
|
|
287979
288083
|
if (collection != null) {
|