vitest-auto-spy 5.68.0 → 5.68.1

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/CHANGELOG.md CHANGED
@@ -10,6 +10,13 @@ The latest released version here must always match the one published on
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [5.68.1] - 2026-11-07
14
+
15
+ ### Fixed
16
+
17
+ - The ESLint plugin reports the release it ships in as `meta.version`. 5.68.0 carried `5.67.0`, so
18
+ ESLint's cache kept results computed by the previous release's rules after an upgrade.
19
+
13
20
  ## [5.68.0] - 2026-11-07
14
21
 
15
22
  ### Added
@@ -446,14 +453,13 @@ for the reactive-node shapes before Angular 20.1.6 / 20.3 the helpers now read.
446
453
  `no-vacuous-absence-assertion` each carried a copy of, and the `matcherOf` walk `no-constant-expect`
447
454
  duplicated — both now shared out of `absence-assertion.ts`.
448
455
 
449
- ## [5.59.1] - 2026-09-30
450
-
451
456
  ## Earlier releases
452
457
 
453
458
  This copy ships with the package and carries the latest 10 releases. Every earlier one is in the
454
459
  [full changelog](https://github.com/ASDAlexey/vitest-auto-spy/blob/master/CHANGELOG.md).
455
460
 
456
- [Unreleased]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.68.0...HEAD
461
+ [Unreleased]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.68.1...HEAD
462
+ [5.68.1]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.68.0...v5.68.1
457
463
  [5.68.0]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.67.0...v5.68.0
458
464
  [5.67.0]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.66.0...v5.67.0
459
465
  [5.66.0]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.65.0...v5.66.0
@@ -463,4 +469,3 @@ This copy ships with the package and carries the latest 10 releases. Every earli
463
469
  [5.62.0]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.61.0...v5.62.0
464
470
  [5.61.0]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.60.0...v5.61.0
465
471
  [5.60.0]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.59.1...v5.60.0
466
- [5.59.1]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.59.0...v5.59.1
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import {a as a$2,b}from'./cli-2RAZK7PT.js';import {a as a$1,b as b$1}from'./cli-CEX3MAIK.js';import {a,h as h$1,m,c as c$1,t}from'./cli-MR3RTLWH.js';import {createRequire}from'node:module';import {join,dirname}from'node:path';var f="5.67.0",R="vitest-auto-spy vitest-auto-spy/bun vitest-auto-spy/bun-angular vitest-auto-spy/node vitest-auto-spy/rstest vitest-auto-spy/rxjs vitest-auto-spy/console vitest-auto-spy/dom-stubs vitest-auto-spy/diagnostics vitest-auto-spy/jasmine vitest-auto-spy/jasmine-compat vitest-auto-spy/observer-spy vitest-auto-spy/angular vitest-auto-spy/angular/diagnostics vitest-auto-spy/angular/doubles vitest-auto-spy/angular/matchers vitest-auto-spy/angular-http vitest-auto-spy/angular-router vitest-auto-spy/signal-forms vitest-auto-spy/nestjs vitest-auto-spy/react vitest-auto-spy/vue vitest-auto-spy/svelte vitest-auto-spy/setup vitest-auto-spy/zone vitest-auto-spy/eslint-plugin vitest-auto-spy/perf-reporter",v={AccessorImplementations:"0 1 2 3 4 12 20 21 22",AccessorKeysOf:"0 1 2 3 4 20 21 22",ActivatedRouteChange:"17",ActivatedRouteDouble:"17",ActivatedRouteInit:"17",AddAccessorsSpies:"0 1 2 3 4 20 21 22",AddCalledWithAny:"0 1 2 3 4 20 21 22",AddCalledWithObservable:"0 1 2 3 4 20 21 22",AddCalledWithPromise:"0 1 2 3 4 20 21 22",AddCalledWithSpyMethods:"0 1 2 3 4 20 21 22",AddObservableSpyMethods:"0 1 2 3 4 5 20 21 22",AddPromiseSpyMethods:"0 1 2 3 4 20 21 22",AddSpyMethodsByReturnTypes:"0 1 2 3 4 20 21 22",AddThrowHelper:"0 1 2 3 4 20 21 22",AddVoidReturnHelpers:"0 1 2 3 4 20 21 22",AdoptedMock:"0 1 2 3 4 20 21 22",adoptMock:"0 1 2 3 4 20 21 22",AdoptMockOptions:"0 1 2 3 4 20 21 22",advanceTimers:"23",AngularDiagnosticsOptions:"13",AngularResourceInlinerOptions:"2",AngularTestEnvMode:"12",AngularTestEnvOptions:"12",AngularTokenProvider:"12",AngularValueProvider:"2 9 12",AnimationFrameMode:"7",AnimationFrameStub:"7",AnimationFrameStubOptions:"7",AnyReturnHelpers:"0 1 2 3 4 20 21 22",ArgCaptor:"0 1 2 3 4 20 21 22",asInstance:"0 1 2 3 4 20 21 22",asInstances:"0 1 2 3 4 20 21 22",AsInstances:"0 1 2 3 4 20 21 22",assertComponentDefIntact:"12",assertMocked:"0 1 2 3 4 20 21 22",AssertMockedOptions:"0 1 2 3 4 20 21 22",assertNgModuleScopes:"12",assertNoPendingRequests:"13",assertNoShadowedProviders:"13",asSpy:"0 1 2 3 4 20 21 22",AttachedComponent:"14",AutoMockConfigMarker:"0 1 2 3 4 20 21 22",AutoMockConfigOnly:"0 1 2 3 4 20 21 22",AutoMockConfiguration:"0 1 2 3 4 20 21 22",autoMocked:"0 1 2 3 4 20 21 22",AutoMocked:"0 1 2 3 4 20 21 22",AutoSpiedInstance:"2 12",AutoSpyDefaultEntry:"0 1 2 3 4 20 21 22",AutoSpyEslintPlugin:"25",AutoSpyFixture:"12",AutoSpyOverride:"12",AutoSpyRxjsTypes:"0 1 2 3 4 20 21 22",AutoSpyTokenDefaults:"12",baselineStrayListeners:"23",BLOCKED_FETCH_MESSAGE:"23",BLOCKED_XHR_MESSAGE:"23",blockNetwork:"23",BlockNetworkOptions:"23",CallbackSubscribable:"0 1 2 3 4 12 20 21 22",CallLog:"0 1 2 3 4 20 21 22",CancelAnimationFrameFn:"7",cancelStrayTimers:"23",captureArg:"0 1 2 3 4 20 21 22",CaptureArgOptions:"0 1 2 3 4 20 21 22",captureGlobalBaseline:"23",captureMockRegistry:"23",ClassListStub:"7",ClassSpyConfiguration:"0 1 2 3 4 9 20 21 22",ClassType:"0 1 2 3 4 9 20 21 22",clearAutoSpy:"0 1 2 3 4 20 21 22",clearAutoSpyDefaults:"0 1 2 3 4 12 20 21 22",collectRouterEvents:"17",compareTestRuns:"8",CompleteValueConfig:"0 1 2 3 4 5 20 21 22",ComponentInputs:"2 12",ComponentStubOptions:"12",ConsoleChannel:"6",consoleDebugSpy:"6",consoleErrorSpy:"6",consoleInfoSpy:"6",ConsoleLine:"6",consoleLines:"6",consoleLogSpy:"6",ConsoleMethodSpy:"6",consoleOutput:"6",ConsoleOutput:"6",ConsoleSpies:"6",consoleTimeEndSpy:"6",consoleTimeSpy:"6",consoleTraceSpy:"6",consoleWarnSpy:"6",ConstructorMock:"0 1 2 3 4 20 21 22",ConstructorSpy:"0 1 2 3 4 20 21 22",copyWindowGlobals:"2",CountingClock:"23",CountingClockOptions:"23",countMockedProps:"0 1 2 3 4 12 20 21 22",countNodeMocks:"3",countStrayListeners:"23",countStrayRejections:"23",countStrayTimers:"23",createActivatedRoute:"17",createAutoMock:"0 1 2 3 4 20 21 22",createChangeDetectorRefDouble:"14",createComponentStub:"12",createDeferred:"0 1 2 3 4 20 21 22",createDirectiveHost:"12",createDocumentDouble:"14",createDomEvent:"7",createDomSanitizerDouble:"14",createDropEvent:"7",createElementStub:"7",createFixture:"0 1 2 3 4 20 21 22",createFixtureFactory:"0 1 2 3 4 20 21 22",createForm:"18",CreateFormOptions:"18",createFunctionSpy:"0 1 2 3 4 9 20 21 22",createGlobalRegistratorRegistrar:"2",createHttpExecutionContext:"19",createInputEvent:"7",createJsdomRegistrar:"2",createLocationDouble:"17",createLog:"0 1 2 3 4 20 21 22",createMatDialogRef:"14",createMock:"0 1 2 3 4 20 21 22",createNestUnit:"1 2 3 19",CreateNestUnitOptions:"1 2 3 19",createObservableWithValues:"5",createOverlayDouble:"14",createPasteEvent:"7",createRouterDouble:"17",createSpyClass:"0 1 2 3 4 20 21 22",createSpyFromClass:"0 1 2 3 4 9 20 21 22",createSpyFromInstance:"0 1 2 3 4 20 21 22",createSpyObj:"9",createWindowDouble:"14",createWindowSpies:"14",createWithAutoSpies:"2 12",CreateWithAutoSpiesOptions:"2 12",DeepMockProxy:"0 1 2 3 4 20 21 22",DeepPartial:"0 1 2 3 4 20 21 22",default:"25 26",Deferred:"0 1 2 3 4 20 21 22",describeDuplicateCopies:"0 1 2 3 4 20 21 22 23",describeStrayListeners:"23",describeStrayTimers:"23",DialogComponent:"14",DialogDataOf:"14",DialogRefLike:"14",DialogResult:"14",diffByField:"8",DirectiveHostOptions:"12",disableAngularDiagnostics:"13",disableTestBedDiagnostics:"13",DocumentPollutionOptions:"23",DocumentPollutionReaction:"23",DomEventInit:"7",DomRegistrar:"2",DuplicateCopiesReaction:"23",ElementConstructor:"2 12",ElementRectRestore:"7",ElementRefPropStub:"14",ElementStub:"7",ElementStubOptions:"7",EmissionObserver:"0 1 2 3 4 12 20 21 22",EmissionOptions:"0 1 2 3 4 12 20 21 22",EmissionSource:"0 1 2 3 4 12 20 21 22",enableAngularDiagnostics:"13",enableJasmineCompat:"9 10",enableTestBedDiagnostics:"13",errorHandler:"0 1 2 3 4 20 21 22",ErrorValueConfig:"0 1 2 3 4 5 20 21 22",expectAllEmissions:"0 1 2 3 4 12 20 21 22",expectCompletion:"0 1 2 3 4 12 20 21 22",ExpectedUnhandledError:"23",expectEmission:"0 1 2 3 4 12 20 21 22",expectEmissions:"0 1 2 3 4 12 20 21 22",expectEmissionsSync:"0 1 2 3 4 12 20 21 22",expectEmissionSync:"0 1 2 3 4 12 20 21 22",expectError:"0 1 2 3 4 12 20 21 22",expectNoEmission:"0 1 2 3 4 12 20 21 22",expectNoEmissionSync:"0 1 2 3 4 12 20 21 22",expectNoRequest:"16",expectRequest:"16",ExpectRequestOptions:"16",expectUnhandledObservableErrors:"23",explainSpy:"8",extendWithAutoSpies:"12",ExtendWithAutoSpiesOptions:"12",FakeTimersConfig:"23",FieldErrorMatch:"18",fillMissingDomApis:"7",FillMissingDomApisOptions:"7",FixtureFactory:"0 1 2 3 4 20 21 22",FlatConfig:"25",flushEffects:"2 12",flushEventLoop:"0 1 2 3 4 20 21 22",flushEventLoopUntil:"0 1 2 3 4 20 21 22",FlushOptions:"16",flushStrayRejections:"23",flushUnhandledObservableErrors:"23",FlushUntilOptions:"0 1 2 3 4 20 21 22",formatSpecTiming:"13",formatTestRunComparison:"8",Func:"0 1 2 3 4 20 21 22",FunctionSpy:"0 1 2 3 4 20 21 22",getMockRegistrySize:"23",getPackageCopies:"0 1 2 3 4 20 21 22 23",getSpyEngine:"23",getTestBedTiming:"13",getWatchedTimerGlobals:"23",GlobalPatchReaction:"23",GlobalRegistratorOptions:"2",guardDocumentPollution:"23",guardGlobalPatches:"23",guardPrototypePollution:"23",guardStrayConsole:"23",hostElement:"2 12",HttpTestingOptions:"16",injectActivatedRoute:"17",injectHttpTesting:"16",InjectionLog:"12 19",injectLocationDouble:"17",injectMatDialogRef:"14",injectOverlayDouble:"14",injectRouterDouble:"17",injectSpy:"2 12 19",inlineAngularResources:"2",innerDouble:"0 1 2 3 4 20 21 22",InputValueEvent:"7",InputValueEventInit:"7",installConsoleSpies:"6",installPerTest:"23",installProxyZonePatch:"24",InstanceSpyConfiguration:"0 1 2 3 4 20 21 22",instrumentTestBed:"13",intersectionEntry:"7",IntersectionEntryOverrides:"7",IntersectionObserverStubOptions:"7",invokeNestParamDecorator:"19",isAngularUnitTestBuilder:"23",jasmine:"9",JasmineAccessorSpies:"9 10",JasmineAccessorSpy:"9 10",JasmineAnd:"9 10",JasmineCallInfo:"9 10",JasmineCalls:"9 10",JasmineClassSpyConfiguration:"9",JasmineClock:"9",JasmineCustomEqualityTester:"9",JasmineCustomMatcher:"9",JasmineCustomMatcherFactories:"9",JasmineCustomMatcherFactory:"9",JasmineCustomMatcherResult:"9",JasmineMatchersUtil:"9",JasmineMethodSpy:"9 10",JasmineNamespaces:"9 10",JasmineSpy:"9 10",JasmineStrategies:"9 10",JasmineWithArgsAnd:"9 10",JasmineWithArgsStrategies:"9 10",JasmineWithArgsSync:"9 10",JsdomModule:"2",JsdomRegistrarOptions:"2",keepMockRegistered:"23",keepRegisteredMocks:"23",LocationDouble:"17",MatDialogRefDouble:"14",MatDialogRefInit:"14",MediaElementState:"7",MediaElementStub:"7",MediaElementStubOptions:"7",MethodReturns:"0 1 2 3 4 20 21 22",MethodReturnsClass:"0 1 2 3 4 20 21 22",MisconfigurationReaction:"23",mockAccessorsProp:"0 1 2 3 4 12 20 21 22",mockConstructor:"0 1 2 3 4 20 21 22",mockDeep:"0 1 2 3 4 20 21 22",MockDeepOptions:"0 1 2 3 4 20 21 22",MockedResource:"12",mockElementRefProp:"14",mockNow:"23",mockReadonlyProp:"0 1 2 3 4 12 20 21 22",mockReadonlyPropGetter:"0 1 2 3 4 12 20 21 22",MockResourceOptions:"12",mockResourceProp:"12",mockSignalProp:"12",mockSignalProps:"12",mockSystemTime:"23",mockValueProp:"0 1 2 3 4 12 20 21 22",moduleNamespace:"0 1 2 3 4 20 21 22",ModuleNamespace:"0 1 2 3 4 20 21 22",ModuleNamespaceOptions:"0 1 2 3 4 20 21 22",Mutable:"0 1 2 3 4 20 21 22",mutationRecord:"7",MutationRecordInit:"7",narrow:"0 1 2 3 4 20 21 22",NativeElementHolder:"2 12",NavigationInit:"17",NestHttpArgumentsHost:"19",NestHttpContextClass:"19",NestHttpExecutionContext:"19",NestHttpExecutionContextOptions:"19",NestModuleRef:"19",NestParamDecoratorMethod:"19",NestUnit:"1 2 3 19",NestUnitClass:"1 2 3 19",NestUnitProvider:"1 2 3 19",NestUnitSpies:"1 2 3 19",NestValueProvider:"19",NextValueConfig:"0 1 2 3 4 5 20 21 22",NotAPublicKey:"0 1 2 3 4 20 21 22",ObservableLike:"0 1 2 3 4 20 21 22",ObservablePropSpyMethods:"0 1 2 3 4 5 20 21 22",ObserverGlobal:"7",ObserverInstance:"7",ObserverSpy:"11",ObserverSpyConfig:"11",ObserverSpyWaitOptions:"11",ObserverStub:"7",ObserverStubOptions:"7",OnlyMethodKeysOf:"0 1 2 3 4 9 20 21 22",OnlyObservablePropsOf:"0 1 2 3 4 9 20 21 22",OnlyPropsOf:"0 1 2 3 4 9 20 21 22",outOfType:"0 1 2 3 4 20 21 22",OutsideHookReaction:"0 1 2 3 4 20 21 22",OverlayDouble:"14",OverlayDoubleInit:"14",OverlayLike:"14",OverlayRefDouble:"14",OverlayRefStub:"14",Overload:"0 1 2 3 4 20 21 22",OverloadChoice:"0 1 2 3 4 20 21 22",Overloads:"0 1 2 3 4 20 21 22",overrideAutoSpy:"12",overrideComponentProvider:"12",PendingRequestsOptions:"13",PerTestHandle:"23",PlatformFlagTokens:"14",PlatformName:"14",PlatformOverrides:"14",PluginRule:"25",PositionCall:"14",PreparedShallow:"2 12",prepareShallow:"2 12",PropStubValue:"0 1 2 3 4 20 21 22",PrototypePollutionReaction:"23",provideActivatedRoute:"17",provideAutoSpy:"2 9 12 19 21",provideAutoSpyForToken:"12",provideChangeDetectorRefDouble:"14",provideDocumentDouble:"14",provideDomSanitizerDouble:"14",provideHttpTesting:"16",provideLocationDouble:"17",provideMatDialogData:"14",provideMatDialogRef:"14",provideOverlayDouble:"14",providePlatform:"14",provideRouterDouble:"17",provideWindowDouble:"14",ProxyZonePatchOptions:"24",ProxyZoneScope:"24",pruneMockRegistry:"23",pruneNodeMocks:"3",queryElement:"2 12",registerAutoSpyDefaults:"0 1 2 3 4 12 20 21 22",registerDirectiveMatchers:"15",registerDomGlobals:"2",RegisterDomGlobalsOptions:"2",registerFocusMatchers:"23",registerFormMatchers:"18",registerJasmineMatchers:"9",registerResourceMatchers:"15",registerSignalMatchers:"15",RegisterSignalMatchersOptions:"15",RejectionHost:"23",removeStrayListeners:"23",renderShallow:"2 12",RenderShallowOptions:"2 12",reportPropsOutsideHooks:"0 1 2 3 4 20 21 22",reportSpecTiming:"13",RequestAnimationFrameFn:"7",RequestErrorOptions:"16",RequestExpectation:"16",RequestMatcher:"16",resetAutoSpy:"0 1 2 3 4 20 21 22",resetConsoleSpies:"6",resetMockRegistryTracking:"23",resizeEntry:"7",ResizeEntryRect:"7",ResourceDouble:"12",ResourceDoubleSnapshot:"12",ResourceDoubleStatus:"12",ResourceLike:"15",ResourceStatusLike:"2 12",ResponseBody:"16",restoreConsole:"6",restoreGlobals:"23",restoreLongLivedImplementations:"23",restoreMockedProps:"0 1 2 3 4 12 20 21 22",RestoreProp:"0 1 2 3 4 12 20 21 22",restoreSpiedInstance:"0 1 2 3 4 20 21 22",restoreStorageSpies:"23",restoreTimerGlobals:"23",restoreWebStorage:"23",RestoreWebStorageOptions:"23",ReturnsClassEntry:"0 1 2 3 4 20 21 22",RouterDouble:"17",RouterDoubleInit:"17",RouteResources:"17",RouterEventPair:"17",RouterEventsHandle:"17",RuleSeverity:"25",RunCounter:"2 12",runEffect:"2 12",SchedulerHost:"23",setEmissionTimeout:"0 1 2 3 4 12 20 21 22",setInputs:"2 12",setSpyEngine:"23",settleDynamicImport:"0 1 2 3 4 20 21 22",settleResource:"2 12",SettleResourceOptions:"2 12",setupAngularTestEnv:"12",setupAutoSpy:"23",SetupAutoSpyOptions:"23",SetupAutoSpyPreset:"23",setupFakeTimers:"23",ShallowOverrides:"2 12",ShallowRender:"2 12",SignalLike:"15",SignalPropHandles:"12",SignalPropValues:"12",SignalValueOptions:"15",SpecTiming:"13",SpiedDomEvent:"7",SpiedFixtures:"12",Spy:"0 1 2 3 4 9 12 20 21 22",SpyClassOptions:"0 1 2 3 4 20 21 22",SpyDisposable:"0 1 2 3 4 20 21 22",SpyEngine:"23",SpyObj:"9",spyOnOwnMethod:"0 1 2 3 4 20 21 22",spyOnVoidMethod:"0 1 2 3 4 20 21 22",SpyOptions:"0 1 2 3 4 20 21 22",SpyRegistry:"2 12",stable:"2 12",StableOptions:"2 12",StopTrackingListeners:"23",StopTrackingNodeMocks:"3",StopTrackingRejections:"23",StopTrackingTimers:"23",StorageSpyKey:"23",StrayConsoleOptions:"23",StrayConsoleReaction:"23",StrayListener:"23",StrayListenerReport:"23",StrayRejection:"23",StrayTimer:"23",StrayTimerReport:"23",StrayTimersOptions:"23",StrictSpyConfiguration:"0 1 2 3 4 20 21 22",stubAbortController:"7",stubAnimationFrame:"7",stubConstructor:"0 1 2 3 4 20 21 22",stubElementRect:"7",stubIntersectionObserver:"7",stubMediaElement:"7",stubMutationObserver:"7",stubObserver:"7",stubResizeObserver:"7",stubResponse:"23",StubResponseInit:"23",stubWebStorage:"7",stubWorker:"7",StyleStub:"7",SubjectLike:"0 1 2 3 4 20 21 22",SubjectOf:"0 1 2 3 4 12 20 21 22",SubscribableLike:"0 1 2 3 4 12 20 21 22",SubscriberSpy:"11",subscribeSpyTo:"11",summarizeTestRun:"8",SwallowedStrictCallsReaction:"23",SyncEmissionOptions:"0 1 2 3 4 12 20 21 22",SystemTime:"23",takeStrictViolations:"23",TestBedDiagnosticsOptions:"13",TestRunComparison:"8",TestRunReport:"8",TestRunSummary:"8",TrackedListenerTarget:"23",TrackedProvider:"12 19",trackEffectRuns:"2 12",trackInjections:"12 19",TrackInjectionsOptions:"12 19",trackMockRegistry:"23",trackNodeMocks:"3",trackRecomputations:"2 12",trackStrayListeners:"23",trackStrayRejections:"23",trackStrayTimers:"23",UnconfiguredReadsReaction:"23",UnhandledObservableError:"23",UnstubbedCall:"0 1 2 3 4 20 21 22",UnstubbedCallHandler:"0 1 2 3 4 20 21 22",UnstubbedRead:"0 1 2 3 4 20 21 22",UnstubbedReadHandler:"0 1 2 3 4 20 21 22",useConsoleSpies:"6",useCountingClock:"23",ValueConfig:"0 1 2 3 4 5 20 21 22",ValueConfigPerCall:"0 1 2 3 4 5 20 21 22",verifyNoPendingRequests:"16",VueInjectionToken:"21",VueProvideSpy:"21",WebStorageKey:"7",WebStorageStub:"7",WebStorageStubOptions:"7",WindowSpies:"14",WindowSpySelection:"14",withFakeTimers:"23",WithMockReturnValue:"0 1 2 3 4 20 21 22",withoutStrayTimerTracking:"23",withOverrides:"0 1 2 3 4 20 21 22",withSystemTime:"23",WorkerInstance:"7",WorkerScript:"7",WorkerStub:"7",WorkerStubOptions:"7",XhrBlockMode:"23"},E="advanceTimers expectAllEmissions expectCompletion expectEmission expectEmissions expectError expectNoEmission flushEventLoop flushEventLoopUntil registerDomGlobals setInputs settleDynamicImport settleResource stable withSystemTime";var p="vitest-auto-spy",M=R.split(" "),x=new Set(E.split(" ")),I=[],h=new Map(Object.entries(v).map(([e,t])=>{let o=new Set(t.split(" ").map(Number));return [e,M.filter((n,r)=>o.has(r))]})),N=new Map(M.map(e=>[e,new Set([...h].filter(([,t])=>t.includes(e)).map(([t])=>t))])),F=/\bimport\s+(?:type\s+)?([\s\w$*,{}]*?)\s*from\s*["'](vitest-auto-spy(?:\/[\w-]+){0,2})["']/g,w=/{([^}]*)}/g,O=" as ";function L(e,t){let o=[];for(let n of h$1(e,w))for(let r of n.split(",")){let i=r.trim().replace(/\s+/g," ").replace(/^type /,""),a=i.indexOf(O);i!==""&&o.push({entry:t,name:a===-1?i:i.slice(0,a),local:a===-1?i:i.slice(a+O.length)});}return o}a(L,"parseClause");function Y(e){let t=a$2(e),o=[];return e.replace(F,(n,r,i,a)=>(b(t,a)||o.push(...L(r,i)),n)),o}a(Y,"findEntryImports");function Z(e){return N.get(e)}a(Z,"entryExports");function $(e){return h.get(e)??I}a($,"ownersOf");function Q(e){return x.has(e)}a(Q,"isAwaitableHelper");function A(e){return h$1(e,/^(\d+)\./g)[0]}a(A,"majorOf");function C(e){let t$1=e===void 0?void 0:m(e),o=t$1===void 0?void 0:c$1(t$1),n=t(o)?o.version:void 0;return t(o)&&typeof n=="string"?{version:n,exports:o.exports}:void 0}a(C,"manifestAt");function W(e){try{return createRequire(join(e,"package.json")).resolve("vitest-auto-spy/package.json")}catch{return}}a(W,"resolvedManifest");function j(e){let t=C(W(e));if(t!==void 0)return t;let o=e;for(;;){let n=C(join(o,"node_modules/vitest-auto-spy/package.json"));if(n!==void 0)return n;let r=dirname(o);if(r===o)return;o=r;}}a(j,"findManifest");var c=new Map;function D(e){return c.has(e)||c.set(e,j(e)),c.get(e)}a(D,"installedManifest");function H(e){return D(e)?.version}a(H,"installedVersion");function ee(e){let t$1=D(e)?.exports;if(typeof t$1=="string")return new Set([p]);if(t(t$1))return new Set(Object.keys(t$1).map(o=>o==="."?p:`${p}${o.slice(1)}`))}a(ee,"installedEntries");function J(e,t=V()){let o=H(e),n=o===void 0?void 0:A(o);return n===void 0||n===A(t)}a(J,"tableApplies");function V(e=a$1){let t=e();return t===void 0?f:b$1(t)}a(V,"tableVersion");function te(e,t){if(!J(e.cwd))return;let o=[],n=a(r=>{o.push(r);},"report");return {visit:a((r,i)=>t(r,i,n),"visit"),finish:a(()=>o,"finish")}}a(te,"sourcesPass");export{Y as a,Z as b,$ as c,Q as d,ee as e,te as f};
2
+ import {a as a$2,b}from'./cli-2RAZK7PT.js';import {a as a$1,b as b$1}from'./cli-CEX3MAIK.js';import {a,h as h$1,m,c as c$1,t}from'./cli-MR3RTLWH.js';import {createRequire}from'node:module';import {join,dirname}from'node:path';var f="5.68.1",R="vitest-auto-spy vitest-auto-spy/bun vitest-auto-spy/bun-angular vitest-auto-spy/node vitest-auto-spy/rstest vitest-auto-spy/rxjs vitest-auto-spy/console vitest-auto-spy/dom-stubs vitest-auto-spy/diagnostics vitest-auto-spy/jasmine vitest-auto-spy/jasmine-compat vitest-auto-spy/observer-spy vitest-auto-spy/angular vitest-auto-spy/angular/diagnostics vitest-auto-spy/angular/doubles vitest-auto-spy/angular/matchers vitest-auto-spy/angular-http vitest-auto-spy/angular-router vitest-auto-spy/signal-forms vitest-auto-spy/nestjs vitest-auto-spy/react vitest-auto-spy/vue vitest-auto-spy/svelte vitest-auto-spy/setup vitest-auto-spy/zone vitest-auto-spy/eslint-plugin vitest-auto-spy/perf-reporter",v={AccessorImplementations:"0 1 2 3 4 12 20 21 22",AccessorKeysOf:"0 1 2 3 4 20 21 22",ActivatedRouteChange:"17",ActivatedRouteDouble:"17",ActivatedRouteInit:"17",AddAccessorsSpies:"0 1 2 3 4 20 21 22",AddCalledWithAny:"0 1 2 3 4 20 21 22",AddCalledWithObservable:"0 1 2 3 4 20 21 22",AddCalledWithPromise:"0 1 2 3 4 20 21 22",AddCalledWithSpyMethods:"0 1 2 3 4 20 21 22",AddObservableSpyMethods:"0 1 2 3 4 5 20 21 22",AddPromiseSpyMethods:"0 1 2 3 4 20 21 22",AddSpyMethodsByReturnTypes:"0 1 2 3 4 20 21 22",AddThrowHelper:"0 1 2 3 4 20 21 22",AddVoidReturnHelpers:"0 1 2 3 4 20 21 22",AdoptedMock:"0 1 2 3 4 20 21 22",adoptMock:"0 1 2 3 4 20 21 22",AdoptMockOptions:"0 1 2 3 4 20 21 22",advanceTimers:"23",AngularDiagnosticsOptions:"13",AngularResourceInlinerOptions:"2",AngularTestEnvMode:"12",AngularTestEnvOptions:"12",AngularTokenProvider:"12",AngularValueProvider:"2 9 12",AnimationFrameMode:"7",AnimationFrameStub:"7",AnimationFrameStubOptions:"7",AnyReturnHelpers:"0 1 2 3 4 20 21 22",ArgCaptor:"0 1 2 3 4 20 21 22",asInstance:"0 1 2 3 4 20 21 22",asInstances:"0 1 2 3 4 20 21 22",AsInstances:"0 1 2 3 4 20 21 22",assertComponentDefIntact:"12",assertMocked:"0 1 2 3 4 20 21 22",AssertMockedOptions:"0 1 2 3 4 20 21 22",assertNgModuleScopes:"12",assertNoPendingRequests:"13",assertNoShadowedProviders:"13",asSpy:"0 1 2 3 4 20 21 22",AttachedComponent:"14",AutoMockConfigMarker:"0 1 2 3 4 20 21 22",AutoMockConfigOnly:"0 1 2 3 4 20 21 22",AutoMockConfiguration:"0 1 2 3 4 20 21 22",autoMocked:"0 1 2 3 4 20 21 22",AutoMocked:"0 1 2 3 4 20 21 22",AutoSpiedInstance:"2 12",AutoSpyDefaultEntry:"0 1 2 3 4 20 21 22",AutoSpyEslintPlugin:"25",AutoSpyFixture:"12",AutoSpyOverride:"12",AutoSpyRxjsTypes:"0 1 2 3 4 20 21 22",AutoSpyTokenDefaults:"12",baselineStrayListeners:"23",BLOCKED_FETCH_MESSAGE:"23",BLOCKED_XHR_MESSAGE:"23",blockNetwork:"23",BlockNetworkOptions:"23",CallbackSubscribable:"0 1 2 3 4 12 20 21 22",CallLog:"0 1 2 3 4 20 21 22",CancelAnimationFrameFn:"7",cancelStrayTimers:"23",captureArg:"0 1 2 3 4 20 21 22",CaptureArgOptions:"0 1 2 3 4 20 21 22",captureGlobalBaseline:"23",captureMockRegistry:"23",ClassListStub:"7",ClassSpyConfiguration:"0 1 2 3 4 9 20 21 22",ClassType:"0 1 2 3 4 9 20 21 22",clearAutoSpy:"0 1 2 3 4 20 21 22",clearAutoSpyDefaults:"0 1 2 3 4 12 20 21 22",collectRouterEvents:"17",compareTestRuns:"8",CompleteValueConfig:"0 1 2 3 4 5 20 21 22",ComponentInputs:"2 12",ComponentStubOptions:"12",ConsoleChannel:"6",consoleDebugSpy:"6",consoleErrorSpy:"6",consoleInfoSpy:"6",ConsoleLine:"6",consoleLines:"6",consoleLogSpy:"6",ConsoleMethodSpy:"6",consoleOutput:"6",ConsoleOutput:"6",ConsoleSpies:"6",consoleTimeEndSpy:"6",consoleTimeSpy:"6",consoleTraceSpy:"6",consoleWarnSpy:"6",ConstructorMock:"0 1 2 3 4 20 21 22",ConstructorSpy:"0 1 2 3 4 20 21 22",copyWindowGlobals:"2",CountingClock:"23",CountingClockOptions:"23",countMockedProps:"0 1 2 3 4 12 20 21 22",countNodeMocks:"3",countStrayListeners:"23",countStrayRejections:"23",countStrayTimers:"23",createActivatedRoute:"17",createAutoMock:"0 1 2 3 4 20 21 22",createChangeDetectorRefDouble:"14",createComponentStub:"12",createDeferred:"0 1 2 3 4 20 21 22",createDirectiveHost:"12",createDocumentDouble:"14",createDomEvent:"7",createDomSanitizerDouble:"14",createDropEvent:"7",createElementStub:"7",createFixture:"0 1 2 3 4 20 21 22",createFixtureFactory:"0 1 2 3 4 20 21 22",createForm:"18",CreateFormOptions:"18",createFunctionSpy:"0 1 2 3 4 9 20 21 22",createGlobalRegistratorRegistrar:"2",createHttpExecutionContext:"19",createInputEvent:"7",createJsdomRegistrar:"2",createLocationDouble:"17",createLog:"0 1 2 3 4 20 21 22",createMatDialogRef:"14",createMock:"0 1 2 3 4 20 21 22",createNestUnit:"1 2 3 19",CreateNestUnitOptions:"1 2 3 19",createObservableWithValues:"5",createOverlayDouble:"14",createPasteEvent:"7",createRouterDouble:"17",createSpyClass:"0 1 2 3 4 20 21 22",createSpyFromClass:"0 1 2 3 4 9 20 21 22",createSpyFromInstance:"0 1 2 3 4 20 21 22",createSpyObj:"9",createWindowDouble:"14",createWindowSpies:"14",createWithAutoSpies:"2 12",CreateWithAutoSpiesOptions:"2 12",DeepMockProxy:"0 1 2 3 4 20 21 22",DeepPartial:"0 1 2 3 4 20 21 22",default:"25 26",Deferred:"0 1 2 3 4 20 21 22",describeDuplicateCopies:"0 1 2 3 4 20 21 22 23",describeStrayListeners:"23",describeStrayTimers:"23",DialogComponent:"14",DialogDataOf:"14",DialogRefLike:"14",DialogResult:"14",diffByField:"8",DirectiveHostOptions:"12",disableAngularDiagnostics:"13",disableTestBedDiagnostics:"13",DocumentPollutionOptions:"23",DocumentPollutionReaction:"23",DomEventInit:"7",DomRegistrar:"2",DuplicateCopiesReaction:"23",ElementConstructor:"2 12",ElementRectRestore:"7",ElementRefPropStub:"14",ElementStub:"7",ElementStubOptions:"7",EmissionObserver:"0 1 2 3 4 12 20 21 22",EmissionOptions:"0 1 2 3 4 12 20 21 22",EmissionSource:"0 1 2 3 4 12 20 21 22",enableAngularDiagnostics:"13",enableJasmineCompat:"9 10",enableTestBedDiagnostics:"13",errorHandler:"0 1 2 3 4 20 21 22",ErrorValueConfig:"0 1 2 3 4 5 20 21 22",expectAllEmissions:"0 1 2 3 4 12 20 21 22",expectCompletion:"0 1 2 3 4 12 20 21 22",ExpectedUnhandledError:"23",expectEmission:"0 1 2 3 4 12 20 21 22",expectEmissions:"0 1 2 3 4 12 20 21 22",expectEmissionsSync:"0 1 2 3 4 12 20 21 22",expectEmissionSync:"0 1 2 3 4 12 20 21 22",expectError:"0 1 2 3 4 12 20 21 22",expectNoEmission:"0 1 2 3 4 12 20 21 22",expectNoEmissionSync:"0 1 2 3 4 12 20 21 22",expectNoRequest:"16",expectRequest:"16",ExpectRequestOptions:"16",expectUnhandledObservableErrors:"23",explainSpy:"8",extendWithAutoSpies:"12",ExtendWithAutoSpiesOptions:"12",FakeTimersConfig:"23",FieldErrorMatch:"18",fillMissingDomApis:"7",FillMissingDomApisOptions:"7",FixtureFactory:"0 1 2 3 4 20 21 22",FlatConfig:"25",flushEffects:"2 12",flushEventLoop:"0 1 2 3 4 20 21 22",flushEventLoopUntil:"0 1 2 3 4 20 21 22",FlushOptions:"16",flushStrayRejections:"23",flushUnhandledObservableErrors:"23",FlushUntilOptions:"0 1 2 3 4 20 21 22",formatSpecTiming:"13",formatTestRunComparison:"8",Func:"0 1 2 3 4 20 21 22",FunctionSpy:"0 1 2 3 4 20 21 22",getMockRegistrySize:"23",getPackageCopies:"0 1 2 3 4 20 21 22 23",getSpyEngine:"23",getTestBedTiming:"13",getWatchedTimerGlobals:"23",GlobalPatchReaction:"23",GlobalRegistratorOptions:"2",guardDocumentPollution:"23",guardGlobalPatches:"23",guardPrototypePollution:"23",guardStrayConsole:"23",hostElement:"2 12",HttpTestingOptions:"16",injectActivatedRoute:"17",injectHttpTesting:"16",InjectionLog:"12 19",injectLocationDouble:"17",injectMatDialogRef:"14",injectOverlayDouble:"14",injectRouterDouble:"17",injectSpy:"2 12 19",inlineAngularResources:"2",innerDouble:"0 1 2 3 4 20 21 22",InputValueEvent:"7",InputValueEventInit:"7",installConsoleSpies:"6",installPerTest:"23",installProxyZonePatch:"24",InstanceSpyConfiguration:"0 1 2 3 4 20 21 22",instrumentTestBed:"13",intersectionEntry:"7",IntersectionEntryOverrides:"7",IntersectionObserverStubOptions:"7",invokeNestParamDecorator:"19",isAngularUnitTestBuilder:"23",jasmine:"9",JasmineAccessorSpies:"9 10",JasmineAccessorSpy:"9 10",JasmineAnd:"9 10",JasmineCallInfo:"9 10",JasmineCalls:"9 10",JasmineClassSpyConfiguration:"9",JasmineClock:"9",JasmineCustomEqualityTester:"9",JasmineCustomMatcher:"9",JasmineCustomMatcherFactories:"9",JasmineCustomMatcherFactory:"9",JasmineCustomMatcherResult:"9",JasmineMatchersUtil:"9",JasmineMethodSpy:"9 10",JasmineNamespaces:"9 10",JasmineSpy:"9 10",JasmineStrategies:"9 10",JasmineWithArgsAnd:"9 10",JasmineWithArgsStrategies:"9 10",JasmineWithArgsSync:"9 10",JsdomModule:"2",JsdomRegistrarOptions:"2",keepMockRegistered:"23",keepRegisteredMocks:"23",LocationDouble:"17",MatDialogRefDouble:"14",MatDialogRefInit:"14",MediaElementState:"7",MediaElementStub:"7",MediaElementStubOptions:"7",MethodReturns:"0 1 2 3 4 20 21 22",MethodReturnsClass:"0 1 2 3 4 20 21 22",MisconfigurationReaction:"23",mockAccessorsProp:"0 1 2 3 4 12 20 21 22",mockConstructor:"0 1 2 3 4 20 21 22",mockDeep:"0 1 2 3 4 20 21 22",MockDeepOptions:"0 1 2 3 4 20 21 22",MockedResource:"12",mockElementRefProp:"14",mockNow:"23",mockReadonlyProp:"0 1 2 3 4 12 20 21 22",mockReadonlyPropGetter:"0 1 2 3 4 12 20 21 22",MockResourceOptions:"12",mockResourceProp:"12",mockSignalProp:"12",mockSignalProps:"12",mockSystemTime:"23",mockValueProp:"0 1 2 3 4 12 20 21 22",moduleNamespace:"0 1 2 3 4 20 21 22",ModuleNamespace:"0 1 2 3 4 20 21 22",ModuleNamespaceOptions:"0 1 2 3 4 20 21 22",Mutable:"0 1 2 3 4 20 21 22",mutationRecord:"7",MutationRecordInit:"7",narrow:"0 1 2 3 4 20 21 22",NativeElementHolder:"2 12",NavigationInit:"17",NestHttpArgumentsHost:"19",NestHttpContextClass:"19",NestHttpExecutionContext:"19",NestHttpExecutionContextOptions:"19",NestModuleRef:"19",NestParamDecoratorMethod:"19",NestUnit:"1 2 3 19",NestUnitClass:"1 2 3 19",NestUnitProvider:"1 2 3 19",NestUnitSpies:"1 2 3 19",NestValueProvider:"19",NextValueConfig:"0 1 2 3 4 5 20 21 22",NotAPublicKey:"0 1 2 3 4 20 21 22",ObservableLike:"0 1 2 3 4 20 21 22",ObservablePropSpyMethods:"0 1 2 3 4 5 20 21 22",ObserverGlobal:"7",ObserverInstance:"7",ObserverSpy:"11",ObserverSpyConfig:"11",ObserverSpyWaitOptions:"11",ObserverStub:"7",ObserverStubOptions:"7",OnlyMethodKeysOf:"0 1 2 3 4 9 20 21 22",OnlyObservablePropsOf:"0 1 2 3 4 9 20 21 22",OnlyPropsOf:"0 1 2 3 4 9 20 21 22",outOfType:"0 1 2 3 4 20 21 22",OutsideHookReaction:"0 1 2 3 4 20 21 22",OverlayDouble:"14",OverlayDoubleInit:"14",OverlayLike:"14",OverlayRefDouble:"14",OverlayRefStub:"14",Overload:"0 1 2 3 4 20 21 22",OverloadChoice:"0 1 2 3 4 20 21 22",Overloads:"0 1 2 3 4 20 21 22",overrideAutoSpy:"12",overrideComponentProvider:"12",PendingRequestsOptions:"13",PerTestHandle:"23",PlatformFlagTokens:"14",PlatformName:"14",PlatformOverrides:"14",PluginRule:"25",PositionCall:"14",PreparedShallow:"2 12",prepareShallow:"2 12",PropStubValue:"0 1 2 3 4 20 21 22",PrototypePollutionReaction:"23",provideActivatedRoute:"17",provideAutoSpy:"2 9 12 19 21",provideAutoSpyForToken:"12",provideChangeDetectorRefDouble:"14",provideDocumentDouble:"14",provideDomSanitizerDouble:"14",provideHttpTesting:"16",provideLocationDouble:"17",provideMatDialogData:"14",provideMatDialogRef:"14",provideOverlayDouble:"14",providePlatform:"14",provideRouterDouble:"17",provideWindowDouble:"14",ProxyZonePatchOptions:"24",ProxyZoneScope:"24",pruneMockRegistry:"23",pruneNodeMocks:"3",queryElement:"2 12",registerAutoSpyDefaults:"0 1 2 3 4 12 20 21 22",registerDirectiveMatchers:"15",registerDomGlobals:"2",RegisterDomGlobalsOptions:"2",registerFocusMatchers:"23",registerFormMatchers:"18",registerJasmineMatchers:"9",registerResourceMatchers:"15",registerSignalMatchers:"15",RegisterSignalMatchersOptions:"15",RejectionHost:"23",removeStrayListeners:"23",renderShallow:"2 12",RenderShallowOptions:"2 12",reportPropsOutsideHooks:"0 1 2 3 4 20 21 22",reportSpecTiming:"13",RequestAnimationFrameFn:"7",RequestErrorOptions:"16",RequestExpectation:"16",RequestMatcher:"16",resetAutoSpy:"0 1 2 3 4 20 21 22",resetConsoleSpies:"6",resetMockRegistryTracking:"23",resizeEntry:"7",ResizeEntryRect:"7",ResourceDouble:"12",ResourceDoubleSnapshot:"12",ResourceDoubleStatus:"12",ResourceLike:"15",ResourceStatusLike:"2 12",ResponseBody:"16",restoreConsole:"6",restoreGlobals:"23",restoreLongLivedImplementations:"23",restoreMockedProps:"0 1 2 3 4 12 20 21 22",RestoreProp:"0 1 2 3 4 12 20 21 22",restoreSpiedInstance:"0 1 2 3 4 20 21 22",restoreStorageSpies:"23",restoreTimerGlobals:"23",restoreWebStorage:"23",RestoreWebStorageOptions:"23",ReturnsClassEntry:"0 1 2 3 4 20 21 22",RouterDouble:"17",RouterDoubleInit:"17",RouteResources:"17",RouterEventPair:"17",RouterEventsHandle:"17",RuleSeverity:"25",RunCounter:"2 12",runEffect:"2 12",SchedulerHost:"23",setEmissionTimeout:"0 1 2 3 4 12 20 21 22",setInputs:"2 12",setSpyEngine:"23",settleDynamicImport:"0 1 2 3 4 20 21 22",settleResource:"2 12",SettleResourceOptions:"2 12",setupAngularTestEnv:"12",setupAutoSpy:"23",SetupAutoSpyOptions:"23",SetupAutoSpyPreset:"23",setupFakeTimers:"23",ShallowOverrides:"2 12",ShallowRender:"2 12",SignalLike:"15",SignalPropHandles:"12",SignalPropValues:"12",SignalValueOptions:"15",SpecTiming:"13",SpiedDomEvent:"7",SpiedFixtures:"12",Spy:"0 1 2 3 4 9 12 20 21 22",SpyClassOptions:"0 1 2 3 4 20 21 22",SpyDisposable:"0 1 2 3 4 20 21 22",SpyEngine:"23",SpyObj:"9",spyOnOwnMethod:"0 1 2 3 4 20 21 22",spyOnVoidMethod:"0 1 2 3 4 20 21 22",SpyOptions:"0 1 2 3 4 20 21 22",SpyRegistry:"2 12",stable:"2 12",StableOptions:"2 12",StopTrackingListeners:"23",StopTrackingNodeMocks:"3",StopTrackingRejections:"23",StopTrackingTimers:"23",StorageSpyKey:"23",StrayConsoleOptions:"23",StrayConsoleReaction:"23",StrayListener:"23",StrayListenerReport:"23",StrayRejection:"23",StrayTimer:"23",StrayTimerReport:"23",StrayTimersOptions:"23",StrictSpyConfiguration:"0 1 2 3 4 20 21 22",stubAbortController:"7",stubAnimationFrame:"7",stubConstructor:"0 1 2 3 4 20 21 22",stubElementRect:"7",stubIntersectionObserver:"7",stubMediaElement:"7",stubMutationObserver:"7",stubObserver:"7",stubResizeObserver:"7",stubResponse:"23",StubResponseInit:"23",stubWebStorage:"7",stubWorker:"7",StyleStub:"7",SubjectLike:"0 1 2 3 4 20 21 22",SubjectOf:"0 1 2 3 4 12 20 21 22",SubscribableLike:"0 1 2 3 4 12 20 21 22",SubscriberSpy:"11",subscribeSpyTo:"11",summarizeTestRun:"8",SwallowedStrictCallsReaction:"23",SyncEmissionOptions:"0 1 2 3 4 12 20 21 22",SystemTime:"23",takeStrictViolations:"23",TestBedDiagnosticsOptions:"13",TestRunComparison:"8",TestRunReport:"8",TestRunSummary:"8",TrackedListenerTarget:"23",TrackedProvider:"12 19",trackEffectRuns:"2 12",trackInjections:"12 19",TrackInjectionsOptions:"12 19",trackMockRegistry:"23",trackNodeMocks:"3",trackRecomputations:"2 12",trackStrayListeners:"23",trackStrayRejections:"23",trackStrayTimers:"23",UnconfiguredReadsReaction:"23",UnhandledObservableError:"23",UnstubbedCall:"0 1 2 3 4 20 21 22",UnstubbedCallHandler:"0 1 2 3 4 20 21 22",UnstubbedRead:"0 1 2 3 4 20 21 22",UnstubbedReadHandler:"0 1 2 3 4 20 21 22",useConsoleSpies:"6",useCountingClock:"23",ValueConfig:"0 1 2 3 4 5 20 21 22",ValueConfigPerCall:"0 1 2 3 4 5 20 21 22",verifyNoPendingRequests:"16",VueInjectionToken:"21",VueProvideSpy:"21",WebStorageKey:"7",WebStorageStub:"7",WebStorageStubOptions:"7",WindowSpies:"14",WindowSpySelection:"14",withFakeTimers:"23",WithMockReturnValue:"0 1 2 3 4 20 21 22",withoutStrayTimerTracking:"23",withOverrides:"0 1 2 3 4 20 21 22",withSystemTime:"23",WorkerInstance:"7",WorkerScript:"7",WorkerStub:"7",WorkerStubOptions:"7",XhrBlockMode:"23"},E="advanceTimers expectAllEmissions expectCompletion expectEmission expectEmissions expectError expectNoEmission flushEventLoop flushEventLoopUntil registerDomGlobals setInputs settleDynamicImport settleResource stable withSystemTime";var p="vitest-auto-spy",M=R.split(" "),x=new Set(E.split(" ")),I=[],h=new Map(Object.entries(v).map(([e,t])=>{let o=new Set(t.split(" ").map(Number));return [e,M.filter((n,r)=>o.has(r))]})),N=new Map(M.map(e=>[e,new Set([...h].filter(([,t])=>t.includes(e)).map(([t])=>t))])),F=/\bimport\s+(?:type\s+)?([\s\w$*,{}]*?)\s*from\s*["'](vitest-auto-spy(?:\/[\w-]+){0,2})["']/g,w=/{([^}]*)}/g,O=" as ";function L(e,t){let o=[];for(let n of h$1(e,w))for(let r of n.split(",")){let i=r.trim().replace(/\s+/g," ").replace(/^type /,""),a=i.indexOf(O);i!==""&&o.push({entry:t,name:a===-1?i:i.slice(0,a),local:a===-1?i:i.slice(a+O.length)});}return o}a(L,"parseClause");function Y(e){let t=a$2(e),o=[];return e.replace(F,(n,r,i,a)=>(b(t,a)||o.push(...L(r,i)),n)),o}a(Y,"findEntryImports");function Z(e){return N.get(e)}a(Z,"entryExports");function $(e){return h.get(e)??I}a($,"ownersOf");function Q(e){return x.has(e)}a(Q,"isAwaitableHelper");function A(e){return h$1(e,/^(\d+)\./g)[0]}a(A,"majorOf");function C(e){let t$1=e===void 0?void 0:m(e),o=t$1===void 0?void 0:c$1(t$1),n=t(o)?o.version:void 0;return t(o)&&typeof n=="string"?{version:n,exports:o.exports}:void 0}a(C,"manifestAt");function W(e){try{return createRequire(join(e,"package.json")).resolve("vitest-auto-spy/package.json")}catch{return}}a(W,"resolvedManifest");function j(e){let t=C(W(e));if(t!==void 0)return t;let o=e;for(;;){let n=C(join(o,"node_modules/vitest-auto-spy/package.json"));if(n!==void 0)return n;let r=dirname(o);if(r===o)return;o=r;}}a(j,"findManifest");var c=new Map;function D(e){return c.has(e)||c.set(e,j(e)),c.get(e)}a(D,"installedManifest");function H(e){return D(e)?.version}a(H,"installedVersion");function ee(e){let t$1=D(e)?.exports;if(typeof t$1=="string")return new Set([p]);if(t(t$1))return new Set(Object.keys(t$1).map(o=>o==="."?p:`${p}${o.slice(1)}`))}a(ee,"installedEntries");function J(e,t=V()){let o=H(e),n=o===void 0?void 0:A(o);return n===void 0||n===A(t)}a(J,"tableApplies");function V(e=a$1){let t=e();return t===void 0?f:b$1(t)}a(V,"tableVersion");function te(e,t){if(!J(e.cwd))return;let o=[],n=a(r=>{o.push(r);},"report");return {visit:a((r,i)=>t(r,i,n),"visit"),finish:a(()=>o,"finish")}}a(te,"sourcesPass");export{Y as a,Z as b,$ as c,Q as d,ee as e,te as f};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import {a as a$2}from'./cli-KG2RCNLP.js';import {b as b$2,c,a as a$1}from'./cli-KAVWSADU.js';import {g as g$1}from'./cli-LLUOKL65.js';import'./cli-2RAZK7PT.js';import {d}from'./cli-CEX3MAIK.js';import {b as b$1}from'./cli-77OHOFJE.js';import {a,k as k$1,n,l as l$1,q as q$1,o,p as p$1}from'./cli-MR3RTLWH.js';import {join,dirname}from'node:path';import {spawnSync}from'node:child_process';import {createHash}from'node:crypto';function B(e,t){if(t.length===0)return new Set;let n=spawnSync("git",["check-ignore","--",...t],{cwd:e,encoding:"utf8"});return new Set(n.status===0?n.stdout.split(`
2
+ import {a as a$2}from'./cli-KG2RCNLP.js';import {b as b$2,c,a as a$1}from'./cli-5TEHB76W.js';import {g as g$1}from'./cli-LLUOKL65.js';import'./cli-2RAZK7PT.js';import {d}from'./cli-CEX3MAIK.js';import {b as b$1}from'./cli-77OHOFJE.js';import {a,k as k$1,n,l as l$1,q as q$1,o,p as p$1}from'./cli-MR3RTLWH.js';import {join,dirname}from'node:path';import {spawnSync}from'node:child_process';import {createHash}from'node:crypto';function B(e,t){if(t.length===0)return new Set;let n=spawnSync("git",["check-ignore","--",...t],{cwd:e,encoding:"utf8"});return new Set(n.status===0?n.stdout.split(`
3
3
  `).filter(r=>r!==""):[])}a(B,"ignoredByGit");var D=/<!-- vitest-auto-spy:begin[^>]*-->/,f="<!-- vitest-auto-spy:end -->";function G(e){return createHash("sha256").update(e).digest("hex").slice(0,8)}a(G,"digest");var ne={angular:"- `provideAutoSpy(Class)` in the TestBed providers, `injectSpy(Class)` to read the spy back. Both live on the\n adapter entry, not on the package root.",nestjs:"- `provideAutoSpy(Class)` in the testing module providers; read the spy back with `moduleRef.get(Class)`.",react:"- `createAutoMock<T>()` for a hook or context value; `renderShallow` when a child component only needs to exist.",vue:"- `createAutoMock<T>()` for a store or composable; a Pinia store is mocked by type, not by class.",svelte:"- `createAutoMock<T>()` for a store or a module contract; a spy over a writable store keeps its `subscribe`.",none:"- `createSpyFromClass(Class)` for a real class, `createAutoMock<T>()` when only the type exists."},re={companions:[]};function ie(e,t){return e.hasRxjs?`- Observable spies (\`nextWith\`, \`observablePropsToSpyOn\`) need \`import 'vitest-auto-spy/rxjs'\` once, in
4
4
  \`${t.setupFile??e.setupFiles[0]??"the test setup file"}\` or a module / \`.d.ts\` it loads. Without it they throw "Observable spies require rxjs".`:void 0}a(ie,"rxjsBullet");function oe(e){return e.companions.length===0?void 0:`- Setup helpers also come from ${e.companions.map(n=>`\`${n}\``).join(", ")}, separate entries since
5
5
  5.21.0 that do not re-export the core.`}a(oe,"companionsBullet");function L(e,t=re){return ["## Tests that use `vitest-auto-spy`","","For a spec that uses `vitest-auto-spy`, read the short map","`node_modules/vitest-auto-spy/AGENTS.md` whole, then only the `agent-docs/*.md` files it names.","On a failure: `grep -n -F '<error text>' node_modules/vitest-auto-spy/agent-docs/errors.md`.","Where docs and code disagree, `dist/*.d.ts` wins.","",`- This repository imports from \`${e.entry}\`. Each entry registers its mock adapter on`," import, so the wrong one leaves the wrong adapter installed and the spies fail at runtime.",ne[e.framework],oe(t),ie(e,t),"- `methodsToSpyOn` **adds** to the auto-discovered prototype methods; the exhaustive whitelist is"," `onlyMethodsToSpyOn`. For methods on the instance, not the prototype, use `createAutoMock<T>()`.","- `Spy<T>` is a mapped type and drops `#private` members, so it is not assignable to `T`. Declare"," the variable as `Spy<T>`, or pass `asInstance(spy)` where the real type is required.","- `npx vitest-auto-spy doctor` reports suite-level defects that never fail a run."].filter(r=>r!==void 0).join(`
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import {e as e$1,c as c$2,f as f$1,a as a$3,b as b$3,d as d$3}from'./cli-KAVWSADU.js';import {b as b$4,a as a$4,f as f$4}from'./cli-P76X2CLG.js';import {d as d$5,f as f$3,k as k$1,g as g$2,i,j as j$1,l}from'./cli-EH6SQSRG.js';import {n,h as h$2,m as m$1,k,j as j$2,f as f$5,b as b$5,l as l$1}from'./cli-45YUTGOS.js';import {e,f,d as d$1,b as b$2,g as g$1,h as h$1}from'./cli-LLUOKL65.js';import {r,s,E,F,D as D$1,A,v,x,z as z$1,J as J$1,H,I,G,C,B,t as t$1,u,w,y}from'./cli-3IP2U4X3.js';import {a as a$2,b,d as d$2,c as c$3}from'./cli-2RAZK7PT.js';import {d,c as c$1}from'./cli-6OGAT2WC.js';import {c as c$4}from'./cli-CEX3MAIK.js';import {a as a$1,b as b$1}from'./cli-77OHOFJE.js';import {a,s as s$1,j,m,c,t,v as v$1,h,f as f$2,g,e as e$2,d as d$4,w as w$1}from'./cli-MR3RTLWH.js';import {join,posix,dirname,resolve}from'node:path';var J=["AGENTS.md","CLAUDE.md","GEMINI.md",".claude/CLAUDE.md"];function qn(e){return e.startsWith(".claude/")?".claude":e}a(qn,"onlyEntry");function Zn(e){let t=s$1(e.cwd),n=J.filter(r=>t(r));if(n.length===J.length)return "Run `npx vitest-auto-spy init` on your machine. CI never sees these files, because .gitignore keeps them out of git, and under `CI` this note stays quiet.";let i=J.filter(r=>!t(r)&&j(join(e.cwd,r)));return n.length===0||i.length===0?"Run `npx vitest-auto-spy init` to point them at `node_modules/vitest-auto-spy/AGENTS.md`.":`Run \`npx vitest-auto-spy init --only ${[...new Set(i.map(qn))].join(",")}\` to point the tracked ones at \`node_modules/vitest-auto-spy/AGENTS.md\`.`}a(Zn,"fixFor");function Qn(e){let t=process.env.CI,n=s$1(e.cwd);return t!==void 0&&t!==""&&t!=="false"&&t!=="0"&&J.every(i=>n(i))}a(Qn,"unreachableInCi");function wt(e){return J.some(n=>(m(join(e.cwd,n))??"").includes("vitest-auto-spy"))||Qn(e)?[]:[{check:"no-agent-instructions",severity:"info",message:"No root AGENTS.md, CLAUDE.md, GEMINI.md or .claude/CLAUDE.md mentions vitest-auto-spy.",fix:Zn(e)}]}a(wt,"checkAgentInstructions");var ei=/@(?:Injectable|Service)\s*\(/g,ti=/^\s*(?:export\s+)?(?:default\s+)?(?:abstract\s+)?class\s+([$A-Z_a-z][\w$]*)[^{]*{/,bt=/constructor\s*\(/y,me=10,xt=new Set(["(","[","{","<"]),St=new Set([")","]","}",">"]);function kt(e,t){return e.find(n=>n.start===t)}a(kt,"spanAt");function z(e,t,n){let i=0;for(let r=n;r<e.length;r+=1){let s=kt(t,r);if(s!==void 0){r=s.end-1;continue}let a=e.charAt(r);if(i+="([{".includes(a)?1:")]}".includes(a)?-1:0,i===0)return r}return -1}a(z,"closingIndex");function ni(e){let t=[],n=0,i=0;for(let r=0;r<e.length;r+=1){let s=e.charAt(r);xt.has(s)?n+=1:St.has(s)&&e.charAt(r-1)!=="="?n-=1:s===","&&n===0&&(t.push(e.slice(i,r)),i=r+1);}return t.push(e.slice(i)),t.map(r=>r.trim()).filter(r=>r!=="")}a(ni,"splitParameters");function ii(e){let t=0;if(/@Inject\s*\(/.test(e))return false;for(let n=0;n<e.length;n+=1){let i=e.charAt(n);if(xt.has(i))t+=1;else if(St.has(i)&&e.charAt(n-1)!=="=")t-=1;else if(i==="="&&t===0&&e.charAt(n+1)!==">")return false}return true}a(ii,"needsTypeToken");function ri(e,t,n,i){let r=0;for(let s=n;s<i;s+=1){let a=kt(t,s);if(a!==void 0){s=a.end-1;continue}let c=e.charAt(s);r+=c==="{"?1:c==="}"?-1:0,bt.lastIndex=s+1;let d=r===1&&/[\s;{}]/.test(c)?bt.exec(e):null;if(d!==null){let l=s+d[0].length;return e.slice(l+1,z(e,t,l))}}}a(ri,"constructorParameters");function si(e){if(!/@(?:Injectable|Service)\b/.test(e))return [];let t=a$2(e),n=[];for(let i of e.matchAll(ei)){let r=z(e,t,i.index+i[0].length-1),s=r===-1||b(t,i.index)?null:ti.exec(e.slice(r+1));if(s===null)continue;let a=r+s[0].length,c=ri(e,t,a,z(e,t,a));c!==void 0&&ni(c).some(ii)&&n.push(String(s[1]));}return n}a(si,"constructorInjectedClasses");function oi(e){let t=D$1(e),n=new Set(t.filter(r=>E(r,"jit")&&/^false\b/.test(r.value)).map(r=>r.file)),i=t.filter(r=>E(r,"fastCompile")&&/^true\b/.test(r.value)&&!n.has(r.file));return [...new Set(i.map(r=>r.file))]}a(oi,"fastCompileConfigs");function $t(e){let t=oi(e);if(t.length===0)return;let n=[];return {visit:a((i,r)=>{A(i)||n.push(...si(r).map(s=>`${i}: ${s}`));},"visit"),finish:a(()=>ai(t,n),"finish")}}a($t,"analogFastCompilePass");function ai(e,t){if(t.length===0)return [];let n=t.length>me?[...t.slice(0,me),`\u2026 and ${t.length-me} more`]:t,i=t.length===1?"1 `@Injectable` class takes":`${t.length} \`@Injectable\` classes take`;return e.map(r=>({check:"analog-fast-compile-ctor-injection",severity:"warning",file:r,message:`Analog \`fastCompile\` is on in JIT mode, the default under Vitest, and ${i} constructor parameters known only by their type: the plugin emits no \`ctorParameters\` for \`@Injectable\`, so \`TestBed.inject\`, \`Injector.create\` and \`createWithAutoSpies\` throw NG0202 ("dependency at index N of the parameter list is invalid") for each of them.`,details:n,fix:"Move those dependencies to `inject()` field initializers (`ng generate @angular/core:inject` migrates a project), or name each token with `@Inject(TaxService)` on the parameter, or turn `fastCompile` off until the plugin emits `ctorParameters` for `@Injectable`. Components, directives and pipes are not affected."}))}a(ai,"fastCompileFindings");var ci=[22,2,0],di=[2,7,5],li=[22,12,0],ui=[6,4,0],fi=["@analogjs/vite-plugin-angular","@analogjs/vitest-angular"],gi=/\bv?(\d+)(?:\.(\d+|x))?(?:\.(\d+|x))?/g;function pi(e){return [...e.matchAll(gi)].map(n=>[1,2,3].map(i=>Number(n[i])||0)).sort(s)[0]}a(pi,"lowestVersion");var mi=/^\s*(?:-\s*)?node-version\s*:\s*([^\n#]+)|\bimage\s*:\s*["']?(?:[\w.-]+\/)*node:([\d.x]+)/gm;function hi(e,t$1){let n=c(m(join(e.cwd,"package.json"))??""),i=t(n)&&n.private===true&&t(n.engines)?n.engines.node:void 0,r=typeof i=="string"?[{file:"package.json",version:i}]:[];for(let s of [".nvmrc",".node-version"]){let a=m(join(e.cwd,s));a!==void 0&&r.push({file:s,version:a.trim()});}for(let{file:s,text:a}of t$1)for(let c of a.matchAll(mi))r.push({file:s,version:String(c[1]??c[2]).trim()});return r.filter(({version:s$1})=>{let a=pi(s$1);return a!==void 0&&s(a,li)<0})}a(hi,"nodeFloors");function yi(e,t){let n=[],i=v(e.cwd,"@angular/build");b$1(e).length>0&&x(i,ci)&&n.push({what:`@angular/build ${String(i)}, whose \`@angular/build:unit-test\` does not run Vitest 5`,fix:"Upgrade @angular/build to 22.2.0 or newer, the first release whose unit-test builder runs Vitest 5."});for(let s of fi){let a=v(e.cwd,s);x(a,di)&&n.push({what:`${s} ${String(a)}`,fix:`Upgrade ${s} to 2.7.5 or newer.`});}let r=v(e.cwd,"vite");x(r,ui)&&n.push({what:`vite ${String(r)}`,fix:"Upgrade vite to 6.4 or newer, the floor Vitest 5 requires."});for(let{file:s,version:a}of hi(e,t))n.push({what:`Node \`${a}\` in ${s}`,fix:`Raise the Node version in ${s} to 22.12 or newer, the floor Vitest 5 requires.`});return n}a(yi,"blockers");var Pt="On an Angular 22.2 suite of 700 spec files with coverage, Vitest 5 took the run from 16.50 s to 8.91 s with v8 (\u221246 %) and from 37.07 s to 23.92 s with istanbul (\u221235.5 %); without coverage the two majors are level.";function Et(e){if(z$1(e)!==4)return [];let t=String(v(e.cwd,"vitest")),n=yi(e,J$1(e));return n.length===0?[{check:"vitest-5-available",severity:"info",message:`Vitest ${t} is installed, and nothing in this repository holds back Vitest 5. ${Pt}`,fix:`Upgrade \`vitest\` and every \`@vitest/*\` package to 5 together, then read \`vitest-5-clear-mocks\`: Vitest 5 clears mocks before each test by default. The measurement: ${d}`}]:[{check:"vitest-5-available",severity:"info",message:`Vitest 5 is out, and this repository cannot take it yet: ${n.map(i=>i.what).join("; ")}.`,fix:`${n.map(i=>i.fix).join(" ")} ${Pt} ${d}`}]}a(Et,"checkVitest5Available");var vi="node_modules/.experimental-vitest-cache",oe="node_modules/.vitest-cache",wi=a(e=>e.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&"),"escapeRegExp");function bi(e,t){let n=t.replace(/^\.\//,"").split("/");return [...n.map((r,s)=>n.slice(0,s+1).join("/")),`**/${String(n.at(-1))}`].some(r=>new RegExp(`(?:^|[\\s'"[,=])(?:\\./|\\*\\*/)?${wi(r)}/?(?:\\*\\*)?(?=$|[\\s'",\\]])`,"m").test(e))}a(bi,"cachesPath");function Y(e,t){return e.some(({text:n})=>bi(n,t))}a(Y,"persistedInCi");var xi=new Set(["include","variables","stages","workflow","default","spec","image","services","cache"]),Si=/^\s*-?\s*(?:project|remote|component|template)\s*:/m;function he(e){return e.length>0&&e.every(({text:t})=>{let n=[...t.matchAll(/^([.A-Z_a-z][\w.-]*)\s*:/gm)].map(([,i])=>String(i));return n.includes("include")&&n.every(i=>xi.has(i))&&Si.test(t)})}a(he,"ciJobsElsewhere");function ye(e){return `Persist \`${e}\` between CI runs \u2014 for GitHub Actions an \`actions/cache\` step with that path and a key on the lockfile hash (\`cache: npm\` in \`setup-node\` stores only the npm download cache). \`npm ci\` deletes \`node_modules\` before it installs, so with it set \`fsModuleCachePath\` to a directory outside \`node_modules\` and cache that one.`}a(ye,"persistFix");function ve(e,t,n){let i=D$1(t),r=i.find(c=>E(c,"fsModuleCache")&&F(c)),s=H(e).some(([,c])=>I(c,"fsModuleCache")||I(c,"experimental.fsModuleCache"));if(r===void 0&&!s)return;let a=i.filter(c=>E(c,"fsModuleCachePath")).map(G)[0];return {file:r?.file??"package.json",path:a??(n>=5?oe:vi)}}a(ve,"moduleCacheSetting");function At(e,t){let n=z$1(e),i=J$1(e);if(n===void 0||n<4||i.length===0)return [];let r=ve(e,t,n);if(r===void 0||Y(i,r.path)||he(i))return [];let s=i.map(({file:a})=>a).join(", ");return [{check:"fs-module-cache-not-persisted",severity:"warning",file:r.file,message:`\`fsModuleCache\` is on, and no CI config caches \`${r.path}\`: every CI run (${s}) starts with an empty module cache and pays the full transform, so the cache only ever helps locally.`,fix:ye(r.path)}]}a(At,"checkModuleCachePersisted");var ki=new Set(["@analogjs/vite-plugin-angular","@analogjs/vitest-angular"]),Ft="@analogjs/vite-plugin-angular",$i=[Number.POSITIVE_INFINITY],Ti=/@Component\s*\(/,Pi=/^(?:(?!\bclass\s)[^])*?\bstyles\s*:/;function Ei(e){return e.split(Ti).slice(1).some(t=>Pi.test(t))}a(Ei,"hasInlineStyles");function Ai(e){return C(e,A).find(({file:t,text:n})=>d$1(n).some(i=>ki.has(i))&&!B(t,n).some(i=>E(i,"jit")&&/^false\b/.test(i.value)))?.file}a(Ai,"analogConfig");function Ct(e,t){let n=z$1(e),i=v(e.cwd,Ft),r=Ai(t);if(n===void 0||n<4||r===void 0||!x(i,$i))return;let s=ve(e,t,n);if(s===void 0)return;let a$1;return {visit:a((c,d)=>{a$1===void 0&&Ei(d)&&(a$1=c);},"visit"),finish:a(()=>a$1===void 0?[]:[Fi(s,r,i,a$1)],"finish")}}a(Ct,"analogModuleCachePass");function Fi(e,t,n,i){return {check:"analog-module-cache-inline-styles",severity:"warning",file:e.file,message:`\`fsModuleCache\` is on for a suite that ${t} runs through ${Ft} ${String(n)} in JIT mode, and ${i} declares inline component \`styles\`: the first run passes and fills the cache, and every run after it fails the specs that reach such a component with \`Cannot find module '/@id/__x00__virtual:angular:jit:style:inline;<hash>'\`. Verified on Analog 2.7.5, Angular 22.2 and Vitest 5.0.0.`,fix:`Turn \`fsModuleCache\` off in ${e.file} while the suite runs through Analog. \`@angular/build:unit-test\` has no such break: it bundles the code before Vitest sees it.`}}a(Fi,"inlineStylesFinding");var Ci=3;function L(e){let t=e.slice(0,Ci).map(i=>`\`${i.project}:${i.name}\` in ${i.file}`),n=e.length-t.length;return t.length===0?"the unit-test target":`${t.join(", ")}${n===0?"":` and ${n} more targets`}`}a(L,"namedTargets");function ji(e){return `Upgrade @angular/build to 22.1.7 or newer, where splitting is on by default, and remove any \`"splitting": false\` from ${L(b$1(e))}.`}a(ji,"fixFor");function Ri(e,t){return t===void 0||!t$1(t)?[]:[{check:"angular-build-splitting-off",severity:"warning",file:"node_modules/@angular/build/package.json",message:u(t),fix:ji(e)}]}a(Ri,"splittingOff");var we="@analogjs/vite-plugin-angular",Ii=[22,2,0],Oi=[2,7,5],be=a((e,t)=>{let n=r(e);return n===void 0?Number.NaN:s(n,t)},"compared"),Mi=[22,2,0];function _i(e,t){return t===void 0||!(be(t,Mi)>=0)?[]:b$1(e).flatMap(n=>{let i=n.optionBlocks.flatMap(a=>typeof a.splitting=="boolean"?[a.splitting]:[]);if(i.length===0)return [];let r=i.includes(false),s=`\`${n.project}:${n.name}\``;return [{check:"angular-build-splitting-deprecated",severity:r?"warning":"info",file:n.file,message:r?`${s} sets \`"splitting": false\`, deprecated since @angular/build 22.2.0 ("No longer needed with Vitest 5") and still honoured: one self-contained bundle per spec, and \`--coverage\` grows by hundreds of megabytes.`:`${s} sets \`"splitting"\`, deprecated since @angular/build 22.2.0 ("No longer needed with Vitest 5"); \`true\` is the default, so the key changes nothing.`,fix:`Remove \`"splitting"\` from ${s}.`}]})}a(_i,"splittingDeprecated");function Ni(e,t){let n=v(e,we);return t===void 0||n===void 0?[]:be(t,Ii)>=0&&be(n,Oi)<0?[{check:"analog-behind-angular-build",severity:"error",file:`node_modules/${we}/package.json`,message:`${we} ${n} is too old for @angular/build ${t}: the run dies at startup with \`TypeError: cache.has is not a function\`, because from 22.2.0 the builder's \`SourceFileCache\` no longer extends \`Map\`.`,fix:"Upgrade `@analogjs/vite-plugin-angular` and `@analogjs/vitest-angular` to 2.7.5 or newer."}]:[]}a(Ni,"analogBehind");function jt(e){let t=v(e.cwd,"@angular/build");return [...Ri(e,t),..._i(e,t),...Ni(e.cwd,t)]}a(jt,"checkAngularBuild");var Vi=".angular/cache",Rt="On a 700-file suite a cold cache cost +2.91 s (+33 %) per run.";function Li(e){let t$1=c(m(join(e.cwd,"angular.json"))??"");if(!t(t$1))return;let n=t(t$1.cli)?t$1.cli:{},i=t(n.cache)?n.cache:{};return {enabled:i.enabled!==false,environment:typeof i.environment=="string"?i.environment:void 0,path:typeof i.path=="string"?i.path.replace(/^\.\//,"").replace(/\/$/,""):Vi}}a(Li,"cacheSettings");function It(e){let t=Li(e),n=J$1(e);return t?.enabled!==true||n.length===0||!b$1(e).some(i=>i.file==="angular.json")?[]:t.environment===void 0||t.environment==="local"?[{check:"angular-cache-off-in-ci",severity:"info",file:"angular.json",message:`The Angular build cache is off in CI: \`cli.cache.environment\` is \`local\`${t.environment===void 0?" (the default)":""}, so every CI run of the unit-test builder compiles the whole suite cold. ${Rt}`,fix:`Set \`"cli": { "cache": { "environment": "all" } }\` in angular.json, and persist \`${t.path}\` between CI runs with a key on the lockfile hash.`}]:t.environment==="none"||Y(n,t.path)||he(n)?[]:[{check:"angular-cache-off-in-ci",severity:"info",file:"angular.json",message:`The Angular build cache is on in CI (\`cli.cache.environment: ${t.environment}\`), and no CI config (${n.map(({file:i})=>i).join(", ")}) keeps \`${t.path}\`: every run starts it empty, so CI pays the cold compile anyway. ${Rt}`,fix:`Persist \`${t.path}\` between CI runs \u2014 for GitHub Actions an \`actions/cache\` step with that path and a key on the lockfile hash.`}]}a(It,"checkAngularCacheInCi");var Di=/["']@analogjs\/(?:vite-plugin-angular|platform|vitest-angular)["']/,Ui=/["']vitest-auto-spy\/(?:angular|angular-http)["']/,Bi=/^(?:inline|noExternal)\s*:\s*(?:true\b|\[[^\]]*vitest-auto-spy)/;function Ki(e){return [...d$2(e).matchAll(/\b(?:inline|noExternal)\s*:/g)].some(n=>Bi.test(e.slice(n.index)))}a(Ki,"inlinesThePackage");function Ot(e,t){if(!e.hasAngular||!w(e,"vitest-auto-spy"))return;let n=C(t,A),i=n.find(({text:s})=>Di.test(s));if(i===void 0||n.some(({text:s})=>Ki(s)))return;let r=0;return {visit:a((s,a)=>{r+=Ui.test(a)?1:0;},"visit"),finish:a(()=>r===0?[]:[Hi(i.file,r)],"finish")}}a(Ot,"angularTestBedSplitPass");function Hi(e,t){return {check:"angular-testbed-split",severity:"warning",file:e,message:`The Analog plugin inlines \`@angular/core/testing\` while Vitest externalizes \`vitest-auto-spy\`, which ${t} ${t===1?"file imports":"files import"} for Angular: its \`TestBed\` is a second copy nobody initialised, and \`injectSpy\` throws "Need to call TestBed.initTestEnvironment() first" or "Cannot read properties of null (reading 'ngModule')".`,fix:"Add `server: { deps: { inline: ['vitest-auto-spy'] } }` to the `test` block of this config, so the package goes through Vite and shares the spec's `TestBed`."}}a(Hi,"split");var Wi=["vitest.config.ts","vitest.config.mts","vitest.config.js","vitest.config.mjs","vite.config.ts","vite.config.mts",...["ts","mts","cts","js","mjs","cjs"].map(e=>`vitest-base.config.${e}`)],Ji=["src/test-setup.ts","src/setup-tests.ts","src/vitest.setup.ts"];function zi(e){return e.optionBlocks.some(t=>{let n=t.setupFiles,i=t.runnerConfig;return Array.isArray(n)&&n.length>0||i!==void 0&&i!==false})}a(zi,"declaresSetup");function Yi(e,t){let n=a(s=>posix.join(t,s.replace(/^\.\//,"")),"inProject");for(let s of Wi){let a=m(posix.join(e.cwd,n(s))),c=a===void 0?[]:v$1(a);if(c.length>0)return {files:c.map(n),source:`listed in the \`setupFiles\` of ${n(s)}`}}let i=new Set(e.files),r=Ji.map(n).filter(s=>i.has(s));return r.length>0?{files:r,source:"found at the conventional path"}:void 0}a(Yi,"intendedSetup");function _t(e){return b$1(e).flatMap(t=>{let n=zi(t)?void 0:Yi(e,t.root);if(n===void 0)return [];let i=n.files.map(s=>`\`${s}\``).join(", "),r=n.files.map(s=>`"${s}"`).join(", ");return [{check:"builder-setup-unreached",severity:"warning",file:t.file,message:`\`${t.project}:${t.name}\` runs through \`${t.builder}\`, which runs only the setup files its target names, so ${i}, ${n.source}, never runs there. \`setupAutoSpy()\`, registered matchers and the mock adapter are missing under that target.`,fix:`Add \`"setupFiles": [${r}]\` to the options of \`${t.project}:${t.name}\` in ${t.file}.`}]})}a(_t,"checkBuilderSetup");var qi=[21],Zi=5,Qi=["ts","mts","cts","js","mjs","cjs"];function er(e,t,n){return typeof n=="string"&&n!==""?n.replace(/^\.\//,""):n!==true?void 0:[...new Set([t.root,""])].flatMap(r=>Qi.map(s=>posix.join(r,`vitest-base.config.${s}`))).find(r=>m(join(e.cwd,r))!==void 0)}a(er,"namedConfig");function tr(e,t){return t===void 0?[]:B(t,m(join(e.cwd,t))??"")}a(tr,"keysOf");function nr(e,t){let n=t.optionBlocks.map(r=>er(e,t,r.runnerConfig)).find(Boolean),i=t.optionBlocks.flatMap(r=>Array.isArray(r.browsers)?r.browsers.filter(s=>typeof s=="string"):[]);return {target:t,config:n,keys:tr(e,n),browsers:i}}a(nr,"targetConfig");function xe(e){return ir(e)?b$1(e).map(t=>nr(e,t)):[]}a(xe,"builderTargets");function ir(e){let t=v(e.cwd,"@angular/build");return t!==void 0&&!x(t,qi)}a(ir,"isRunnerConfigRead");function rr(e,{config:t,keys:n,browsers:i}){if(i.length>0)return;let r=n.filter(c=>E(c,"coverage.provider")).map(G)[0];if(r!==void 0)return r==="istanbul"?`${String(t)} sets \`coverage.provider: 'istanbul'\``:void 0;let s=v(e.cwd,"@vitest/coverage-istanbul")!==void 0,a=v(e.cwd,"@vitest/coverage-v8")!==void 0;return s&&!a?"only `@vitest/coverage-istanbul` is installed, so the builder picks istanbul":void 0}a(rr,"istanbulBecause");var sr=a(({keys:e})=>e.some(t=>E(t,"fsModuleCache")&&F(t)),"hasModuleCache"),or="The module cache took an istanbul coverage run under the builder from 24.55 s to 13.20 s (up to \u221246 %) on an Angular 22.2 suite of 700 spec files on Vitest 5, and from 27.01 s to 15.85 s (\u221241 %) with the builder cache off, as it is on CI; on an 862-spec suite it took 48 s to 39 s (\u221219 %). Switching that suite to v8 beat istanbul with the cache about 2x: 19\u201322 s, where the cache gained nothing, since the builder has already bundled the code. The cache pays off on CI only when CI keeps `node_modules/.vitest-cache` between runs.",ar=" Or switch the target to `coverage.provider: 'v8'`, with `@vitest/coverage-v8` installed: it needs no cache, and the coverage thresholds are worth one run to confirm after the switch.";function cr(e,{first:t,why:n,targets:i}){let r=L(i.map(({target:d})=>d)),s=J$1(e),a=s.length>0&&!Y(s,oe)?` ${ye(oe)}`:"",c=t.config===void 0?`Add \`"runnerConfig": "vitest-base.config.mts"\` to the options of ${r}, and export \`defineConfig({ test: { fsModuleCache: true } })\` from that file.`:`Add \`fsModuleCache: true\` to the \`test\` block of ${t.config}.`;return {check:"angular-build-istanbul-module-cache",severity:"info",file:t.config??t.target.file,message:`${r} collects coverage with istanbul through \`${t.target.builder}\` (${n}), and no runner config of it turns on \`fsModuleCache\`: every run instruments every file again. ${or}`,fix:`${c}${a}${ar}`}}a(cr,"moduleCacheFinding");function dr(e,t){let n=y(e.cwd);if(n===void 0||n<Zi)return [];let i=new Map;for(let r of t){let s=sr(r)?void 0:rr(e,r);if(s!==void 0){let a=r.config??"",c=i.get(a)??{first:r,why:s,targets:[]};c.targets.push(r),i.set(a,c);}}return [...i.values()].map(r=>cr(e,r))}a(dr,"checkIstanbulModuleCache");function lr(e,t){let n=v(e.cwd,"jsdom");if(n===void 0||v(e.cwd,"happy-dom")!==void 0)return [];let i=t.filter(({keys:s,browsers:a})=>a.length===0&&!s.some(c=>E(c,"environment")));return i.length===0?[]:[{check:"angular-build-happy-dom",severity:"info",file:"package.json",message:`${L(i.map(({target:s})=>s))} runs on jsdom ${n} only because \`happy-dom\` is not installed: from @angular/build 21 the builder picks happy-dom by itself whenever it resolves, unless the runner config sets \`environment\`. On an Angular 22.2 suite of 700 spec files happy-dom took 4.6 % off the wall time and 6 % off the resident memory of the run.`,fix:"`npm i -D happy-dom`; no config line is needed. happy-dom implements less of the platform than jsdom, so run the suite once and keep jsdom (uninstall happy-dom) if a spec depends on what it lacks."}]}a(lr,"checkHappyDom");function Gt(e){let t=xe(e);return [...dr(e,t),...lr(e,t)]}a(Gt,"checkBuilderSpeed");var fr=["vitest.config.ts","vitest.config.mts","vitest.config.cts","vitest.config.js","vitest.config.mjs","vite.config.ts","vite.config.mts","vite.config.cts","vite.config.js","vite.config.mjs"],gr=["ts","mts","cts","js","mjs","cjs"].map(e=>`vitest-base.config.${e}`),pr=/(^|\/)(?:angular|workspace|project)\.json$/,Vt="@angular/build:unit-test",mr=a(e=>[e.builder,e.executor].some(t=>typeof t=="string"&&a$1.has(t)),"runsUnitTestBuilder"),hr=4,Lt=5,yr=50;function vr(e){let t=/coverage\s*:\s*{/.exec(e);if(t===null)return;let n=0;for(let i=t.index+t[0].length-1;i<e.length;i+=1)if(e[i]==="{")n+=1;else if(e[i]==="}"&&(n-=1,n===0))return e.slice(t.index,i+1)}a(vr,"coverageBlock");function Dt(e){let t=0,n="";for(let i of e)i==="{"?t+=1:i==="}"?t-=1:t===1&&(n+=i);return n}a(Dt,"ownKeysText");function wr(e,t){return new RegExp(`(?:^|[\\s,])${t}\\s*:`).test(Dt(e))}a(wr,"declaresKey");function Se(e,t){return h(Dt(e),new RegExp(`(?:^|[\\s,])${t}\\s*:\\s*\\[([^\\]]*)]`,"g")).flatMap(i=>h(i,/["'`]([^"'`]+)["'`]/g))}a(Se,"arrayPatterns");function br(e){return Se(e,"include")}a(br,"includePatterns");function xr(e){let t=e.slice(e.lastIndexOf("/")+1);if(!t.includes("."))return true;let n=t.slice(t.lastIndexOf(".")+1);return n==="*"||/^[cm]?js$/.test(n)||/^{[^}]*\b[cm]?js\b[^}]*}$/.test(n)}a(xr,"canMatchBundleChunk");function ke(e,t$1){if(Array.isArray(e)){for(let i of e)ke(i,t$1);return}if(!t(e))return;let n=e.options;mr(e)&&t(n)&&t$1(n);for(let i of Object.values(e))ke(i,t$1);}a(ke,"forEachUnitTestOptions");function Ut(e,t){for(let n of e.files.filter(i=>pr.test(i)))ke(c(m(join(e.cwd,n))??""),t);}a(Ut,"forEachWorkspaceUnitTest");function Sr(e){let t=0;return Ut(e,n=>{for(let i of ["coverageInclude","coverageExclude"]){let r=n[i];Array.isArray(r)&&(t+=r.length);}}),t}a(Sr,"targetScopeSize");function kr(e,t){for(let n of new Set(t)){let i=gr.map(r=>posix.join(n,r)).find(r=>m(join(e.cwd,r))!==void 0);if(i!==void 0)return i}}a(kr,"baseConfigIn");function $r(e){let t=new Set;Ut(e,n=>{let i=n.runnerConfig;typeof i=="string"&&t.add(i.replace(/^\.\//,""));});for(let n of b$1(e)){let i=n.optionBlocks.some(r=>r.runnerConfig===true)?kr(e,[n.root,""]):void 0;i!==void 0&&t.add(i);}return [...t]}a($r,"unitTestRunnerConfigs");function Bt(e){let t=$r(e),n=Sr(e),i=y(e.cwd),r=b$1(e).length>0?` Under \`${Vt}\`, Vitest 5 needs @angular/build 22.2.0 or newer.`:"",s=[];for(let a of [...new Set([...t,...fr])]){let c=m(join(e.cwd,a)),d=c===void 0?void 0:vr(c);if(d===void 0)continue;i!==void 0&&i>=hr&&wr(d,"all")&&s.push({check:"coverage-all-removed",severity:"warning",file:a,message:`\`coverage.all\` no longer exists in Vitest ${i}: the key is absent from \`coverageConfigDefaults\` and nothing reads it. The pass over files no test imported is driven by \`coverage.include\` now.`,fix:"Delete `all` and declare `coverage.include` instead. Without an include the report has been covering only the files the run imported \u2014 which is what this config has been silently doing since the upgrade."});let l=Se(d,"include").length+Se(d,"exclude").length+n;i!==void 0&&i<Lt&&l>=yr&&s.push({check:"coverage-include-recompiles-globs",severity:"info",file:a,message:`The coverage scope here is ${l} globs, and Vitest ${i} compiles every one of them again for every file it checks, so matching can cost more than the coverage itself.`,fix:`Upgrade to Vitest ${Lt}, which compiles them once.${r} To stay on ${i}, use the custom-provider recipe: ${c$1}`});let u=t.includes(a)?br(d):[];u.length>0&&!u.some(xr)&&s.push({check:"coverage-include-misses-bundle",severity:"warning",file:a,message:`\`coverage.include\` here names only sources, and \`${Vt}\` runs the suite over a bundle: the provider matches the list once against the executed chunks, before any remap, and every counter is dropped there.`,fix:"Move the list to the target\u2019s `coverageInclude` option \u2014 the builder prepends `spec-*.js` and `chunk-*.js` to it, which is exactly what the pre-remap pass needs. Keeping it here means an empty report from a run that stays green."});}return s}a(Bt,"checkCoverageConfig");var Tr=/@jest-(?:environment-options|environment|config)\b/g;var Pr=/^[\t ]+([\w./@-]+)/;function Er(e){let t=new Map;for(let n of e.matchAll(Tr)){let i=n[0],r=i==="@jest-environment"?Pr.exec(e.slice(n.index+i.length))?.[1]:void 0,s=`${i} ${r??""}`,a=t.get(s)??{pragma:i,value:r,lines:[]};a.lines.push(e.slice(0,n.index).split(`
2
+ import {e as e$1,c as c$2,f as f$1,a as a$3,b as b$3,d as d$3}from'./cli-5TEHB76W.js';import {b as b$4,a as a$4,f as f$4}from'./cli-P76X2CLG.js';import {d as d$5,f as f$3,k as k$1,g as g$2,i,j as j$1,l}from'./cli-EH6SQSRG.js';import {n,h as h$2,m as m$1,k,j as j$2,f as f$5,b as b$5,l as l$1}from'./cli-45YUTGOS.js';import {e,f,d as d$1,b as b$2,g as g$1,h as h$1}from'./cli-LLUOKL65.js';import {r,s,E,F,D as D$1,A,v,x,z as z$1,J as J$1,H,I,G,C,B,t as t$1,u,w,y}from'./cli-3IP2U4X3.js';import {a as a$2,b,d as d$2,c as c$3}from'./cli-2RAZK7PT.js';import {d,c as c$1}from'./cli-6OGAT2WC.js';import {c as c$4}from'./cli-CEX3MAIK.js';import {a as a$1,b as b$1}from'./cli-77OHOFJE.js';import {a,s as s$1,j,m,c,t,v as v$1,h,f as f$2,g,e as e$2,d as d$4,w as w$1}from'./cli-MR3RTLWH.js';import {join,posix,dirname,resolve}from'node:path';var J=["AGENTS.md","CLAUDE.md","GEMINI.md",".claude/CLAUDE.md"];function qn(e){return e.startsWith(".claude/")?".claude":e}a(qn,"onlyEntry");function Zn(e){let t=s$1(e.cwd),n=J.filter(r=>t(r));if(n.length===J.length)return "Run `npx vitest-auto-spy init` on your machine. CI never sees these files, because .gitignore keeps them out of git, and under `CI` this note stays quiet.";let i=J.filter(r=>!t(r)&&j(join(e.cwd,r)));return n.length===0||i.length===0?"Run `npx vitest-auto-spy init` to point them at `node_modules/vitest-auto-spy/AGENTS.md`.":`Run \`npx vitest-auto-spy init --only ${[...new Set(i.map(qn))].join(",")}\` to point the tracked ones at \`node_modules/vitest-auto-spy/AGENTS.md\`.`}a(Zn,"fixFor");function Qn(e){let t=process.env.CI,n=s$1(e.cwd);return t!==void 0&&t!==""&&t!=="false"&&t!=="0"&&J.every(i=>n(i))}a(Qn,"unreachableInCi");function wt(e){return J.some(n=>(m(join(e.cwd,n))??"").includes("vitest-auto-spy"))||Qn(e)?[]:[{check:"no-agent-instructions",severity:"info",message:"No root AGENTS.md, CLAUDE.md, GEMINI.md or .claude/CLAUDE.md mentions vitest-auto-spy.",fix:Zn(e)}]}a(wt,"checkAgentInstructions");var ei=/@(?:Injectable|Service)\s*\(/g,ti=/^\s*(?:export\s+)?(?:default\s+)?(?:abstract\s+)?class\s+([$A-Z_a-z][\w$]*)[^{]*{/,bt=/constructor\s*\(/y,me=10,xt=new Set(["(","[","{","<"]),St=new Set([")","]","}",">"]);function kt(e,t){return e.find(n=>n.start===t)}a(kt,"spanAt");function z(e,t,n){let i=0;for(let r=n;r<e.length;r+=1){let s=kt(t,r);if(s!==void 0){r=s.end-1;continue}let a=e.charAt(r);if(i+="([{".includes(a)?1:")]}".includes(a)?-1:0,i===0)return r}return -1}a(z,"closingIndex");function ni(e){let t=[],n=0,i=0;for(let r=0;r<e.length;r+=1){let s=e.charAt(r);xt.has(s)?n+=1:St.has(s)&&e.charAt(r-1)!=="="?n-=1:s===","&&n===0&&(t.push(e.slice(i,r)),i=r+1);}return t.push(e.slice(i)),t.map(r=>r.trim()).filter(r=>r!=="")}a(ni,"splitParameters");function ii(e){let t=0;if(/@Inject\s*\(/.test(e))return false;for(let n=0;n<e.length;n+=1){let i=e.charAt(n);if(xt.has(i))t+=1;else if(St.has(i)&&e.charAt(n-1)!=="=")t-=1;else if(i==="="&&t===0&&e.charAt(n+1)!==">")return false}return true}a(ii,"needsTypeToken");function ri(e,t,n,i){let r=0;for(let s=n;s<i;s+=1){let a=kt(t,s);if(a!==void 0){s=a.end-1;continue}let c=e.charAt(s);r+=c==="{"?1:c==="}"?-1:0,bt.lastIndex=s+1;let d=r===1&&/[\s;{}]/.test(c)?bt.exec(e):null;if(d!==null){let l=s+d[0].length;return e.slice(l+1,z(e,t,l))}}}a(ri,"constructorParameters");function si(e){if(!/@(?:Injectable|Service)\b/.test(e))return [];let t=a$2(e),n=[];for(let i of e.matchAll(ei)){let r=z(e,t,i.index+i[0].length-1),s=r===-1||b(t,i.index)?null:ti.exec(e.slice(r+1));if(s===null)continue;let a=r+s[0].length,c=ri(e,t,a,z(e,t,a));c!==void 0&&ni(c).some(ii)&&n.push(String(s[1]));}return n}a(si,"constructorInjectedClasses");function oi(e){let t=D$1(e),n=new Set(t.filter(r=>E(r,"jit")&&/^false\b/.test(r.value)).map(r=>r.file)),i=t.filter(r=>E(r,"fastCompile")&&/^true\b/.test(r.value)&&!n.has(r.file));return [...new Set(i.map(r=>r.file))]}a(oi,"fastCompileConfigs");function $t(e){let t=oi(e);if(t.length===0)return;let n=[];return {visit:a((i,r)=>{A(i)||n.push(...si(r).map(s=>`${i}: ${s}`));},"visit"),finish:a(()=>ai(t,n),"finish")}}a($t,"analogFastCompilePass");function ai(e,t){if(t.length===0)return [];let n=t.length>me?[...t.slice(0,me),`\u2026 and ${t.length-me} more`]:t,i=t.length===1?"1 `@Injectable` class takes":`${t.length} \`@Injectable\` classes take`;return e.map(r=>({check:"analog-fast-compile-ctor-injection",severity:"warning",file:r,message:`Analog \`fastCompile\` is on in JIT mode, the default under Vitest, and ${i} constructor parameters known only by their type: the plugin emits no \`ctorParameters\` for \`@Injectable\`, so \`TestBed.inject\`, \`Injector.create\` and \`createWithAutoSpies\` throw NG0202 ("dependency at index N of the parameter list is invalid") for each of them.`,details:n,fix:"Move those dependencies to `inject()` field initializers (`ng generate @angular/core:inject` migrates a project), or name each token with `@Inject(TaxService)` on the parameter, or turn `fastCompile` off until the plugin emits `ctorParameters` for `@Injectable`. Components, directives and pipes are not affected."}))}a(ai,"fastCompileFindings");var ci=[22,2,0],di=[2,7,5],li=[22,12,0],ui=[6,4,0],fi=["@analogjs/vite-plugin-angular","@analogjs/vitest-angular"],gi=/\bv?(\d+)(?:\.(\d+|x))?(?:\.(\d+|x))?/g;function pi(e){return [...e.matchAll(gi)].map(n=>[1,2,3].map(i=>Number(n[i])||0)).sort(s)[0]}a(pi,"lowestVersion");var mi=/^\s*(?:-\s*)?node-version\s*:\s*([^\n#]+)|\bimage\s*:\s*["']?(?:[\w.-]+\/)*node:([\d.x]+)/gm;function hi(e,t$1){let n=c(m(join(e.cwd,"package.json"))??""),i=t(n)&&n.private===true&&t(n.engines)?n.engines.node:void 0,r=typeof i=="string"?[{file:"package.json",version:i}]:[];for(let s of [".nvmrc",".node-version"]){let a=m(join(e.cwd,s));a!==void 0&&r.push({file:s,version:a.trim()});}for(let{file:s,text:a}of t$1)for(let c of a.matchAll(mi))r.push({file:s,version:String(c[1]??c[2]).trim()});return r.filter(({version:s$1})=>{let a=pi(s$1);return a!==void 0&&s(a,li)<0})}a(hi,"nodeFloors");function yi(e,t){let n=[],i=v(e.cwd,"@angular/build");b$1(e).length>0&&x(i,ci)&&n.push({what:`@angular/build ${String(i)}, whose \`@angular/build:unit-test\` does not run Vitest 5`,fix:"Upgrade @angular/build to 22.2.0 or newer, the first release whose unit-test builder runs Vitest 5."});for(let s of fi){let a=v(e.cwd,s);x(a,di)&&n.push({what:`${s} ${String(a)}`,fix:`Upgrade ${s} to 2.7.5 or newer.`});}let r=v(e.cwd,"vite");x(r,ui)&&n.push({what:`vite ${String(r)}`,fix:"Upgrade vite to 6.4 or newer, the floor Vitest 5 requires."});for(let{file:s,version:a}of hi(e,t))n.push({what:`Node \`${a}\` in ${s}`,fix:`Raise the Node version in ${s} to 22.12 or newer, the floor Vitest 5 requires.`});return n}a(yi,"blockers");var Pt="On an Angular 22.2 suite of 700 spec files with coverage, Vitest 5 took the run from 16.50 s to 8.91 s with v8 (\u221246 %) and from 37.07 s to 23.92 s with istanbul (\u221235.5 %); without coverage the two majors are level.";function Et(e){if(z$1(e)!==4)return [];let t=String(v(e.cwd,"vitest")),n=yi(e,J$1(e));return n.length===0?[{check:"vitest-5-available",severity:"info",message:`Vitest ${t} is installed, and nothing in this repository holds back Vitest 5. ${Pt}`,fix:`Upgrade \`vitest\` and every \`@vitest/*\` package to 5 together, then read \`vitest-5-clear-mocks\`: Vitest 5 clears mocks before each test by default. The measurement: ${d}`}]:[{check:"vitest-5-available",severity:"info",message:`Vitest 5 is out, and this repository cannot take it yet: ${n.map(i=>i.what).join("; ")}.`,fix:`${n.map(i=>i.fix).join(" ")} ${Pt} ${d}`}]}a(Et,"checkVitest5Available");var vi="node_modules/.experimental-vitest-cache",oe="node_modules/.vitest-cache",wi=a(e=>e.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&"),"escapeRegExp");function bi(e,t){let n=t.replace(/^\.\//,"").split("/");return [...n.map((r,s)=>n.slice(0,s+1).join("/")),`**/${String(n.at(-1))}`].some(r=>new RegExp(`(?:^|[\\s'"[,=])(?:\\./|\\*\\*/)?${wi(r)}/?(?:\\*\\*)?(?=$|[\\s'",\\]])`,"m").test(e))}a(bi,"cachesPath");function Y(e,t){return e.some(({text:n})=>bi(n,t))}a(Y,"persistedInCi");var xi=new Set(["include","variables","stages","workflow","default","spec","image","services","cache"]),Si=/^\s*-?\s*(?:project|remote|component|template)\s*:/m;function he(e){return e.length>0&&e.every(({text:t})=>{let n=[...t.matchAll(/^([.A-Z_a-z][\w.-]*)\s*:/gm)].map(([,i])=>String(i));return n.includes("include")&&n.every(i=>xi.has(i))&&Si.test(t)})}a(he,"ciJobsElsewhere");function ye(e){return `Persist \`${e}\` between CI runs \u2014 for GitHub Actions an \`actions/cache\` step with that path and a key on the lockfile hash (\`cache: npm\` in \`setup-node\` stores only the npm download cache). \`npm ci\` deletes \`node_modules\` before it installs, so with it set \`fsModuleCachePath\` to a directory outside \`node_modules\` and cache that one.`}a(ye,"persistFix");function ve(e,t,n){let i=D$1(t),r=i.find(c=>E(c,"fsModuleCache")&&F(c)),s=H(e).some(([,c])=>I(c,"fsModuleCache")||I(c,"experimental.fsModuleCache"));if(r===void 0&&!s)return;let a=i.filter(c=>E(c,"fsModuleCachePath")).map(G)[0];return {file:r?.file??"package.json",path:a??(n>=5?oe:vi)}}a(ve,"moduleCacheSetting");function At(e,t){let n=z$1(e),i=J$1(e);if(n===void 0||n<4||i.length===0)return [];let r=ve(e,t,n);if(r===void 0||Y(i,r.path)||he(i))return [];let s=i.map(({file:a})=>a).join(", ");return [{check:"fs-module-cache-not-persisted",severity:"warning",file:r.file,message:`\`fsModuleCache\` is on, and no CI config caches \`${r.path}\`: every CI run (${s}) starts with an empty module cache and pays the full transform, so the cache only ever helps locally.`,fix:ye(r.path)}]}a(At,"checkModuleCachePersisted");var ki=new Set(["@analogjs/vite-plugin-angular","@analogjs/vitest-angular"]),Ft="@analogjs/vite-plugin-angular",$i=[Number.POSITIVE_INFINITY],Ti=/@Component\s*\(/,Pi=/^(?:(?!\bclass\s)[^])*?\bstyles\s*:/;function Ei(e){return e.split(Ti).slice(1).some(t=>Pi.test(t))}a(Ei,"hasInlineStyles");function Ai(e){return C(e,A).find(({file:t,text:n})=>d$1(n).some(i=>ki.has(i))&&!B(t,n).some(i=>E(i,"jit")&&/^false\b/.test(i.value)))?.file}a(Ai,"analogConfig");function Ct(e,t){let n=z$1(e),i=v(e.cwd,Ft),r=Ai(t);if(n===void 0||n<4||r===void 0||!x(i,$i))return;let s=ve(e,t,n);if(s===void 0)return;let a$1;return {visit:a((c,d)=>{a$1===void 0&&Ei(d)&&(a$1=c);},"visit"),finish:a(()=>a$1===void 0?[]:[Fi(s,r,i,a$1)],"finish")}}a(Ct,"analogModuleCachePass");function Fi(e,t,n,i){return {check:"analog-module-cache-inline-styles",severity:"warning",file:e.file,message:`\`fsModuleCache\` is on for a suite that ${t} runs through ${Ft} ${String(n)} in JIT mode, and ${i} declares inline component \`styles\`: the first run passes and fills the cache, and every run after it fails the specs that reach such a component with \`Cannot find module '/@id/__x00__virtual:angular:jit:style:inline;<hash>'\`. Verified on Analog 2.7.5, Angular 22.2 and Vitest 5.0.0.`,fix:`Turn \`fsModuleCache\` off in ${e.file} while the suite runs through Analog. \`@angular/build:unit-test\` has no such break: it bundles the code before Vitest sees it.`}}a(Fi,"inlineStylesFinding");var Ci=3;function L(e){let t=e.slice(0,Ci).map(i=>`\`${i.project}:${i.name}\` in ${i.file}`),n=e.length-t.length;return t.length===0?"the unit-test target":`${t.join(", ")}${n===0?"":` and ${n} more targets`}`}a(L,"namedTargets");function ji(e){return `Upgrade @angular/build to 22.1.7 or newer, where splitting is on by default, and remove any \`"splitting": false\` from ${L(b$1(e))}.`}a(ji,"fixFor");function Ri(e,t){return t===void 0||!t$1(t)?[]:[{check:"angular-build-splitting-off",severity:"warning",file:"node_modules/@angular/build/package.json",message:u(t),fix:ji(e)}]}a(Ri,"splittingOff");var we="@analogjs/vite-plugin-angular",Ii=[22,2,0],Oi=[2,7,5],be=a((e,t)=>{let n=r(e);return n===void 0?Number.NaN:s(n,t)},"compared"),Mi=[22,2,0];function _i(e,t){return t===void 0||!(be(t,Mi)>=0)?[]:b$1(e).flatMap(n=>{let i=n.optionBlocks.flatMap(a=>typeof a.splitting=="boolean"?[a.splitting]:[]);if(i.length===0)return [];let r=i.includes(false),s=`\`${n.project}:${n.name}\``;return [{check:"angular-build-splitting-deprecated",severity:r?"warning":"info",file:n.file,message:r?`${s} sets \`"splitting": false\`, deprecated since @angular/build 22.2.0 ("No longer needed with Vitest 5") and still honoured: one self-contained bundle per spec, and \`--coverage\` grows by hundreds of megabytes.`:`${s} sets \`"splitting"\`, deprecated since @angular/build 22.2.0 ("No longer needed with Vitest 5"); \`true\` is the default, so the key changes nothing.`,fix:`Remove \`"splitting"\` from ${s}.`}]})}a(_i,"splittingDeprecated");function Ni(e,t){let n=v(e,we);return t===void 0||n===void 0?[]:be(t,Ii)>=0&&be(n,Oi)<0?[{check:"analog-behind-angular-build",severity:"error",file:`node_modules/${we}/package.json`,message:`${we} ${n} is too old for @angular/build ${t}: the run dies at startup with \`TypeError: cache.has is not a function\`, because from 22.2.0 the builder's \`SourceFileCache\` no longer extends \`Map\`.`,fix:"Upgrade `@analogjs/vite-plugin-angular` and `@analogjs/vitest-angular` to 2.7.5 or newer."}]:[]}a(Ni,"analogBehind");function jt(e){let t=v(e.cwd,"@angular/build");return [...Ri(e,t),..._i(e,t),...Ni(e.cwd,t)]}a(jt,"checkAngularBuild");var Vi=".angular/cache",Rt="On a 700-file suite a cold cache cost +2.91 s (+33 %) per run.";function Li(e){let t$1=c(m(join(e.cwd,"angular.json"))??"");if(!t(t$1))return;let n=t(t$1.cli)?t$1.cli:{},i=t(n.cache)?n.cache:{};return {enabled:i.enabled!==false,environment:typeof i.environment=="string"?i.environment:void 0,path:typeof i.path=="string"?i.path.replace(/^\.\//,"").replace(/\/$/,""):Vi}}a(Li,"cacheSettings");function It(e){let t=Li(e),n=J$1(e);return t?.enabled!==true||n.length===0||!b$1(e).some(i=>i.file==="angular.json")?[]:t.environment===void 0||t.environment==="local"?[{check:"angular-cache-off-in-ci",severity:"info",file:"angular.json",message:`The Angular build cache is off in CI: \`cli.cache.environment\` is \`local\`${t.environment===void 0?" (the default)":""}, so every CI run of the unit-test builder compiles the whole suite cold. ${Rt}`,fix:`Set \`"cli": { "cache": { "environment": "all" } }\` in angular.json, and persist \`${t.path}\` between CI runs with a key on the lockfile hash.`}]:t.environment==="none"||Y(n,t.path)||he(n)?[]:[{check:"angular-cache-off-in-ci",severity:"info",file:"angular.json",message:`The Angular build cache is on in CI (\`cli.cache.environment: ${t.environment}\`), and no CI config (${n.map(({file:i})=>i).join(", ")}) keeps \`${t.path}\`: every run starts it empty, so CI pays the cold compile anyway. ${Rt}`,fix:`Persist \`${t.path}\` between CI runs \u2014 for GitHub Actions an \`actions/cache\` step with that path and a key on the lockfile hash.`}]}a(It,"checkAngularCacheInCi");var Di=/["']@analogjs\/(?:vite-plugin-angular|platform|vitest-angular)["']/,Ui=/["']vitest-auto-spy\/(?:angular|angular-http)["']/,Bi=/^(?:inline|noExternal)\s*:\s*(?:true\b|\[[^\]]*vitest-auto-spy)/;function Ki(e){return [...d$2(e).matchAll(/\b(?:inline|noExternal)\s*:/g)].some(n=>Bi.test(e.slice(n.index)))}a(Ki,"inlinesThePackage");function Ot(e,t){if(!e.hasAngular||!w(e,"vitest-auto-spy"))return;let n=C(t,A),i=n.find(({text:s})=>Di.test(s));if(i===void 0||n.some(({text:s})=>Ki(s)))return;let r=0;return {visit:a((s,a)=>{r+=Ui.test(a)?1:0;},"visit"),finish:a(()=>r===0?[]:[Hi(i.file,r)],"finish")}}a(Ot,"angularTestBedSplitPass");function Hi(e,t){return {check:"angular-testbed-split",severity:"warning",file:e,message:`The Analog plugin inlines \`@angular/core/testing\` while Vitest externalizes \`vitest-auto-spy\`, which ${t} ${t===1?"file imports":"files import"} for Angular: its \`TestBed\` is a second copy nobody initialised, and \`injectSpy\` throws "Need to call TestBed.initTestEnvironment() first" or "Cannot read properties of null (reading 'ngModule')".`,fix:"Add `server: { deps: { inline: ['vitest-auto-spy'] } }` to the `test` block of this config, so the package goes through Vite and shares the spec's `TestBed`."}}a(Hi,"split");var Wi=["vitest.config.ts","vitest.config.mts","vitest.config.js","vitest.config.mjs","vite.config.ts","vite.config.mts",...["ts","mts","cts","js","mjs","cjs"].map(e=>`vitest-base.config.${e}`)],Ji=["src/test-setup.ts","src/setup-tests.ts","src/vitest.setup.ts"];function zi(e){return e.optionBlocks.some(t=>{let n=t.setupFiles,i=t.runnerConfig;return Array.isArray(n)&&n.length>0||i!==void 0&&i!==false})}a(zi,"declaresSetup");function Yi(e,t){let n=a(s=>posix.join(t,s.replace(/^\.\//,"")),"inProject");for(let s of Wi){let a=m(posix.join(e.cwd,n(s))),c=a===void 0?[]:v$1(a);if(c.length>0)return {files:c.map(n),source:`listed in the \`setupFiles\` of ${n(s)}`}}let i=new Set(e.files),r=Ji.map(n).filter(s=>i.has(s));return r.length>0?{files:r,source:"found at the conventional path"}:void 0}a(Yi,"intendedSetup");function _t(e){return b$1(e).flatMap(t=>{let n=zi(t)?void 0:Yi(e,t.root);if(n===void 0)return [];let i=n.files.map(s=>`\`${s}\``).join(", "),r=n.files.map(s=>`"${s}"`).join(", ");return [{check:"builder-setup-unreached",severity:"warning",file:t.file,message:`\`${t.project}:${t.name}\` runs through \`${t.builder}\`, which runs only the setup files its target names, so ${i}, ${n.source}, never runs there. \`setupAutoSpy()\`, registered matchers and the mock adapter are missing under that target.`,fix:`Add \`"setupFiles": [${r}]\` to the options of \`${t.project}:${t.name}\` in ${t.file}.`}]})}a(_t,"checkBuilderSetup");var qi=[21],Zi=5,Qi=["ts","mts","cts","js","mjs","cjs"];function er(e,t,n){return typeof n=="string"&&n!==""?n.replace(/^\.\//,""):n!==true?void 0:[...new Set([t.root,""])].flatMap(r=>Qi.map(s=>posix.join(r,`vitest-base.config.${s}`))).find(r=>m(join(e.cwd,r))!==void 0)}a(er,"namedConfig");function tr(e,t){return t===void 0?[]:B(t,m(join(e.cwd,t))??"")}a(tr,"keysOf");function nr(e,t){let n=t.optionBlocks.map(r=>er(e,t,r.runnerConfig)).find(Boolean),i=t.optionBlocks.flatMap(r=>Array.isArray(r.browsers)?r.browsers.filter(s=>typeof s=="string"):[]);return {target:t,config:n,keys:tr(e,n),browsers:i}}a(nr,"targetConfig");function xe(e){return ir(e)?b$1(e).map(t=>nr(e,t)):[]}a(xe,"builderTargets");function ir(e){let t=v(e.cwd,"@angular/build");return t!==void 0&&!x(t,qi)}a(ir,"isRunnerConfigRead");function rr(e,{config:t,keys:n,browsers:i}){if(i.length>0)return;let r=n.filter(c=>E(c,"coverage.provider")).map(G)[0];if(r!==void 0)return r==="istanbul"?`${String(t)} sets \`coverage.provider: 'istanbul'\``:void 0;let s=v(e.cwd,"@vitest/coverage-istanbul")!==void 0,a=v(e.cwd,"@vitest/coverage-v8")!==void 0;return s&&!a?"only `@vitest/coverage-istanbul` is installed, so the builder picks istanbul":void 0}a(rr,"istanbulBecause");var sr=a(({keys:e})=>e.some(t=>E(t,"fsModuleCache")&&F(t)),"hasModuleCache"),or="The module cache took an istanbul coverage run under the builder from 24.55 s to 13.20 s (up to \u221246 %) on an Angular 22.2 suite of 700 spec files on Vitest 5, and from 27.01 s to 15.85 s (\u221241 %) with the builder cache off, as it is on CI; on an 862-spec suite it took 48 s to 39 s (\u221219 %). Switching that suite to v8 beat istanbul with the cache about 2x: 19\u201322 s, where the cache gained nothing, since the builder has already bundled the code. The cache pays off on CI only when CI keeps `node_modules/.vitest-cache` between runs.",ar=" Or switch the target to `coverage.provider: 'v8'`, with `@vitest/coverage-v8` installed: it needs no cache, and the coverage thresholds are worth one run to confirm after the switch.";function cr(e,{first:t,why:n,targets:i}){let r=L(i.map(({target:d})=>d)),s=J$1(e),a=s.length>0&&!Y(s,oe)?` ${ye(oe)}`:"",c=t.config===void 0?`Add \`"runnerConfig": "vitest-base.config.mts"\` to the options of ${r}, and export \`defineConfig({ test: { fsModuleCache: true } })\` from that file.`:`Add \`fsModuleCache: true\` to the \`test\` block of ${t.config}.`;return {check:"angular-build-istanbul-module-cache",severity:"info",file:t.config??t.target.file,message:`${r} collects coverage with istanbul through \`${t.target.builder}\` (${n}), and no runner config of it turns on \`fsModuleCache\`: every run instruments every file again. ${or}`,fix:`${c}${a}${ar}`}}a(cr,"moduleCacheFinding");function dr(e,t){let n=y(e.cwd);if(n===void 0||n<Zi)return [];let i=new Map;for(let r of t){let s=sr(r)?void 0:rr(e,r);if(s!==void 0){let a=r.config??"",c=i.get(a)??{first:r,why:s,targets:[]};c.targets.push(r),i.set(a,c);}}return [...i.values()].map(r=>cr(e,r))}a(dr,"checkIstanbulModuleCache");function lr(e,t){let n=v(e.cwd,"jsdom");if(n===void 0||v(e.cwd,"happy-dom")!==void 0)return [];let i=t.filter(({keys:s,browsers:a})=>a.length===0&&!s.some(c=>E(c,"environment")));return i.length===0?[]:[{check:"angular-build-happy-dom",severity:"info",file:"package.json",message:`${L(i.map(({target:s})=>s))} runs on jsdom ${n} only because \`happy-dom\` is not installed: from @angular/build 21 the builder picks happy-dom by itself whenever it resolves, unless the runner config sets \`environment\`. On an Angular 22.2 suite of 700 spec files happy-dom took 4.6 % off the wall time and 6 % off the resident memory of the run.`,fix:"`npm i -D happy-dom`; no config line is needed. happy-dom implements less of the platform than jsdom, so run the suite once and keep jsdom (uninstall happy-dom) if a spec depends on what it lacks."}]}a(lr,"checkHappyDom");function Gt(e){let t=xe(e);return [...dr(e,t),...lr(e,t)]}a(Gt,"checkBuilderSpeed");var fr=["vitest.config.ts","vitest.config.mts","vitest.config.cts","vitest.config.js","vitest.config.mjs","vite.config.ts","vite.config.mts","vite.config.cts","vite.config.js","vite.config.mjs"],gr=["ts","mts","cts","js","mjs","cjs"].map(e=>`vitest-base.config.${e}`),pr=/(^|\/)(?:angular|workspace|project)\.json$/,Vt="@angular/build:unit-test",mr=a(e=>[e.builder,e.executor].some(t=>typeof t=="string"&&a$1.has(t)),"runsUnitTestBuilder"),hr=4,Lt=5,yr=50;function vr(e){let t=/coverage\s*:\s*{/.exec(e);if(t===null)return;let n=0;for(let i=t.index+t[0].length-1;i<e.length;i+=1)if(e[i]==="{")n+=1;else if(e[i]==="}"&&(n-=1,n===0))return e.slice(t.index,i+1)}a(vr,"coverageBlock");function Dt(e){let t=0,n="";for(let i of e)i==="{"?t+=1:i==="}"?t-=1:t===1&&(n+=i);return n}a(Dt,"ownKeysText");function wr(e,t){return new RegExp(`(?:^|[\\s,])${t}\\s*:`).test(Dt(e))}a(wr,"declaresKey");function Se(e,t){return h(Dt(e),new RegExp(`(?:^|[\\s,])${t}\\s*:\\s*\\[([^\\]]*)]`,"g")).flatMap(i=>h(i,/["'`]([^"'`]+)["'`]/g))}a(Se,"arrayPatterns");function br(e){return Se(e,"include")}a(br,"includePatterns");function xr(e){let t=e.slice(e.lastIndexOf("/")+1);if(!t.includes("."))return true;let n=t.slice(t.lastIndexOf(".")+1);return n==="*"||/^[cm]?js$/.test(n)||/^{[^}]*\b[cm]?js\b[^}]*}$/.test(n)}a(xr,"canMatchBundleChunk");function ke(e,t$1){if(Array.isArray(e)){for(let i of e)ke(i,t$1);return}if(!t(e))return;let n=e.options;mr(e)&&t(n)&&t$1(n);for(let i of Object.values(e))ke(i,t$1);}a(ke,"forEachUnitTestOptions");function Ut(e,t){for(let n of e.files.filter(i=>pr.test(i)))ke(c(m(join(e.cwd,n))??""),t);}a(Ut,"forEachWorkspaceUnitTest");function Sr(e){let t=0;return Ut(e,n=>{for(let i of ["coverageInclude","coverageExclude"]){let r=n[i];Array.isArray(r)&&(t+=r.length);}}),t}a(Sr,"targetScopeSize");function kr(e,t){for(let n of new Set(t)){let i=gr.map(r=>posix.join(n,r)).find(r=>m(join(e.cwd,r))!==void 0);if(i!==void 0)return i}}a(kr,"baseConfigIn");function $r(e){let t=new Set;Ut(e,n=>{let i=n.runnerConfig;typeof i=="string"&&t.add(i.replace(/^\.\//,""));});for(let n of b$1(e)){let i=n.optionBlocks.some(r=>r.runnerConfig===true)?kr(e,[n.root,""]):void 0;i!==void 0&&t.add(i);}return [...t]}a($r,"unitTestRunnerConfigs");function Bt(e){let t=$r(e),n=Sr(e),i=y(e.cwd),r=b$1(e).length>0?` Under \`${Vt}\`, Vitest 5 needs @angular/build 22.2.0 or newer.`:"",s=[];for(let a of [...new Set([...t,...fr])]){let c=m(join(e.cwd,a)),d=c===void 0?void 0:vr(c);if(d===void 0)continue;i!==void 0&&i>=hr&&wr(d,"all")&&s.push({check:"coverage-all-removed",severity:"warning",file:a,message:`\`coverage.all\` no longer exists in Vitest ${i}: the key is absent from \`coverageConfigDefaults\` and nothing reads it. The pass over files no test imported is driven by \`coverage.include\` now.`,fix:"Delete `all` and declare `coverage.include` instead. Without an include the report has been covering only the files the run imported \u2014 which is what this config has been silently doing since the upgrade."});let l=Se(d,"include").length+Se(d,"exclude").length+n;i!==void 0&&i<Lt&&l>=yr&&s.push({check:"coverage-include-recompiles-globs",severity:"info",file:a,message:`The coverage scope here is ${l} globs, and Vitest ${i} compiles every one of them again for every file it checks, so matching can cost more than the coverage itself.`,fix:`Upgrade to Vitest ${Lt}, which compiles them once.${r} To stay on ${i}, use the custom-provider recipe: ${c$1}`});let u=t.includes(a)?br(d):[];u.length>0&&!u.some(xr)&&s.push({check:"coverage-include-misses-bundle",severity:"warning",file:a,message:`\`coverage.include\` here names only sources, and \`${Vt}\` runs the suite over a bundle: the provider matches the list once against the executed chunks, before any remap, and every counter is dropped there.`,fix:"Move the list to the target\u2019s `coverageInclude` option \u2014 the builder prepends `spec-*.js` and `chunk-*.js` to it, which is exactly what the pre-remap pass needs. Keeping it here means an empty report from a run that stays green."});}return s}a(Bt,"checkCoverageConfig");var Tr=/@jest-(?:environment-options|environment|config)\b/g;var Pr=/^[\t ]+([\w./@-]+)/;function Er(e){let t=new Map;for(let n of e.matchAll(Tr)){let i=n[0],r=i==="@jest-environment"?Pr.exec(e.slice(n.index+i.length))?.[1]:void 0,s=`${i} ${r??""}`,a=t.get(s)??{pragma:i,value:r,lines:[]};a.lines.push(e.slice(0,n.index).split(`
3
3
  `).length),t.set(s,a);}return [...t.values()]}a(Er,"pragmaSites");function Ar(e){return e.length===1?`Line ${e[0]}`:`Lines ${e.join(", ")}`}a(Ar,"linesOf");function Fr({pragma:e,value:t,lines:n}){let i=Ar(n);if(e==="@jest-config"||e==="@jest-environment"&&t===void 0)return {severity:"warning",message:`${i}: \`${e}\` is a Jest docblock pragma, which Vitest never reads.`,fix:"Delete it: the runner config decides this."};let r=t===void 0?e:`${e} ${t}`;return {severity:"info",message:`${i}: \`${r}\` is the Jest spelling of a Vitest pragma. Vitest reads it as well, so it works, but it reads as a leftover of a migration.`,fix:`Write \`${r.replace("@jest-","@vitest-")}\` instead.`}}a(Fr,"findingFor");function Kt(){let e=[];return {visit:a((t,n)=>{if(b$2(t))for(let i of Er(n))e.push({check:"foreign-runner-pragma",file:t,...Fr(i)});},"visit"),finish:a(()=>e,"finish")}}a(Kt,"foreignPragmaPass");function Rr(e,t){return e.includes(t)?[t]:e}a(Rr,"candidates");function Ir(e,t,n,i){let r=i.map(s=>`\`${s}\``).join(" or ");return {check:"helper-from-wrong-entry",severity:"error",file:e,message:`Imports \`${n}\` from \`${t}\`, which does not export it.`,fix:`Change the specifier to ${r}. The entry point decides which mock adapter and which framework wiring the file gets, which is why the name is not re-exported from the root.`}}a(Ir,"findingFor");function Or(e,t,n){let i=e$1(join(e.cwd,dirname(t)));return c$2(n).filter(r=>i?.has(r)===true)}a(Or,"publishedOwners");function Ht(e){return f$1(e,(t,n,i)=>{for(let{entry:r,name:s}of a$3(n)){let a=b$3(r),c=a===void 0||a.has(s)?[]:Rr(Or(e,t,s),e.entry);c.length>0&&i(Ir(t,r,s,c));}})}a(Ht,"helperEntryPass");var _r=["@hirez_io/observer-spy","@types/jasmine","jasmine-auto-spies","jasmine-core"],Nr=/^karma/,Gr=/(^|\/)karma\.conf\.[cm]?[jt]s$/,Vr=/(^|\/)tsconfig[^/]*\.json$/;function Lr(e){return Object.keys(e.dependencies).filter(t=>_r.includes(t)||Nr.test(t)).sort((t,n)=>t.localeCompare(n))}a(Lr,"packageEvidence");function Dr(e){let t$1=m(e),n=t$1===void 0?void 0:c(t$1),i=t(n)?n.compilerOptions:void 0,r=t(i)?i.types:void 0;return Array.isArray(r)&&r.includes("jasmine")}a(Dr,"declaresJasmineTypes");function Ur(e){return [...Lr(e),...e.files.filter(t=>Gr.test(t)),...e.files.filter(t=>Vr.test(t)&&Dr(join(e.cwd,t)))]}a(Ur,"evidenceOf");function Wt(e){let t=Ur(e);return t.length===0?[]:[{check:"jasmine-era-project",severity:"info",message:`This repository still carries the jasmine era: ${t.join(", ")}.`,fix:"Two steps, in this order. Point the specs at `vitest-auto-spy/jasmine`, which keeps `.and`, `.calls` and `.withArgs` working, and land the suite green. Then run `npx vitest-auto-spy codemod --from jasmine` and drop that import \u2014 it rewrites the compatibility layer away, `spyOn` included."}]}a(Wt,"checkJasmineEra");var Br=/\bSet\.prototype\.forEach\s*=|\bSet\.prototype\s*,\s*["']forEach["']/,Te="vitest-auto-spy.sweepSentinel";function Jt(e){if(!w(e,"vitest-auto-spy"))return;let t=[];return {visit:a((n,i)=>{Br.test(i)&&/\bclearAllMocks\b/.test(d$2(i))&&!i.includes(Te)&&t.push(Kr(n));},"visit"),finish:a(()=>t,"finish")}}a(Jt,"mockRegistryCapturePass");function Kr(e){return {check:"mock-registry-capture-drops-sentinel",severity:"warning",file:e,message:`Captures Vitest's mock registry by hand and never mentions \`Symbol.for('${Te}')\`: a prune that drops that entry turns \`vi.clearAllMocks()\` and \`clearMocks: true\` into a no-op for every auto-spy.`,fix:`Skip the entry that carries it \u2014 \`if (Symbol.for('${Te}') in mock) continue;\` \u2014 or replace the capture with \`setupAutoSpy({ pruneMockRegistry: true })\`, which keeps it. On Vitest 5 there is no growing registry to prune, and the capture can go.`}}a(Kr,"finding");var Wr=/["'][\w/@-]*\/no-redundant-mock-reset["']\s*:\s*\[/g,Jr=/\bconfigFile\s*:\s*(["'`])([^"'`]+)\1/g,zr=/\b(?:clearMocks|mockReset|restoreMocks)\s*:/g,Yr=/\b(?:clearMocks|mockReset|restoreMocks)\b/,Xr=/\b(?:export\s+default|module\.exports\s*=)\s*([$A-Z_a-z][\w$.]*)\s*(?:<[^>]*>)?\s*\(/,qr=new Set(["defineConfig","defineProject"]);function Zr(e,t,n){let i=0;for(let r=n;r<e.length;r+=1){let s=t.find(c=>c.start===r);if(s!==void 0){r=s.end-1;continue}let a=e.charAt(r);if(i+=a==="["?1:a==="]"?-1:0,i===0)return r+1}return e.length}a(Zr,"closingBracket");function zt(e,t,n){return !b(e,n+t.index)}a(zt,"inCode");function Qr(e){if(!e.includes("no-redundant-mock-reset"))return [];let t=a$2(e),n=[];for(let i of e.matchAll(Wr)){if(t.find(d=>d.start<=i.index&&i.index<d.end)?.start!==i.index)continue;let r=i.index+i[0].length-1,s=e.slice(r,Zr(e,t,r)),a=[...s.matchAll(Jr)].find(d=>zt(t,d,r))?.[2],c=[...s.matchAll(zr)].some(d=>zt(t,d,r));a!==void 0&&!c&&n.push(a);}return n}a(Qr,"unflaggedConfigFiles");function es(e){if(Yr.test(e))return;let t=Xr.exec(e)?.[1];return t===void 0||qr.has(t)?void 0:t}a(es,"unreadableCallee");function Yt(e){let t=[];return {visit:a((i,r)=>{for(let s of Qr(r)){let a=es(m(resolve(e.cwd,s))??"");a!==void 0&&t.push({check:"mock-reset-config-unread",severity:"info",file:i,message:`\`no-redundant-mock-reset\` reads \`${s}\`, whose default export is a \`${a}(\u2026)\` call: the rule reads the file as text, finds no \`clearMocks\` / \`mockReset\` / \`restoreMocks\`, and decides on the runner's defaults instead of what \`${a}\` sets.`,fix:"Write the flags that config ends up with as `configFlags` in the rule options, e.g. `{ configFile, configFlags: { clearMocks: true } }`; they are read as if the file wrote them, so a builder target that does not load it is still narrowed."});}},"visit"),finish:a(()=>t,"finish")}}a(Yt,"mockResetConfigPass");var ns=/\bvi\.(?:mock|doMock)\(\s*(["'`])([^"'`]+)\1\s*([),])/g,is=/^\s*{\s*spy\s*:\s*true\s*}\s*\)/,rs=/(^|\/)[\w.-]*vite[\w.-]*\.[cm]?[jt]s$/;function ss(e){let t=a$2(e);return [...e.matchAll(ns)].filter(n=>!b(t,n.index)).map(n=>{let i=e.slice(n.index+n[0].length),r=n[3]===")"||is.test(i);return {specifier:String(n[2]),kind:r?"automock":"factory"}})}a(ss,"mockCalls");function os(e){let t=e.files.filter(i=>rs.test(i)).find(i=>/\bisolate\s*:\s*false\b/.test(String(m(posix.join(e.cwd,i)))));if(t!==void 0)return `\`isolate: false\` in ${t}`;let[n]=b$1(e);return n!==void 0&&b$4(e)?.isolated===false?`the \`isolate: false\` default of ${n.builder}`:void 0}a(os,"sharedEnvironmentSource");var Xt=6;function as(e){let t=e.length<=Xt?e:e.slice(0,Xt-1),n=e.length-t.length;return `${t.join(", ")}${n===0?"":` and ${n} more`}`}a(as,"listFiles");function qt(e){let t=os(e);if(t===void 0)return;let n=new Set(e.files),i=new Map;return {visit:a((s,a)=>{if(b$2(s))for(let{specifier:c,kind:d}of ss(a)){let l=f(s,c,n)??c,u=i.get(l)??new Map;u.set(d,[...u.get(d)??[],{file:s,specifier:c}]),i.set(l,u);}},"visit"),finish:a(()=>cs(i,t),"finish")}}a(qt,"moduleMockLeakPass");function cs(e,t){return [...e].flatMap(([n,i])=>{let r=(i.get("factory")??[]).map(s=>s.file);return r.length===0?[]:(i.get("automock")??[]).map(({file:s,specifier:a})=>({check:"module-mock-leak",severity:"warning",file:s,message:`\`${n}\` is automocked here and mocked with a factory in ${as(r)}. With ${t}, a later automock of the module gets that factory, so this file fails with \`No "\u2026" export is defined on the "${a}" mock\` whenever the two share a worker.`,fix:`Give \`vi.mock('${a}')\` in this file a factory too, as ${String(r[0])} does.`}))})}a(cs,"leaks");var ls=[{pattern:/(^|\/)jest[.-](?:config|preset|setup)\.[cm]?[jt]sx?$|(^|\/)jest\.config\.json$|(^|\/)setup-jest\.[cm]?[jt]sx?$/,runner:"jest",packages:["jest","ts-jest","jest-preset-angular","@jest/globals","babel-jest","@types/jest"],binary:/\bjest\b/},{pattern:/(^|\/)karma\.conf\.[cm]?[jt]s$/,runner:"karma",packages:["karma","karma-jasmine","@angular-devkit/build-angular"],binary:/\bkarma\b/}];function us(e,t){return Object.values(t.scripts).some(i=>e.binary.test(i))||e.packages.some(i=>t.dependencies[i]!==void 0)}a(us,"isRunnerInstalled");function fs(e){let t=h(e,/["']([^"']+)["']/g);return [...new Set(t.filter(n=>n.includes("/")||n.includes(".")).map(n=>n.replace(/^<rootDir>\//,"").replace(/^\.\//,"")).filter(n=>!n.startsWith("@")&&!n.startsWith("<")&&/\.[cm]?[jt]sx?$/.test(n)))]}a(fs,"referencedPaths");function gs(e,t,n,i){let r=new Set(n.setupFiles.map(s=>s.replace(/^\.\//,"")));return fs(t).filter(s=>n.files.includes(s)&&!r.has(s)&&(i.importedBy.get(s)??[]).length===0).map(s=>({check:"orphan-runner-file",severity:"warning",file:s,message:`Referenced only by ${e}, which configures a runner this repository no longer installs.`,fix:"Nothing loads this file. Delete it, or move what it does into the live runner\u2019s setup file."}))}a(gs,"orphanFindings");function Zt(e,t){let n=[];for(let i of ls)if(!us(i,e))for(let r of e.files.filter(s=>i.pattern.test(s))){let s=m(join(e.cwd,r))??"";n.push({check:"dead-runner-config",severity:"warning",file:r,message:`Configures ${i.runner}, which is not installed in this repository.`,fix:"Delete it. While it stays, every reader \u2014 human or agent \u2014 treats it as the source of truth for how tests run."}),n.push(...gs(r,s,e,t));}return n}a(Zt,"checkOrphanRunnerConfig");var ps=/^vite(?:st)?\.config\.[cm]?[jt]s$/,ms="On a 48-file Angular suite switching the runner config to happy-dom took Duration from 1.37 s to 1.10 s (\u221220 %), suite green.";function hs({keys:e,browsers:t}){let n=e.filter(i=>E(i,"environment")).map(G)[0];return t.length===0&&(n??"happy-dom")==="happy-dom"}a(hs,"builderRunsHappyDom");var Qt=a(e=>e.length===1?"runs":"run","runs");function ys(e,t){return e===""||t===e||t.startsWith(`${e}/`)}a(ys,"covers");function en(e,t){if(v(e.cwd,"happy-dom")===void 0||v(e.cwd,"jsdom")===void 0)return [];let n=xe(e),i=new Set(n.map(({config:s})=>s)),r=n.filter(hs);return C(t,s=>ps.test(posix.basename(s))&&!i.has(s)).flatMap(({file:s,text:a})=>{let c=B(s,a).some(p=>E(p,"environment")&&G(p)==="jsdom"),d=posix.dirname(s)==="."?"":posix.dirname(s),l=c?r.filter(({target:p})=>ys(d,p.root)):[],[u]=l;return u===void 0?[]:[{check:"runner-dom-differs-from-builder",severity:"warning",file:s,message:`${s} sets \`environment: 'jsdom'\`, while ${L(l.map(({target:p})=>p))} ${Qt(l)} through \`${u.target.builder}\` on happy-dom, which the builder picks whenever it resolves and the target's runner config does not set \`environment\`. \`vitest run\` and the IDE test one DOM, \`ng test\` / \`nx test\` another, so a spec can pass in one and fail in the other. ${ms}`,fix:`Set \`environment: 'happy-dom'\` in the \`test\` block of ${s}. A spec that needs jsdom keeps it with a \`// @vitest-environment jsdom\` comment at its top.`}]})}a(en,"checkRunnerDom");var vs=/\bimport\s*{([^}]*)}\s*from\s*["']@analogjs\/vitest-angular\/setup-testbed["']/g,tn=["errorOnUnknownElements","errorOnUnknownProperties"],ws="setupTestBed({ errorOnUnknownElements: true, errorOnUnknownProperties: true })";function bs(e){let t=a$2(e),n=[...e.matchAll(vs)].find(r=>!b(t,r.index))?.[1],i=n===void 0?null:/\bsetupTestBed\b(?:\s+as\s+([$A-Z_a-z][\w$]*))?/.exec(n);return i===null?void 0:i[1]??"setupTestBed"}a(bs,"localName");function xs(e,t){let n=a$2(e),i=[...e.matchAll(new RegExp(`(?<![\\w$.])${t.replace(/\$/g,"\\$")}\\s*\\(`,"g"))].find(a=>!b(n,a.index));if(i===void 0)return;let r=i.index+i[0].length-1,s=e.slice(r+1,z(e,n,r)).trim();if(!(s!==""&&!s.startsWith("{")))return tn.filter(a=>!new RegExp(`\\b${a}\\s*:`).test(s))}a(xs,"unsetFlags");function nn(e){let t=b$1(e),[n]=t;if(n===void 0)return;let i=[],r=a((s,a)=>{let c=bs(a),d=c===void 0?void 0:xs(a,c);if(d===void 0||d.length===0)return [];let l=d.map(p=>`\`${p}\``).join(" and "),u=d.length===tn.length?`Call \`${ws}\`, the TestBed the builder sets up.`:`Add ${d.map(p=>`\`${p}: true\``).join(", ")} to the options of \`setupTestBed(\u2026)\`, as the builder's TestBed has it.`;return [{check:"analog-testbed-laxer-than-builder",severity:"warning",file:s,message:`${s} calls \`setupTestBed()\` from \`@analogjs/vitest-angular/setup-testbed\` without ${l}, which Analog leaves off, while ${L(t)} ${Qt(t)} through \`${n.builder}\`, whose TestBed turns both on. A misspelt element or binding in a template passes \`vitest run\` and fails \`ng test\` / \`nx test\`.`,fix:u}]},"laxerIn");return {visit:a((s,a)=>{i.push(...r(s,a));},"visit"),finish:a(()=>i,"finish")}}a(nn,"analogTestBedPass");function rn(e){return e.filesTruncated?[{check:"scan-cap-reached",severity:"warning",message:`The repository scan stopped at its safety cap of ${g()} files, so every check here read only part of the tree. A clean result below is not a clean repository.`,fix:`Raise the cap with ${f$2}, or run doctor with --cwd on a smaller part of the tree.`}]:[]}a(rn,"checkScanCap");var X={values:new Map,open:true},Ss={values:new Map,open:false},R=Symbol("missing"),sn=12,ks=/^[$A-Z_a-z][\w$]*/,$s=/^(?:[$A-Z_a-z][\w$]*|(["'])[^\n"']*\1)/,Ts=/^(?:Object\s*\.\s*freeze\s*)?\(/,Ps=/^(?:\s+(?:as|satisfies)\s+[\w$.]+(?:<[^\n;]*>)?(?:\[[^\n\]]*])*)*/,Es=/(?<![\w$.])import\s+(?!type\b)([\s\w$,{}]*?)\s*from\s*["']/g,As=/(?<![\w$.])export\s+(?!type\b)({[^}]*})(?:\s*from\s*["'])?/g,Fs=/(?<![\w$.])export\s*\*\s*from\s*["']/g,Cs=/(?<![\w$.])export\s+default\s+/,js="({[",Rs=")}]";function Fe(e,t){if(!e.values.has(t))return e.open?{kind:"unknown"}:{kind:"unset"};let n=e.values.get(t);return n===void 0?{kind:"unknown"}:{kind:"value",text:n}}a(Fe,"keyValue");function on(e,t){if(t.open)for(let n of e.keys())e.set(n,void 0);for(let[n,i]of t.values)e.set(n,i);return t.open}a(on,"spread");function cn(e){return js.includes(e)?1:Rs.includes(e)?-1:0}a(cn,"nesting");function an(e,t){let n=0;for(let i=t;i<e.length;i+=1)if(n+=cn(e.charAt(i)),n===0)return i;return -1}a(an,"closingOf");function Ee(e,t){return /^[\t ]*(?:[\n\r),;}]|$)/.test(e.slice(t).replace(Ps,""))}a(Ee,"endsCleanly");function Ae(e){return e.search(/\S|$/)}a(Ae,"leadingSpace");var ae=class{static{a(this,"SettingsReader");}#e=new Map;#t;constructor(t){this.#t=t;}withText(t,n){let i={file:t,text:n,code:e(n)};return this.#e.set(t,i),i}#o(t){if(!this.#e.has(t)){let n=this.#t.texts.get(t);this.#e.set(t,n===void 0?void 0:{file:t,text:n,code:e(n)});}return this.#e.get(t)}valueAt(t,n,i=0){let{code:r}=t,s=n+Ae(r.slice(n));if(r.charAt(s)===")")return Ss;let a=Ts.exec(r.slice(s))?.[0];if(a!==void 0){let l=an(r,s+a.length-1);return l!==-1&&Ee(r,l+1)?this.valueAt(t,s+a.length,i):X}if(r.charAt(s)==="{"){let l=an(r,s);return l!==-1&&Ee(r,l+1)?this.#a(t,s,l,i):X}let c=ks.exec(r.slice(s))?.[0];if(c===void 0||!Ee(r,s+c.length)||i>=sn)return X;let d=this.#n(t,c,i+1);return d===R?X:d}#a(t,n,i,r){let s=new Map,a=false,c=n+1,d=0;for(let l=n+1;l<=i;l+=1){let u=t.code.charAt(l);l===i||u===","&&d===0?(a=this.#c(t,c,l,s,r)||a,c=l+1):d+=cn(u);}return {values:s,open:a}}#c(t,n,i,r,s){let a=n+Ae(t.code.slice(n,i)),c=t.code.slice(a,i).trimEnd();if(c.startsWith("..."))return on(r,this.valueAt(t,a+3,s));if(c.startsWith("["))return on(r,X);let d=$s.exec(c)?.[0];if(d===void 0)return false;let l=t.text.slice(a,a+d.length).replace(/^["']|["']$/g,""),u=/^\s*:/.exec(c.slice(d.length));if(u===null)return c===d&&r.set(l,void 0),false;let p=a+d.length+u[0].length,T=t.code.slice(p,a+c.length),v=Ae(T),ee=t.text.slice(p+v,p+T.trimEnd().length);return /^(?:undefined|null)$/.test(ee)?r.delete(l):r.set(l,ee),false}#n(t,n,i){let r=new RegExp(`(?<![\\w$.])(?:const|let|var)\\s+${n.replace(/\$/g,"\\$")}\\s*(?::[^=;]*)?=(?![=>])`).exec(t.code);if(r!==null)return this.valueAt(t,r.index+r[0].length,i);let s=this.#s(t,Es).find(({local:a})=>a===n);return s===void 0?R:this.#i(t,String(s.specifier),s.imported,i)}#d(t,n,i){let r=this.#o(t);if(r===void 0||i>=sn)return R;if(n==="default"){let c=Cs.exec(r.code);return c===null?R:this.valueAt(r,c.index+c[0].length,i)}let s=this.#s(r,As).find(({local:c})=>c===n);if(s!==void 0)return s.specifier===void 0?this.#n(r,s.imported,i+1):this.#i(r,s.specifier,s.imported,i);let a=this.#n(r,n,i+1);if(a!==R)return a;for(let c of r.code.matchAll(Fs)){let d=this.#i(r,this.#r(r,c.index+c[0].length),n,i);if(d!==R)return d}return R}#i(t,n,i,r){let s=this.#t.imports.get(t.file)??[],a=f(t.file,n,new Set(s)),c=a!==void 0?[a]:n.startsWith(".")?[]:s;for(let d of c){let l=this.#d(d,i,r+1);if(l!==R)return l}return R}#r(t,n){return t.text.slice(n,t.text.indexOf(t.text.charAt(n-1),n))}#s(t,n){return [...t.code.matchAll(n)].flatMap(i=>{let r=/["']$/.test(i[0])?this.#r(t,i.index+i[0].length):void 0,s=String(i[1]),a=/{([^}]*)}/.exec(s)?.[1]??"",c=/^\s*([$A-Z_a-z][\w$]*)/.exec(s.replace(/^\s*{[^}]*}/,""))?.[1],d=a.split(",").flatMap(l=>{let u=/^\s*(?:type\s+)?([\w$]+)(?:\s+as\s+([\w$]+))?\s*$/.exec(l);return u===null?[]:[{local:u[2]??String(u[1]),imported:String(u[1]),specifier:r}]});return c===void 0?d:[{local:c,imported:"default",specifier:r},...d]})}};var q=[["restoreMocks","a `vi.spyOn` on a shared object"],["strayTimers","a timer or animation frame still pending"],["strayListeners","a `window` / `document` listener never removed"],["restoreGlobals","a global assigned by hand"]],Is=/\bsetupAutoSpy\s*\(/g;function Os(e,t){let n=D$1(t).find(s=>E(s,"isolate")&&/^false\b/.test(s.value));if(n!==void 0)return `${n.file} sets \`isolate: false\``;let i=H(e).find(([,s])=>/--no-isolate\b|--isolate[ =]false\b/.test(s));if(i!==void 0)return `the \`${i[0]}\` script turns isolation off`;let r=b$4(e);return r?.isolated===false?r.why:void 0}a(Os,"sharedBecause");function Ms(e){return /^(?:true\b|{)/.test(e)?true:e==="false"?false:void 0}a(Ms,"truthOf");function _s(e){let t=Fe(e,"preset");return t.kind!=="value"?t.kind==="unset"?false:void 0:/^(["'`])strict\1$/.test(t.text)?true:/^["'`]/.test(t.text)?false:void 0}a(_s,"strictPreset");function Ns(e,t){let n=Fe(e,t);return n.kind==="unset"?t==="strayTimers"&&_s(e):n.kind==="value"?Ms(n.text):void 0}a(Ns,"switchOf");function ln(e,t){return e===true||t===true?true:e===void 0||t===void 0?void 0:false}a(ln,"either");function Gs(e,t,n){if(b$2(t)||!n.includes("setupAutoSpy"))return;let i=e.withText(t,n),r=[...i.code.matchAll(Is)].map(s=>e.valueAt(i,s.index+s[0].length));return r.length===0?void 0:{file:t,switches:q.map(([s])=>r.map(a=>Ns(a,s)).reduce(ln))}}a(Gs,"siteOf");function Vs(e,t){let n=e.filter(({file:r})=>t.has(r)),i=e.filter(({file:r})=>!t.has(r)).map(r=>[r]);return n.length===0?i:[n,...i]}a(Vs,"groupsOf");function dn(e,t,n,i){return {check:"shared-env-without-restore",severity:"info",...i===void 0?{}:{file:i},message:`This Angular suite shares one environment across its files (${e}), and ${n}: ${t.map(([,r])=>r).join(", ")} survives into the next file and fails there, in a file that never touched it.`,fix:`Call \`setupAutoSpy({ ${t.map(([r])=>`${r}: true`).join(", ")} })\` in the setup file, or turn isolation back on for the files that leak.`}}a(dn,"finding");function un(e,t){if(!e.hasAngular||!w(e,"vitest-auto-spy"))return;let n=Os(e,t);if(n===void 0)return;let i=new ae(t),r=[];return {visit:a((s,a)=>{let c=Gs(i,s,a);c!==void 0&&r.push(c);},"visit"),finish:a(()=>Ds(r,new Set(e.setupFiles),n),"finish")}}a(un,"sharedEnvRestorePass");function Ls(e,t,n){let i=t.map(([r])=>`\`${r}\``).join(", ");return {check:"shared-env-without-restore",severity:"info",file:String(n[0]),message:`This Angular suite shares one environment across its files (${e}), and the options \`setupAutoSpy()\` gets in ${n.join(", ")} are not statically readable, so \`doctor\` cannot tell whether ${i} ${t.length===1?"is":"are"} on: if off, ${t.map(([,r])=>r).join(", ")} survives into the next file.`,fix:`Pass an object literal, or one declared in the setup file or imported from a module of the repository, so ${i} can be read; a function call, a condition or an import from a package cannot.`}}a(Ls,"unreadable");function Ds(e,t,n){return e.length===0?[dn(n,q,"no setup file calls `setupAutoSpy()`")]:Vs(e,t).flatMap(i=>{let r=q.map((d,l)=>i.map(({switches:u})=>u[l]).reduce(ln)),s=q.filter((d,l)=>r[l]===false),a=q.filter((d,l)=>r[l]===void 0),c=i.map(({file:d})=>d);return [...s.length===0?[]:[dn(n,s,`\`setupAutoSpy()\` in ${c.join(", ")} leaves ${s.map(([d])=>`\`${d}\``).join(", ")} off`,c[0])],...a.length===0?[]:[Ls(n,a,c)]]})}a(Ds,"withoutRestore");function Us(e,t){return b$2(e)?{check:"spec-exports-fixture",severity:"warning",file:e,message:`Imports the spec ${t}, so that file's suites and hooks run inside this one too.`,fix:"Move the shared fixture into a non-spec file (`*.fixture.ts`, `*.testing.ts`) and import that from both specs."}:{check:"spec-imported-by-non-spec",severity:"error",file:e,message:`A non-spec file imports the spec ${t}.`,fix:"Under a shared test environment this is a cycle and the spec loses its own suite. Extract what is shared into a non-spec module."}}a(Us,"findingFor");function fn(e){let t=[];for(let[n,i]of e.imports)for(let r of i)b$2(r)&&t.push(Us(n,r));return t}a(fn,"checkSpecImports");var Bs=[".ts",".tsx",".d.ts",".mts",".cts",".js",".jsx",".mjs",".cjs"],Ks=[".vue",".svelte"],Hs=/(^|\/)tsconfig[^/]*\.json$/;function Ws(e){return e.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&")}a(Ws,"escapeLiteral");function Ce(e){let t=e.replace(/\*\*\/|\*\*|[*?]|[^*?]+/g,n=>n==="**/"?"(?:[^/]+/)*":n==="**"?".*":n==="*"?"[^/]*":n==="?"?"[^/]":Ws(n));return new RegExp(`^${t}$`)}a(Ce,"globToRegExp");function je(e){let t=e.replace(/\/+$/,""),n=t.slice(t.lastIndexOf("/")+1);if(n.includes("."))return [t];let i=n==="*"?t:`${t}${n==="**"?"/*":"/**/*"}`;return [...Bs,...Ks].map(r=>`${i}${r}`)}a(je,"expandInclude");function mn(e,t=()=>false){return /\.d\.[cm]?ts$/.test(e)||zs(e,t)}a(mn,"isExemptPattern");function Js(e){return e===".."||e.startsWith("../")}a(Js,"isAboveRoot");function zs(e,t){let n=e.split("/"),i=n.findIndex(s=>/[*?[]/.test(s)),r=i===-1?n:n.slice(0,i);return r.some(e$2)||r.some((s,a)=>t(r.slice(0,a+1).join("/")))}a(zs,"isOutsideScan");function Ys(e){let t=e.slice(e.lastIndexOf("/")+1),n=Math.max(t.lastIndexOf("*"),t.lastIndexOf("?"));if(n===-1)return;let i=t.slice(n+1);return i===""?void 0:i}a(Ys,"literalTail");function Xs(e,t,n){let i=posix.dirname(e),r=i==="."?"":`${i}/`;return n.some(s=>s.startsWith(r)&&s.endsWith(t))}a(Xs,"hasIntendedFiles");function qs(e,t){let n=je(e).map(Ce);return t.some(i=>n.some(r=>r.test(i)))}a(qs,"matchesAnyFile");function pn(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}a(pn,"stringList");function hn(e,t){return posix.normalize(posix.join(posix.dirname(e),t)).replace(/^\.\//,"")}a(hn,"resolveFromConfig");function Zs(e,t,n){let i=n.files;if(t.includes("${")||t.startsWith("/"))return;let r=hn(e,t);if(Js(r)||mn(r,n.isIgnoredDirectory)||qs(r,i)||n.filesTruncated)return;let s=Ys(r);return s!==void 0&&!Xs(e,s,i)?{check:"tsconfig-glob-matches-nothing",severity:"info",file:e,message:`The "include" pattern ${JSON.stringify(t)} matches no file, and there is no "*${s}" beside this config for it to miss.`,fix:"Nothing is unchecked today: the entry starts matching when the first such file is written. Delete it only if none ever will be."}:{check:"tsconfig-glob-matches-nothing",severity:"error",file:e,message:`The "include" pattern ${JSON.stringify(t)} matches no file.`,fix:"A pattern that matches nothing type-checks nothing, and `tsc --noEmit` still reports zero errors. Fix the glob or delete the entry."}}a(Zs,"checkInclude");function Qs(e,t$1){let n=m(join(e.cwd,t$1)),i=n===void 0?void 0:c(n);if(!t(i))return [];let r=pn(i.include).flatMap(s=>Zs(t$1,s,e)??[]);for(let s of pn(i.files)){let a=hn(t$1,s);!j(join(e.cwd,a))&&!mn(a,e.isIgnoredDirectory)&&r.push({check:"tsconfig-file-missing",severity:"error",file:t$1,message:`The "files" entry ${JSON.stringify(s)} does not exist.`,fix:"Remove the entry, or restore the file it used to name."});}return r}a(Qs,"checkOne");function yn(e){return e.files.filter(n=>Hs.test(n)).flatMap(n=>Qs(e,n))}a(yn,"checkTsconfigGlobs");var vn=/(?:^|\/)__mocks__\/|\.(?:fixtures?|mocks?)\.[cm]?[jt]sx?$/,eo=/(?:^|\/)tsconfig[^/]*\.json$/,to=/(?:^|\/)__tests__\/|\.(?:spec|test)\.[cm]?[jt]sx?$/,no=/(?:^|[.-])(?:lib|build)(?=[.-])/,io=/(?:^|[.-])(?:app|spec|test|tests|e2e|cypress|playwright|storybook)(?=[.-])/,ro=/\*.*\.(?:spec|test)\.(?:[cm]?[jt]sx?|\*)$|(?:^|\/)__tests__(?:\/|$)/,so=5,Re=3;function wn(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):void 0}a(wn,"stringList");function xn(e,t$1){let n=c(m(join(e.cwd,t$1))??"");return t(n)?n:void 0}a(xn,"readConfig");function Sn(e,t){return [t?.extends].flat().filter(n=>typeof n=="string"&&n.startsWith(".")).map(n=>posix.normalize(posix.join(posix.dirname(e),n.endsWith(".json")?n:`${n}.json`)))}a(Sn,"parentsOf");function kn(e,t,n,i=0){let r=a(a=>a?.map(c=>posix.normalize(posix.join(posix.dirname(t),c)).replace(/^\.\//,"")),"resolve"),s={include:r(wn(n?.include)??(Array.isArray(n?.files)?[]:void 0)),exclude:r(wn(n?.exclude))};return Sn(t,n).reduce((a,c)=>{if(i>=so||!j(join(e.cwd,c)))return a;let d=kn(e,c,xn(e,c),i+1);return {include:a.include??d.include,exclude:a.exclude??d.exclude}},s)}a(kn,"patternsOf");function bn(e,t){let n=e.flatMap(t).map(Ce);return i=>n.some(r=>r.test(i))}a(bn,"matcher");function oo(e,t){let n=e.split("/").filter(a=>a!==""),i=n.findIndex(a=>/[*?]/.test(a)),s=(i===-1?n.filter((a,c)=>c<n.length-1||!a.includes(".")):n.slice(0,i)).map(a=>`${a}/`).join("");return s.startsWith(t)?s.slice(t.length):""}a(oo,"literalPrefix");function ao(e,t){let n=/\.(?:fixtures?|mocks?|spec|test)\.[cm]?[jt]sx?$/.exec(e)?.[0],i=/(?:^|\/)(__mocks__|__tests__)\//.exec(e)?.[1];return `${t}**/${i===void 0?`*${String(n)}`:`${i}/**`}`}a(ao,"excludeGlob");function co(e,t$1,n,i,r){let s=posix.dirname(t$1),a=n?.compilerOptions;if(io.test(posix.basename(t$1))||t(a)&&a.noEmit===true||j(join(e.cwd,s,"ng-package.json")))return;let{include:c,exclude:d}=kn(e,t$1,n),l=d?.find(S=>ro.test(S));if(d===void 0?!no.test(posix.basename(t$1)):l===void 0)return;let u=s==="."?"":`${s}/`,p=bn(c??[`${u}**/*`],je),T=bn(d??[],S=>[S,`${S}/**/*`]),v=[...d===void 0?r:[],...i].filter(S=>S.startsWith(u)&&p(S)&&!T(S));if(v.length===0)return;let ee=oo(l??c?.[0]??"",u),Yn=[...new Set(v.map(S=>ao(S,ee)))],Xn=v.length>Re?` and ${v.length-Re} more`:"",Me=`${v.slice(0,Re).join(", ")}${Xn} ${v.length===1?"ships":"ship"} with the package`,_e=`\`"exclude": [${Yn.map(S=>JSON.stringify(S)).join(", ")}]\``;return {check:"tsconfig-ships-mock-file",severity:"warning",file:t$1,...d===void 0?{message:`This build config has no \`exclude\`, so it compiles the specs and their test data into the output: ${Me}.`,fix:`Leave the tests out of the build: ${_e}.`}:{message:`This build config leaves the specs out but compiles their test data into the output: ${Me}.`,fix:`Exclude the test data beside the specs: ${_e}, next to the spec patterns already there.`}}}a(co,"checkConfig");function $n(e){let t=e.files.filter(s=>vn.test(s)),n=e.files.filter(s=>to.test(s)&&!vn.test(s));if(t.length===0&&n.length===0)return [];let i=e.files.filter(s=>eo.test(s)).map(s=>[s,xn(e,s)]),r=new Set(i.flatMap(([s,a])=>Sn(s,a)));return i.flatMap(([s,a])=>r.has(s)?[]:co(e,s,a,t,n)??[])}a($n,"checkTsconfigMockFiles");var lo=new Set(["'",'"',"`"]),uo=new Set([" "," "]),fo=new Set(["",";",`
4
4
  `,"\r","}"]);function go(e){let t=a$3(e).filter(({name:n})=>d$3(n)).map(({local:n})=>n);return [...new Set(t)]}a(go,"awaitableLocals");function po(e,t){let n=0,i=t;for(;i<e.length;){let r=e.charAt(i);if(lo.has(r)){i=d$4(e,i);continue}if(r==="("&&(n+=1),r===")"&&(n-=1,n===0))return i;i+=1;}return -1}a(po,"endOfCall");function mo(e,t){let n=t;for(;uo.has(e.charAt(n));)n+=1;return fo.has(e.charAt(n))}a(mo,"isStatementEnd");function ho(e,t){if(t.length===0)return [];let n=a$2(e),i=new RegExp(`(?:^|[;{}])\\s*(${t.join("|")})\\s*\\(`,"g"),r=[];return e.replace(i,(s,a,c)=>{let d=po(e,c+s.length-1);return !b(n,c)&&d!==-1&&mo(e,d+1)&&r.push({local:a,line:e.slice(0,c+s.indexOf(a)).split(`
5
5
  `).length}),s}),r}a(ho,"findUnawaitedSites");function Tn(e){return f$1(e,(t,n,i)=>{let r=new Map;for(let{local:s,line:a}of ho(n,go(n)))r.set(s,[...r.get(s)??[],a]);for(let[s,a]of r)i({check:"no-unawaited-helper",severity:"error",file:t,message:`${a.length===1?"Line":"Lines"} ${a.join(", ")}: \`${s}()\` is called as a statement, and the promise it returns is dropped.`,fix:"Await it. Unawaited, it settles after the test has ended, so its assertion reports into a later test or nowhere."});})}a(Tn,"unawaitedHelperPass");var Fn=5,Cn=4,Pn="Import from `vitest/node` instead; it exports the same names from Vitest 4.1 on.",En="Import from `vitest/runtime` instead; it exports the same names from Vitest 4.1 on.",yo={reporters:Pn,coverage:Pn,environments:En,snapshot:En,runners:"Use `TestRunner` from `vitest` instead; it is exported from Vitest 4.1 on.",suite:"Use the static methods on `TestRunner` from `vitest` instead.",mocker:"Import from the `@vitest/mocker` package directly."},vo=/\b(?:from|import|require)\s*\(?\s*["']vitest\/(reporters|coverage|environments|snapshot|runners|suite|mocker)["']/g,wo=/\b(?:test|it|describe|suite)(?:\.\w+)*\.sequential\b/g,jn="Use `--reporter=json --outputFile=<path>` instead.",Rn="Pass `writeResult` as a per-bench option to persist a result, and read it back with `bench.from()`; Vitest 5 has no flag for it.",bo=[["outputJson",jn],["compare",Rn]],xo={experimental_clearCache:"clearCache",experimental_parseSpecifications:"parseSpecifications"},So=/\.(experimental_clearCache|experimental_parseSpecifications)\b/g;function de(e,t,n,i,r){let s=e>=Fn;return {check:"vitest-5-removed",severity:s?"error":"info",file:t,message:s?`${n}, which Vitest ${e} removed: ${i}.`:`${n}, which Vitest 5 removes: after the upgrade ${i}.`,fix:r}}a(de,"removed");var ko=a((e,t)=>e.slice(0,t).split(`
package/dist/cli.js CHANGED
@@ -247,7 +247,7 @@ warning ${t}`);if(!e.ok){let t=e.actions.filter(o=>o.status==="created"||o.stat
247
247
  ${t.join(", ")} ${t.length===1?"is":"are"} out of date. Run \`npx vitest-auto-spy init\` to update ${t.length===1?"it":"them"}.`);for(let o of e.actions.filter(i=>i.status==="stale"))r.err(`
248
248
  ${o.path} is a stale copy of the shipped skill. Delete it, then run \`npx vitest-auto-spy init\`.`);return 1}return r.out(n?`
249
249
  Up to date.`:`
250
- Done. Re-run after upgrading the package; the block between the markers is regenerated.`),0}a(M,"reportInit");async function G(e,n,r){let t=d(n),o=h(t,"check"),[{runInit:i},{readProfile:d$1}]=await Promise.all([import('./cli-LKWY3YW7.js'),import('./cli-BVSWOGM4.js')]),l=d$1(e),s=i(l,c(),{check:o,dryRun:h(t,"dry-run"),uninstall:h(t,"uninstall"),...g(t,"only")===void 0?{}:{only:f(t,"only")}});return r.out(`vitest-auto-spy init \u2014 ${e}`),r.out(`runner: ${l.runner}, framework: ${l.framework}, entry: ${l.entry}
251
- `),M(s,o,r)}a(G,"initCommand");async function H(e,n,r){let t=d(n),{runCodemod:o}=await import('./cli-27FFYF3X.js');return o(e,{write:h(t,"write"),verify:h(t,"verify"),list:h(t,"list"),only:g(t,"only"),skip:g(t,"skip"),from:g(t,"from"),paths:t.positionals,format:l(t)},r)}a(H,"codemodCommand");async function q(e,n,r){let t=d(n),o=g(t,"shard"),[{captureProcess:i,changedRef:d$1,changedRefProblem:l,resolveNg:s,runNgTest:g$1},{spawnProcess:D},{readProfile:N}]=await Promise.all([import('./cli-NLRIRLRR.js'),import('./cli-KDIEX2B5.js'),import('./cli-BVSWOGM4.js')]),y=d$1(t.flags.changed),x=y===void 0?void 0:l(i,e,y);return x!==void 0?(r.err(`${x} Nothing ran.`),2):g$1({cwd:e,profile:N(e),target:g(t,"target"),shard:o===void 0?void 0:a$1(o),changed:y,related:f(t,"related"),dryRun:h(t,"dry-run"),passthrough:t.passthrough},{capture:i,spawn:D,resolveNg:s},r)}a(q,"ngTestCommand");var T=["cwd","help","version"],E={codemod:["format","from","list","only","skip","verify","write"],doctor:["code-quality","fail-on","format","ignore","min-severity"],init:["check","dry-run","only","uninstall"],"ng-test":["changed","dry-run","related","shard","target"],perf:["ab-isolate","baseline","baseline-factor","baseline-floor-ms","changed","code-quality","command","confirm-runs","debt","factor","fail-on","fail-on-flaky","fail-on-red","format","gate","gate-margin","gate-only","json","max-file-ms","max-file-tests","max-test-ms","max-wall-ms","min-severity","no-confirm","out","profile-dir","top","update-baseline"]};function B(e,n,r,t){let o=Object.keys(e.flags).filter(s=>!r.includes(s)&&!T.includes(s));if(o.length===0)return false;let i=[...r,...T].sort((s,g)=>s.localeCompare(g)),d=o.map(s=>r.includes("format")&&(s==="json"||s==="markdown")?`format ${s}`:a$2(s,i));t.err(`Unknown flag for \`${n}\`: ${o.map(s=>`--${s}`).join(", ")}. Nothing ran.`);let l=d.filter(s=>s!==void 0);return l.length<d.length&&t.err(`\`${n}\` accepts ${i.map(s=>`--${s}`).join(", ")}.`),l.length>0&&t.err(`Did you mean ${l.map(s=>`\`--${s}\``).join(", ")}?`),true}a(B,"rejectFlags");var Y=["baseline-factor","baseline-floor-ms","factor","max-file-ms","max-file-tests","max-test-ms","max-wall-ms","top"];function J(e){let n=Number(e);return e.trim()!==""&&Number.isFinite(n)&&n>=0}a(J,"isCount");function K(e$1,n,r){let t=e$1.flags[n];if(t===true&&a$3.has(n)&&!c$1.has(n))return `--${n} needs a value, as in \`--${n} <value>\`.`;if(typeof t!="string")return;if(a$3.has(n)&&(t.trim()===""||b.has(n)&&f(e$1,n).length===0))return `--${n} needs a value, and got an empty one.`;if(Y.includes(n)&&!J(t))return `--${n} takes a number of zero or more, and got ${t}.`;if(n==="shard"&&a$1(t)===void 0)return `--shard takes <index>/<count>, as in \`--shard 1/4\`, and got ${t}.`;if(n==="fail-on"&&j(e$1)===void 0)return `Unknown --fail-on value: ${t}. Accepted values: error, warning, info.`;if(n==="min-severity"&&k(e$1)===void 0)return `Unknown --min-severity value: ${t}. Accepted values: error, warning, info.`;let o=n==="ignore"&&r==="doctor"?f(e$1,"ignore").filter(d=>!e.includes(d)):[];if(o.length===0)return;let i=o.map(d=>a$2(d,e));return i.every(d=>d!==void 0)?`Unknown check id for --ignore: ${o.join(", ")}. Did you mean ${i.join(", ")}?`:`Unknown check id for --ignore: ${o.join(", ")}. Known ids: ${e.join(", ")}.`}a(K,"valueProblem");function X(e,n,r){let o=[...e.passthrough.length>0&&n!=="ng-test"?["Only `ng-test` takes arguments after `--`."]:[],...Object.keys(e.flags).flatMap(i=>K(e,i,n)??[])];for(let i of o)r.err(`${i} Nothing ran.`);return o.length>0}a(X,"rejectValues");var S="Usage: npx vitest-auto-spy <doctor|perf|init|codemod|ng-test> [options]. Run `npx vitest-auto-spy --help` for the options.";function z(e,n){if(e===void 0){n.err(`Missing command. ${S}`);return}let r=E[e];if(r!==void 0)return r;let t=a$2(e,Object.keys(E));n.err(t===void 0?`Unknown command: ${e}. ${S}`:`Unknown command: ${e}. Did you mean \`${t}\`? Run \`npx vitest-auto-spy --help\` for the commands.`);}a(z,"acceptedFlags");function I(e,n){e.on("error",r=>{if(r.code!=="EPIPE")throw r;n();});}a(I,"guardBrokenPipe");async function O(e,n){try{return await e()}catch(r){return n.err(`vitest-auto-spy crashed: ${r instanceof Error?r.message:String(r)}`),2}}a(O,"settle");function _(e,n){let r=d(e),t=g(r,"cwd"),o=resolve(t??process.cwd());if(h(r,"version"))return n.out(c()),0;if(r.command==="help"||h(r,"help"))return n.out(C),0;let i=z(r.command,n),d$1=String(r.command);return i===void 0||B(r,d$1,i,n)||X(r,d$1,n)||F(r,n)?2:t!==void 0&&!k$1(o)?(n.err(`--cwd ${t} is not a directory (resolved to ${o}). Nothing ran.`),2):Q(d$1,o,e,n)}a(_,"runCli");async function Q(e,n,r,t){if(e==="doctor"){let{doctorCommand:o}=await import('./cli-GFSMIIPJ.js');return o(n,r,t)}if(e==="init")return G(n,r,t);if(e==="ng-test")return q(n,r,t);if(e==="perf"){let{perfCommand:o}=await import('./cli-DKD5FUCL.js');return o(n,r,t)}return H(n,r,t)}a(Q,"dispatch");for(let e of [process.stdout,process.stderr])I(e,()=>process.exit(typeof process.exitCode=="number"?process.exitCode:0));var U={out:a(e=>process.stdout.write(`${e}
250
+ Done. Re-run after upgrading the package; the block between the markers is regenerated.`),0}a(M,"reportInit");async function G(e,n,r){let t=d(n),o=h(t,"check"),[{runInit:i},{readProfile:d$1}]=await Promise.all([import('./cli-IX26FWE2.js'),import('./cli-BVSWOGM4.js')]),l=d$1(e),s=i(l,c(),{check:o,dryRun:h(t,"dry-run"),uninstall:h(t,"uninstall"),...g(t,"only")===void 0?{}:{only:f(t,"only")}});return r.out(`vitest-auto-spy init \u2014 ${e}`),r.out(`runner: ${l.runner}, framework: ${l.framework}, entry: ${l.entry}
251
+ `),M(s,o,r)}a(G,"initCommand");async function H(e,n,r){let t=d(n),{runCodemod:o}=await import('./cli-27FFYF3X.js');return o(e,{write:h(t,"write"),verify:h(t,"verify"),list:h(t,"list"),only:g(t,"only"),skip:g(t,"skip"),from:g(t,"from"),paths:t.positionals,format:l(t)},r)}a(H,"codemodCommand");async function q(e,n,r){let t=d(n),o=g(t,"shard"),[{captureProcess:i,changedRef:d$1,changedRefProblem:l,resolveNg:s,runNgTest:g$1},{spawnProcess:D},{readProfile:N}]=await Promise.all([import('./cli-NLRIRLRR.js'),import('./cli-KDIEX2B5.js'),import('./cli-BVSWOGM4.js')]),y=d$1(t.flags.changed),x=y===void 0?void 0:l(i,e,y);return x!==void 0?(r.err(`${x} Nothing ran.`),2):g$1({cwd:e,profile:N(e),target:g(t,"target"),shard:o===void 0?void 0:a$1(o),changed:y,related:f(t,"related"),dryRun:h(t,"dry-run"),passthrough:t.passthrough},{capture:i,spawn:D,resolveNg:s},r)}a(q,"ngTestCommand");var T=["cwd","help","version"],E={codemod:["format","from","list","only","skip","verify","write"],doctor:["code-quality","fail-on","format","ignore","min-severity"],init:["check","dry-run","only","uninstall"],"ng-test":["changed","dry-run","related","shard","target"],perf:["ab-isolate","baseline","baseline-factor","baseline-floor-ms","changed","code-quality","command","confirm-runs","debt","factor","fail-on","fail-on-flaky","fail-on-red","format","gate","gate-margin","gate-only","json","max-file-ms","max-file-tests","max-test-ms","max-wall-ms","min-severity","no-confirm","out","profile-dir","top","update-baseline"]};function B(e,n,r,t){let o=Object.keys(e.flags).filter(s=>!r.includes(s)&&!T.includes(s));if(o.length===0)return false;let i=[...r,...T].sort((s,g)=>s.localeCompare(g)),d=o.map(s=>r.includes("format")&&(s==="json"||s==="markdown")?`format ${s}`:a$2(s,i));t.err(`Unknown flag for \`${n}\`: ${o.map(s=>`--${s}`).join(", ")}. Nothing ran.`);let l=d.filter(s=>s!==void 0);return l.length<d.length&&t.err(`\`${n}\` accepts ${i.map(s=>`--${s}`).join(", ")}.`),l.length>0&&t.err(`Did you mean ${l.map(s=>`\`--${s}\``).join(", ")}?`),true}a(B,"rejectFlags");var Y=["baseline-factor","baseline-floor-ms","factor","max-file-ms","max-file-tests","max-test-ms","max-wall-ms","top"];function J(e){let n=Number(e);return e.trim()!==""&&Number.isFinite(n)&&n>=0}a(J,"isCount");function K(e$1,n,r){let t=e$1.flags[n];if(t===true&&a$3.has(n)&&!c$1.has(n))return `--${n} needs a value, as in \`--${n} <value>\`.`;if(typeof t!="string")return;if(a$3.has(n)&&(t.trim()===""||b.has(n)&&f(e$1,n).length===0))return `--${n} needs a value, and got an empty one.`;if(Y.includes(n)&&!J(t))return `--${n} takes a number of zero or more, and got ${t}.`;if(n==="shard"&&a$1(t)===void 0)return `--shard takes <index>/<count>, as in \`--shard 1/4\`, and got ${t}.`;if(n==="fail-on"&&j(e$1)===void 0)return `Unknown --fail-on value: ${t}. Accepted values: error, warning, info.`;if(n==="min-severity"&&k(e$1)===void 0)return `Unknown --min-severity value: ${t}. Accepted values: error, warning, info.`;let o=n==="ignore"&&r==="doctor"?f(e$1,"ignore").filter(d=>!e.includes(d)):[];if(o.length===0)return;let i=o.map(d=>a$2(d,e));return i.every(d=>d!==void 0)?`Unknown check id for --ignore: ${o.join(", ")}. Did you mean ${i.join(", ")}?`:`Unknown check id for --ignore: ${o.join(", ")}. Known ids: ${e.join(", ")}.`}a(K,"valueProblem");function X(e,n,r){let o=[...e.passthrough.length>0&&n!=="ng-test"?["Only `ng-test` takes arguments after `--`."]:[],...Object.keys(e.flags).flatMap(i=>K(e,i,n)??[])];for(let i of o)r.err(`${i} Nothing ran.`);return o.length>0}a(X,"rejectValues");var S="Usage: npx vitest-auto-spy <doctor|perf|init|codemod|ng-test> [options]. Run `npx vitest-auto-spy --help` for the options.";function z(e,n){if(e===void 0){n.err(`Missing command. ${S}`);return}let r=E[e];if(r!==void 0)return r;let t=a$2(e,Object.keys(E));n.err(t===void 0?`Unknown command: ${e}. ${S}`:`Unknown command: ${e}. Did you mean \`${t}\`? Run \`npx vitest-auto-spy --help\` for the commands.`);}a(z,"acceptedFlags");function I(e,n){e.on("error",r=>{if(r.code!=="EPIPE")throw r;n();});}a(I,"guardBrokenPipe");async function O(e,n){try{return await e()}catch(r){return n.err(`vitest-auto-spy crashed: ${r instanceof Error?r.message:String(r)}`),2}}a(O,"settle");function _(e,n){let r=d(e),t=g(r,"cwd"),o=resolve(t??process.cwd());if(h(r,"version"))return n.out(c()),0;if(r.command==="help"||h(r,"help"))return n.out(C),0;let i=z(r.command,n),d$1=String(r.command);return i===void 0||B(r,d$1,i,n)||X(r,d$1,n)||F(r,n)?2:t!==void 0&&!k$1(o)?(n.err(`--cwd ${t} is not a directory (resolved to ${o}). Nothing ran.`),2):Q(d$1,o,e,n)}a(_,"runCli");async function Q(e,n,r,t){if(e==="doctor"){let{doctorCommand:o}=await import('./cli-LMTN5FNY.js');return o(n,r,t)}if(e==="init")return G(n,r,t);if(e==="ng-test")return q(n,r,t);if(e==="perf"){let{perfCommand:o}=await import('./cli-DKD5FUCL.js');return o(n,r,t)}return H(n,r,t)}a(Q,"dispatch");for(let e of [process.stdout,process.stderr])I(e,()=>process.exit(typeof process.exitCode=="number"?process.exitCode:0));var U={out:a(e=>process.stdout.write(`${e}
252
252
  `),"out"),err:a(e=>process.stderr.write(`${e}
253
253
  `),"err")};O(()=>_(process.argv.slice(2),U),U).then(e=>{process.exitCode=e;});
@@ -1,4 +1,4 @@
1
- 'use strict';var node_fs=require('node:fs'),node_path=require('node:path');var Ji=Object.defineProperty;var s=(e,t)=>Ji(e,"name",{value:t,configurable:true});var ln=Object.freeze(["enableAngularDiagnostics","enableTestBedDiagnostics","guardDocumentPollution","guardGlobalPatches","guardPrototypePollution","guardStrayConsole","installPerTest","mockNow","setupAngularTestEnv","setupAutoSpy","setupFakeTimers","trackMockRegistry","trackNodeMocks","useConsoleSpies","useCountingClock"]);var cn="5.67.0";function W(e){return e.type==="TSAsExpression"||e.type==="TSTypeAssertion"}s(W,"isCast");function D(e){return e.type==="ArrayExpression"}s(D,"isArrayExpression");function C(e){return e.type==="ObjectExpression"}s(C,"isObjectExpression");function d(e){return e.type==="CallExpression"}s(d,"isCallExpression");function X(e){return e.type==="NewExpression"}s(X,"isNewExpression");function p(e){return e.type==="MemberExpression"}s(p,"isMemberExpression");function U(e){return e.type==="BlockStatement"}s(U,"isBlockStatement");function T(e){return e.type==="ExpressionStatement"}s(T,"isExpressionStatement");function J(e){return e.type==="ImportSpecifier"}s(J,"isNamedImportSpecifier");function w(e){return e.type==="VariableDeclarator"}s(w,"isVariableDeclarator");function Z(e){return e.type==="TSTypeReference"}s(Z,"isTypeReference");function G(e){return e.type==="AssignmentExpression"}s(G,"isAssignmentExpression");function ht(e){return e.type==="ClassDeclaration"||e.type==="ClassExpression"}s(ht,"isClass");function yt(e){return e.type==="PropertyDefinition"}s(yt,"isPropertyDefinition");function l(e){return e.type==="Identifier"}s(l,"isIdentifier");function g(e){if(!(!p(e)||e.computed||!l(e.property)))return e.property.name}s(g,"memberName");function L(e){return d(e.parent)&&e.parent.callee===e}s(L,"isCallee");function x(e){if(e.type!=="Property")return;let t=e;if(!t.computed)return t.key.type==="Identifier"?t.key.name:String(t.key.value)}s(x,"propertyName");function v(e){return e.value}s(v,"propertyValue");function S(e,t){let n=e.properties.find(r=>x(r)===t);return n||void 0}s(S,"findProperty");function V(e){return I(bt(e),Zi)}s(V,"isRunnerFnCall");var Xi=new Set(["jest","vi"]),Zi=new Set(["fn"]);function bt(e){let t=e;for(;d(t)&&p(t.callee)&&d(t.callee.object);)t=t.callee.object;return t}s(bt,"rootCall");function I(e,t){return _(e,Xi,t)}s(I,"isRunnerCall");function _(e,t,n){return !d(e)||!p(e.callee)||!l(e.callee.object)||!l(e.callee.property)?false:t.has(e.callee.object.name)&&n.has(e.callee.property.name)}s(_,"isMemberCall");var dn=new Set(["ArrowFunctionExpression","FunctionDeclaration","FunctionExpression"]);function k(e){return dn.has(e.type)}s(k,"isFunctionNode");function un(e){return typeof e=="object"&&e!==null&&typeof Reflect.get(e,"type")=="string"}s(un,"isNode");function Ke(e,t){return je(e,t,false)}s(Ke,"buildsRunnerFnAtModuleScope");function je(e,t,n){return j(e,t,V,n)}s(je,"buildsRunnerFn");var Qi=new Set(["parent","range","loc","type"]);function ea(e,t,n){let r=t[e.type]??Object.keys(e).filter(o=>!Qi.has(o));for(let o of r){let i=Reflect.get(e,o);Array.isArray(i)?i.forEach(a=>{un(a)&&n.push(a);}):un(i)&&n.push(i);}}s(ea,"pushChildren");function pn(e,t,n,r,o){let{visitorKeys:i}=e.sourceCode,a=[t],c=0;for(let u=a.pop();u;u=a.pop())if(!(!r&&dn.has(u.type))){if(n(u)){if(c+=1,o)return c;continue}ea(u,i,a);}return c}s(pn,"walkSubtree");function j(e,t,n,r){return pn(e,t,n,r,true)>0}s(j,"anyInSubtree");function Ye(e,t,n,r){return pn(e,t,n,r,false)}s(Ye,"countInSubtree");function $(e,t){let n=e;for(;n.type!=="Program";){if(t(n))return true;n=n.parent;}return false}s($,"hasAncestor");function O(e){let t=e;for(;t.type!=="Program";){if(k(t))return t;t=t.parent;}}s(O,"enclosingFunction");var A="vitest-auto-spy",Ct=new Set(["","/bun","/bun-angular","/node","/rstest","/react","/vue","/svelte"].map(e=>`${A}${e}`)),ta="ImportBinding";function E(e,t){for(let n=e;n;n=n.upper){let r=n.variables.find(o=>o.name===t);if(r)return r}}s(E,"findBinding");function N(e,t){let n=E(e,t);return n?n.defs.some(r=>r.type===ta)?"imported":"taken":"free"}s(N,"bindingState");function oe(e){return e.defs.map(t=>t.node).find(J)}s(oe,"importSpecifierOf");function na(e){return e.type==="ImportDeclaration"}s(na,"isImportDeclaration");function ra(e){return e.type==="Program"}s(ra,"isProgram");function qe(e){let t=e;for(;!ra(t);)t=t.parent;return t.body.filter(na)}s(qe,"importsOf");function fn(e){return e.split("/").slice(0,e.startsWith("@")?2:1).join("/")}s(fn,"packageOf");function ie(e,t,n,r){let o=qe(t).filter(c=>fn(String(c.source.value))===fn(n)),a=(o.find(c=>String(c.source.value)>n)??o.at(-1))?.range[0]??0;return e.insertTextBeforeRange([a,a],`import ${r} from '${n}';
1
+ 'use strict';var node_fs=require('node:fs'),node_path=require('node:path');var Ji=Object.defineProperty;var s=(e,t)=>Ji(e,"name",{value:t,configurable:true});var ln=Object.freeze(["enableAngularDiagnostics","enableTestBedDiagnostics","guardDocumentPollution","guardGlobalPatches","guardPrototypePollution","guardStrayConsole","installPerTest","mockNow","setupAngularTestEnv","setupAutoSpy","setupFakeTimers","trackMockRegistry","trackNodeMocks","useConsoleSpies","useCountingClock"]);var cn="5.68.1";function W(e){return e.type==="TSAsExpression"||e.type==="TSTypeAssertion"}s(W,"isCast");function D(e){return e.type==="ArrayExpression"}s(D,"isArrayExpression");function C(e){return e.type==="ObjectExpression"}s(C,"isObjectExpression");function d(e){return e.type==="CallExpression"}s(d,"isCallExpression");function X(e){return e.type==="NewExpression"}s(X,"isNewExpression");function p(e){return e.type==="MemberExpression"}s(p,"isMemberExpression");function U(e){return e.type==="BlockStatement"}s(U,"isBlockStatement");function T(e){return e.type==="ExpressionStatement"}s(T,"isExpressionStatement");function J(e){return e.type==="ImportSpecifier"}s(J,"isNamedImportSpecifier");function w(e){return e.type==="VariableDeclarator"}s(w,"isVariableDeclarator");function Z(e){return e.type==="TSTypeReference"}s(Z,"isTypeReference");function G(e){return e.type==="AssignmentExpression"}s(G,"isAssignmentExpression");function ht(e){return e.type==="ClassDeclaration"||e.type==="ClassExpression"}s(ht,"isClass");function yt(e){return e.type==="PropertyDefinition"}s(yt,"isPropertyDefinition");function l(e){return e.type==="Identifier"}s(l,"isIdentifier");function g(e){if(!(!p(e)||e.computed||!l(e.property)))return e.property.name}s(g,"memberName");function L(e){return d(e.parent)&&e.parent.callee===e}s(L,"isCallee");function x(e){if(e.type!=="Property")return;let t=e;if(!t.computed)return t.key.type==="Identifier"?t.key.name:String(t.key.value)}s(x,"propertyName");function v(e){return e.value}s(v,"propertyValue");function S(e,t){let n=e.properties.find(r=>x(r)===t);return n||void 0}s(S,"findProperty");function V(e){return I(bt(e),Zi)}s(V,"isRunnerFnCall");var Xi=new Set(["jest","vi"]),Zi=new Set(["fn"]);function bt(e){let t=e;for(;d(t)&&p(t.callee)&&d(t.callee.object);)t=t.callee.object;return t}s(bt,"rootCall");function I(e,t){return _(e,Xi,t)}s(I,"isRunnerCall");function _(e,t,n){return !d(e)||!p(e.callee)||!l(e.callee.object)||!l(e.callee.property)?false:t.has(e.callee.object.name)&&n.has(e.callee.property.name)}s(_,"isMemberCall");var dn=new Set(["ArrowFunctionExpression","FunctionDeclaration","FunctionExpression"]);function k(e){return dn.has(e.type)}s(k,"isFunctionNode");function un(e){return typeof e=="object"&&e!==null&&typeof Reflect.get(e,"type")=="string"}s(un,"isNode");function Ke(e,t){return je(e,t,false)}s(Ke,"buildsRunnerFnAtModuleScope");function je(e,t,n){return j(e,t,V,n)}s(je,"buildsRunnerFn");var Qi=new Set(["parent","range","loc","type"]);function ea(e,t,n){let r=t[e.type]??Object.keys(e).filter(o=>!Qi.has(o));for(let o of r){let i=Reflect.get(e,o);Array.isArray(i)?i.forEach(a=>{un(a)&&n.push(a);}):un(i)&&n.push(i);}}s(ea,"pushChildren");function pn(e,t,n,r,o){let{visitorKeys:i}=e.sourceCode,a=[t],c=0;for(let u=a.pop();u;u=a.pop())if(!(!r&&dn.has(u.type))){if(n(u)){if(c+=1,o)return c;continue}ea(u,i,a);}return c}s(pn,"walkSubtree");function j(e,t,n,r){return pn(e,t,n,r,true)>0}s(j,"anyInSubtree");function Ye(e,t,n,r){return pn(e,t,n,r,false)}s(Ye,"countInSubtree");function $(e,t){let n=e;for(;n.type!=="Program";){if(t(n))return true;n=n.parent;}return false}s($,"hasAncestor");function O(e){let t=e;for(;t.type!=="Program";){if(k(t))return t;t=t.parent;}}s(O,"enclosingFunction");var A="vitest-auto-spy",Ct=new Set(["","/bun","/bun-angular","/node","/rstest","/react","/vue","/svelte"].map(e=>`${A}${e}`)),ta="ImportBinding";function E(e,t){for(let n=e;n;n=n.upper){let r=n.variables.find(o=>o.name===t);if(r)return r}}s(E,"findBinding");function N(e,t){let n=E(e,t);return n?n.defs.some(r=>r.type===ta)?"imported":"taken":"free"}s(N,"bindingState");function oe(e){return e.defs.map(t=>t.node).find(J)}s(oe,"importSpecifierOf");function na(e){return e.type==="ImportDeclaration"}s(na,"isImportDeclaration");function ra(e){return e.type==="Program"}s(ra,"isProgram");function qe(e){let t=e;for(;!ra(t);)t=t.parent;return t.body.filter(na)}s(qe,"importsOf");function fn(e){return e.split("/").slice(0,e.startsWith("@")?2:1).join("/")}s(fn,"packageOf");function ie(e,t,n,r){let o=qe(t).filter(c=>fn(String(c.source.value))===fn(n)),a=(o.find(c=>String(c.source.value)>n)??o.at(-1))?.range[0]??0;return e.insertTextBeforeRange([a,a],`import ${r} from '${n}';
2
2
  `)}s(ie,"insertImport");function sa(e){return qe(e).map(t=>String(t.source.value)).find(t=>Ct.has(t))??A}s(sa,"coreEntryOf");var gn=`${A}/angular`,mn=`${A}/bun-angular`;function Pe(e){return qe(e).some(t=>t.source.value===mn)?mn:gn}s(Pe,"angularEntryOf");function oa(e,t){let n=qe(e).filter(o=>o.source.value===t&&o.importKind!=="type"),[r]=n;return n.length===1&&r?.specifiers.every(J)===true?r:void 0}s(oa,"namedImportFrom");function P(e,t,n,r){let o=r===A?sa(t):r===gn?Pe(t):r,i=oa(t,o)?.specifiers.filter(J)??[],a=i.map(b=>({specifier:b,key:(l(b.imported)?b.imported.name:"").toLowerCase()})),u=a.every((b,R)=>a.slice(0,R).every(F=>F.key<=b.key))?a.find(b=>b.key>n.toLowerCase())?.specifier:void 0,m=i.at(-1);return u?e.insertTextBeforeRange([u.range[0],u.range[0]],`${n}, `):m?e.replaceTextRange([m.range[1],m.range[1]],`, ${n}`):ie(e,t,o,`{ ${n} }`)}s(P,"importNamed");function q(e,t,n){let r=oe(n);if(!r)return;let{specifiers:o}=r.parent,i=o.filter(c=>c!==r);if(i.length===0)return t.remove(r.parent);if(!i.every(J))return;let a=i.map(c=>e.getText(c)).join(", ");return t.replaceTextRange([Math.min(...o.map(c=>c.range[0])),Math.max(...o.map(c=>c.range[1]))],a)}s(q,"dropNamedImport");function M(e,t){let n=E(e,t.name);if(n){if(!xt.has(n)){let r=n.references.flatMap(o=>o.writeExpr?[o.writeExpr]:[]);xt.set(n,r.length===1?r[0]:void 0);}return xt.get(n)}}s(M,"boundValueOf");var xt=new WeakMap;function K(e,t){let r=E(e,t.name)?.defs.map(o=>o.node).find(w);return r?.init&&M(e,t)===r.init?r.init:void 0}s(K,"initializerOf");function Fe(e){return d(e)&&p(e.callee)&&l(e.callee.property)&&e.callee.property.name==="subscribe"}s(Fe,"isSubscribeCall");var ia=new Set(["ArrowFunctionExpression","FunctionExpression"]);function En(e){return ia.has(e.type)&&U(Reflect.get(e,"body"))}s(En,"isBlockBodied");function hn(e){let t=e.params.filter(l);return e.params.length===1?t[0]:void 0}s(hn,"soleName");function yn(e){return U(e.body)?e.body.body:[]}s(yn,"statementsOf");function aa(e,t){let n=e.slice(e.lastIndexOf(`
3
3
  `,t)+1,t);return n.slice(0,n.length-n.trimStart().length)}s(aa,"lineIndent");function la(e,t){let n=e.split(`
4
4
  `),r=n.slice(1).flatMap(i=>i.trim().length>0?[i.length-i.trimStart().length]:[]),o=Math.min(...r,Number.MAX_SAFE_INTEGER);return n.map((i,a)=>a===0||i.trim().length===0?i:`${t}${i.slice(o)}`).join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitest-auto-spy",
3
- "version": "5.68.0",
3
+ "version": "5.68.1",
4
4
  "description": "Auto-generate fully-typed test spies from a class — across Vitest, Bun, node:test and Rstest, with Angular/NestJS/React/Vue/Svelte recipes. Drop-in replacement for jest-auto-spies and jasmine-auto-spies.",
5
5
  "keywords": [
6
6
  "auto-mock",
@@ -334,7 +334,7 @@
334
334
  "prepublishOnly": "npm run build",
335
335
  "prepack": "node scripts/pack-changelog.mjs --trim",
336
336
  "postpack": "node scripts/pack-changelog.mjs --restore",
337
- "version": "node scripts/sync-plugin-version.mjs && node scripts/sync-alias.mjs && node scripts/generate-export-map.mjs && node scripts/stamp-changelog.mjs && node scripts/size-entries.mjs --release && node scripts/cold-import.mjs --release && git add .claude-plugin alias src/cli/checks/export-map.generated.ts CHANGELOG.md size-entries.json cold-import.json"
337
+ "version": "node scripts/sync-plugin-version.mjs && node scripts/sync-alias.mjs && node scripts/generate-export-map.mjs && node scripts/stamp-changelog.mjs && node scripts/size-entries.mjs --release && node scripts/cold-import.mjs --release && git add .claude-plugin alias src/lib/eslint/plugin-version.ts src/cli/checks/export-map.generated.ts CHANGELOG.md size-entries.json cold-import.json"
338
338
  },
339
339
  "peerDependencies": {
340
340
  "@angular/common": ">=20.0.0",