Files
backstage/packages/backend-plugin-api/CHANGELOG.md
T
github-actions[bot] 675324ed19 Version Packages (next)
2023-01-31 14:45:37 +00:00

13 KiB

@backstage/backend-plugin-api

0.3.2-next.1

Patch Changes

  • ae88f61e00: The register methods passed to createBackendPlugin and createBackendModule now have dedicated BackendPluginRegistrationPoints and BackendModuleRegistrationPoints arguments, respectively. This lets us make it clear on a type level that it's not possible to pass in extension points as dependencies to plugins (should only ever be done for modules). This has no practical effect on code that was already well behaved.
  • Updated dependencies
    • @backstage/backend-tasks@0.4.3-next.1
    • @backstage/config@1.0.6
    • @backstage/types@1.0.2
    • @backstage/plugin-auth-node@0.2.11-next.1
    • @backstage/plugin-permission-common@0.7.3

0.3.2-next.0

Patch Changes

  • Updated dependencies
    • @backstage/backend-tasks@0.4.3-next.0
    • @backstage/plugin-auth-node@0.2.11-next.0

0.3.0

Minor Changes

  • 8e06f3cf00: Moved loggerToWinstonLogger to @backstage/backend-common.
  • ecbec4ec4c: Updated all factory function creators to accept options as a top-level callback rather than extra parameter to the main factory function.

Patch Changes

  • 6cfd4d7073: Added RootLifecycleService and rootLifecycleServiceRef, as well as added a logger option to the existing LifecycleServiceShutdownHook.

  • ecc6bfe4c9: Added ServiceFactoryOrFunction type, for use when either a ServiceFactory or () => ServiceFactory can be used.

  • 5b7bcd3c5e: Added createSharedEnvironment for creating a shared environment containing commonly used services in a split backend setup of the backend.

  • 02b119ff93: Added a new rootHttpRouterServiceRef and RootHttpRouterService interface.

  • 5e2cebe9a3: Migrate UrlReader into this package to gradually remove the dependency on backend-common.

  • 843a0a158c: Added new core identity service.

  • 5437fe488f: Migrated types related to TokenManagerService, CacheService and DatabaseService into backend-plugin-api.

  • 6f02d23b01: Moved PluginEndpointDiscovery type from backend-common to backend-plugin-api.

  • 483e907eaf: The createServiceFactory function has been updated to no longer use a duplicate callback pattern for plugin scoped services. The outer callback is now replaced by an optional createRootContext method. This change was made in order to support TypeScript 4.9, but it also simplifies the API surface a bit, especially for plugin scoped service factories that don't need to create a root context. In addition, the factory and root context functions can now be synchronous.

    A factory that previously would have looked like this:

    createServiceFactory({
      service: coreServices.cache,
      deps: {
        config: coreServices.config,
        plugin: coreServices.pluginMetadata,
      },
      async factory({ config }) {
        const cacheManager = CacheManager.fromConfig(config);
        return async ({ plugin }) => {
          return cacheManager.forPlugin(plugin.getId());
        };
      },
    });
    

    Now instead looks like this:

    createServiceFactory({
      service: coreServices.cache,
      deps: {
        config: coreServices.config,
        plugin: coreServices.pluginMetadata,
      },
      async createRootContext({ config }) {
        return CacheManager.fromConfig(config);
      },
      async factory({ plugin }, manager) {
        return manager.forPlugin(plugin.getId());
      },
    });
    

    Although in many cases the createRootContext isn't needed, for example:

    createServiceFactory({
      service: coreServices.logger,
      deps: {
        rootLogger: coreServices.rootLogger,
        plugin: coreServices.pluginMetadata,
      },
      factory({ rootLogger, plugin }) {
        return rootLogger.child({ plugin: plugin.getId() });
      },
    });
    
  • 16054afdec: Documented coreServices an all of its members.

  • 0e63aab311: Updated the RootLoggerService to also have an addRedactions method.

  • 62b04bb865: Updates all create* methods to simplify their type definitions and ensure they all have configuration interfaces.

  • Updated dependencies

    • @backstage/backend-tasks@0.4.1
    • @backstage/config@1.0.6
    • @backstage/types@1.0.2
    • @backstage/plugin-auth-node@0.2.9
    • @backstage/plugin-permission-common@0.7.3

