🔧
This commit is contained in:
4
node_modules/rollup/dist/es/getLogFilter.js
generated
vendored
4
node_modules/rollup/dist/es/getLogFilter.js
generated
vendored
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
@license
|
||||
Rollup.js v4.40.0
|
||||
Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
|
||||
Rollup.js v4.40.2
|
||||
Tue, 06 May 2025 07:26:21 GMT - commit 02da7efedcf373f0f819b78e3acbe50de05d9a5b
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
|
||||
4
node_modules/rollup/dist/es/parseAst.js
generated
vendored
4
node_modules/rollup/dist/es/parseAst.js
generated
vendored
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
@license
|
||||
Rollup.js v4.40.0
|
||||
Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
|
||||
Rollup.js v4.40.2
|
||||
Tue, 06 May 2025 07:26:21 GMT - commit 02da7efedcf373f0f819b78e3acbe50de05d9a5b
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
|
||||
4
node_modules/rollup/dist/es/rollup.js
generated
vendored
4
node_modules/rollup/dist/es/rollup.js
generated
vendored
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
@license
|
||||
Rollup.js v4.40.0
|
||||
Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
|
||||
Rollup.js v4.40.2
|
||||
Tue, 06 May 2025 07:26:21 GMT - commit 02da7efedcf373f0f819b78e3acbe50de05d9a5b
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
|
||||
163
node_modules/rollup/dist/es/shared/node-entry.js
generated
vendored
163
node_modules/rollup/dist/es/shared/node-entry.js
generated
vendored
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
@license
|
||||
Rollup.js v4.40.0
|
||||
Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
|
||||
Rollup.js v4.40.2
|
||||
Tue, 06 May 2025 07:26:21 GMT - commit 02da7efedcf373f0f819b78e3acbe50de05d9a5b
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
Released under the MIT License.
|
||||
*/
|
||||
import { EMPTY_OBJECT, ExportDefaultDeclaration as ExportDefaultDeclaration$1, CallExpression as CallExpression$1, EMPTY_ARRAY, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, ObjectExpression as ObjectExpression$1, Property as Property$1, Program as Program$1, logIllegalImportReassignment, BLANK, logRedeclarationError, StaticBlock as StaticBlock$1, CatchClause as CatchClause$1, logDuplicateArgumentNameError, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, VariableDeclarator as VariableDeclarator$1, ExpressionStatement as ExpressionStatement$1, logMissingExport, normalize, getImportPath, logMissingNodeBuiltins, logReservedNamespace, error, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, RestElement as RestElement$1, logConstVariableReassignError, ArrowFunctionExpression as ArrowFunctionExpression$1, EMPTY_SET, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1, getRollupError, logModuleParseError, logParseError, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, Identifier as Identifier$1, logThisIsUndefined, getAstBuffer, convertAnnotations, FIXED_STRINGS, convertNode as convertNode$1, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logMissingJsxExport, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logInvalidFormatForTopLevelAwait, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logCircularReexport, logAddonNotGenerated, logIncompatibleExportOptionValue, logMixedExport, logFailedValidation, isPathFragment, logCyclicCrossChunkReexport, getAliasName, logUnexpectedNamedImport, isAbsolute as isAbsolute$1, relative as relative$1, logUnexpectedNamespaceReexport, logEmptyChunk, logMissingGlobalName, logOptimizeChunkStatus, logSourcemapBroken, logConflictingSourcemapSources, logChunkInvalid, logInvalidOption, logCannotAssignModuleToChunk, URL_OUTPUT_FORMAT, URL_OUTPUT_DIR, URL_OUTPUT_SOURCEMAPFILE, URL_OUTPUT_AMD_ID, logAnonymousPluginCache, logDuplicatePluginName, logUnknownOption, LOGLEVEL_ERROR, logLevelPriority, LOGLEVEL_DEBUG, printQuotedStringList, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, relativeId, logBadLoader, logExternalModulesCannotBeTransformedToModules, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, warnDeprecation, logChunkNotGeneratedForFileName, logAssetNotFinalisedForFileName, logFileNameConflict, URL_GENERATEBUNDLE, logInvalidLogPosition, logInputHookInOutputPlugin, logInvalidAddonPluginHook, logInvalidFunctionPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, augmentLogMessage, URL_TREESHAKE, URL_JSX, URL_TREESHAKE_MODULESIDEEFFECTS, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_GENERATEDCODE, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_MANUALCHUNKS, logInvalidExportOptionValue, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_INTEROP, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, logAlreadyClosed, logMissingFileOrDirOption, logCannotEmitFromOptionsHook, URL_WATCH } from './parseAst.js';
|
||||
import { EMPTY_OBJECT, ExportDefaultDeclaration as ExportDefaultDeclaration$1, CallExpression as CallExpression$1, EMPTY_ARRAY, LOGLEVEL_WARN, logUnusedExternalImports, ANNOTATION_KEY, INVALID_ANNOTATION_KEY, ObjectExpression as ObjectExpression$1, Property as Property$1, Program as Program$1, logIllegalImportReassignment, BLANK, logRedeclarationError, StaticBlock as StaticBlock$1, CatchClause as CatchClause$1, logDuplicateArgumentNameError, logModuleLevelDirective, ReturnStatement as ReturnStatement$1, VariableDeclarator as VariableDeclarator$1, ExpressionStatement as ExpressionStatement$1, logMissingExport, normalize, getImportPath, logMissingNodeBuiltins, logReservedNamespace, error, logIllegalIdentifierAsName, logMissingNameOptionForIifeExport, logMissingNameOptionForUmdExport, RestElement as RestElement$1, logConstVariableReassignError, ArrowFunctionExpression as ArrowFunctionExpression$1, EMPTY_SET, logCannotCallNamespace, logEval, BlockStatement as BlockStatement$1, getRollupError, logModuleParseError, logParseError, LOGLEVEL_INFO, logFirstSideEffect, locate, logInvalidAnnotation, Identifier as Identifier$1, logThisIsUndefined, getAstBuffer, convertAnnotations, FIXED_STRINGS, convertNode as convertNode$1, logImportAttributeIsInvalid, logImportOptionsAreInvalid, logSyntheticNamedExportsNeedNamespaceExport, logMissingEntryExport, logDuplicateExportError, logInvalidSourcemapForError, augmentCodeLocation, logInconsistentImportAttributes, logMissingJsxExport, logNamespaceConflict, logAmbiguousExternalNamespaces, logShimmedExport, parseAst, logInvalidFormatForTopLevelAwait, TemplateLiteral as TemplateLiteral$1, Literal as Literal$1, logCircularReexport, logAddonNotGenerated, logIncompatibleExportOptionValue, logMixedExport, logFailedValidation, isPathFragment, logCyclicCrossChunkReexport, getAliasName, logUnexpectedNamedImport, isAbsolute as isAbsolute$1, relative as relative$1, logUnexpectedNamespaceReexport, logEmptyChunk, logMissingGlobalName, logOptimizeChunkStatus, logSourcemapBroken, logConflictingSourcemapSources, logChunkInvalid, logInvalidOption, URL_OUTPUT_FORMAT, URL_OUTPUT_DIR, URL_OUTPUT_SOURCEMAPFILE, URL_OUTPUT_AMD_ID, logCannotAssignModuleToChunk, logAnonymousPluginCache, logDuplicatePluginName, logUnknownOption, LOGLEVEL_ERROR, logLevelPriority, LOGLEVEL_DEBUG, printQuotedStringList, logInvalidSetAssetSourceCall, logPluginError, logNoTransformMapOrAstWithoutCode, relativeId, logBadLoader, logExternalModulesCannotBeTransformedToModules, logInternalIdCannotBeExternal, isRelative, logUnresolvedImport, logUnresolvedImportTreatedAsExternal, logExternalSyntheticExports, logUnresolvedEntry, logUnresolvedImplicitDependant, logExternalModulesCannotBeIncludedInManualChunks, logEntryCannotBeExternal, logImplicitDependantCannotBeExternal, logNoAssetSourceSet, logFileReferenceIdNotFoundForFilename, logAssetReferenceIdNotFoundForSetSource, logAssetSourceAlreadySet, logInvalidRollupPhaseForChunkEmission, warnDeprecation, logChunkNotGeneratedForFileName, logAssetNotFinalisedForFileName, logFileNameConflict, URL_GENERATEBUNDLE, logInvalidLogPosition, logInputHookInOutputPlugin, logInvalidAddonPluginHook, logInvalidFunctionPluginHook, logImplicitDependantIsNotIncluded, logCircularDependency, augmentLogMessage, URL_JSX, URL_TREESHAKE_MODULESIDEEFFECTS, URL_TREESHAKE, URL_OUTPUT_INLINEDYNAMICIMPORTS, URL_PRESERVEENTRYSIGNATURES, URL_OUTPUT_GENERATEDCODE, isValidUrl, addTrailingSlashIfMissed, URL_OUTPUT_SOURCEMAPBASEURL, URL_OUTPUT_MANUALCHUNKS, logInvalidExportOptionValue, URL_OUTPUT_AMD_BASEPATH, URL_OUTPUT_INTEROP, URL_OUTPUT_EXTERNALIMPORTATTRIBUTES, logAlreadyClosed, logMissingFileOrDirOption, logCannotEmitFromOptionsHook, URL_WATCH } from './parseAst.js';
|
||||
import { relative, dirname, basename, extname, resolve as resolve$1 } from 'node:path';
|
||||
import { posix, isAbsolute, resolve, win32 } from 'path';
|
||||
import { parseAsync, xxhashBase16, xxhashBase64Url, xxhashBase36 } from '../../native.js';
|
||||
@@ -15,7 +15,7 @@ import process$1, { env } from 'node:process';
|
||||
import { performance } from 'node:perf_hooks';
|
||||
import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
|
||||
|
||||
var version = "4.40.0";
|
||||
var version = "4.40.2";
|
||||
|
||||
const comma = ','.charCodeAt(0);
|
||||
const semicolon = ';'.charCodeAt(0);
|
||||
@@ -2192,8 +2192,7 @@ function createInclusionContext() {
|
||||
hasBreak: false,
|
||||
hasContinue: false,
|
||||
includedCallArguments: new Set(),
|
||||
includedLabels: new Set(),
|
||||
withinTopLevelAwait: false
|
||||
includedLabels: new Set()
|
||||
};
|
||||
}
|
||||
function createHasEffectsContext() {
|
||||
@@ -8424,7 +8423,7 @@ function amd(magicString, { accessedGlobals, dependencies, exports, hasDefaultEx
|
||||
const deps = dependencies.map(m => `'${updateExtensionForRelativeAmdId(m.importPath, amd.forceJsExtensionForImports)}'`);
|
||||
const parameters = dependencies.map(m => m.name);
|
||||
const { n, getNonArrowFunctionIntro, _ } = snippets;
|
||||
if (namedExportsMode && hasExports) {
|
||||
if (hasExports && (namedExportsMode || exports[0]?.local === 'exports.default')) {
|
||||
parameters.unshift(`exports`);
|
||||
deps.unshift(`'exports'`);
|
||||
}
|
||||
@@ -8683,7 +8682,7 @@ function iife(magicString, { accessedGlobals, dependencies, exports, hasDefaultE
|
||||
if (hasExports && !name) {
|
||||
log(LOGLEVEL_WARN, logMissingNameOptionForIifeExport());
|
||||
}
|
||||
if (namedExportsMode && hasExports) {
|
||||
if (hasExports && (namedExportsMode || exports[0]?.local === 'exports.default')) {
|
||||
if (extend) {
|
||||
deps.unshift(`this${keypath(name, getPropertyAccess)}${_}=${_}this${keypath(name, getPropertyAccess)}${_}||${_}{}`);
|
||||
parameters.unshift('exports');
|
||||
@@ -8902,7 +8901,8 @@ function umd(magicString, { accessedGlobals, dependencies, exports, hasDefaultEx
|
||||
const trimmedImports = trimEmptyImports(dependencies);
|
||||
const globalDeps = trimmedImports.map(module => globalProperty(module.globalName, globalVariable, getPropertyAccess));
|
||||
const factoryParameters = trimmedImports.map(m => m.name);
|
||||
if (namedExportsMode && (hasExports || noConflict)) {
|
||||
if ((hasExports || noConflict) &&
|
||||
(namedExportsMode || (hasExports && exports[0]?.local === 'exports.default'))) {
|
||||
amdDeps.unshift(`'exports'`);
|
||||
cjsDeps.unshift(`exports`);
|
||||
globalDeps.unshift(assignToDeepVariable(name, globalVariable, globals, `${extend ? `${globalProperty(name, globalVariable, getPropertyAccess)}${_}||${_}` : ''}{}`, snippets, log));
|
||||
@@ -11658,44 +11658,38 @@ class AssignmentPattern extends NodeBase {
|
||||
}
|
||||
|
||||
class AwaitExpression extends NodeBase {
|
||||
get isTopLevelAwait() {
|
||||
return isFlagSet(this.flags, 134217728 /* Flag.isTopLevelAwait */);
|
||||
}
|
||||
set isTopLevelAwait(value) {
|
||||
this.flags = setFlag(this.flags, 134217728 /* Flag.isTopLevelAwait */, value);
|
||||
}
|
||||
hasEffects() {
|
||||
if (!this.deoptimized)
|
||||
this.applyDeoptimizations();
|
||||
return true;
|
||||
}
|
||||
initialise() {
|
||||
super.initialise();
|
||||
let parent = this.parent;
|
||||
do {
|
||||
if (parent instanceof FunctionNode || parent instanceof ArrowFunctionExpression)
|
||||
return;
|
||||
} while ((parent = parent.parent));
|
||||
this.scope.context.usesTopLevelAwait = true;
|
||||
}
|
||||
include(context, includeChildrenRecursively) {
|
||||
if (!this.included)
|
||||
this.includeNode(context);
|
||||
this.argument.include({ ...context, withinTopLevelAwait: this.isTopLevelAwait }, includeChildrenRecursively);
|
||||
this.argument.include(context, includeChildrenRecursively);
|
||||
}
|
||||
includeNode(context) {
|
||||
this.included = true;
|
||||
if (!this.deoptimized)
|
||||
this.applyDeoptimizations();
|
||||
checkTopLevelAwait: {
|
||||
let parent = this.parent;
|
||||
do {
|
||||
if (parent instanceof FunctionNode || parent instanceof ArrowFunctionExpression)
|
||||
break checkTopLevelAwait;
|
||||
} while ((parent = parent.parent));
|
||||
this.scope.context.usesTopLevelAwait = true;
|
||||
this.isTopLevelAwait = true;
|
||||
}
|
||||
// Thenables need to be included
|
||||
this.argument.includePath(THEN_PATH, { ...context, withinTopLevelAwait: this.isTopLevelAwait });
|
||||
this.argument.includePath(THEN_PATH, context);
|
||||
}
|
||||
includePath(path, context) {
|
||||
if (!this.deoptimized)
|
||||
this.applyDeoptimizations();
|
||||
if (!this.included)
|
||||
this.includeNode(context);
|
||||
this.argument.includePath(path, { ...context, withinTopLevelAwait: this.isTopLevelAwait });
|
||||
this.argument.includePath(path, context);
|
||||
}
|
||||
}
|
||||
const THEN_PATH = ['then'];
|
||||
@@ -11920,10 +11914,10 @@ class CallExpressionBase extends NodeBase {
|
||||
|
||||
class CallExpression extends CallExpressionBase {
|
||||
get hasCheckedForWarnings() {
|
||||
return isFlagSet(this.flags, 536870912 /* Flag.checkedForWarnings */);
|
||||
return isFlagSet(this.flags, 268435456 /* Flag.checkedForWarnings */);
|
||||
}
|
||||
set hasCheckedForWarnings(value) {
|
||||
this.flags = setFlag(this.flags, 536870912 /* Flag.checkedForWarnings */, value);
|
||||
this.flags = setFlag(this.flags, 268435456 /* Flag.checkedForWarnings */, value);
|
||||
}
|
||||
get optional() {
|
||||
return isFlagSet(this.flags, 128 /* Flag.optional */);
|
||||
@@ -12929,10 +12923,10 @@ class ImportExpression extends NodeBase {
|
||||
this.resolutionString = null;
|
||||
}
|
||||
get withinTopLevelAwait() {
|
||||
return isFlagSet(this.flags, 268435456 /* Flag.withinTopLevelAwait */);
|
||||
return isFlagSet(this.flags, 134217728 /* Flag.withinTopLevelAwait */);
|
||||
}
|
||||
set withinTopLevelAwait(value) {
|
||||
this.flags = setFlag(this.flags, 268435456 /* Flag.withinTopLevelAwait */, value);
|
||||
this.flags = setFlag(this.flags, 134217728 /* Flag.withinTopLevelAwait */, value);
|
||||
}
|
||||
// Do not bind attributes
|
||||
bind() {
|
||||
@@ -13039,18 +13033,17 @@ class ImportExpression extends NodeBase {
|
||||
}
|
||||
include(context, includeChildrenRecursively) {
|
||||
if (!this.included)
|
||||
this.includeNode(context);
|
||||
this.includeNode();
|
||||
this.source.include(context, includeChildrenRecursively);
|
||||
}
|
||||
includeNode(context) {
|
||||
includeNode() {
|
||||
this.included = true;
|
||||
this.withinTopLevelAwait = context.withinTopLevelAwait;
|
||||
this.scope.context.includeDynamicImport(this);
|
||||
this.scope.addAccessedDynamicImport(this);
|
||||
}
|
||||
includePath(path, context) {
|
||||
includePath(path) {
|
||||
if (!this.included)
|
||||
this.includeNode(context);
|
||||
this.includeNode();
|
||||
// Technically, this is not correct as dynamic imports return a Promise.
|
||||
if (this.hasUnknownAccessedKey)
|
||||
return;
|
||||
@@ -13066,6 +13059,22 @@ class ImportExpression extends NodeBase {
|
||||
initialise() {
|
||||
super.initialise();
|
||||
this.scope.context.addDynamicImport(this);
|
||||
let parent = this.parent;
|
||||
let withinAwaitExpression = false;
|
||||
let withinTopLevelAwait = false;
|
||||
do {
|
||||
if (withinAwaitExpression &&
|
||||
(parent instanceof FunctionNode || parent instanceof ArrowFunctionExpression)) {
|
||||
withinTopLevelAwait = false;
|
||||
}
|
||||
if (parent instanceof AwaitExpression) {
|
||||
withinAwaitExpression = true;
|
||||
withinTopLevelAwait = true;
|
||||
}
|
||||
} while ((parent = parent.parent));
|
||||
if (withinAwaitExpression && withinTopLevelAwait) {
|
||||
this.withinTopLevelAwait = true;
|
||||
}
|
||||
}
|
||||
parseNode(esTreeNode) {
|
||||
this.sourceAstNode = esTreeNode.source;
|
||||
@@ -14696,10 +14705,10 @@ SwitchStatement.prototype.applyDeoptimizations = doNotDeoptimize;
|
||||
|
||||
class TaggedTemplateExpression extends CallExpressionBase {
|
||||
get hasCheckedForWarnings() {
|
||||
return isFlagSet(this.flags, 536870912 /* Flag.checkedForWarnings */);
|
||||
return isFlagSet(this.flags, 268435456 /* Flag.checkedForWarnings */);
|
||||
}
|
||||
set hasCheckedForWarnings(value) {
|
||||
this.flags = setFlag(this.flags, 536870912 /* Flag.checkedForWarnings */, value);
|
||||
this.flags = setFlag(this.flags, 268435456 /* Flag.checkedForWarnings */, value);
|
||||
}
|
||||
bind() {
|
||||
super.bind();
|
||||
@@ -18136,7 +18145,9 @@ class Chunk {
|
||||
for (const module of entryModules) {
|
||||
if (module.preserveSignature === 'allow-extension') {
|
||||
const canPreserveExports = this.canPreserveModuleExports(module);
|
||||
if (canPreserveExports) {
|
||||
if (canPreserveExports &&
|
||||
!module.chunkFileNames.size &&
|
||||
module.chunkNames.every(({ isUserDefined }) => !isUserDefined)) {
|
||||
this.allowExtensionModules.add(module);
|
||||
if (!this.facadeModule) {
|
||||
this.facadeModule = module;
|
||||
@@ -19244,12 +19255,12 @@ function analyzeModuleGraph(entries) {
|
||||
const awaitedDynamicImportsForCurrentEntry = new Set();
|
||||
dynamicImportModulesByEntry[entryIndex] = dynamicImportsForCurrentEntry;
|
||||
awaitedDynamicImportModulesByEntry[entryIndex] = awaitedDynamicImportsForCurrentEntry;
|
||||
const modulesToHandle = new Set([currentEntry]);
|
||||
for (const module of modulesToHandle) {
|
||||
const staticDependencies = new Set([currentEntry]);
|
||||
for (const module of staticDependencies) {
|
||||
getOrCreate(dependentEntriesByModule, module, (getNewSet)).add(entryIndex);
|
||||
for (const dependency of module.getDependenciesToBeIncluded()) {
|
||||
if (!(dependency instanceof ExternalModule)) {
|
||||
modulesToHandle.add(dependency);
|
||||
staticDependencies.add(dependency);
|
||||
}
|
||||
}
|
||||
for (const { resolution } of module.dynamicImports) {
|
||||
@@ -19259,9 +19270,12 @@ function analyzeModuleGraph(entries) {
|
||||
dynamicEntryModules.add(resolution);
|
||||
allEntriesSet.add(resolution);
|
||||
dynamicImportsForCurrentEntry.add(resolution);
|
||||
if (resolution.includedDirectTopLevelAwaitingDynamicImporters.has(currentEntry)) {
|
||||
awaitedDynamicEntryModules.add(resolution);
|
||||
awaitedDynamicImportsForCurrentEntry.add(resolution);
|
||||
for (const includedDirectTopLevelAwaitingDynamicImporter of resolution.includedDirectTopLevelAwaitingDynamicImporters) {
|
||||
if (staticDependencies.has(includedDirectTopLevelAwaitingDynamicImporter)) {
|
||||
awaitedDynamicEntryModules.add(resolution);
|
||||
awaitedDynamicImportsForCurrentEntry.add(resolution);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19765,24 +19779,32 @@ function analyseModuleExecution(entryModules) {
|
||||
const dynamicImports = new Set();
|
||||
const parents = new Map();
|
||||
const orderedModules = [];
|
||||
const handleSyncLoadedModule = (module, parent) => {
|
||||
if (parents.has(module)) {
|
||||
if (!analysedModules.has(module)) {
|
||||
cyclePaths.push(getCyclePath(module, parent, parents));
|
||||
}
|
||||
return;
|
||||
}
|
||||
parents.set(module, parent);
|
||||
analyseModule(module);
|
||||
};
|
||||
const analyseModule = (module) => {
|
||||
if (module instanceof Module) {
|
||||
for (const dependency of module.dependencies) {
|
||||
if (parents.has(dependency)) {
|
||||
if (!analysedModules.has(dependency)) {
|
||||
cyclePaths.push(getCyclePath(dependency, module, parents));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
parents.set(dependency, module);
|
||||
analyseModule(dependency);
|
||||
handleSyncLoadedModule(dependency, module);
|
||||
}
|
||||
for (const dependency of module.implicitlyLoadedBefore) {
|
||||
dynamicImports.add(dependency);
|
||||
}
|
||||
for (const { resolution } of module.dynamicImports) {
|
||||
for (const { resolution, node } of module.dynamicImports) {
|
||||
if (resolution instanceof Module) {
|
||||
dynamicImports.add(resolution);
|
||||
if (node.withinTopLevelAwait) {
|
||||
handleSyncLoadedModule(resolution, module);
|
||||
}
|
||||
else {
|
||||
dynamicImports.add(resolution);
|
||||
}
|
||||
}
|
||||
}
|
||||
orderedModules.push(module);
|
||||
@@ -21441,7 +21463,7 @@ function generateAssetFileName(name, names, source, originalFileName, originalFi
|
||||
: outputOptions.assetFileNames, 'output.assetFileNames', {
|
||||
ext: () => extname(emittedName).slice(1),
|
||||
extname: () => extname(emittedName),
|
||||
hash: size => sourceHash.slice(0, Math.max(0, size || DEFAULT_HASH_SIZE)),
|
||||
hash: size => sourceHash.slice(0, Math.min(Math.max(0, size || DEFAULT_HASH_SIZE), MAX_HASH_SIZE)),
|
||||
name: () => emittedName.slice(0, Math.max(0, emittedName.length - extname(emittedName).length))
|
||||
}), bundle);
|
||||
}
|
||||
@@ -23630,12 +23652,41 @@ function watch(configs) {
|
||||
});
|
||||
return emitter;
|
||||
}
|
||||
function withTrailingSlash(path) {
|
||||
if (path[path.length - 1] !== '/') {
|
||||
return `${path}/`;
|
||||
}
|
||||
return path;
|
||||
}
|
||||
function checkWatchConfig(config) {
|
||||
for (const item of config) {
|
||||
if (item.input && item.output) {
|
||||
const input = typeof item.input === 'string' ? ensureArray(item.input) : item.input;
|
||||
const output = ensureArray(item.output);
|
||||
for (const index in input) {
|
||||
const inputPath = input[index];
|
||||
const subPath = output.find(o => {
|
||||
if (!o.dir || typeof inputPath !== 'string') {
|
||||
return false;
|
||||
}
|
||||
const _outPath = withTrailingSlash(o.dir);
|
||||
const _inputPath = withTrailingSlash(inputPath);
|
||||
return _inputPath.startsWith(_outPath);
|
||||
});
|
||||
if (subPath) {
|
||||
error(logInvalidOption('watch', URL_WATCH, `the input "${inputPath}" is a subpath of the output "${subPath.dir}"`));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
async function watchInternal(configs, emitter) {
|
||||
const optionsList = await Promise.all(ensureArray(configs).map(config => mergeOptions(config, true)));
|
||||
const watchOptionsList = optionsList.filter(config => config.watch !== false);
|
||||
if (watchOptionsList.length === 0) {
|
||||
return error(logInvalidOption('watch', URL_WATCH, 'there must be at least one config where "watch" is not set to "false"'));
|
||||
}
|
||||
checkWatchConfig(watchOptionsList);
|
||||
await loadFsEvents();
|
||||
const { Watcher } = await import('./watch.js');
|
||||
new Watcher(watchOptionsList, emitter);
|
||||
|
||||
4
node_modules/rollup/dist/es/shared/parseAst.js
generated
vendored
4
node_modules/rollup/dist/es/shared/parseAst.js
generated
vendored
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
@license
|
||||
Rollup.js v4.40.0
|
||||
Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
|
||||
Rollup.js v4.40.2
|
||||
Tue, 06 May 2025 07:26:21 GMT - commit 02da7efedcf373f0f819b78e3acbe50de05d9a5b
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
|
||||
4
node_modules/rollup/dist/es/shared/watch.js
generated
vendored
4
node_modules/rollup/dist/es/shared/watch.js
generated
vendored
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
@license
|
||||
Rollup.js v4.40.0
|
||||
Sat, 12 Apr 2025 08:39:04 GMT - commit 1f2d579ccd4b39f223fed14ac7d031a6c848cd80
|
||||
Rollup.js v4.40.2
|
||||
Tue, 06 May 2025 07:26:21 GMT - commit 02da7efedcf373f0f819b78e3acbe50de05d9a5b
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
|
||||
Reference in New Issue
Block a user