@vitest-agent/sdk 2.4.12 → 2.4.13
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/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/utils/resolve-data-path.js +5 -8
package/index.d.ts
CHANGED
|
@@ -5205,7 +5205,7 @@ interface ResolveDataPathOptions {
|
|
|
5205
5205
|
* @param options - Optional programmatic overrides.
|
|
5206
5206
|
* @public
|
|
5207
5207
|
*/
|
|
5208
|
-
declare const resolveDataPath: (projectDir: string, options?: ResolveDataPathOptions) => Effect.Effect<any, import("@effected/xdg").AppDirsError | import("@effected/config-file").ConfigReadError, AppDirs | VitestAgentConfigFile>;
|
|
5208
|
+
declare const resolveDataPath: (projectDir: string, options?: ResolveDataPathOptions) => Effect.Effect<any, import("@effected/xdg").AppDirsError | import("effect/PlatformError").PlatformError | import("@effected/config-file").ConfigReadError, AppDirs | FileSystem.FileSystem | VitestAgentConfigFile>;
|
|
5209
5209
|
//#endregion
|
|
5210
5210
|
//#region src/utils/resolve-project-key-from-cwd.d.ts
|
|
5211
5211
|
/**
|
package/index.js
CHANGED
|
@@ -117,7 +117,7 @@ import { requiredArtifactForTransition, transitionEnforcesBehaviorMatch, validat
|
|
|
117
117
|
* substituted yet. Exported for version introspection by downstream tooling.
|
|
118
118
|
* @public
|
|
119
119
|
*/
|
|
120
|
-
const CURRENT_SDK_VERSION = "2.4.
|
|
120
|
+
const CURRENT_SDK_VERSION = "2.4.13";
|
|
121
121
|
|
|
122
122
|
//#endregion
|
|
123
123
|
export { ActionSeverity, ActorType, Agent, AgentConsoleMode, AgentContext, AgentId, AgentNotFoundError, AgentPluginOptions, AgentReport, AgentReporterOptions, BehaviorAbandonedEvent, BehaviorAddedEvent, BehaviorCompletedEvent, BehaviorDetail, BehaviorNotFoundError, BehaviorRow, BehaviorScopedEventTypes, BehaviorStartedEvent, BehaviorStatus, BehaviorsReadyEvent, BlockedEvent, CURRENT_SDK_VERSION, CacheManifest, CacheManifestEntry, ChannelEvent, ChatId, CiConsoleMode, ConfigLive, ConsoleLeakFile, ConsoleLeaks, ConsoleLogLevel, ConsoleMode, ConsoleOutputMode, ConsoleOutputs, ConversationId, ConversationNotFoundError, CoverageBaselines, FileCoverageReport as CoverageFile, CoverageGap, CoverageLevel, CoverageMetric, CoverageRenderState, CoverageReport, CoverageTargets, CoverageTargetsMetrics, CoverageTotals, DATABASE_FILENAME, DataReader, DataReaderLive, DataStore, DataStoreError, DataStoreLive, DetailLevel, DetailResolver, DetailResolverLive, DiscoveryError, DiscoveryRegistry, DiscoveryRegistryLive, Environment, EnvironmentDetector, EnvironmentDetectorLive, EnvironmentDetectorTest, Executor, ExecutorResolver, ExecutorResolverLive, FailureRecord, FileCoverageReport, FileEditPayload, FormatSelector, FormatSelectorLive, GfmFormatter, GitCommandError, GoalAbandonedEvent, GoalAddedEvent, GoalCompletedEvent, GoalDetail, GoalNotFoundError, GoalRow, GoalStartedEvent, GoalStatus, GoalsReadyEvent, HistoryRecord, HistoryTracker, HistoryTrackerLive, HistoryTrackerTest, HookFirePayload, HookStatus, HookType, HostKind, HostMetadataParseError, HumanConsoleMode, HypothesisPayload, IDEMPOTENCY_ROOT_SENTINEL, IdempotencyHit, IllegalStatusTransitionError, JsonFormatter, LoggerLive, MarkdownFormatter, MetricThresholds, ModuleRecord, ModuleReport, NON_DISCOVERABLE_DIRS, NotePayload, OutputFormat, OutputPipelineLive, OutputRenderer, OutputRendererLive, PackageManager, PathResolutionError, PathResolutionLive, PatternThresholds, PerClientSessionMapReader, PerClientSessionMapReaderLive, PerClientSessionMapWriter, PerClientSessionMapWriterLive, PhaseTransitionEvent, ProbeMissError, ProjectDiscovery, ProjectDiscoveryLive, ProjectDiscoveryTest, ProjectIdentity, ProjectIdentityLive, ProjectIdentityNotResolvableError, ProjectIdentityTest, ProjectKey, RegistrationConflictError, RenderState, RenderTotals, ReportError, ReportSummary, ResolvedThresholds, RunContext, RunContext$, RunContextLive, RunContextService, RunContextTest, RunEvent, SRC_DIR, SessionCompleteEvent, SessionNotFoundError, SessionOutcome, SidecarTimeoutError, SilentFormatter, SuggestedActionRecord, TEST_DIR, TEST_FILE_GLOB_SUFFIX, TEST_HELPER_DIRS, TagCountEntry, TddTaskAlreadyEndedError, TddTaskId, TddTaskNotFoundError, TerminalFormatter, TestClassification, TestHistory, TestRecord, TestReport, TestRun, TestRunReason, TestState, ToolCallPayload, ToolResultPayload, Transport, TrendEntry, TrendRecord, TurnPayload, UserPromptPayload, VitestAgentConfig, VitestAgentConfigFile, _resetMigrationCacheForTesting, ansi, assembleHistoryRecord, assembleManifest, buildAgentReport, buildConsoleLeaks, buildEnvPrefix, canonicalizeGitUrl, ciAnnotationsFormatter, classifyTest, classifyTestPath, coerceErrorField, coerceErrorText, collectConsoleLeakEntries, compressLines, computeFailureSignature, computeTrend, countSuiteFailures, deriveIdempotencyKey, detectPackageManager, detectVitestScripts, determineTier, ensureMigrated, extractSqlReason, findFunctionBoundary, findOwningWorkspace, formatConsoleMarkdown, formatFatalError, formatGfm, formatTriageEffect, formatWrapupEffect, getRecentDirection, getRunCommand, getWorstMetric, gitUrlToProjectKey, hashTargets, historyKey, initialRenderState, isTestFileName, isTimeoutError, isVitestInvocation, migration as migration0001, normalizeAssertionShape, normalizeWorkspaceKey, osc8, probeHostMetadataFromEnv, migration$1 as registryMigration0001, relativePath, requiredArtifactForTransition, resolveCoverageInput, resolveDataPath, resolveLogFile, resolveLogLevel, resolveProjectIdentityFromCandidates, resolveProjectKeyFromCwd, resolveWorkspaceKey, rewriteBashCommand, safeFilename, migration$2 as sessionMapMigration0001, stripAnsi, transitionEnforcesBehaviorMatch, validateCoverageConfig, validateCoverageTargetsShape, validatePhaseTransition };
|
package/package.json
CHANGED
|
@@ -2,9 +2,8 @@ import { VitestAgentConfig } from "../schemas/Config.js";
|
|
|
2
2
|
import { VitestAgentConfigFile } from "../services/Config.js";
|
|
3
3
|
import { normalizeWorkspaceKey } from "./normalize-workspace-key.js";
|
|
4
4
|
import { resolveProjectKeyFromCwd } from "./resolve-project-key-from-cwd.js";
|
|
5
|
-
import { Effect } from "effect";
|
|
5
|
+
import { Effect, FileSystem } from "effect";
|
|
6
6
|
import { join } from "node:path";
|
|
7
|
-
import { mkdirSync } from "node:fs";
|
|
8
7
|
import { AppDirs } from "@effected/xdg";
|
|
9
8
|
|
|
10
9
|
//#region src/utils/resolve-data-path.ts
|
|
@@ -45,24 +44,22 @@ const DATABASE_FILENAME = "data.db";
|
|
|
45
44
|
* @public
|
|
46
45
|
*/
|
|
47
46
|
const resolveDataPath = (projectDir, options = {}) => Effect.gen(function* () {
|
|
47
|
+
const fs = yield* FileSystem.FileSystem;
|
|
48
48
|
if (options.cacheDir) {
|
|
49
|
-
|
|
49
|
+
yield* fs.makeDirectory(options.cacheDir, { recursive: true });
|
|
50
50
|
return join(options.cacheDir, DATABASE_FILENAME);
|
|
51
51
|
}
|
|
52
52
|
const loaded = yield* (yield* VitestAgentConfigFile).loadOrDefault(new VitestAgentConfig({}));
|
|
53
53
|
if (loaded.cacheDir) {
|
|
54
|
-
|
|
54
|
+
yield* fs.makeDirectory(loaded.cacheDir, { recursive: true });
|
|
55
55
|
return join(loaded.cacheDir, DATABASE_FILENAME);
|
|
56
56
|
}
|
|
57
57
|
const dataRoot = yield* (yield* AppDirs).ensureData;
|
|
58
58
|
const key = loaded.projectKey ? normalizeWorkspaceKey(loaded.projectKey) : resolveProjectKeyFromCwd(projectDir);
|
|
59
59
|
const dir = join(dataRoot, key);
|
|
60
|
-
|
|
60
|
+
yield* fs.makeDirectory(dir, { recursive: true });
|
|
61
61
|
return join(dir, DATABASE_FILENAME);
|
|
62
62
|
});
|
|
63
|
-
const ensureDirSync = (path) => {
|
|
64
|
-
mkdirSync(path, { recursive: true });
|
|
65
|
-
};
|
|
66
63
|
|
|
67
64
|
//#endregion
|
|
68
65
|
export { DATABASE_FILENAME, resolveDataPath };
|