0.3.0-next.1

Minor Changes

  • 8e06f3cf00: Moved loggerToWinstonLogger to @backstage/backend-common.

Patch Changes

  • ecc6bfe4c9: Added ServiceFactoryOrFunction type, for use when either a ServiceFactory or () => ServiceFactory can be used.
  • 02b119ff93: Added a new rootHttpRouterServiceRef and RootHttpRouterService interface.
  • 5437fe488f: Migrated types related to TokenManagerService, CacheService and DatabaseService into backend-plugin-api.
  • 16054afdec: Documented coreServices an all of its members.
  • 62b04bb865: Updates all create* methods to simplify their type definitions and ensure they all have configuration interfaces.
  • Updated dependencies
    • @backstage/backend-tasks@0.4.1-next.1
    • @backstage/config@1.0.6-next.0
    • @backstage/types@1.0.2
    • @backstage/plugin-permission-common@0.7.3-next.0

0.2.1-next.0

Patch Changes

  • 6cfd4d7073: Added RootLifecycleService and rootLifecycleServiceRef, as well as added a labels option to the existing LifecycleServiceShutdownHook.
  • 5e2cebe9a3: Migrate UrlReader into this package to gradually remove the dependency on backend-common.
  • 6f02d23b01: Moved PluginEndpointDiscovery type from backend-common to backend-plugin-api.
  • Updated dependencies
    • @backstage/backend-common@0.18.0-next.0
    • @backstage/config@1.0.6-next.0
    • @backstage/backend-tasks@0.4.1-next.0
    • @backstage/plugin-permission-common@0.7.3-next.0

0.2.0

Minor Changes

  • 884d749b14: BREAKING: All core service references are now exported via a single coreServices object. For example, the loggerServiceRef is now accessed via coreServices.logger instead.
  • a025190552: BREAKING: All service interfaces are now suffixed with *Service.

Patch Changes

  • cb1c2781c0: Updated LoggerService interface with more log methods and meta.
  • d6dbf1792b: Added initial support for registering shutdown hooks via lifecycleServiceRef.
  • Updated dependencies

0.2.0-next.3

Patch Changes

  • Updated dependencies
    • @backstage/backend-tasks@0.4.0-next.3
    • @backstage/plugin-permission-common@0.7.2-next.2
    • @backstage/backend-common@0.17.0-next.3
    • @backstage/config@1.0.5-next.1

0.2.0-next.2

Minor Changes

  • 884d749b14: BREAKING: All core service references are now exported via a single coreServices object. For example, the loggerServiceRef is now accessed via coreServices.logger instead.

Patch Changes

  • Updated dependencies
    • @backstage/backend-common@0.17.0-next.2
    • @backstage/backend-tasks@0.4.0-next.2
    • @backstage/config@1.0.5-next.1
    • @backstage/plugin-permission-common@0.7.2-next.1

0.1.5-next.1

Patch Changes

  • Updated dependencies
    • @backstage/backend-common@0.17.0-next.1
    • @backstage/backend-tasks@0.4.0-next.1
    • @backstage/config@1.0.5-next.1
    • @backstage/plugin-permission-common@0.7.2-next.1

0.1.5-next.0

Patch Changes

  • d6dbf1792b: Added initial support for registering shutdown hooks via lifecycleServiceRef.
  • Updated dependencies
    • @backstage/backend-common@0.16.1-next.0
    • @backstage/plugin-permission-common@0.7.2-next.0
    • @backstage/backend-tasks@0.3.8-next.0
    • @backstage/config@1.0.5-next.0

0.1.4

Patch Changes

  • Updated dependencies

0.1.4-next.1

Patch Changes

  • Updated dependencies
    • @backstage/backend-common@0.16.0-next.1
    • @backstage/backend-tasks@0.3.7-next.1
    • @backstage/config@1.0.4-next.0
    • @backstage/plugin-permission-common@0.7.1-next.0

0.1.4-next.0

