Files
backstage/.changeset/thick-squids-drive.md
T
blam 8fb60cb2f1 chore: some more work
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Fredrik Adelöw <freben@users.noreply.github.com>
Co-authored-by: Camila Belo <camilaibs@users.noreply.github.com>

Signed-off-by: blam <ben@blam.sh>
2024-08-08 13:41:00 +02:00

715 B

@backstage/frontend-plugin-api, @backstage/frontend-test-utils
@backstage/frontend-plugin-api @backstage/frontend-test-utils
patch patch

Added support for being able to override extension definitions.

const TestCard = EntityCardBlueprint.make({
  ...
});

TestCard.override({
  // override attachment points
  attachTo: { id: 'something-else', input: 'overridden' },
  // extend the config schema
  config: {
    schema: {
      newConfig: z => z.string().optional(),
    }
  },
  // override factory
  *factory(originalFactory, { inputs, config }){
    const originalOutput = originalFactory();

    yield coreExentsionData.reactElement(
      <Wrapping>
        {originalOutput.get(coreExentsionData.reactElement)}
      </Wrapping>
    );
  }
});