zedbee 0.1.0-beta.16 → 0.1.0-beta.18
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/THIRD_PARTY_NOTICES.md +68 -74
- package/dist/attribution/metrics.d.ts.map +1 -1
- package/dist/attribution/metrics.js +8 -5
- package/dist/attribution/metrics.js.map +1 -1
- package/dist/attribution/pair-source-moves.d.ts +12 -0
- package/dist/attribution/pair-source-moves.d.ts.map +1 -0
- package/dist/attribution/pair-source-moves.js +108 -0
- package/dist/attribution/pair-source-moves.js.map +1 -0
- package/dist/attribution/source-moves.d.ts +47 -0
- package/dist/attribution/source-moves.d.ts.map +1 -0
- package/dist/attribution/source-moves.js +199 -0
- package/dist/attribution/source-moves.js.map +1 -0
- package/dist/cache/captured-dependencies.d.ts +24 -1
- package/dist/cache/captured-dependencies.d.ts.map +1 -1
- package/dist/cache/captured-dependencies.js +146 -25
- package/dist/cache/captured-dependencies.js.map +1 -1
- package/dist/cache/dependency-inputs.d.ts +3 -1
- package/dist/cache/dependency-inputs.d.ts.map +1 -1
- package/dist/cache/dependency-inputs.js +7 -3
- package/dist/cache/dependency-inputs.js.map +1 -1
- package/dist/checks/adapter.d.ts +1 -0
- package/dist/checks/adapter.d.ts.map +1 -1
- package/dist/checks/applicability.d.ts.map +1 -1
- package/dist/checks/applicability.js +1 -1
- package/dist/checks/applicability.js.map +1 -1
- package/dist/checks/changed-file-paths.d.ts.map +1 -1
- package/dist/checks/changed-file-paths.js +7 -1
- package/dist/checks/changed-file-paths.js.map +1 -1
- package/dist/checks/closed-compiler-project.d.ts +5 -0
- package/dist/checks/closed-compiler-project.d.ts.map +1 -0
- package/dist/checks/closed-compiler-project.js +106 -0
- package/dist/checks/closed-compiler-project.js.map +1 -0
- package/dist/checks/comparison-context.d.ts +3 -1
- package/dist/checks/comparison-context.d.ts.map +1 -1
- package/dist/checks/comparison-context.js +122 -7
- package/dist/checks/comparison-context.js.map +1 -1
- package/dist/checks/compiler-change-inputs.d.ts +12 -0
- package/dist/checks/compiler-change-inputs.d.ts.map +1 -0
- package/dist/checks/compiler-change-inputs.js +104 -0
- package/dist/checks/compiler-change-inputs.js.map +1 -0
- package/dist/checks/compiler-inputs.d.ts +1 -1
- package/dist/checks/compiler-inputs.d.ts.map +1 -1
- package/dist/checks/compiler-inputs.js +65 -5
- package/dist/checks/compiler-inputs.js.map +1 -1
- package/dist/checks/complexity/adapter.d.ts.map +1 -1
- package/dist/checks/complexity/adapter.js +21 -2
- package/dist/checks/complexity/adapter.js.map +1 -1
- package/dist/checks/dead-code/adapter.d.ts.map +1 -1
- package/dist/checks/dead-code/adapter.js +16 -5
- package/dist/checks/dead-code/adapter.js.map +1 -1
- package/dist/checks/dead-code/entry-configuration.d.ts +6 -0
- package/dist/checks/dead-code/entry-configuration.d.ts.map +1 -0
- package/dist/checks/dead-code/entry-configuration.js +48 -0
- package/dist/checks/dead-code/entry-configuration.js.map +1 -0
- package/dist/checks/dead-code/managed-config.d.ts +1 -1
- package/dist/checks/dead-code/managed-config.d.ts.map +1 -1
- package/dist/checks/dead-code/managed-config.js +24 -3
- package/dist/checks/dead-code/managed-config.js.map +1 -1
- package/dist/checks/dead-code/vite-entrypoints.d.ts +13 -0
- package/dist/checks/dead-code/vite-entrypoints.d.ts.map +1 -0
- package/dist/checks/dead-code/vite-entrypoints.js +314 -0
- package/dist/checks/dead-code/vite-entrypoints.js.map +1 -0
- package/dist/checks/diagnostic-details.d.ts.map +1 -1
- package/dist/checks/diagnostic-details.js +32 -0
- package/dist/checks/diagnostic-details.js.map +1 -1
- package/dist/checks/dispatch-cache.d.ts.map +1 -1
- package/dist/checks/dispatch-cache.js +9 -0
- package/dist/checks/dispatch-cache.js.map +1 -1
- package/dist/checks/dispatch-context.d.ts.map +1 -1
- package/dist/checks/dispatch-context.js +1 -0
- package/dist/checks/dispatch-context.js.map +1 -1
- package/dist/checks/dispatch-target.d.ts.map +1 -1
- package/dist/checks/dispatch-target.js +36 -5
- package/dist/checks/dispatch-target.js.map +1 -1
- package/dist/checks/dispatcher.d.ts.map +1 -1
- package/dist/checks/dispatcher.js +20 -7
- package/dist/checks/dispatcher.js.map +1 -1
- package/dist/checks/engine-identity.d.ts.map +1 -1
- package/dist/checks/engine-identity.js +9 -8
- package/dist/checks/engine-identity.js.map +1 -1
- package/dist/checks/eslint/convert-message.d.ts.map +1 -1
- package/dist/checks/eslint/convert-message.js +5 -2
- package/dist/checks/eslint/convert-message.js.map +1 -1
- package/dist/checks/incomplete-error.d.ts +3 -0
- package/dist/checks/incomplete-error.d.ts.map +1 -1
- package/dist/checks/incomplete-error.js +4 -0
- package/dist/checks/incomplete-error.js.map +1 -1
- package/dist/checks/incomplete-result.d.ts +1 -0
- package/dist/checks/incomplete-result.d.ts.map +1 -1
- package/dist/checks/incomplete-result.js +3 -0
- package/dist/checks/incomplete-result.js.map +1 -1
- package/dist/checks/installation-diagnostic.d.ts +11 -0
- package/dist/checks/installation-diagnostic.d.ts.map +1 -0
- package/dist/checks/installation-diagnostic.js +71 -0
- package/dist/checks/installation-diagnostic.js.map +1 -0
- package/dist/checks/observation-result.d.ts.map +1 -1
- package/dist/checks/observation-result.js +69 -7
- package/dist/checks/observation-result.js.map +1 -1
- package/dist/checks/prettier/settings.d.ts +2 -2
- package/dist/checks/project-inputs.d.ts +1 -1
- package/dist/checks/project-inputs.d.ts.map +1 -1
- package/dist/checks/project-inputs.js +13 -4
- package/dist/checks/project-inputs.js.map +1 -1
- package/dist/checks/react/adapter.d.ts.map +1 -1
- package/dist/checks/react/adapter.js +38 -5
- package/dist/checks/react/adapter.js.map +1 -1
- package/dist/checks/runner/envelope.d.ts.map +1 -1
- package/dist/checks/runner/envelope.js +1 -0
- package/dist/checks/runner/envelope.js.map +1 -1
- package/dist/checks/runner/worker.js +3 -0
- package/dist/checks/runner/worker.js.map +1 -1
- package/dist/checks/sanitize-result.d.ts +1 -0
- package/dist/checks/sanitize-result.d.ts.map +1 -1
- package/dist/checks/sanitize-result.js +7 -0
- package/dist/checks/sanitize-result.js.map +1 -1
- package/dist/checks/source-moves.d.ts +9 -0
- package/dist/checks/source-moves.d.ts.map +1 -0
- package/dist/checks/source-moves.js +184 -0
- package/dist/checks/source-moves.js.map +1 -0
- package/dist/checks/structural-security/adapter.d.ts.map +1 -1
- package/dist/checks/structural-security/adapter.js +35 -55
- package/dist/checks/structural-security/adapter.js.map +1 -1
- package/dist/checks/structural-security/parse-failures.d.ts +6 -0
- package/dist/checks/structural-security/parse-failures.d.ts.map +1 -0
- package/dist/checks/structural-security/parse-failures.js +76 -0
- package/dist/checks/structural-security/parse-failures.js.map +1 -0
- package/dist/checks/structural-security/parser.d.ts +18 -0
- package/dist/checks/structural-security/parser.d.ts.map +1 -0
- package/dist/checks/structural-security/parser.js +96 -0
- package/dist/checks/structural-security/parser.js.map +1 -0
- package/dist/checks/structural-security/rules.d.ts.map +1 -1
- package/dist/checks/structural-security/rules.js +67 -113
- package/dist/checks/structural-security/rules.js.map +1 -1
- package/dist/checks/typescript/compiler-host.d.ts.map +1 -1
- package/dist/checks/typescript/compiler-host.js +68 -49
- package/dist/checks/typescript/compiler-host.js.map +1 -1
- package/dist/checks/typescript/compiler-scope-graph.d.ts +11 -0
- package/dist/checks/typescript/compiler-scope-graph.d.ts.map +1 -0
- package/dist/checks/typescript/compiler-scope-graph.js +694 -0
- package/dist/checks/typescript/compiler-scope-graph.js.map +1 -0
- package/dist/checks/typescript/compiler-scope-inputs.d.ts +20 -0
- package/dist/checks/typescript/compiler-scope-inputs.d.ts.map +1 -0
- package/dist/checks/typescript/compiler-scope-inputs.js +183 -0
- package/dist/checks/typescript/compiler-scope-inputs.js.map +1 -0
- package/dist/checks/typescript/config.d.ts +3 -0
- package/dist/checks/typescript/config.d.ts.map +1 -1
- package/dist/checks/typescript/config.js +2 -2
- package/dist/checks/typescript/config.js.map +1 -1
- package/dist/checks/typescript/configuration-paths.d.ts +3 -2
- package/dist/checks/typescript/configuration-paths.d.ts.map +1 -1
- package/dist/checks/typescript/configuration-paths.js +67 -12
- package/dist/checks/typescript/configuration-paths.js.map +1 -1
- package/dist/checks/typescript/convert-diagnostic.d.ts +1 -2
- package/dist/checks/typescript/convert-diagnostic.d.ts.map +1 -1
- package/dist/checks/typescript/convert-diagnostic.js +2 -16
- package/dist/checks/typescript/convert-diagnostic.js.map +1 -1
- package/dist/checks/typescript/diagnostic-message.d.ts +3 -0
- package/dist/checks/typescript/diagnostic-message.d.ts.map +1 -0
- package/dist/checks/typescript/diagnostic-message.js +18 -0
- package/dist/checks/typescript/diagnostic-message.js.map +1 -0
- package/dist/checks/typescript/project-coverage.d.ts.map +1 -1
- package/dist/checks/typescript/project-coverage.js +3 -2
- package/dist/checks/typescript/project-coverage.js.map +1 -1
- package/dist/checks/typescript/reuse-inputs.d.ts +3 -0
- package/dist/checks/typescript/reuse-inputs.d.ts.map +1 -1
- package/dist/checks/typescript/reuse-inputs.js +14 -4
- package/dist/checks/typescript/reuse-inputs.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/checks.js +3 -3
- package/dist/commands/checks.js.map +1 -1
- package/dist/commands/diagnostics.d.ts +2 -0
- package/dist/commands/diagnostics.d.ts.map +1 -1
- package/dist/commands/diagnostics.js +34 -0
- package/dist/commands/diagnostics.js.map +1 -1
- package/dist/commands/fix.d.ts.map +1 -1
- package/dist/commands/fix.js +4 -1
- package/dist/commands/fix.js.map +1 -1
- package/dist/commands/scan.d.ts +1 -0
- package/dist/commands/scan.d.ts.map +1 -1
- package/dist/commands/scan.js +31 -3
- package/dist/commands/scan.js.map +1 -1
- package/dist/config/profiles.d.ts.map +1 -1
- package/dist/config/profiles.js +6 -0
- package/dist/config/profiles.js.map +1 -1
- package/dist/config/schema.d.ts +43 -23
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +16 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/config/settings-registry.js +2 -2
- package/dist/config/settings-registry.js.map +1 -1
- package/dist/core/types.d.ts +14 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/diagnostics/local-scan-diagnostics.d.ts +12 -0
- package/dist/diagnostics/local-scan-diagnostics.d.ts.map +1 -0
- package/dist/diagnostics/local-scan-diagnostics.js +138 -0
- package/dist/diagnostics/local-scan-diagnostics.js.map +1 -0
- package/dist/diagnostics/scan-performance.d.ts +2 -0
- package/dist/diagnostics/scan-performance.d.ts.map +1 -1
- package/dist/diagnostics/scan-performance.js +22 -20
- package/dist/diagnostics/scan-performance.js.map +1 -1
- package/dist/doctor/diagnostics.d.ts.map +1 -1
- package/dist/doctor/diagnostics.js +22 -3
- package/dist/doctor/diagnostics.js.map +1 -1
- package/dist/doctor/workspace-installation.d.ts +9 -0
- package/dist/doctor/workspace-installation.d.ts.map +1 -0
- package/dist/doctor/workspace-installation.js +165 -0
- package/dist/doctor/workspace-installation.js.map +1 -0
- package/dist/hooks/detect.d.ts +4 -0
- package/dist/hooks/detect.d.ts.map +1 -1
- package/dist/hooks/detect.js +5 -4
- package/dist/hooks/detect.js.map +1 -1
- package/dist/hooks/update-notice.d.ts +5 -0
- package/dist/hooks/update-notice.d.ts.map +1 -0
- package/dist/hooks/update-notice.js +145 -0
- package/dist/hooks/update-notice.js.map +1 -0
- package/dist/init/presentation.d.ts +2 -2
- package/dist/renderers/incomplete.d.ts +5 -1
- package/dist/renderers/incomplete.d.ts.map +1 -1
- package/dist/renderers/incomplete.js +29 -2
- package/dist/renderers/incomplete.js.map +1 -1
- package/dist/renderers/json.d.ts.map +1 -1
- package/dist/renderers/json.js +20 -3
- package/dist/renderers/json.js.map +1 -1
- package/dist/renderers/sarif.d.ts.map +1 -1
- package/dist/renderers/sarif.js +7 -0
- package/dist/renderers/sarif.js.map +1 -1
- package/dist/renderers/text.d.ts.map +1 -1
- package/dist/renderers/text.js +20 -0
- package/dist/renderers/text.js.map +1 -1
- package/dist/reporting/agent-guidance.d.ts.map +1 -1
- package/dist/reporting/agent-guidance.js +7 -0
- package/dist/reporting/agent-guidance.js.map +1 -1
- package/dist/reporting/finding-priority.d.ts +6 -0
- package/dist/reporting/finding-priority.d.ts.map +1 -0
- package/dist/reporting/finding-priority.js +69 -0
- package/dist/reporting/finding-priority.js.map +1 -0
- package/dist/reporting/fix-plan-store.d.ts +2 -5
- package/dist/reporting/fix-plan-store.d.ts.map +1 -1
- package/dist/reporting/fix-plan-store.js +2 -1
- package/dist/reporting/fix-plan-store.js.map +1 -1
- package/dist/reporting/fix-presentation.d.ts +1 -1
- package/dist/reporting/hook-update-notice.d.ts +12 -0
- package/dist/reporting/hook-update-notice.d.ts.map +1 -0
- package/dist/reporting/hook-update-notice.js +13 -0
- package/dist/reporting/hook-update-notice.js.map +1 -0
- package/dist/reporting/presentation.d.ts +3 -1
- package/dist/reporting/presentation.d.ts.map +1 -1
- package/dist/reporting/presentation.js +19 -7
- package/dist/reporting/presentation.js.map +1 -1
- package/dist/reporting/result-sections.d.ts +1 -0
- package/dist/reporting/result-sections.d.ts.map +1 -1
- package/dist/reporting/result-sections.js +12 -0
- package/dist/reporting/result-sections.js.map +1 -1
- package/dist/reporting/temporary-report-common.d.ts +13 -1
- package/dist/reporting/temporary-report-common.d.ts.map +1 -1
- package/dist/reporting/temporary-report-common.js +4 -1
- package/dist/reporting/temporary-report-common.js.map +1 -1
- package/dist/reporting/temporary-report-lifecycle.d.ts +3 -3
- package/dist/reporting/temporary-report-lifecycle.d.ts.map +1 -1
- package/dist/reporting/temporary-report-lifecycle.js +18 -4
- package/dist/reporting/temporary-report-lifecycle.js.map +1 -1
- package/dist/reporting/temporary-reports.d.ts +1 -1
- package/dist/reporting/temporary-reports.d.ts.map +1 -1
- package/dist/reporting/temporary-reports.js +22 -3
- package/dist/reporting/temporary-reports.js.map +1 -1
- package/dist/scan/analysis-session.d.ts.map +1 -1
- package/dist/scan/analysis-session.js +15 -1
- package/dist/scan/analysis-session.js.map +1 -1
- package/dist/scan/report.d.ts +6 -0
- package/dist/scan/report.d.ts.map +1 -1
- package/dist/scan/run-scan.d.ts.map +1 -1
- package/dist/scan/run-scan.js +17 -8
- package/dist/scan/run-scan.js.map +1 -1
- package/dist/service/server-connection.d.ts.map +1 -1
- package/dist/service/server-connection.js +2 -1
- package/dist/service/server-connection.js.map +1 -1
- package/dist/telemetry/schema.d.ts +45 -45
- package/dist/telemetry/state.d.ts +5 -5
- package/dist/ui/incomplete-list.d.ts.map +1 -1
- package/dist/ui/incomplete-list.js +4 -2
- package/dist/ui/incomplete-list.js.map +1 -1
- package/dist/ui/scan-result-dashboard.d.ts.map +1 -1
- package/dist/ui/scan-result-dashboard.js +7 -3
- package/dist/ui/scan-result-dashboard.js.map +1 -1
- package/docs/checks.md +106 -2
- package/docs/cli-reference.md +7 -1
- package/docs/privacy.md +15 -0
- package/docs/react-analysis.md +7 -0
- package/docs/reporting.md +43 -1
- package/docs/support.md +19 -0
- package/{node_modules/dependency-cruiser/node_modules/picomatch/LICENSE → licenses/overrides/jscpd-5.4.2-LICENSE} +5 -5
- package/licenses/overrides/napi-rs-wasm-runtime-1.2.5-LICENSE +43 -0
- package/licenses/reviewed-overrides.json +70 -0
- package/node_modules/acorn/CHANGELOG.md +14 -0
- package/node_modules/acorn/dist/acorn.js +42 -14
- package/node_modules/acorn/dist/acorn.mjs +42 -14
- package/node_modules/acorn/package.json +1 -1
- package/node_modules/dependency-cruiser/README.md +7 -8
- package/node_modules/dependency-cruiser/bin/depcruise-baseline.mjs +12 -5
- package/node_modules/dependency-cruiser/bin/{dependency-cruise.mjs → dependency-cruiser.mjs} +24 -14
- package/node_modules/dependency-cruiser/configs/rules/no-duplicate-dependency-types.cjs +1 -1
- package/node_modules/dependency-cruiser/node_modules/ignore/README.md +138 -8
- package/node_modules/dependency-cruiser/node_modules/ignore/index.d.ts +56 -20
- package/node_modules/dependency-cruiser/node_modules/ignore/index.js +1032 -229
- package/node_modules/dependency-cruiser/node_modules/ignore/legacy.js +868 -184
- package/node_modules/dependency-cruiser/node_modules/ignore/package.json +10 -4
- package/node_modules/dependency-cruiser/node_modules/semver/LICENSE +15 -0
- package/node_modules/dependency-cruiser/node_modules/semver/README.md +680 -0
- package/node_modules/dependency-cruiser/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/dependency-cruiser/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/dependency-cruiser/node_modules/semver/classes/index.js +7 -0
- package/node_modules/dependency-cruiser/node_modules/semver/classes/range.js +577 -0
- package/node_modules/dependency-cruiser/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/major.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/dependency-cruiser/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/dependency-cruiser/node_modules/semver/index.js +93 -0
- package/node_modules/dependency-cruiser/node_modules/semver/internal/constants.js +67 -0
- package/node_modules/dependency-cruiser/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/dependency-cruiser/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/dependency-cruiser/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/dependency-cruiser/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/dependency-cruiser/node_modules/semver/internal/re.js +223 -0
- package/node_modules/dependency-cruiser/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/node_modules/dependency-cruiser/node_modules/semver/package.json +78 -0
- package/node_modules/dependency-cruiser/node_modules/semver/preload.js +4 -0
- package/node_modules/dependency-cruiser/node_modules/semver/range.bnf +17 -0
- package/node_modules/dependency-cruiser/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/dependency-cruiser/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/dependency-cruiser/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/dependency-cruiser/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/dependency-cruiser/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/dependency-cruiser/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/dependency-cruiser/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/dependency-cruiser/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/dependency-cruiser/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/dependency-cruiser/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/dependency-cruiser/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/dependency-cruiser/package.json +16 -10
- package/node_modules/dependency-cruiser/src/analyze/analyze-modules.mjs +5 -1
- package/node_modules/dependency-cruiser/src/analyze/index.mjs +3 -3
- package/node_modules/dependency-cruiser/src/analyze/soften-known-violations.mjs +4 -2
- package/node_modules/dependency-cruiser/src/analyze/summarize/get-stats.mjs +38 -3
- package/node_modules/dependency-cruiser/src/analyze/summarize/index.mjs +28 -105
- package/node_modules/dependency-cruiser/src/analyze/summarize/summarize-options.mjs +3 -0
- package/node_modules/dependency-cruiser/src/analyze/summarize/verify-environment.mjs +146 -0
- package/node_modules/dependency-cruiser/src/cache/cache.mjs +1 -1
- package/node_modules/dependency-cruiser/src/cache/options-compatible.mjs +3 -0
- package/node_modules/dependency-cruiser/src/cli/defaults.mjs +0 -1
- package/node_modules/dependency-cruiser/src/cli/index.mjs +11 -3
- package/node_modules/dependency-cruiser/src/cli/init-config/build-config.mjs +14 -0
- package/node_modules/dependency-cruiser/src/cli/init-config/config-template.mjs +7 -2
- package/node_modules/dependency-cruiser/src/cli/init-config/environment-helpers.mjs +5 -1
- package/node_modules/dependency-cruiser/src/cli/init-config/get-user-input.mjs +11 -0
- package/node_modules/dependency-cruiser/src/cli/init-config/index.mjs +1 -0
- package/node_modules/dependency-cruiser/src/cli/init-config/normalize-init-options.mjs +1 -1
- package/node_modules/dependency-cruiser/src/cli/init-config/types.d.mts +4 -0
- package/node_modules/dependency-cruiser/src/cli/init-config/write-run-scripts-to-manifest.mjs +7 -7
- package/node_modules/dependency-cruiser/src/cli/normalize-cli-options.mjs +63 -2
- package/node_modules/dependency-cruiser/src/config-utl/extract-ts-config.mjs +1 -1
- package/node_modules/dependency-cruiser/src/extract/helpers.mjs +1 -0
- package/node_modules/dependency-cruiser/src/extract/resolve/determine-dependency-types.mjs +15 -7
- package/node_modules/dependency-cruiser/src/extract/resolve/merge-manifests.mjs +6 -3
- package/node_modules/dependency-cruiser/src/extract/swc/dependency-visitor.mjs +21 -4
- package/node_modules/dependency-cruiser/src/extract/swc/parse.mjs +14 -4
- package/node_modules/dependency-cruiser/src/extract/transpile/index.mjs +1 -1
- package/node_modules/dependency-cruiser/src/extract/transpile/meta.mjs +15 -3
- package/node_modules/dependency-cruiser/src/extract/transpile/svelte-wrap.mjs +23 -2
- package/node_modules/dependency-cruiser/src/extract/transpile/try-import-available.mjs +2 -2
- package/node_modules/dependency-cruiser/src/extract/transpile/typescript-wrap.mjs +23 -1
- package/node_modules/dependency-cruiser/src/extract/tsc/extract-typescript-deps.mjs +57 -12
- package/node_modules/dependency-cruiser/src/extract/tsc/extract.mjs +2 -0
- package/node_modules/dependency-cruiser/src/graph-utl/add-focus.mjs +2 -2
- package/node_modules/dependency-cruiser/src/graph-utl/compare.mjs +113 -14
- package/node_modules/dependency-cruiser/src/main/cruise.mjs +1 -2
- package/node_modules/dependency-cruiser/src/main/format.mjs +1 -1
- package/node_modules/dependency-cruiser/src/main/options/defaults.mjs +1 -0
- package/node_modules/dependency-cruiser/src/main/options/normalize.mjs +13 -4
- package/node_modules/dependency-cruiser/src/main/report-wrap.mjs +4 -2
- package/node_modules/dependency-cruiser/src/main/resolve-options/normalize.mjs +0 -27
- package/node_modules/dependency-cruiser/src/meta.cjs +1 -1
- package/node_modules/dependency-cruiser/src/report/anon/index.mjs +1 -1
- package/node_modules/dependency-cruiser/src/report/azure-devops.mjs +15 -11
- package/node_modules/dependency-cruiser/src/report/baseline.mjs +67 -10
- package/node_modules/dependency-cruiser/src/report/csv.mjs +1 -1
- package/node_modules/dependency-cruiser/src/report/dot/index.mjs +1 -1
- package/node_modules/dependency-cruiser/src/report/dot-webpage/dot-module.mjs +1 -1
- package/node_modules/dependency-cruiser/src/report/error-html/error-html-template.mjs +2 -0
- package/node_modules/dependency-cruiser/src/report/error-html/index.mjs +84 -8
- package/node_modules/dependency-cruiser/src/report/error.mjs +62 -13
- package/node_modules/dependency-cruiser/src/report/html/index.mjs +1 -1
- package/node_modules/dependency-cruiser/src/report/index.mjs +3 -2
- package/node_modules/dependency-cruiser/src/report/markdown.mjs +89 -19
- package/node_modules/dependency-cruiser/src/report/metrics.mjs +3 -3
- package/node_modules/dependency-cruiser/src/report/null.mjs +6 -3
- package/node_modules/dependency-cruiser/src/report/teamcity.mjs +4 -1
- package/node_modules/dependency-cruiser/src/schema/configuration.validate.mjs +1 -1
- package/node_modules/dependency-cruiser/src/schema/cruise-result.validate.mjs +1 -1
- package/node_modules/dependency-cruiser/src/utl/try-import.mjs +1 -1
- package/node_modules/dependency-cruiser/types/cruise-result.d.mts +14 -0
- package/node_modules/dependency-cruiser/types/dependency-cruiser.d.mts +6 -0
- package/node_modules/dependency-cruiser/types/options.d.mts +37 -2
- package/node_modules/dependency-cruiser/types/reporter-options.d.mts +30 -5
- package/node_modules/dependency-cruiser/types/restrictions.d.mts +2 -2
- package/node_modules/dependency-cruiser/types/shared-types.d.mts +16 -13
- package/node_modules/enhanced-resolve/README.md +46 -1
- package/node_modules/enhanced-resolve/lib/ExportsFieldPlugin.js +31 -6
- package/node_modules/enhanced-resolve/lib/ImportsFieldPlugin.js +27 -6
- package/node_modules/enhanced-resolve/lib/PackageMapPlugin.js +297 -0
- package/node_modules/enhanced-resolve/lib/Resolver.js +37 -30
- package/node_modules/enhanced-resolve/lib/ResolverFactory.js +104 -11
- package/node_modules/enhanced-resolve/lib/getPaths.js +6 -1
- package/node_modules/enhanced-resolve/lib/index.js +4 -0
- package/node_modules/enhanced-resolve/lib/util/entrypoints.js +104 -0
- package/node_modules/enhanced-resolve/lib/util/graceful-fs-browser.js +5 -1
- package/node_modules/enhanced-resolve/lib/util/identifier.js +4 -2
- package/node_modules/enhanced-resolve/lib/util/packageMap.js +224 -0
- package/node_modules/enhanced-resolve/lib/util/path.js +29 -8
- package/node_modules/enhanced-resolve/lib/util/pathToFileURL.js +87 -0
- package/node_modules/enhanced-resolve/package.json +8 -9
- package/node_modules/enhanced-resolve/types/AliasFieldPlugin.d.ts +41 -0
- package/node_modules/enhanced-resolve/types/AliasPlugin.d.ts +32 -0
- package/node_modules/enhanced-resolve/types/AliasUtils.d.ts +128 -0
- package/node_modules/enhanced-resolve/types/AppendPlugin.d.ts +27 -0
- package/node_modules/enhanced-resolve/types/CachedInputFileSystem.d.ts +224 -0
- package/node_modules/enhanced-resolve/types/CloneBasenamePlugin.d.ts +24 -0
- package/node_modules/enhanced-resolve/types/ConditionalPlugin.d.ts +33 -0
- package/node_modules/enhanced-resolve/types/DescriptionFilePlugin.d.ts +30 -0
- package/node_modules/enhanced-resolve/types/DescriptionFileUtils.d.ts +83 -0
- package/node_modules/enhanced-resolve/types/DirectoryExistsPlugin.d.ts +23 -0
- package/node_modules/enhanced-resolve/types/ExportsFieldPlugin.d.ts +45 -0
- package/node_modules/enhanced-resolve/types/ExtensionAliasPlugin.d.ts +31 -0
- package/node_modules/enhanced-resolve/types/FileExistsPlugin.d.ts +23 -0
- package/node_modules/enhanced-resolve/types/ImportsFieldPlugin.d.ts +45 -0
- package/node_modules/enhanced-resolve/types/JoinRequestPartPlugin.d.ts +24 -0
- package/node_modules/enhanced-resolve/types/JoinRequestPlugin.d.ts +24 -0
- package/node_modules/enhanced-resolve/types/LogInfoPlugin.d.ts +18 -0
- package/node_modules/enhanced-resolve/types/MainFieldPlugin.d.ts +41 -0
- package/node_modules/enhanced-resolve/types/ModulesInHierachicDirectoriesPlugin.d.ts +2 -0
- package/node_modules/enhanced-resolve/types/ModulesInHierarchicalDirectoriesPlugin.d.ts +26 -0
- package/node_modules/enhanced-resolve/types/ModulesInRootPlugin.d.ts +27 -0
- package/node_modules/enhanced-resolve/types/ModulesUtils.d.ts +25 -0
- package/node_modules/enhanced-resolve/types/NextPlugin.d.ts +23 -0
- package/node_modules/enhanced-resolve/types/PackageMapPlugin.d.ts +85 -0
- package/node_modules/enhanced-resolve/types/ParsePlugin.d.ts +27 -0
- package/node_modules/enhanced-resolve/types/PnpPlugin.d.ts +42 -0
- package/node_modules/enhanced-resolve/types/Resolver.d.ts +1545 -0
- package/node_modules/enhanced-resolve/types/ResolverFactory.d.ts +340 -0
- package/node_modules/enhanced-resolve/types/RestrictionsPlugin.d.ts +52 -0
- package/node_modules/enhanced-resolve/types/ResultPlugin.d.ts +18 -0
- package/node_modules/enhanced-resolve/types/RootsPlugin.d.ts +30 -0
- package/node_modules/enhanced-resolve/types/SelfReferencePlugin.d.ts +31 -0
- package/node_modules/enhanced-resolve/types/SymlinkPlugin.d.ts +24 -0
- package/node_modules/enhanced-resolve/types/SyncAsyncFileSystemDecorator.d.ts +52 -0
- package/node_modules/enhanced-resolve/types/TryNextPlugin.d.ts +26 -0
- package/node_modules/enhanced-resolve/types/TsconfigPathsPlugin.d.ts +204 -0
- package/node_modules/enhanced-resolve/types/UnsafeCachePlugin.d.ts +43 -0
- package/node_modules/enhanced-resolve/types/UseFilePlugin.d.ts +27 -0
- package/node_modules/enhanced-resolve/types/createInnerContext.d.ts +10 -0
- package/node_modules/enhanced-resolve/types/forEachBail.d.ts +15 -0
- package/node_modules/enhanced-resolve/types/getInnerRequest.d.ts +7 -0
- package/node_modules/enhanced-resolve/types/getPaths.d.ts +34 -0
- package/node_modules/enhanced-resolve/types/index.d.ts +131 -0
- package/node_modules/enhanced-resolve/types/util/entrypoints.d.ts +62 -0
- package/node_modules/enhanced-resolve/types/util/fileURLToPath.d.ts +14 -0
- package/node_modules/enhanced-resolve/types/util/fs.d.ts +38 -0
- package/node_modules/enhanced-resolve/types/util/graceful-fs-browser.d.ts +22 -0
- package/node_modules/enhanced-resolve/types/util/identifier.d.ts +7 -0
- package/node_modules/enhanced-resolve/types/util/memoize.d.ts +15 -0
- package/node_modules/enhanced-resolve/types/util/module-browser.d.ts +1 -0
- package/node_modules/enhanced-resolve/types/util/packageMap.d.ts +118 -0
- package/node_modules/enhanced-resolve/types/util/path-browser.d.ts +45 -0
- package/node_modules/enhanced-resolve/types/util/path.d.ts +125 -0
- package/node_modules/enhanced-resolve/types/util/pathToFileURL.d.ts +14 -0
- package/node_modules/enhanced-resolve/types/util/process-browser.d.ts +3 -0
- package/node_modules/enhanced-resolve/types/util/strip-json-comments.d.ts +24 -0
- package/node_modules/enhanced-resolve/types/util/url-browser.d.ts +1 -0
- package/node_modules/enhanced-resolve/types.d.ts +5 -2057
- package/node_modules/is-installed-globally/index.js +26 -4
- package/node_modules/is-installed-globally/package.json +1 -1
- package/package.json +5 -5
- package/schema/zedbee.schema.json +12 -1
- package/node_modules/dependency-cruiser/node_modules/picomatch/README.md +0 -743
- package/node_modules/dependency-cruiser/node_modules/picomatch/index.js +0 -17
- package/node_modules/dependency-cruiser/node_modules/picomatch/lib/constants.js +0 -184
- package/node_modules/dependency-cruiser/node_modules/picomatch/lib/parse.js +0 -1416
- package/node_modules/dependency-cruiser/node_modules/picomatch/lib/picomatch.js +0 -361
- package/node_modules/dependency-cruiser/node_modules/picomatch/lib/scan.js +0 -391
- package/node_modules/dependency-cruiser/node_modules/picomatch/lib/utils.js +0 -72
- package/node_modules/dependency-cruiser/node_modules/picomatch/package.json +0 -83
- package/node_modules/dependency-cruiser/node_modules/picomatch/posix.js +0 -3
|
@@ -0,0 +1,1545 @@
|
|
|
1
|
+
export = Resolver;
|
|
2
|
+
declare class Resolver {
|
|
3
|
+
/**
|
|
4
|
+
* @param {ResolveStepHook} hook hook
|
|
5
|
+
* @param {ResolveRequest} request request
|
|
6
|
+
* @param {StackEntry=} parent previous tip of the stack
|
|
7
|
+
* @param {Set<string>=} preSeeded entries pre-seeded via the legacy `Set<string>` API
|
|
8
|
+
* @returns {StackEntry} stack entry
|
|
9
|
+
*/
|
|
10
|
+
static createStackEntry(
|
|
11
|
+
hook: ResolveStepHook,
|
|
12
|
+
request: ResolveRequest,
|
|
13
|
+
parent?: StackEntry | undefined,
|
|
14
|
+
preSeeded?: Set<string> | undefined,
|
|
15
|
+
): StackEntry;
|
|
16
|
+
/**
|
|
17
|
+
* @param {FileSystem} fileSystem a filesystem
|
|
18
|
+
* @param {ResolveOptions} options options
|
|
19
|
+
*/
|
|
20
|
+
constructor(fileSystem: FileSystem, options: ResolveOptions);
|
|
21
|
+
/** @type {FileSystem} */
|
|
22
|
+
fileSystem: FileSystem;
|
|
23
|
+
/** @type {ResolveOptions} */
|
|
24
|
+
options: ResolveOptions;
|
|
25
|
+
/** @type {PathCacheFunctions} */
|
|
26
|
+
pathCache: PathCacheFunctions;
|
|
27
|
+
/** @type {KnownHooks} */
|
|
28
|
+
hooks: KnownHooks;
|
|
29
|
+
/**
|
|
30
|
+
* @param {string | ResolveStepHook} name hook name or hook itself
|
|
31
|
+
* @returns {ResolveStepHook} the hook
|
|
32
|
+
*/
|
|
33
|
+
ensureHook(name: string | ResolveStepHook): ResolveStepHook;
|
|
34
|
+
/**
|
|
35
|
+
* @param {string | ResolveStepHook} name hook name or hook itself
|
|
36
|
+
* @returns {ResolveStepHook} the hook
|
|
37
|
+
*/
|
|
38
|
+
getHook(name: string | ResolveStepHook): ResolveStepHook;
|
|
39
|
+
/**
|
|
40
|
+
* @overload
|
|
41
|
+
* @param {string | URL} parent context path or a `file:` URL
|
|
42
|
+
* @param {string | URL} specifier request string or a `file:` URL
|
|
43
|
+
* @param {ResolveContext=} resolveContext resolve context
|
|
44
|
+
* @returns {string | false} result
|
|
45
|
+
*/
|
|
46
|
+
resolveSync(
|
|
47
|
+
parent: string | URL,
|
|
48
|
+
specifier: string | URL,
|
|
49
|
+
resolveContext?: ResolveContext | undefined,
|
|
50
|
+
): string | false;
|
|
51
|
+
/**
|
|
52
|
+
* @overload
|
|
53
|
+
* @param {Context} context context information object
|
|
54
|
+
* @param {string | URL} parent context path or a `file:` URL
|
|
55
|
+
* @param {string | URL} specifier request string or a `file:` URL
|
|
56
|
+
* @param {ResolveContext=} resolveContext resolve context
|
|
57
|
+
* @returns {string | false} result
|
|
58
|
+
*/
|
|
59
|
+
resolveSync(
|
|
60
|
+
context: Context,
|
|
61
|
+
parent: string | URL,
|
|
62
|
+
specifier: string | URL,
|
|
63
|
+
resolveContext?: ResolveContext | undefined,
|
|
64
|
+
): string | false;
|
|
65
|
+
/**
|
|
66
|
+
* @overload
|
|
67
|
+
* @param {string | URL} parent context path or a `file:` URL
|
|
68
|
+
* @param {string | URL} specifier request string or a `file:` URL
|
|
69
|
+
* @param {ResolveContext=} resolveContext resolve context
|
|
70
|
+
* @returns {Promise<string | false>} result
|
|
71
|
+
*/
|
|
72
|
+
resolvePromise(
|
|
73
|
+
parent: string | URL,
|
|
74
|
+
specifier: string | URL,
|
|
75
|
+
resolveContext?: ResolveContext | undefined,
|
|
76
|
+
): Promise<string | false>;
|
|
77
|
+
/**
|
|
78
|
+
* @overload
|
|
79
|
+
* @param {Context} context context information object
|
|
80
|
+
* @param {string | URL} parent context path or a `file:` URL
|
|
81
|
+
* @param {string | URL} specifier request string or a `file:` URL
|
|
82
|
+
* @param {ResolveContext=} resolveContext resolve context
|
|
83
|
+
* @returns {Promise<string | false>} result
|
|
84
|
+
*/
|
|
85
|
+
resolvePromise(
|
|
86
|
+
context: Context,
|
|
87
|
+
parent: string | URL,
|
|
88
|
+
specifier: string | URL,
|
|
89
|
+
resolveContext?: ResolveContext | undefined,
|
|
90
|
+
): Promise<string | false>;
|
|
91
|
+
/**
|
|
92
|
+
* @overload
|
|
93
|
+
* @param {string | URL} parent context path or a `file:` URL
|
|
94
|
+
* @param {string | URL} specifier request string or a `file:` URL
|
|
95
|
+
* @param {ResolveCallback} callback callback function
|
|
96
|
+
* @returns {void}
|
|
97
|
+
*/
|
|
98
|
+
resolve(
|
|
99
|
+
parent: string | URL,
|
|
100
|
+
specifier: string | URL,
|
|
101
|
+
callback: ResolveCallback,
|
|
102
|
+
): void;
|
|
103
|
+
/**
|
|
104
|
+
* @overload
|
|
105
|
+
* @param {string | URL} parent context path or a `file:` URL
|
|
106
|
+
* @param {string | URL} specifier request string or a `file:` URL
|
|
107
|
+
* @param {ResolveContext} resolveContext resolve context
|
|
108
|
+
* @param {ResolveCallback} callback callback function
|
|
109
|
+
* @returns {void}
|
|
110
|
+
*/
|
|
111
|
+
resolve(
|
|
112
|
+
parent: string | URL,
|
|
113
|
+
specifier: string | URL,
|
|
114
|
+
resolveContext: ResolveContext,
|
|
115
|
+
callback: ResolveCallback,
|
|
116
|
+
): void;
|
|
117
|
+
/**
|
|
118
|
+
* @overload
|
|
119
|
+
* @param {Context} context context information object
|
|
120
|
+
* @param {string | URL} parent context path or a `file:` URL
|
|
121
|
+
* @param {string | URL} specifier request string or a `file:` URL
|
|
122
|
+
* @param {ResolveCallback} callback callback function
|
|
123
|
+
* @returns {void}
|
|
124
|
+
*/
|
|
125
|
+
resolve(
|
|
126
|
+
context: Context,
|
|
127
|
+
parent: string | URL,
|
|
128
|
+
specifier: string | URL,
|
|
129
|
+
callback: ResolveCallback,
|
|
130
|
+
): void;
|
|
131
|
+
/**
|
|
132
|
+
* @overload
|
|
133
|
+
* @param {Context} context context information object
|
|
134
|
+
* @param {string | URL} parent context path or a `file:` URL
|
|
135
|
+
* @param {string | URL} specifier request string or a `file:` URL
|
|
136
|
+
* @param {ResolveContext} resolveContext resolve context
|
|
137
|
+
* @param {ResolveCallback} callback callback function
|
|
138
|
+
* @returns {void}
|
|
139
|
+
*/
|
|
140
|
+
resolve(
|
|
141
|
+
context: Context,
|
|
142
|
+
parent: string | URL,
|
|
143
|
+
specifier: string | URL,
|
|
144
|
+
resolveContext: ResolveContext,
|
|
145
|
+
callback: ResolveCallback,
|
|
146
|
+
): void;
|
|
147
|
+
/**
|
|
148
|
+
* @param {ResolveStepHook} hook hook
|
|
149
|
+
* @param {ResolveRequest} request request
|
|
150
|
+
* @param {null | string} message string
|
|
151
|
+
* @param {ResolveContext} resolveContext resolver context
|
|
152
|
+
* @param {(err?: null | Error, result?: ResolveRequest) => void} callback callback
|
|
153
|
+
* @returns {void}
|
|
154
|
+
*/
|
|
155
|
+
doResolve(
|
|
156
|
+
hook: ResolveStepHook,
|
|
157
|
+
request: ResolveRequest,
|
|
158
|
+
message: null | string,
|
|
159
|
+
resolveContext: ResolveContext,
|
|
160
|
+
callback: (err?: null | Error, result?: ResolveRequest) => void,
|
|
161
|
+
): void;
|
|
162
|
+
/**
|
|
163
|
+
* @param {string} identifier identifier
|
|
164
|
+
* @returns {ParsedIdentifier} parsed identifier
|
|
165
|
+
*/
|
|
166
|
+
parse(identifier: string): ParsedIdentifier;
|
|
167
|
+
/**
|
|
168
|
+
* @param {string} path path
|
|
169
|
+
* @returns {boolean} true, if the path is a module
|
|
170
|
+
*/
|
|
171
|
+
isModule(path: string): boolean;
|
|
172
|
+
/**
|
|
173
|
+
* @param {string} path path
|
|
174
|
+
* @returns {boolean} true, if the path is private
|
|
175
|
+
*/
|
|
176
|
+
isPrivate(path: string): boolean;
|
|
177
|
+
/**
|
|
178
|
+
* @param {string} path a path
|
|
179
|
+
* @returns {boolean} true, if the path is a directory path
|
|
180
|
+
*/
|
|
181
|
+
isDirectory(path: string): boolean;
|
|
182
|
+
/**
|
|
183
|
+
* @param {string} path path
|
|
184
|
+
* @returns {string} normalized path
|
|
185
|
+
*/
|
|
186
|
+
normalize(path: string): string;
|
|
187
|
+
/**
|
|
188
|
+
* @param {string} path path
|
|
189
|
+
* @param {string} request request
|
|
190
|
+
* @returns {string} joined path
|
|
191
|
+
*/
|
|
192
|
+
join(path: string, request: string): string;
|
|
193
|
+
/**
|
|
194
|
+
* @param {string} path path
|
|
195
|
+
* @returns {string} parent directory
|
|
196
|
+
*/
|
|
197
|
+
dirname(path: string): string;
|
|
198
|
+
/**
|
|
199
|
+
* @param {string} path the path to evaluate
|
|
200
|
+
* @param {string=} suffix an extension to remove from the result
|
|
201
|
+
* @returns {string} the last portion of a path
|
|
202
|
+
*/
|
|
203
|
+
basename(path: string, suffix?: string | undefined): string;
|
|
204
|
+
}
|
|
205
|
+
declare namespace Resolver {
|
|
206
|
+
export {
|
|
207
|
+
ResolveContext,
|
|
208
|
+
ResolveStepHook,
|
|
209
|
+
KnownHooks,
|
|
210
|
+
EnsuredHooks,
|
|
211
|
+
AliasOption,
|
|
212
|
+
CachedJoin,
|
|
213
|
+
CachedDirname,
|
|
214
|
+
CachedBasename,
|
|
215
|
+
JoinCacheEntry,
|
|
216
|
+
DirnameCacheEntry,
|
|
217
|
+
BasenameCacheEntry,
|
|
218
|
+
PathCacheFunctions,
|
|
219
|
+
ResolveOptions,
|
|
220
|
+
KnownContext,
|
|
221
|
+
Context,
|
|
222
|
+
ErrorWithDetail,
|
|
223
|
+
ResolveCallback,
|
|
224
|
+
PossibleFileSystemError,
|
|
225
|
+
FileSystemCallback,
|
|
226
|
+
PathLike,
|
|
227
|
+
PathOrFileDescriptor,
|
|
228
|
+
ObjectEncodingOptions,
|
|
229
|
+
EncodingOption,
|
|
230
|
+
StringCallback,
|
|
231
|
+
BufferCallback,
|
|
232
|
+
StringOrBufferCallback,
|
|
233
|
+
StatsCallback,
|
|
234
|
+
BigIntStatsCallback,
|
|
235
|
+
StatsOrBigIntStatsCallback,
|
|
236
|
+
ReadJsonCallback,
|
|
237
|
+
IStatsBase,
|
|
238
|
+
IStats,
|
|
239
|
+
IBigIntStats,
|
|
240
|
+
Dirent,
|
|
241
|
+
StatOptions,
|
|
242
|
+
StatSyncOptions,
|
|
243
|
+
ReadFile,
|
|
244
|
+
BufferEncodingOption,
|
|
245
|
+
ReadFileSync,
|
|
246
|
+
Readdir,
|
|
247
|
+
ReaddirSync,
|
|
248
|
+
ReadJson,
|
|
249
|
+
ReadJsonSync,
|
|
250
|
+
Readlink,
|
|
251
|
+
ReadlinkSync,
|
|
252
|
+
LStat,
|
|
253
|
+
LStatSync,
|
|
254
|
+
Stat,
|
|
255
|
+
StatSync,
|
|
256
|
+
RealPath,
|
|
257
|
+
RealPathSync,
|
|
258
|
+
FileSystem,
|
|
259
|
+
SyncFileSystem,
|
|
260
|
+
ParsedIdentifier,
|
|
261
|
+
JsonPrimitive,
|
|
262
|
+
JsonArray,
|
|
263
|
+
JsonValue,
|
|
264
|
+
JsonObject,
|
|
265
|
+
TsconfigPathsMap,
|
|
266
|
+
TsconfigPathsData,
|
|
267
|
+
BaseResolveRequest,
|
|
268
|
+
ResolveRequest,
|
|
269
|
+
WriteOnlySet,
|
|
270
|
+
ResolveContextYield,
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
/** @typedef {import("./ResolverFactory").ResolveOptions} ResolveOptions */
|
|
274
|
+
/**
|
|
275
|
+
* @typedef {object} KnownContext
|
|
276
|
+
* @property {string[]=} environments environments
|
|
277
|
+
* @property {string=} packageId package id of the importing file in the package map, propagated from a previous result to disambiguate package entries that share a location (`@experimental`, see the `packageMap` option)
|
|
278
|
+
*/
|
|
279
|
+
/** @typedef {KnownContext & Record<any, any>} Context */
|
|
280
|
+
/** @typedef {Error & { details?: string }} ErrorWithDetail */
|
|
281
|
+
/** @typedef {(err: ErrorWithDetail | null, res?: string | false, req?: ResolveRequest) => void} ResolveCallback */
|
|
282
|
+
/**
|
|
283
|
+
* @typedef {object} PossibleFileSystemError
|
|
284
|
+
* @property {string=} code code
|
|
285
|
+
* @property {number=} errno number
|
|
286
|
+
* @property {string=} path path
|
|
287
|
+
* @property {string=} syscall syscall
|
|
288
|
+
*/
|
|
289
|
+
/**
|
|
290
|
+
* @template T
|
|
291
|
+
* @callback FileSystemCallback
|
|
292
|
+
* @param {PossibleFileSystemError & Error | null} err
|
|
293
|
+
* @param {T=} result
|
|
294
|
+
*/
|
|
295
|
+
/**
|
|
296
|
+
* @typedef {string | Buffer | URL} PathLike
|
|
297
|
+
*/
|
|
298
|
+
/**
|
|
299
|
+
* @typedef {PathLike | number} PathOrFileDescriptor
|
|
300
|
+
*/
|
|
301
|
+
/**
|
|
302
|
+
* @typedef {object} ObjectEncodingOptions
|
|
303
|
+
* @property {BufferEncoding | null | undefined=} encoding encoding
|
|
304
|
+
*/
|
|
305
|
+
/**
|
|
306
|
+
* @typedef {ObjectEncodingOptions | BufferEncoding | undefined | null} EncodingOption
|
|
307
|
+
*/
|
|
308
|
+
/** @typedef {(err: NodeJS.ErrnoException | null, result?: string) => void} StringCallback */
|
|
309
|
+
/** @typedef {(err: NodeJS.ErrnoException | null, result?: Buffer) => void} BufferCallback */
|
|
310
|
+
/** @typedef {(err: NodeJS.ErrnoException | null, result?: (string | Buffer)) => void} StringOrBufferCallback */
|
|
311
|
+
/** @typedef {(err: NodeJS.ErrnoException | null, result?: IStats) => void} StatsCallback */
|
|
312
|
+
/** @typedef {(err: NodeJS.ErrnoException | null, result?: IBigIntStats) => void} BigIntStatsCallback */
|
|
313
|
+
/** @typedef {(err: NodeJS.ErrnoException | null, result?: (IStats | IBigIntStats)) => void} StatsOrBigIntStatsCallback */
|
|
314
|
+
/** @typedef {(err: NodeJS.ErrnoException | Error | null, result?: JsonObject) => void} ReadJsonCallback */
|
|
315
|
+
/**
|
|
316
|
+
* @template T
|
|
317
|
+
* @typedef {object} IStatsBase
|
|
318
|
+
* @property {() => boolean} isFile is file
|
|
319
|
+
* @property {() => boolean} isDirectory is directory
|
|
320
|
+
* @property {() => boolean} isBlockDevice is block device
|
|
321
|
+
* @property {() => boolean} isCharacterDevice is character device
|
|
322
|
+
* @property {() => boolean} isSymbolicLink is symbolic link
|
|
323
|
+
* @property {() => boolean} isFIFO is FIFO
|
|
324
|
+
* @property {() => boolean} isSocket is socket
|
|
325
|
+
* @property {T} dev dev
|
|
326
|
+
* @property {T} ino ino
|
|
327
|
+
* @property {T} mode mode
|
|
328
|
+
* @property {T} nlink nlink
|
|
329
|
+
* @property {T} uid uid
|
|
330
|
+
* @property {T} gid gid
|
|
331
|
+
* @property {T} rdev rdev
|
|
332
|
+
* @property {T} size size
|
|
333
|
+
* @property {T} blksize blksize
|
|
334
|
+
* @property {T} blocks blocks
|
|
335
|
+
* @property {T} atimeMs atime ms
|
|
336
|
+
* @property {T} mtimeMs mtime ms
|
|
337
|
+
* @property {T} ctimeMs ctime ms
|
|
338
|
+
* @property {T} birthtimeMs birthtime ms
|
|
339
|
+
* @property {Date} atime atime
|
|
340
|
+
* @property {Date} mtime mtime
|
|
341
|
+
* @property {Date} ctime ctime
|
|
342
|
+
* @property {Date} birthtime birthtime
|
|
343
|
+
*/
|
|
344
|
+
/**
|
|
345
|
+
* @typedef {IStatsBase<number>} IStats
|
|
346
|
+
*/
|
|
347
|
+
/**
|
|
348
|
+
* @typedef {IStatsBase<bigint> & { atimeNs: bigint, mtimeNs: bigint, ctimeNs: bigint, birthtimeNs: bigint }} IBigIntStats
|
|
349
|
+
*/
|
|
350
|
+
/**
|
|
351
|
+
* @template {string | Buffer} [T=string]
|
|
352
|
+
* @typedef {object} Dirent
|
|
353
|
+
* @property {() => boolean} isFile true when is file, otherwise false
|
|
354
|
+
* @property {() => boolean} isDirectory true when is directory, otherwise false
|
|
355
|
+
* @property {() => boolean} isBlockDevice true when is block device, otherwise false
|
|
356
|
+
* @property {() => boolean} isCharacterDevice true when is character device, otherwise false
|
|
357
|
+
* @property {() => boolean} isSymbolicLink true when is symbolic link, otherwise false
|
|
358
|
+
* @property {() => boolean} isFIFO true when is FIFO, otherwise false
|
|
359
|
+
* @property {() => boolean} isSocket true when is socket, otherwise false
|
|
360
|
+
* @property {T} name name
|
|
361
|
+
* @property {string} parentPath path
|
|
362
|
+
* @property {string=} path path
|
|
363
|
+
*/
|
|
364
|
+
/**
|
|
365
|
+
* @typedef {object} StatOptions
|
|
366
|
+
* @property {(boolean | undefined)=} bigint need bigint values
|
|
367
|
+
*/
|
|
368
|
+
/**
|
|
369
|
+
* @typedef {object} StatSyncOptions
|
|
370
|
+
* @property {(boolean | undefined)=} bigint need bigint values
|
|
371
|
+
* @property {(boolean | undefined)=} throwIfNoEntry throw if no entry
|
|
372
|
+
*/
|
|
373
|
+
/**
|
|
374
|
+
* @typedef {{
|
|
375
|
+
* (path: PathOrFileDescriptor, options: ({ encoding?: null | undefined, flag?: string | undefined } & import("events").Abortable) | undefined | null, callback: BufferCallback): void,
|
|
376
|
+
* (path: PathOrFileDescriptor, options: ({ encoding: BufferEncoding, flag?: string | undefined } & import("events").Abortable) | BufferEncoding, callback: StringCallback): void,
|
|
377
|
+
* (path: PathOrFileDescriptor, options: (ObjectEncodingOptions & { flag?: string | undefined } & import("events").Abortable) | BufferEncoding | undefined | null, callback: StringOrBufferCallback): void,
|
|
378
|
+
* (path: PathOrFileDescriptor, callback: BufferCallback): void,
|
|
379
|
+
* }} ReadFile
|
|
380
|
+
*/
|
|
381
|
+
/**
|
|
382
|
+
* @typedef {"buffer" | { encoding: "buffer" }} BufferEncodingOption
|
|
383
|
+
*/
|
|
384
|
+
/**
|
|
385
|
+
* @typedef {{
|
|
386
|
+
* (path: PathOrFileDescriptor, options?: { encoding?: null | undefined, flag?: string | undefined } | null): Buffer,
|
|
387
|
+
* (path: PathOrFileDescriptor, options: { encoding: BufferEncoding, flag?: string | undefined } | BufferEncoding): string,
|
|
388
|
+
* (path: PathOrFileDescriptor, options?: (ObjectEncodingOptions & { flag?: string | undefined }) | BufferEncoding | null): string | Buffer,
|
|
389
|
+
* }} ReadFileSync
|
|
390
|
+
*/
|
|
391
|
+
/**
|
|
392
|
+
* @typedef {{
|
|
393
|
+
* (path: PathLike, options: { encoding: BufferEncoding | null, withFileTypes?: false | undefined, recursive?: boolean | undefined } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, files?: string[]) => void): void,
|
|
394
|
+
* (path: PathLike, options: { encoding: "buffer", withFileTypes?: false | undefined, recursive?: boolean | undefined } | "buffer", callback: (err: NodeJS.ErrnoException | null, files?: Buffer[]) => void): void,
|
|
395
|
+
* (path: PathLike, options: (ObjectEncodingOptions & { withFileTypes?: false | undefined, recursive?: boolean | undefined }) | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, files?: string[] | Buffer[]) => void): void,
|
|
396
|
+
* (path: PathLike, callback: (err: NodeJS.ErrnoException | null, files?: string[]) => void): void,
|
|
397
|
+
* (path: PathLike, options: ObjectEncodingOptions & { withFileTypes: true, recursive?: boolean | undefined }, callback: (err: NodeJS.ErrnoException | null, files?: Dirent<string>[]) => void): void,
|
|
398
|
+
* (path: PathLike, options: { encoding: "buffer", withFileTypes: true, recursive?: boolean | undefined }, callback: (err: NodeJS.ErrnoException | null, files: Dirent<Buffer>[]) => void): void,
|
|
399
|
+
* }} Readdir
|
|
400
|
+
*/
|
|
401
|
+
/**
|
|
402
|
+
* @typedef {{
|
|
403
|
+
* (path: PathLike, options?: { encoding: BufferEncoding | null, withFileTypes?: false | undefined, recursive?: boolean | undefined } | BufferEncoding | null): string[],
|
|
404
|
+
* (path: PathLike, options: { encoding: "buffer", withFileTypes?: false | undefined, recursive?: boolean | undefined } | "buffer"): Buffer[],
|
|
405
|
+
* (path: PathLike, options?: (ObjectEncodingOptions & { withFileTypes?: false | undefined, recursive?: boolean | undefined }) | BufferEncoding | null): string[] | Buffer[],
|
|
406
|
+
* (path: PathLike, options: ObjectEncodingOptions & { withFileTypes: true, recursive?: boolean | undefined }): Dirent[],
|
|
407
|
+
* (path: PathLike, options: { encoding: "buffer", withFileTypes: true, recursive?: boolean | undefined }): Dirent<Buffer>[],
|
|
408
|
+
* }} ReaddirSync
|
|
409
|
+
*/
|
|
410
|
+
/**
|
|
411
|
+
* @typedef {(pathOrFileDescription: PathOrFileDescriptor, callback: ReadJsonCallback) => void} ReadJson
|
|
412
|
+
*/
|
|
413
|
+
/**
|
|
414
|
+
* @typedef {(pathOrFileDescription: PathOrFileDescriptor) => JsonObject} ReadJsonSync
|
|
415
|
+
*/
|
|
416
|
+
/**
|
|
417
|
+
* @typedef {{
|
|
418
|
+
* (path: PathLike, options: EncodingOption, callback: StringCallback): void,
|
|
419
|
+
* (path: PathLike, options: BufferEncodingOption, callback: BufferCallback): void,
|
|
420
|
+
* (path: PathLike, options: EncodingOption, callback: StringOrBufferCallback): void,
|
|
421
|
+
* (path: PathLike, callback: StringCallback): void,
|
|
422
|
+
* }} Readlink
|
|
423
|
+
*/
|
|
424
|
+
/**
|
|
425
|
+
* @typedef {{
|
|
426
|
+
* (path: PathLike, options?: EncodingOption): string,
|
|
427
|
+
* (path: PathLike, options: BufferEncodingOption): Buffer,
|
|
428
|
+
* (path: PathLike, options?: EncodingOption): string | Buffer,
|
|
429
|
+
* }} ReadlinkSync
|
|
430
|
+
*/
|
|
431
|
+
/**
|
|
432
|
+
* @typedef {{
|
|
433
|
+
* (path: PathLike, callback: StatsCallback): void,
|
|
434
|
+
* (path: PathLike, options: (StatOptions & { bigint?: false | undefined }) | undefined, callback: StatsCallback): void,
|
|
435
|
+
* (path: PathLike, options: StatOptions & { bigint: true }, callback: BigIntStatsCallback): void,
|
|
436
|
+
* (path: PathLike, options: StatOptions | undefined, callback: StatsOrBigIntStatsCallback): void,
|
|
437
|
+
* }} LStat
|
|
438
|
+
*/
|
|
439
|
+
/**
|
|
440
|
+
* @typedef {{
|
|
441
|
+
* (path: PathLike, options?: undefined): IStats,
|
|
442
|
+
* (path: PathLike, options?: StatSyncOptions & { bigint?: false | undefined, throwIfNoEntry: false }): IStats | undefined,
|
|
443
|
+
* (path: PathLike, options: StatSyncOptions & { bigint: true, throwIfNoEntry: false }): IBigIntStats | undefined,
|
|
444
|
+
* (path: PathLike, options?: StatSyncOptions & { bigint?: false | undefined }): IStats,
|
|
445
|
+
* (path: PathLike, options: StatSyncOptions & { bigint: true }): IBigIntStats,
|
|
446
|
+
* (path: PathLike, options: StatSyncOptions & { bigint: boolean, throwIfNoEntry?: false | undefined }): IStats | IBigIntStats,
|
|
447
|
+
* (path: PathLike, options?: StatSyncOptions): IStats | IBigIntStats | undefined,
|
|
448
|
+
* }} LStatSync
|
|
449
|
+
*/
|
|
450
|
+
/**
|
|
451
|
+
* @typedef {{
|
|
452
|
+
* (path: PathLike, callback: StatsCallback): void,
|
|
453
|
+
* (path: PathLike, options: (StatOptions & { bigint?: false | undefined }) | undefined, callback: StatsCallback): void,
|
|
454
|
+
* (path: PathLike, options: StatOptions & { bigint: true }, callback: BigIntStatsCallback): void,
|
|
455
|
+
* (path: PathLike, options: StatOptions | undefined, callback: StatsOrBigIntStatsCallback): void,
|
|
456
|
+
* }} Stat
|
|
457
|
+
*/
|
|
458
|
+
/**
|
|
459
|
+
* @typedef {{
|
|
460
|
+
* (path: PathLike, options?: undefined): IStats,
|
|
461
|
+
* (path: PathLike, options?: StatSyncOptions & { bigint?: false | undefined, throwIfNoEntry: false }): IStats | undefined,
|
|
462
|
+
* (path: PathLike, options: StatSyncOptions & { bigint: true, throwIfNoEntry: false }): IBigIntStats | undefined,
|
|
463
|
+
* (path: PathLike, options?: StatSyncOptions & { bigint?: false | undefined }): IStats,
|
|
464
|
+
* (path: PathLike, options: StatSyncOptions & { bigint: true }): IBigIntStats,
|
|
465
|
+
* (path: PathLike, options: StatSyncOptions & { bigint: boolean, throwIfNoEntry?: false | undefined }): IStats | IBigIntStats,
|
|
466
|
+
* (path: PathLike, options?: StatSyncOptions): IStats | IBigIntStats | undefined,
|
|
467
|
+
* }} StatSync
|
|
468
|
+
*/
|
|
469
|
+
/**
|
|
470
|
+
* @typedef {{
|
|
471
|
+
* (path: PathLike, options: EncodingOption, callback: StringCallback): void,
|
|
472
|
+
* (path: PathLike, options: BufferEncodingOption, callback: BufferCallback): void,
|
|
473
|
+
* (path: PathLike, options: EncodingOption, callback: StringOrBufferCallback): void,
|
|
474
|
+
* (path: PathLike, callback: StringCallback): void,
|
|
475
|
+
* }} RealPath
|
|
476
|
+
*/
|
|
477
|
+
/**
|
|
478
|
+
* @typedef {{
|
|
479
|
+
* (path: PathLike, options?: EncodingOption): string,
|
|
480
|
+
* (path: PathLike, options: BufferEncodingOption): Buffer,
|
|
481
|
+
* (path: PathLike, options?: EncodingOption): string | Buffer,
|
|
482
|
+
* }} RealPathSync
|
|
483
|
+
*/
|
|
484
|
+
/**
|
|
485
|
+
* @typedef {object} FileSystem
|
|
486
|
+
* @property {ReadFile} readFile read file method
|
|
487
|
+
* @property {Readdir} readdir readdir method
|
|
488
|
+
* @property {ReadJson=} readJson read json method
|
|
489
|
+
* @property {Readlink} readlink read link method
|
|
490
|
+
* @property {LStat=} lstat lstat method
|
|
491
|
+
* @property {Stat} stat stat method
|
|
492
|
+
* @property {RealPath=} realpath realpath method
|
|
493
|
+
*/
|
|
494
|
+
/**
|
|
495
|
+
* @typedef {object} SyncFileSystem
|
|
496
|
+
* @property {ReadFileSync} readFileSync read file sync method
|
|
497
|
+
* @property {ReaddirSync} readdirSync read dir sync method
|
|
498
|
+
* @property {ReadJsonSync=} readJsonSync read json sync method
|
|
499
|
+
* @property {ReadlinkSync} readlinkSync read link sync method
|
|
500
|
+
* @property {LStatSync=} lstatSync lstat sync method
|
|
501
|
+
* @property {StatSync} statSync stat sync method
|
|
502
|
+
* @property {RealPathSync=} realpathSync real path sync method
|
|
503
|
+
*/
|
|
504
|
+
/**
|
|
505
|
+
* @typedef {object} ParsedIdentifier
|
|
506
|
+
* @property {string} request request
|
|
507
|
+
* @property {string} query query
|
|
508
|
+
* @property {string} fragment fragment
|
|
509
|
+
* @property {boolean} directory is directory
|
|
510
|
+
* @property {boolean} module is module
|
|
511
|
+
* @property {boolean} file is file
|
|
512
|
+
* @property {boolean} internal is internal
|
|
513
|
+
*/
|
|
514
|
+
/** @typedef {string | number | boolean | null} JsonPrimitive */
|
|
515
|
+
/** @typedef {JsonValue[]} JsonArray */
|
|
516
|
+
/** @typedef {JsonPrimitive | JsonObject | JsonArray} JsonValue */
|
|
517
|
+
/** @typedef {{ [Key in string]?: JsonValue | undefined }} JsonObject */
|
|
518
|
+
/**
|
|
519
|
+
* @typedef {object} TsconfigPathsMap
|
|
520
|
+
* @property {TsconfigPathsData} main main tsconfig paths data
|
|
521
|
+
* @property {string} mainContext main tsconfig base URL (absolute path)
|
|
522
|
+
* @property {{ [baseUrl: string]: TsconfigPathsData }} refs referenced tsconfig paths data mapped by baseUrl
|
|
523
|
+
* @property {{ [context: string]: TsconfigPathsData }} allContexts all contexts (main + refs) for quick lookup
|
|
524
|
+
* @property {string[]} contextList precomputed `Object.keys(allContexts)` — read-only; used on the `_selectPathsDataForContext` hot path
|
|
525
|
+
* @property {Set<string>} fileDependencies file dependencies
|
|
526
|
+
*/
|
|
527
|
+
/**
|
|
528
|
+
* @typedef {object} TsconfigPathsData
|
|
529
|
+
* @property {import("./AliasUtils").CompiledAliasOptions} alias tsconfig file data
|
|
530
|
+
* @property {string[]} modules tsconfig file data
|
|
531
|
+
*/
|
|
532
|
+
/**
|
|
533
|
+
* @typedef {object} BaseResolveRequest
|
|
534
|
+
* @property {string | false} path path
|
|
535
|
+
* @property {Context=} context content
|
|
536
|
+
* @property {string=} descriptionFilePath description file path
|
|
537
|
+
* @property {string=} descriptionFileRoot description file root
|
|
538
|
+
* @property {JsonObject=} descriptionFileData description file data
|
|
539
|
+
* @property {TsconfigPathsMap | null | undefined=} tsconfigPathsMap tsconfig paths map
|
|
540
|
+
* @property {string=} relativePath relative path
|
|
541
|
+
* @property {boolean=} ignoreSymlinks true when need to ignore symlinks, otherwise false
|
|
542
|
+
* @property {boolean=} fullySpecified true when full specified, otherwise false
|
|
543
|
+
* @property {string=} packageId package id the request was resolved to in the package map, to be propagated to resolutions made from the resulting file (`@experimental`, see the `packageMap` option)
|
|
544
|
+
* @property {string=} __innerRequest inner request for internal usage
|
|
545
|
+
* @property {string=} __innerRequest_request inner request for internal usage
|
|
546
|
+
* @property {string=} __innerRequest_relativePath inner relative path for internal usage
|
|
547
|
+
* @property {{ blocked: boolean }=} __restrictionsMarker internal: shared marker `RestrictionsPlugin` flips when it filters out an existing target, letting `ExportsFieldPlugin` fall back instead of erroring
|
|
548
|
+
*/
|
|
549
|
+
/** @typedef {BaseResolveRequest & Partial<ParsedIdentifier>} ResolveRequest */
|
|
550
|
+
/**
|
|
551
|
+
* @template T
|
|
552
|
+
* @typedef {{ add: (item: T) => void }} WriteOnlySet
|
|
553
|
+
*/
|
|
554
|
+
/** @typedef {(request: ResolveRequest) => void} ResolveContextYield */
|
|
555
|
+
/**
|
|
556
|
+
* Singly-linked stack entry that also exposes a Set-like API
|
|
557
|
+
* (`has`, `size`, iteration). Each `doResolve` call prepends a new
|
|
558
|
+
* `StackEntry` that points at the previous tip via `.parent`, so pushing
|
|
559
|
+
* is O(1) in time and memory. Recursion detection walks the linked list
|
|
560
|
+
* (O(n)) but the stack is typically shallow, so this is cheaper overall
|
|
561
|
+
* than cloning a `Set` per call.
|
|
562
|
+
*/
|
|
563
|
+
declare class StackEntry {
|
|
564
|
+
/**
|
|
565
|
+
* @param {ResolveStepHook} hook hook
|
|
566
|
+
* @param {ResolveRequest} request request
|
|
567
|
+
* @param {StackEntry=} parent previous tip
|
|
568
|
+
* @param {Set<string>=} preSeeded entries pre-seeded via the legacy `Set<string>` API
|
|
569
|
+
*/
|
|
570
|
+
constructor(
|
|
571
|
+
hook: ResolveStepHook,
|
|
572
|
+
request: ResolveRequest,
|
|
573
|
+
parent?: StackEntry | undefined,
|
|
574
|
+
preSeeded?: Set<string> | undefined,
|
|
575
|
+
);
|
|
576
|
+
name: string | undefined;
|
|
577
|
+
path: string | false;
|
|
578
|
+
request: string;
|
|
579
|
+
query: string;
|
|
580
|
+
fragment: string;
|
|
581
|
+
directory: boolean;
|
|
582
|
+
module: boolean;
|
|
583
|
+
/** @type {StackEntry | undefined} */
|
|
584
|
+
parent: StackEntry | undefined;
|
|
585
|
+
/**
|
|
586
|
+
* Strings seeded by callers that still pass `stack: new Set([...])`.
|
|
587
|
+
* Propagated through the chain so deeper `doResolve` calls still see
|
|
588
|
+
* them during recursion checks. `undefined` in the common case so
|
|
589
|
+
* there is no extra work on the hot path.
|
|
590
|
+
* @type {Set<string> | undefined}
|
|
591
|
+
*/
|
|
592
|
+
preSeeded: Set<string> | undefined;
|
|
593
|
+
/**
|
|
594
|
+
* Walk the linked list looking for an entry with the same request shape.
|
|
595
|
+
* Set-compatible: callers that used `stack.has(entry)` keep working.
|
|
596
|
+
*
|
|
597
|
+
* NOTE: kept monomorphic on purpose. An earlier draft accepted a string
|
|
598
|
+
* query too (so pre-5.21 plugins keeping their own `Set<string>` of
|
|
599
|
+
* seen entries could probe the live stack with the formatted form),
|
|
600
|
+
* but adding the second shape regressed `doResolve`'s heap profile by
|
|
601
|
+
* ~1 MiB / 200 resolves on stack-churn — V8 keeps a polymorphic
|
|
602
|
+
* call-site state for `parent.has(stackEntry)` once `has` has two
|
|
603
|
+
* argument shapes. Plugins that need string membership can reach for
|
|
604
|
+
* `[...stack].find(e => e.includes(formattedString))` via the
|
|
605
|
+
* `String`-method proxies on `StackEntry` instead.
|
|
606
|
+
* @param {StackEntry} query entry to look for
|
|
607
|
+
* @returns {boolean} whether the stack already contains an equivalent entry
|
|
608
|
+
*/
|
|
609
|
+
has(query: StackEntry): boolean;
|
|
610
|
+
/**
|
|
611
|
+
* Number of entries on the stack (oldest-to-newest length).
|
|
612
|
+
* @returns {number} size
|
|
613
|
+
*/
|
|
614
|
+
get size(): number;
|
|
615
|
+
/**
|
|
616
|
+
* Human-readable form used in recursion error messages, logs, and the
|
|
617
|
+
* iterator above. Not memoized: caching would require an extra slot on
|
|
618
|
+
* every `StackEntry`, which costs heap even on resolves that never look
|
|
619
|
+
* at the formatted form.
|
|
620
|
+
* @returns {string} formatted entry
|
|
621
|
+
*/
|
|
622
|
+
toString(): string;
|
|
623
|
+
/**
|
|
624
|
+
* Iterate entries from oldest (root) to newest (tip), matching how a
|
|
625
|
+
* `Set` that was populated in insertion order would iterate. Pre-seeded
|
|
626
|
+
* legacy `Set<string>` entries come first so error-message output stays
|
|
627
|
+
* ordered oldest-to-newest.
|
|
628
|
+
*
|
|
629
|
+
* Yields each entry as its formatted `toString()` form. Plugins written
|
|
630
|
+
* against the pre-5.21 `Set<string>` shape — e.g.
|
|
631
|
+
* `[...resolveContext.stack].find(a => a.includes("module:"))` — keep
|
|
632
|
+
* working unchanged because each yielded value is a plain string with
|
|
633
|
+
* all of `String.prototype` available natively. Resolves that never
|
|
634
|
+
* iterate the stack pay nothing; iteration costs one `toString()`
|
|
635
|
+
* allocation per stack frame.
|
|
636
|
+
* @returns {IterableIterator<string>} iterator
|
|
637
|
+
*/
|
|
638
|
+
[Symbol.iterator](): IterableIterator<string>;
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Resolve context
|
|
642
|
+
*/
|
|
643
|
+
type ResolveContext = {
|
|
644
|
+
/**
|
|
645
|
+
* directories that was found on file system
|
|
646
|
+
*/
|
|
647
|
+
contextDependencies?: WriteOnlySet<string> | undefined;
|
|
648
|
+
/**
|
|
649
|
+
* files that was found on file system
|
|
650
|
+
*/
|
|
651
|
+
fileDependencies?: WriteOnlySet<string> | undefined;
|
|
652
|
+
/**
|
|
653
|
+
* dependencies that was not found on file system
|
|
654
|
+
*/
|
|
655
|
+
missingDependencies?: WriteOnlySet<string> | undefined;
|
|
656
|
+
/**
|
|
657
|
+
* tip of the resolver call stack (a singly-linked list with Set-like API). For instance, `resolve → parsedResolve → describedResolve`. Accepts a legacy `Set<string>` for back-compat with older callers; it is normalized internally without a hot-path branch.
|
|
658
|
+
*/
|
|
659
|
+
stack?: (StackEntry | Set<string>) | undefined;
|
|
660
|
+
/**
|
|
661
|
+
* log function
|
|
662
|
+
*/
|
|
663
|
+
log?: ((str: string) => void) | undefined;
|
|
664
|
+
/**
|
|
665
|
+
* yield result, if provided plugins can return several results
|
|
666
|
+
*/
|
|
667
|
+
yield?: ResolveContextYield | undefined;
|
|
668
|
+
};
|
|
669
|
+
type ResolveStepHook = AsyncSeriesBailHook<
|
|
670
|
+
[ResolveRequest, ResolveContext],
|
|
671
|
+
ResolveRequest | null
|
|
672
|
+
>;
|
|
673
|
+
type KnownHooks = {
|
|
674
|
+
/**
|
|
675
|
+
* resolve step hook
|
|
676
|
+
*/
|
|
677
|
+
resolveStep: SyncHook<[ResolveStepHook, ResolveRequest], void>;
|
|
678
|
+
/**
|
|
679
|
+
* no resolve hook
|
|
680
|
+
*/
|
|
681
|
+
noResolve: SyncHook<[ResolveRequest, Error]>;
|
|
682
|
+
/**
|
|
683
|
+
* resolve hook
|
|
684
|
+
*/
|
|
685
|
+
resolve: ResolveStepHook;
|
|
686
|
+
/**
|
|
687
|
+
* result hook
|
|
688
|
+
*/
|
|
689
|
+
result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
|
|
690
|
+
};
|
|
691
|
+
type EnsuredHooks = {
|
|
692
|
+
[key: string]: ResolveStepHook;
|
|
693
|
+
};
|
|
694
|
+
type AliasOption = import("./AliasUtils").AliasOption;
|
|
695
|
+
type CachedJoin = import("./util/path").CachedJoin;
|
|
696
|
+
type CachedDirname = import("./util/path").CachedDirname;
|
|
697
|
+
type CachedBasename = import("./util/path").CachedBasename;
|
|
698
|
+
type JoinCacheEntry = {
|
|
699
|
+
/**
|
|
700
|
+
* cached join function
|
|
701
|
+
*/
|
|
702
|
+
fn: CachedJoin["fn"];
|
|
703
|
+
/**
|
|
704
|
+
* the underlying cache map
|
|
705
|
+
*/
|
|
706
|
+
cache: CachedJoin["cache"];
|
|
707
|
+
};
|
|
708
|
+
type DirnameCacheEntry = {
|
|
709
|
+
/**
|
|
710
|
+
* cached dirname function
|
|
711
|
+
*/
|
|
712
|
+
fn: CachedDirname["fn"];
|
|
713
|
+
/**
|
|
714
|
+
* the underlying cache map
|
|
715
|
+
*/
|
|
716
|
+
cache: CachedDirname["cache"];
|
|
717
|
+
};
|
|
718
|
+
type BasenameCacheEntry = {
|
|
719
|
+
/**
|
|
720
|
+
* cached dirname function
|
|
721
|
+
*/
|
|
722
|
+
fn: CachedBasename["fn"];
|
|
723
|
+
/**
|
|
724
|
+
* the underlying cache map
|
|
725
|
+
*/
|
|
726
|
+
cache: CachedBasename["cache"];
|
|
727
|
+
};
|
|
728
|
+
type PathCacheFunctions = {
|
|
729
|
+
/**
|
|
730
|
+
* cached join
|
|
731
|
+
*/
|
|
732
|
+
join: JoinCacheEntry;
|
|
733
|
+
/**
|
|
734
|
+
* cached dirname
|
|
735
|
+
*/
|
|
736
|
+
dirname: DirnameCacheEntry;
|
|
737
|
+
/**
|
|
738
|
+
* cached basename
|
|
739
|
+
*/
|
|
740
|
+
basename: BasenameCacheEntry;
|
|
741
|
+
};
|
|
742
|
+
type ResolveOptions = import("./ResolverFactory").ResolveOptions;
|
|
743
|
+
type KnownContext = {
|
|
744
|
+
/**
|
|
745
|
+
* environments
|
|
746
|
+
*/
|
|
747
|
+
environments?: string[] | undefined;
|
|
748
|
+
/**
|
|
749
|
+
* package id of the importing file in the package map, propagated from a previous result to disambiguate package entries that share a location (`@experimental`, see the `packageMap` option)
|
|
750
|
+
*/
|
|
751
|
+
packageId?: string | undefined;
|
|
752
|
+
};
|
|
753
|
+
type Context = KnownContext & Record<any, any>;
|
|
754
|
+
type ErrorWithDetail = Error & {
|
|
755
|
+
details?: string;
|
|
756
|
+
};
|
|
757
|
+
type ResolveCallback = (
|
|
758
|
+
err: ErrorWithDetail | null,
|
|
759
|
+
res?: string | false,
|
|
760
|
+
req?: ResolveRequest,
|
|
761
|
+
) => void;
|
|
762
|
+
type PossibleFileSystemError = {
|
|
763
|
+
/**
|
|
764
|
+
* code
|
|
765
|
+
*/
|
|
766
|
+
code?: string | undefined;
|
|
767
|
+
/**
|
|
768
|
+
* number
|
|
769
|
+
*/
|
|
770
|
+
errno?: number | undefined;
|
|
771
|
+
/**
|
|
772
|
+
* path
|
|
773
|
+
*/
|
|
774
|
+
path?: string | undefined;
|
|
775
|
+
/**
|
|
776
|
+
* syscall
|
|
777
|
+
*/
|
|
778
|
+
syscall?: string | undefined;
|
|
779
|
+
};
|
|
780
|
+
type FileSystemCallback<T> = (
|
|
781
|
+
err: (PossibleFileSystemError & Error) | null,
|
|
782
|
+
result?: T | undefined,
|
|
783
|
+
) => any;
|
|
784
|
+
type PathLike = string | Buffer | URL;
|
|
785
|
+
type PathOrFileDescriptor = PathLike | number;
|
|
786
|
+
type ObjectEncodingOptions = {
|
|
787
|
+
/**
|
|
788
|
+
* encoding
|
|
789
|
+
*/
|
|
790
|
+
encoding?: (BufferEncoding | null | undefined) | undefined;
|
|
791
|
+
};
|
|
792
|
+
type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null;
|
|
793
|
+
type StringCallback = (
|
|
794
|
+
err: NodeJS.ErrnoException | null,
|
|
795
|
+
result?: string,
|
|
796
|
+
) => void;
|
|
797
|
+
type BufferCallback = (
|
|
798
|
+
err: NodeJS.ErrnoException | null,
|
|
799
|
+
result?: Buffer,
|
|
800
|
+
) => void;
|
|
801
|
+
type StringOrBufferCallback = (
|
|
802
|
+
err: NodeJS.ErrnoException | null,
|
|
803
|
+
result?: string | Buffer,
|
|
804
|
+
) => void;
|
|
805
|
+
type StatsCallback = (
|
|
806
|
+
err: NodeJS.ErrnoException | null,
|
|
807
|
+
result?: IStats,
|
|
808
|
+
) => void;
|
|
809
|
+
type BigIntStatsCallback = (
|
|
810
|
+
err: NodeJS.ErrnoException | null,
|
|
811
|
+
result?: IBigIntStats,
|
|
812
|
+
) => void;
|
|
813
|
+
type StatsOrBigIntStatsCallback = (
|
|
814
|
+
err: NodeJS.ErrnoException | null,
|
|
815
|
+
result?: IStats | IBigIntStats,
|
|
816
|
+
) => void;
|
|
817
|
+
type ReadJsonCallback = (
|
|
818
|
+
err: NodeJS.ErrnoException | Error | null,
|
|
819
|
+
result?: JsonObject,
|
|
820
|
+
) => void;
|
|
821
|
+
type IStatsBase<T> = {
|
|
822
|
+
/**
|
|
823
|
+
* is file
|
|
824
|
+
*/
|
|
825
|
+
isFile: () => boolean;
|
|
826
|
+
/**
|
|
827
|
+
* is directory
|
|
828
|
+
*/
|
|
829
|
+
isDirectory: () => boolean;
|
|
830
|
+
/**
|
|
831
|
+
* is block device
|
|
832
|
+
*/
|
|
833
|
+
isBlockDevice: () => boolean;
|
|
834
|
+
/**
|
|
835
|
+
* is character device
|
|
836
|
+
*/
|
|
837
|
+
isCharacterDevice: () => boolean;
|
|
838
|
+
/**
|
|
839
|
+
* is symbolic link
|
|
840
|
+
*/
|
|
841
|
+
isSymbolicLink: () => boolean;
|
|
842
|
+
/**
|
|
843
|
+
* is FIFO
|
|
844
|
+
*/
|
|
845
|
+
isFIFO: () => boolean;
|
|
846
|
+
/**
|
|
847
|
+
* is socket
|
|
848
|
+
*/
|
|
849
|
+
isSocket: () => boolean;
|
|
850
|
+
/**
|
|
851
|
+
* dev
|
|
852
|
+
*/
|
|
853
|
+
dev: T;
|
|
854
|
+
/**
|
|
855
|
+
* ino
|
|
856
|
+
*/
|
|
857
|
+
ino: T;
|
|
858
|
+
/**
|
|
859
|
+
* mode
|
|
860
|
+
*/
|
|
861
|
+
mode: T;
|
|
862
|
+
/**
|
|
863
|
+
* nlink
|
|
864
|
+
*/
|
|
865
|
+
nlink: T;
|
|
866
|
+
/**
|
|
867
|
+
* uid
|
|
868
|
+
*/
|
|
869
|
+
uid: T;
|
|
870
|
+
/**
|
|
871
|
+
* gid
|
|
872
|
+
*/
|
|
873
|
+
gid: T;
|
|
874
|
+
/**
|
|
875
|
+
* rdev
|
|
876
|
+
*/
|
|
877
|
+
rdev: T;
|
|
878
|
+
/**
|
|
879
|
+
* size
|
|
880
|
+
*/
|
|
881
|
+
size: T;
|
|
882
|
+
/**
|
|
883
|
+
* blksize
|
|
884
|
+
*/
|
|
885
|
+
blksize: T;
|
|
886
|
+
/**
|
|
887
|
+
* blocks
|
|
888
|
+
*/
|
|
889
|
+
blocks: T;
|
|
890
|
+
/**
|
|
891
|
+
* atime ms
|
|
892
|
+
*/
|
|
893
|
+
atimeMs: T;
|
|
894
|
+
/**
|
|
895
|
+
* mtime ms
|
|
896
|
+
*/
|
|
897
|
+
mtimeMs: T;
|
|
898
|
+
/**
|
|
899
|
+
* ctime ms
|
|
900
|
+
*/
|
|
901
|
+
ctimeMs: T;
|
|
902
|
+
/**
|
|
903
|
+
* birthtime ms
|
|
904
|
+
*/
|
|
905
|
+
birthtimeMs: T;
|
|
906
|
+
/**
|
|
907
|
+
* atime
|
|
908
|
+
*/
|
|
909
|
+
atime: Date;
|
|
910
|
+
/**
|
|
911
|
+
* mtime
|
|
912
|
+
*/
|
|
913
|
+
mtime: Date;
|
|
914
|
+
/**
|
|
915
|
+
* ctime
|
|
916
|
+
*/
|
|
917
|
+
ctime: Date;
|
|
918
|
+
/**
|
|
919
|
+
* birthtime
|
|
920
|
+
*/
|
|
921
|
+
birthtime: Date;
|
|
922
|
+
};
|
|
923
|
+
type IStats = IStatsBase<number>;
|
|
924
|
+
type IBigIntStats = IStatsBase<bigint> & {
|
|
925
|
+
atimeNs: bigint;
|
|
926
|
+
mtimeNs: bigint;
|
|
927
|
+
ctimeNs: bigint;
|
|
928
|
+
birthtimeNs: bigint;
|
|
929
|
+
};
|
|
930
|
+
type Dirent<T extends string | Buffer = string> = {
|
|
931
|
+
/**
|
|
932
|
+
* true when is file, otherwise false
|
|
933
|
+
*/
|
|
934
|
+
isFile: () => boolean;
|
|
935
|
+
/**
|
|
936
|
+
* true when is directory, otherwise false
|
|
937
|
+
*/
|
|
938
|
+
isDirectory: () => boolean;
|
|
939
|
+
/**
|
|
940
|
+
* true when is block device, otherwise false
|
|
941
|
+
*/
|
|
942
|
+
isBlockDevice: () => boolean;
|
|
943
|
+
/**
|
|
944
|
+
* true when is character device, otherwise false
|
|
945
|
+
*/
|
|
946
|
+
isCharacterDevice: () => boolean;
|
|
947
|
+
/**
|
|
948
|
+
* true when is symbolic link, otherwise false
|
|
949
|
+
*/
|
|
950
|
+
isSymbolicLink: () => boolean;
|
|
951
|
+
/**
|
|
952
|
+
* true when is FIFO, otherwise false
|
|
953
|
+
*/
|
|
954
|
+
isFIFO: () => boolean;
|
|
955
|
+
/**
|
|
956
|
+
* true when is socket, otherwise false
|
|
957
|
+
*/
|
|
958
|
+
isSocket: () => boolean;
|
|
959
|
+
/**
|
|
960
|
+
* name
|
|
961
|
+
*/
|
|
962
|
+
name: T;
|
|
963
|
+
/**
|
|
964
|
+
* path
|
|
965
|
+
*/
|
|
966
|
+
parentPath: string;
|
|
967
|
+
/**
|
|
968
|
+
* path
|
|
969
|
+
*/
|
|
970
|
+
path?: string | undefined;
|
|
971
|
+
};
|
|
972
|
+
type StatOptions = {
|
|
973
|
+
/**
|
|
974
|
+
* need bigint values
|
|
975
|
+
*/
|
|
976
|
+
bigint?: (boolean | undefined) | undefined;
|
|
977
|
+
};
|
|
978
|
+
type StatSyncOptions = {
|
|
979
|
+
/**
|
|
980
|
+
* need bigint values
|
|
981
|
+
*/
|
|
982
|
+
bigint?: (boolean | undefined) | undefined;
|
|
983
|
+
/**
|
|
984
|
+
* throw if no entry
|
|
985
|
+
*/
|
|
986
|
+
throwIfNoEntry?: (boolean | undefined) | undefined;
|
|
987
|
+
};
|
|
988
|
+
type ReadFile = {
|
|
989
|
+
(
|
|
990
|
+
path: PathOrFileDescriptor,
|
|
991
|
+
options:
|
|
992
|
+
| ({
|
|
993
|
+
encoding?: null | undefined;
|
|
994
|
+
flag?: string | undefined;
|
|
995
|
+
} & import("events").Abortable)
|
|
996
|
+
| undefined
|
|
997
|
+
| null,
|
|
998
|
+
callback: BufferCallback,
|
|
999
|
+
): void;
|
|
1000
|
+
(
|
|
1001
|
+
path: PathOrFileDescriptor,
|
|
1002
|
+
options:
|
|
1003
|
+
| ({
|
|
1004
|
+
encoding: BufferEncoding;
|
|
1005
|
+
flag?: string | undefined;
|
|
1006
|
+
} & import("events").Abortable)
|
|
1007
|
+
| BufferEncoding,
|
|
1008
|
+
callback: StringCallback,
|
|
1009
|
+
): void;
|
|
1010
|
+
(
|
|
1011
|
+
path: PathOrFileDescriptor,
|
|
1012
|
+
options:
|
|
1013
|
+
| (ObjectEncodingOptions & {
|
|
1014
|
+
flag?: string | undefined;
|
|
1015
|
+
} & import("events").Abortable)
|
|
1016
|
+
| BufferEncoding
|
|
1017
|
+
| undefined
|
|
1018
|
+
| null,
|
|
1019
|
+
callback: StringOrBufferCallback,
|
|
1020
|
+
): void;
|
|
1021
|
+
(path: PathOrFileDescriptor, callback: BufferCallback): void;
|
|
1022
|
+
};
|
|
1023
|
+
type BufferEncodingOption =
|
|
1024
|
+
| "buffer"
|
|
1025
|
+
| {
|
|
1026
|
+
encoding: "buffer";
|
|
1027
|
+
};
|
|
1028
|
+
type ReadFileSync = {
|
|
1029
|
+
(
|
|
1030
|
+
path: PathOrFileDescriptor,
|
|
1031
|
+
options?: {
|
|
1032
|
+
encoding?: null | undefined;
|
|
1033
|
+
flag?: string | undefined;
|
|
1034
|
+
} | null,
|
|
1035
|
+
): Buffer;
|
|
1036
|
+
(
|
|
1037
|
+
path: PathOrFileDescriptor,
|
|
1038
|
+
options:
|
|
1039
|
+
| {
|
|
1040
|
+
encoding: BufferEncoding;
|
|
1041
|
+
flag?: string | undefined;
|
|
1042
|
+
}
|
|
1043
|
+
| BufferEncoding,
|
|
1044
|
+
): string;
|
|
1045
|
+
(
|
|
1046
|
+
path: PathOrFileDescriptor,
|
|
1047
|
+
options?:
|
|
1048
|
+
| (ObjectEncodingOptions & {
|
|
1049
|
+
flag?: string | undefined;
|
|
1050
|
+
})
|
|
1051
|
+
| BufferEncoding
|
|
1052
|
+
| null,
|
|
1053
|
+
): string | Buffer;
|
|
1054
|
+
};
|
|
1055
|
+
type Readdir = {
|
|
1056
|
+
(
|
|
1057
|
+
path: PathLike,
|
|
1058
|
+
options:
|
|
1059
|
+
| {
|
|
1060
|
+
encoding: BufferEncoding | null;
|
|
1061
|
+
withFileTypes?: false | undefined;
|
|
1062
|
+
recursive?: boolean | undefined;
|
|
1063
|
+
}
|
|
1064
|
+
| BufferEncoding
|
|
1065
|
+
| undefined
|
|
1066
|
+
| null,
|
|
1067
|
+
callback: (err: NodeJS.ErrnoException | null, files?: string[]) => void,
|
|
1068
|
+
): void;
|
|
1069
|
+
(
|
|
1070
|
+
path: PathLike,
|
|
1071
|
+
options:
|
|
1072
|
+
| {
|
|
1073
|
+
encoding: "buffer";
|
|
1074
|
+
withFileTypes?: false | undefined;
|
|
1075
|
+
recursive?: boolean | undefined;
|
|
1076
|
+
}
|
|
1077
|
+
| "buffer",
|
|
1078
|
+
callback: (err: NodeJS.ErrnoException | null, files?: Buffer[]) => void,
|
|
1079
|
+
): void;
|
|
1080
|
+
(
|
|
1081
|
+
path: PathLike,
|
|
1082
|
+
options:
|
|
1083
|
+
| (ObjectEncodingOptions & {
|
|
1084
|
+
withFileTypes?: false | undefined;
|
|
1085
|
+
recursive?: boolean | undefined;
|
|
1086
|
+
})
|
|
1087
|
+
| BufferEncoding
|
|
1088
|
+
| undefined
|
|
1089
|
+
| null,
|
|
1090
|
+
callback: (
|
|
1091
|
+
err: NodeJS.ErrnoException | null,
|
|
1092
|
+
files?: string[] | Buffer[],
|
|
1093
|
+
) => void,
|
|
1094
|
+
): void;
|
|
1095
|
+
(
|
|
1096
|
+
path: PathLike,
|
|
1097
|
+
callback: (err: NodeJS.ErrnoException | null, files?: string[]) => void,
|
|
1098
|
+
): void;
|
|
1099
|
+
(
|
|
1100
|
+
path: PathLike,
|
|
1101
|
+
options: ObjectEncodingOptions & {
|
|
1102
|
+
withFileTypes: true;
|
|
1103
|
+
recursive?: boolean | undefined;
|
|
1104
|
+
},
|
|
1105
|
+
callback: (
|
|
1106
|
+
err: NodeJS.ErrnoException | null,
|
|
1107
|
+
files?: Dirent<string>[],
|
|
1108
|
+
) => void,
|
|
1109
|
+
): void;
|
|
1110
|
+
(
|
|
1111
|
+
path: PathLike,
|
|
1112
|
+
options: {
|
|
1113
|
+
encoding: "buffer";
|
|
1114
|
+
withFileTypes: true;
|
|
1115
|
+
recursive?: boolean | undefined;
|
|
1116
|
+
},
|
|
1117
|
+
callback: (
|
|
1118
|
+
err: NodeJS.ErrnoException | null,
|
|
1119
|
+
files: Dirent<Buffer>[],
|
|
1120
|
+
) => void,
|
|
1121
|
+
): void;
|
|
1122
|
+
};
|
|
1123
|
+
type ReaddirSync = {
|
|
1124
|
+
(
|
|
1125
|
+
path: PathLike,
|
|
1126
|
+
options?:
|
|
1127
|
+
| {
|
|
1128
|
+
encoding: BufferEncoding | null;
|
|
1129
|
+
withFileTypes?: false | undefined;
|
|
1130
|
+
recursive?: boolean | undefined;
|
|
1131
|
+
}
|
|
1132
|
+
| BufferEncoding
|
|
1133
|
+
| null,
|
|
1134
|
+
): string[];
|
|
1135
|
+
(
|
|
1136
|
+
path: PathLike,
|
|
1137
|
+
options:
|
|
1138
|
+
| {
|
|
1139
|
+
encoding: "buffer";
|
|
1140
|
+
withFileTypes?: false | undefined;
|
|
1141
|
+
recursive?: boolean | undefined;
|
|
1142
|
+
}
|
|
1143
|
+
| "buffer",
|
|
1144
|
+
): Buffer[];
|
|
1145
|
+
(
|
|
1146
|
+
path: PathLike,
|
|
1147
|
+
options?:
|
|
1148
|
+
| (ObjectEncodingOptions & {
|
|
1149
|
+
withFileTypes?: false | undefined;
|
|
1150
|
+
recursive?: boolean | undefined;
|
|
1151
|
+
})
|
|
1152
|
+
| BufferEncoding
|
|
1153
|
+
| null,
|
|
1154
|
+
): string[] | Buffer[];
|
|
1155
|
+
(
|
|
1156
|
+
path: PathLike,
|
|
1157
|
+
options: ObjectEncodingOptions & {
|
|
1158
|
+
withFileTypes: true;
|
|
1159
|
+
recursive?: boolean | undefined;
|
|
1160
|
+
},
|
|
1161
|
+
): Dirent[];
|
|
1162
|
+
(
|
|
1163
|
+
path: PathLike,
|
|
1164
|
+
options: {
|
|
1165
|
+
encoding: "buffer";
|
|
1166
|
+
withFileTypes: true;
|
|
1167
|
+
recursive?: boolean | undefined;
|
|
1168
|
+
},
|
|
1169
|
+
): Dirent<Buffer>[];
|
|
1170
|
+
};
|
|
1171
|
+
type ReadJson = (
|
|
1172
|
+
pathOrFileDescription: PathOrFileDescriptor,
|
|
1173
|
+
callback: ReadJsonCallback,
|
|
1174
|
+
) => void;
|
|
1175
|
+
type ReadJsonSync = (pathOrFileDescription: PathOrFileDescriptor) => JsonObject;
|
|
1176
|
+
type Readlink = {
|
|
1177
|
+
(path: PathLike, options: EncodingOption, callback: StringCallback): void;
|
|
1178
|
+
(
|
|
1179
|
+
path: PathLike,
|
|
1180
|
+
options: BufferEncodingOption,
|
|
1181
|
+
callback: BufferCallback,
|
|
1182
|
+
): void;
|
|
1183
|
+
(
|
|
1184
|
+
path: PathLike,
|
|
1185
|
+
options: EncodingOption,
|
|
1186
|
+
callback: StringOrBufferCallback,
|
|
1187
|
+
): void;
|
|
1188
|
+
(path: PathLike, callback: StringCallback): void;
|
|
1189
|
+
};
|
|
1190
|
+
type ReadlinkSync = {
|
|
1191
|
+
(path: PathLike, options?: EncodingOption): string;
|
|
1192
|
+
(path: PathLike, options: BufferEncodingOption): Buffer;
|
|
1193
|
+
(path: PathLike, options?: EncodingOption): string | Buffer;
|
|
1194
|
+
};
|
|
1195
|
+
type LStat = {
|
|
1196
|
+
(path: PathLike, callback: StatsCallback): void;
|
|
1197
|
+
(
|
|
1198
|
+
path: PathLike,
|
|
1199
|
+
options:
|
|
1200
|
+
| (StatOptions & {
|
|
1201
|
+
bigint?: false | undefined;
|
|
1202
|
+
})
|
|
1203
|
+
| undefined,
|
|
1204
|
+
callback: StatsCallback,
|
|
1205
|
+
): void;
|
|
1206
|
+
(
|
|
1207
|
+
path: PathLike,
|
|
1208
|
+
options: StatOptions & {
|
|
1209
|
+
bigint: true;
|
|
1210
|
+
},
|
|
1211
|
+
callback: BigIntStatsCallback,
|
|
1212
|
+
): void;
|
|
1213
|
+
(
|
|
1214
|
+
path: PathLike,
|
|
1215
|
+
options: StatOptions | undefined,
|
|
1216
|
+
callback: StatsOrBigIntStatsCallback,
|
|
1217
|
+
): void;
|
|
1218
|
+
};
|
|
1219
|
+
type LStatSync = {
|
|
1220
|
+
(path: PathLike, options?: undefined): IStats;
|
|
1221
|
+
(
|
|
1222
|
+
path: PathLike,
|
|
1223
|
+
options?: StatSyncOptions & {
|
|
1224
|
+
bigint?: false | undefined;
|
|
1225
|
+
throwIfNoEntry: false;
|
|
1226
|
+
},
|
|
1227
|
+
): IStats | undefined;
|
|
1228
|
+
(
|
|
1229
|
+
path: PathLike,
|
|
1230
|
+
options: StatSyncOptions & {
|
|
1231
|
+
bigint: true;
|
|
1232
|
+
throwIfNoEntry: false;
|
|
1233
|
+
},
|
|
1234
|
+
): IBigIntStats | undefined;
|
|
1235
|
+
(
|
|
1236
|
+
path: PathLike,
|
|
1237
|
+
options?: StatSyncOptions & {
|
|
1238
|
+
bigint?: false | undefined;
|
|
1239
|
+
},
|
|
1240
|
+
): IStats;
|
|
1241
|
+
(
|
|
1242
|
+
path: PathLike,
|
|
1243
|
+
options: StatSyncOptions & {
|
|
1244
|
+
bigint: true;
|
|
1245
|
+
},
|
|
1246
|
+
): IBigIntStats;
|
|
1247
|
+
(
|
|
1248
|
+
path: PathLike,
|
|
1249
|
+
options: StatSyncOptions & {
|
|
1250
|
+
bigint: boolean;
|
|
1251
|
+
throwIfNoEntry?: false | undefined;
|
|
1252
|
+
},
|
|
1253
|
+
): IStats | IBigIntStats;
|
|
1254
|
+
(
|
|
1255
|
+
path: PathLike,
|
|
1256
|
+
options?: StatSyncOptions,
|
|
1257
|
+
): IStats | IBigIntStats | undefined;
|
|
1258
|
+
};
|
|
1259
|
+
type Stat = {
|
|
1260
|
+
(path: PathLike, callback: StatsCallback): void;
|
|
1261
|
+
(
|
|
1262
|
+
path: PathLike,
|
|
1263
|
+
options:
|
|
1264
|
+
| (StatOptions & {
|
|
1265
|
+
bigint?: false | undefined;
|
|
1266
|
+
})
|
|
1267
|
+
| undefined,
|
|
1268
|
+
callback: StatsCallback,
|
|
1269
|
+
): void;
|
|
1270
|
+
(
|
|
1271
|
+
path: PathLike,
|
|
1272
|
+
options: StatOptions & {
|
|
1273
|
+
bigint: true;
|
|
1274
|
+
},
|
|
1275
|
+
callback: BigIntStatsCallback,
|
|
1276
|
+
): void;
|
|
1277
|
+
(
|
|
1278
|
+
path: PathLike,
|
|
1279
|
+
options: StatOptions | undefined,
|
|
1280
|
+
callback: StatsOrBigIntStatsCallback,
|
|
1281
|
+
): void;
|
|
1282
|
+
};
|
|
1283
|
+
type StatSync = {
|
|
1284
|
+
(path: PathLike, options?: undefined): IStats;
|
|
1285
|
+
(
|
|
1286
|
+
path: PathLike,
|
|
1287
|
+
options?: StatSyncOptions & {
|
|
1288
|
+
bigint?: false | undefined;
|
|
1289
|
+
throwIfNoEntry: false;
|
|
1290
|
+
},
|
|
1291
|
+
): IStats | undefined;
|
|
1292
|
+
(
|
|
1293
|
+
path: PathLike,
|
|
1294
|
+
options: StatSyncOptions & {
|
|
1295
|
+
bigint: true;
|
|
1296
|
+
throwIfNoEntry: false;
|
|
1297
|
+
},
|
|
1298
|
+
): IBigIntStats | undefined;
|
|
1299
|
+
(
|
|
1300
|
+
path: PathLike,
|
|
1301
|
+
options?: StatSyncOptions & {
|
|
1302
|
+
bigint?: false | undefined;
|
|
1303
|
+
},
|
|
1304
|
+
): IStats;
|
|
1305
|
+
(
|
|
1306
|
+
path: PathLike,
|
|
1307
|
+
options: StatSyncOptions & {
|
|
1308
|
+
bigint: true;
|
|
1309
|
+
},
|
|
1310
|
+
): IBigIntStats;
|
|
1311
|
+
(
|
|
1312
|
+
path: PathLike,
|
|
1313
|
+
options: StatSyncOptions & {
|
|
1314
|
+
bigint: boolean;
|
|
1315
|
+
throwIfNoEntry?: false | undefined;
|
|
1316
|
+
},
|
|
1317
|
+
): IStats | IBigIntStats;
|
|
1318
|
+
(
|
|
1319
|
+
path: PathLike,
|
|
1320
|
+
options?: StatSyncOptions,
|
|
1321
|
+
): IStats | IBigIntStats | undefined;
|
|
1322
|
+
};
|
|
1323
|
+
type RealPath = {
|
|
1324
|
+
(path: PathLike, options: EncodingOption, callback: StringCallback): void;
|
|
1325
|
+
(
|
|
1326
|
+
path: PathLike,
|
|
1327
|
+
options: BufferEncodingOption,
|
|
1328
|
+
callback: BufferCallback,
|
|
1329
|
+
): void;
|
|
1330
|
+
(
|
|
1331
|
+
path: PathLike,
|
|
1332
|
+
options: EncodingOption,
|
|
1333
|
+
callback: StringOrBufferCallback,
|
|
1334
|
+
): void;
|
|
1335
|
+
(path: PathLike, callback: StringCallback): void;
|
|
1336
|
+
};
|
|
1337
|
+
type RealPathSync = {
|
|
1338
|
+
(path: PathLike, options?: EncodingOption): string;
|
|
1339
|
+
(path: PathLike, options: BufferEncodingOption): Buffer;
|
|
1340
|
+
(path: PathLike, options?: EncodingOption): string | Buffer;
|
|
1341
|
+
};
|
|
1342
|
+
type FileSystem = {
|
|
1343
|
+
/**
|
|
1344
|
+
* read file method
|
|
1345
|
+
*/
|
|
1346
|
+
readFile: ReadFile;
|
|
1347
|
+
/**
|
|
1348
|
+
* readdir method
|
|
1349
|
+
*/
|
|
1350
|
+
readdir: Readdir;
|
|
1351
|
+
/**
|
|
1352
|
+
* read json method
|
|
1353
|
+
*/
|
|
1354
|
+
readJson?: ReadJson | undefined;
|
|
1355
|
+
/**
|
|
1356
|
+
* read link method
|
|
1357
|
+
*/
|
|
1358
|
+
readlink: Readlink;
|
|
1359
|
+
/**
|
|
1360
|
+
* lstat method
|
|
1361
|
+
*/
|
|
1362
|
+
lstat?: LStat | undefined;
|
|
1363
|
+
/**
|
|
1364
|
+
* stat method
|
|
1365
|
+
*/
|
|
1366
|
+
stat: Stat;
|
|
1367
|
+
/**
|
|
1368
|
+
* realpath method
|
|
1369
|
+
*/
|
|
1370
|
+
realpath?: RealPath | undefined;
|
|
1371
|
+
};
|
|
1372
|
+
type SyncFileSystem = {
|
|
1373
|
+
/**
|
|
1374
|
+
* read file sync method
|
|
1375
|
+
*/
|
|
1376
|
+
readFileSync: ReadFileSync;
|
|
1377
|
+
/**
|
|
1378
|
+
* read dir sync method
|
|
1379
|
+
*/
|
|
1380
|
+
readdirSync: ReaddirSync;
|
|
1381
|
+
/**
|
|
1382
|
+
* read json sync method
|
|
1383
|
+
*/
|
|
1384
|
+
readJsonSync?: ReadJsonSync | undefined;
|
|
1385
|
+
/**
|
|
1386
|
+
* read link sync method
|
|
1387
|
+
*/
|
|
1388
|
+
readlinkSync: ReadlinkSync;
|
|
1389
|
+
/**
|
|
1390
|
+
* lstat sync method
|
|
1391
|
+
*/
|
|
1392
|
+
lstatSync?: LStatSync | undefined;
|
|
1393
|
+
/**
|
|
1394
|
+
* stat sync method
|
|
1395
|
+
*/
|
|
1396
|
+
statSync: StatSync;
|
|
1397
|
+
/**
|
|
1398
|
+
* real path sync method
|
|
1399
|
+
*/
|
|
1400
|
+
realpathSync?: RealPathSync | undefined;
|
|
1401
|
+
};
|
|
1402
|
+
type ParsedIdentifier = {
|
|
1403
|
+
/**
|
|
1404
|
+
* request
|
|
1405
|
+
*/
|
|
1406
|
+
request: string;
|
|
1407
|
+
/**
|
|
1408
|
+
* query
|
|
1409
|
+
*/
|
|
1410
|
+
query: string;
|
|
1411
|
+
/**
|
|
1412
|
+
* fragment
|
|
1413
|
+
*/
|
|
1414
|
+
fragment: string;
|
|
1415
|
+
/**
|
|
1416
|
+
* is directory
|
|
1417
|
+
*/
|
|
1418
|
+
directory: boolean;
|
|
1419
|
+
/**
|
|
1420
|
+
* is module
|
|
1421
|
+
*/
|
|
1422
|
+
module: boolean;
|
|
1423
|
+
/**
|
|
1424
|
+
* is file
|
|
1425
|
+
*/
|
|
1426
|
+
file: boolean;
|
|
1427
|
+
/**
|
|
1428
|
+
* is internal
|
|
1429
|
+
*/
|
|
1430
|
+
internal: boolean;
|
|
1431
|
+
};
|
|
1432
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
1433
|
+
type JsonArray = JsonValue[];
|
|
1434
|
+
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
1435
|
+
type JsonObject = { [Key in string]?: JsonValue | undefined };
|
|
1436
|
+
type TsconfigPathsMap = {
|
|
1437
|
+
/**
|
|
1438
|
+
* main tsconfig paths data
|
|
1439
|
+
*/
|
|
1440
|
+
main: TsconfigPathsData;
|
|
1441
|
+
/**
|
|
1442
|
+
* main tsconfig base URL (absolute path)
|
|
1443
|
+
*/
|
|
1444
|
+
mainContext: string;
|
|
1445
|
+
/**
|
|
1446
|
+
* referenced tsconfig paths data mapped by baseUrl
|
|
1447
|
+
*/
|
|
1448
|
+
refs: {
|
|
1449
|
+
[baseUrl: string]: TsconfigPathsData;
|
|
1450
|
+
};
|
|
1451
|
+
/**
|
|
1452
|
+
* all contexts (main + refs) for quick lookup
|
|
1453
|
+
*/
|
|
1454
|
+
allContexts: {
|
|
1455
|
+
[context: string]: TsconfigPathsData;
|
|
1456
|
+
};
|
|
1457
|
+
/**
|
|
1458
|
+
* precomputed `Object.keys(allContexts)` — read-only; used on the `_selectPathsDataForContext` hot path
|
|
1459
|
+
*/
|
|
1460
|
+
contextList: string[];
|
|
1461
|
+
/**
|
|
1462
|
+
* file dependencies
|
|
1463
|
+
*/
|
|
1464
|
+
fileDependencies: Set<string>;
|
|
1465
|
+
};
|
|
1466
|
+
type TsconfigPathsData = {
|
|
1467
|
+
/**
|
|
1468
|
+
* tsconfig file data
|
|
1469
|
+
*/
|
|
1470
|
+
alias: import("./AliasUtils").CompiledAliasOptions;
|
|
1471
|
+
/**
|
|
1472
|
+
* tsconfig file data
|
|
1473
|
+
*/
|
|
1474
|
+
modules: string[];
|
|
1475
|
+
};
|
|
1476
|
+
type BaseResolveRequest = {
|
|
1477
|
+
/**
|
|
1478
|
+
* path
|
|
1479
|
+
*/
|
|
1480
|
+
path: string | false;
|
|
1481
|
+
/**
|
|
1482
|
+
* content
|
|
1483
|
+
*/
|
|
1484
|
+
context?: Context | undefined;
|
|
1485
|
+
/**
|
|
1486
|
+
* description file path
|
|
1487
|
+
*/
|
|
1488
|
+
descriptionFilePath?: string | undefined;
|
|
1489
|
+
/**
|
|
1490
|
+
* description file root
|
|
1491
|
+
*/
|
|
1492
|
+
descriptionFileRoot?: string | undefined;
|
|
1493
|
+
/**
|
|
1494
|
+
* description file data
|
|
1495
|
+
*/
|
|
1496
|
+
descriptionFileData?: JsonObject | undefined;
|
|
1497
|
+
/**
|
|
1498
|
+
* tsconfig paths map
|
|
1499
|
+
*/
|
|
1500
|
+
tsconfigPathsMap?: (TsconfigPathsMap | null | undefined) | undefined;
|
|
1501
|
+
/**
|
|
1502
|
+
* relative path
|
|
1503
|
+
*/
|
|
1504
|
+
relativePath?: string | undefined;
|
|
1505
|
+
/**
|
|
1506
|
+
* true when need to ignore symlinks, otherwise false
|
|
1507
|
+
*/
|
|
1508
|
+
ignoreSymlinks?: boolean | undefined;
|
|
1509
|
+
/**
|
|
1510
|
+
* true when full specified, otherwise false
|
|
1511
|
+
*/
|
|
1512
|
+
fullySpecified?: boolean | undefined;
|
|
1513
|
+
/**
|
|
1514
|
+
* package id the request was resolved to in the package map, to be propagated to resolutions made from the resulting file (`@experimental`, see the `packageMap` option)
|
|
1515
|
+
*/
|
|
1516
|
+
packageId?: string | undefined;
|
|
1517
|
+
/**
|
|
1518
|
+
* inner request for internal usage
|
|
1519
|
+
*/
|
|
1520
|
+
__innerRequest?: string | undefined;
|
|
1521
|
+
/**
|
|
1522
|
+
* inner request for internal usage
|
|
1523
|
+
*/
|
|
1524
|
+
__innerRequest_request?: string | undefined;
|
|
1525
|
+
/**
|
|
1526
|
+
* inner relative path for internal usage
|
|
1527
|
+
*/
|
|
1528
|
+
__innerRequest_relativePath?: string | undefined;
|
|
1529
|
+
/**
|
|
1530
|
+
* internal: shared marker `RestrictionsPlugin` flips when it filters out an existing target, letting `ExportsFieldPlugin` fall back instead of erroring
|
|
1531
|
+
*/
|
|
1532
|
+
__restrictionsMarker?:
|
|
1533
|
+
| {
|
|
1534
|
+
blocked: boolean;
|
|
1535
|
+
}
|
|
1536
|
+
| undefined;
|
|
1537
|
+
};
|
|
1538
|
+
type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>;
|
|
1539
|
+
type WriteOnlySet<T> = {
|
|
1540
|
+
add: (item: T) => void;
|
|
1541
|
+
};
|
|
1542
|
+
type ResolveContextYield = (request: ResolveRequest) => void;
|
|
1543
|
+
import { AsyncSeriesBailHook } from "tapable";
|
|
1544
|
+
import { SyncHook } from "tapable";
|
|
1545
|
+
import { AsyncSeriesHook } from "tapable";
|