mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 13:12:26 +00:00
* perf(runtime): eliminate static imports that defeat lazy provider and workflow chunk splitting * perf(ci): cache Windows typecheck in Turbo, bound official compiler checkers, and reuse portable build cache in reverse-tools * perf(package): batch staging file copies and extract packed metadata in one pass * perf(tests): reuse parked JavaScript analysis workers and eliminate redundant CLI and Node spawns * fix(tests): retain failed cleanup owners across non-isolated files and settle concurrent verifier copies * fix(providers): propagate underlying cleanup release claims through DeferredAnalysisClient
59 lines
2.3 KiB
TypeScript
59 lines
2.3 KiB
TypeScript
import { HOST_PLATFORM } from "../platform/HostPlatform.js";
|
|
import type { AnalysisSettingsReader } from "../domain/analysisSettings.js";
|
|
import { snapshotEnvironment } from "../process/snapshotEnvironment.js";
|
|
import type { LazyAnalysisProvider } from "../application/binary/LazyAnalysisProvider.js";
|
|
import { artifactCapabilities } from "../artifacts/ArtifactProviderMetadata.js";
|
|
import {
|
|
ARTIFACT_GRAPH_PROVIDER,
|
|
MANAGED_STATIC_PROVIDER,
|
|
} from "../domain/investigationProviders.js";
|
|
import { managedStaticCapabilities } from "../dotnet/ManagedStaticProviderMetadata.js";
|
|
import { nativeMacOSCapabilities } from "../native/NativeMacOSProviderMetadata.js";
|
|
import { NATIVE_MACOS_PROVIDER_IDENTITY } from "../native/NativeMacosProviderIdentity.js";
|
|
|
|
type AuxiliaryProviderDeclaration = ConstructorParameters<
|
|
typeof LazyAnalysisProvider
|
|
>[0];
|
|
|
|
/** Declare the lazy execution-free .NET static provider wiring. */
|
|
export const managedStaticProviderDeclaration =
|
|
(): AuxiliaryProviderDeclaration => ({
|
|
identity: MANAGED_STATIC_PROVIDER,
|
|
capabilities: managedStaticCapabilities(),
|
|
load: async () => {
|
|
const { ManagedStaticProvider } =
|
|
await import("../dotnet/ManagedStaticProvider.js");
|
|
return new ManagedStaticProvider();
|
|
},
|
|
});
|
|
|
|
/** Wire the three existing auxiliary AnalysisProvider implementations lazily. */
|
|
export const auxiliaryAnalysisProviderDeclarations = (
|
|
selectedEnvironment: Readonly<NodeJS.ProcessEnv>,
|
|
platform: NodeJS.Platform = HOST_PLATFORM.platform,
|
|
settings?: AnalysisSettingsReader,
|
|
): readonly AuxiliaryProviderDeclaration[] => {
|
|
const environment = snapshotEnvironment(selectedEnvironment, platform);
|
|
return [
|
|
{
|
|
identity: ARTIFACT_GRAPH_PROVIDER,
|
|
capabilities: artifactCapabilities(platform),
|
|
load: async () => {
|
|
const { ArtifactProvider } =
|
|
await import("../artifacts/ArtifactProvider.js");
|
|
return new ArtifactProvider(environment, platform, settings);
|
|
},
|
|
},
|
|
{
|
|
identity: NATIVE_MACOS_PROVIDER_IDENTITY,
|
|
capabilities: nativeMacOSCapabilities(platform),
|
|
load: async () => {
|
|
const { NativeMacOSProvider } =
|
|
await import("../native/NativeMacOSProvider.js");
|
|
return new NativeMacOSProvider(environment, undefined, platform);
|
|
},
|
|
},
|
|
managedStaticProviderDeclaration(),
|
|
];
|
|
};
|