Angular Modernizer
    Preparing search index...

    Transform rule refactor:service-bag-split: splits a Service Bag into focused services by concern and backend area.

    Runs only when the plugin config sets transformationType: 'service-bag-transform'; delegates to ServiceBagTransformOrchestrator, which:

    1. Classifies the class (same classification as architecture:service-bag).
    2. Groups methods by backend area and technical concern, or by the caller's assignments.
    3. Creates one focused service file per group.
    4. Makes the original service delegate to the focused services.
    5. Adds imports and constructor injection.
    const rule = new ServiceBagTransformRule();
    const context = ContextFactory.createTransformContext({ sourceFile, project, api });
    const result = await rule.transform(context);

    if (result.modified) {
    console.info('Service Bag split into focused services');
    console.info(`Changes: ${result.changeCount}`);
    }

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    category: "refactoring" = 'refactoring'

    Rule category for grouping.

    description: "Automatically splits Service Bag into focused services" = 'Automatically splits Service Bag into focused services'

    Rule description explaining what it does.

    id: "refactor:service-bag-split" = 'refactor:service-bag-split'

    Unique rule identifier (scoped to plugin).

    name: "Service Bag Split" = 'Service Bag Split'

    Human-readable rule name.

    tags: string[] = ...

    Tags for filtering and search.

    Methods