Patch Changes

  • Updated dependencies
    • @backstage/backend-common@0.16.0-next.0
    • @backstage/backend-tasks@0.3.7-next.0
    • @backstage/plugin-permission-common@0.7.1-next.0
    • @backstage/config@1.0.4-next.0

0.1.3

Patch Changes

  • 28377dc89f: Allow interfaces to be used for inferred option types.
  • a35a27df70: Added documentation for createBackendModule, with guidelines for choosing a module ID.
  • Updated dependencies

0.1.3-next.2

Patch Changes

  • Updated dependencies
    • @backstage/backend-tasks@0.3.6-next.2
    • @backstage/backend-common@0.15.2-next.2
    • @backstage/plugin-permission-common@0.7.0-next.2
    • @backstage/config@1.0.3-next.2

0.1.3-next.1

Patch Changes

  • a35a27df70: Added documentation for createBackendModule, with guidelines for choosing a module ID.
  • Updated dependencies
    • @backstage/backend-common@0.15.2-next.1
    • @backstage/backend-tasks@0.3.6-next.1
    • @backstage/config@1.0.3-next.1
    • @backstage/plugin-permission-common@0.6.5-next.1

0.1.3-next.0

Patch Changes

  • 28377dc89f: Allow interfaces to be used for inferred option types.
  • Updated dependencies
    • @backstage/backend-common@0.15.2-next.0
    • @backstage/backend-tasks@0.3.6-next.0
    • @backstage/config@1.0.3-next.0
    • @backstage/plugin-permission-common@0.6.5-next.0

0.1.2

Patch Changes

  • 2c57c0c499: Made ApiRef.defaultFactory internal.
  • 91eed37a39: Updated createBackendPlugin and createBackendModule to properly forward lack of options.
  • 409ed984e8: Service are now scoped to either 'plugin' or 'root' scope. Service factories have been updated to provide dependency instances directly rather than factory functions.
  • eef91a2558: Simplified the ServiceFactory type and removed AnyServiceFactory.
  • 854ba37357: The createServiceFactory method has been updated to return a higher-order factory that can accept options.
  • 68513f169a: When defining a new ServiceRef you can now also include a defaultFactory, which will be used to construct instances of the service in case there is no explicit factory defined.
  • Updated dependencies

0.1.2-next.2

Patch Changes

  • 409ed984e8: Service are now scoped to either 'plugin' or 'root' scope. Service factories have been updated to provide dependency instances directly rather than factory functions.
  • 854ba37357: The createServiceFactory method has been updated to return a higher-order factory that can accept options.
  • Updated dependencies
    • @backstage/config@1.0.2-next.0
    • @backstage/plugin-permission-common@0.6.4-next.2
    • @backstage/backend-common@0.15.1-next.3
    • @backstage/backend-tasks@0.3.5-next.1

0.1.2-next.1

Patch Changes

  • 2c57c0c499: Made ApiRef.defaultFactory internal.
  • 91eed37a39: Updated createBackendPlugin and createBackendModule to properly forward lack of options.
  • Updated dependencies

0.1.2-next.0

Patch Changes

  • eef91a2558: Simplified the ServiceFactory type and removed AnyServiceFactory.
  • 68513f169a: When defining a new ServiceRef you can now also include a defaultFactory, which will be used to construct instances of the service in case there is no explicit factory defined.
  • Updated dependencies

0.1.1

Patch Changes

  • 0599732ec0: Refactored experimental backend system with new type names.
  • 34c2f5aca1: The factory returned by createBackendPlugin and createBackendModule no longer require a parameter to be passed if the options are optional.
  • Updated dependencies

0.1.1-next.0

Patch Changes

0.1.0

Minor Changes

  • 91c1d12123: Introduced new package for creating backend plugins using the new alpha backend plugin framework. This package is still considered EXPERIMENTAL and things will change without warning. Do not use this for production.

Patch Changes

0.1.0-next.0

Minor Changes

  • 91c1d12123: Introduced new package for creating backend plugins using the new alpha backend plugin framework. This package is still considered EXPERIMENTAL and things will change without warning. Do not use this for production.

Patch Changes

  • Updated dependencies