@backstage/backend-app-api 0.7.10-next.1 → 0.8.1-next.0

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/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
3
- import { LoggerService, RootConfigService, RootLoggerService, BackendFeature, ServiceFactoryOrFunction, DiscoveryService, LifecycleService, RootLifecycleService, RootHttpRouterService } from '@backstage/backend-plugin-api';
3
+ import { LoggerService, RootConfigService, RootLoggerService, BackendFeature, ServiceFactory, DiscoveryService, LifecycleService, RootLifecycleService, RootHttpRouterService } from '@backstage/backend-plugin-api';
4
4
  import { Config, AppConfig } from '@backstage/config';
5
5
  import { ConfigSchema, LoadConfigOptionsRemote, RemoteConfigSourceOptions } from '@backstage/config-loader';
6
6
  import { RequestHandler, ErrorRequestHandler, Express, Handler } from 'express';
@@ -442,8 +442,18 @@ declare class WinstonLogger implements RootLoggerService {
442
442
  * @public
443
443
  */
444
444
  interface Backend {
445
- add(feature: BackendFeature | (() => BackendFeature) | Promise<{
446
- default: BackendFeature | (() => BackendFeature);
445
+ add(feature: BackendFeature | Promise<{
446
+ default: BackendFeature;
447
+ }>): void;
448
+ /**
449
+ * @deprecated The ability to add features defined as a callback is being
450
+ * removed. Please update the installed feature to no longer be defined as a
451
+ * callback, typically this means updating it to use the latest version of
452
+ * `@backstage/backend-plugin-api`. If the feature is from a third-party
453
+ * package, please reach out to the package maintainer to update it.
454
+ */
455
+ add(feature: (() => BackendFeature) | Promise<{
456
+ default: () => BackendFeature;
447
457
  }>): void;
448
458
  start(): Promise<void>;
449
459
  stop(): Promise<void>;
@@ -452,7 +462,7 @@ interface Backend {
452
462
  * @public
453
463
  */
454
464
  interface CreateSpecializedBackendOptions {
455
- defaultServiceFactories: ServiceFactoryOrFunction[];
465
+ defaultServiceFactories: ServiceFactory[];
456
466
  }
457
467
 
458
468
  /**
@@ -464,7 +474,7 @@ declare function createSpecializedBackend(options: CreateSpecializedBackendOptio
464
474
  * @public
465
475
  * @deprecated Please import from `@backstage/backend-defaults/cache` instead.
466
476
  */
467
- declare const cacheServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.CacheService, "plugin">;
477
+ declare const cacheServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.CacheService, "plugin", undefined>;
468
478
 
469
479
  /**
470
480
  * @public
@@ -485,19 +495,19 @@ interface RootConfigFactoryOptions {
485
495
  * @public
486
496
  * @deprecated Please import from `@backstage/backend-defaults/rootConfig` instead.
487
497
  */
488
- declare const rootConfigServiceFactory: (options?: RootConfigFactoryOptions | undefined) => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.RootConfigService, "root">;
498
+ declare const rootConfigServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.RootConfigService, "root", RootConfigFactoryOptions>;
489
499
 
490
500
  /**
491
501
  * @public
492
502
  * @deprecated Please import from `@backstage/backend-defaults/database` instead.
493
503
  */
494
- declare const databaseServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.DatabaseService, "plugin">;
504
+ declare const databaseServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.DatabaseService, "plugin", undefined>;
495
505
 
496
506
  /**
497
507
  * @public
498
508
  * @deprecated Please import from `@backstage/backend-defaults/discovery` instead.
499
509
  */
500
- declare const discoveryServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.DiscoveryService, "plugin">;
510
+ declare const discoveryServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.DiscoveryService, "plugin", undefined>;
501
511
 
502
512
  /**
503
513
  * HostDiscovery is a basic PluginEndpointDiscovery implementation
@@ -562,7 +572,7 @@ type IdentityFactoryOptions = {
562
572
  * @public
563
573
  * @deprecated Please migrate to the new `coreServices.auth`, `coreServices.httpAuth`, and `coreServices.userInfo` services as needed instead
564
574
  */
565
- declare const identityServiceFactory: (options?: IdentityFactoryOptions | undefined) => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.IdentityService, "plugin">;
575
+ declare const identityServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.IdentityService, "plugin", IdentityFactoryOptions>;
566
576
 
567
577
  /**
568
578
  * Allows plugins to register shutdown hooks that are run when the process is about to exit.
@@ -570,13 +580,13 @@ declare const identityServiceFactory: (options?: IdentityFactoryOptions | undefi
570
580
  * @public
571
581
  * @deprecated Please import from `@backstage/backend-defaults/lifecycle` instead.
572
582
  */
573
- declare const lifecycleServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<LifecycleService, "plugin">;
583
+ declare const lifecycleServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<LifecycleService, "plugin", undefined>;
574
584
 
575
585
  /**
576
586
  * @public
577
587
  * @deprecated Please import from `@backstage/backend-defaults/permissions` instead.
578
588
  */
579
- declare const permissionsServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.PermissionsService, "plugin">;
589
+ declare const permissionsServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.PermissionsService, "plugin", undefined>;
580
590
 
581
591
  /**
582
592
  * Allows plugins to register shutdown hooks that are run when the process is about to exit.
@@ -584,47 +594,32 @@ declare const permissionsServiceFactory: () => _backstage_backend_plugin_api.Ser
584
594
  * @public
585
595
  * @deprecated Please import from `@backstage/backend-defaults/rootLifecycle` instead.
586
596
  */
587
- declare const rootLifecycleServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<RootLifecycleService, "root">;
597
+ declare const rootLifecycleServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<RootLifecycleService, "root", undefined>;
588
598
 
589
599
  /**
590
600
  * @public
591
601
  * @deprecated Please migrate to the new `coreServices.auth`, `coreServices.httpAuth`, and `coreServices.userInfo` services as needed instead
592
602
  */
593
- declare const tokenManagerServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.TokenManagerService, "plugin">;
603
+ declare const tokenManagerServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.TokenManagerService, "plugin", undefined>;
594
604
 
595
605
  /**
596
606
  * @public
597
607
  * @deprecated Please import from `@backstage/backend-defaults/urlReader` instead.
598
608
  */
599
- declare const urlReaderServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.UrlReaderService, "plugin">;
609
+ declare const urlReaderServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.UrlReaderService, "plugin", undefined>;
600
610
 
601
611
  /**
602
612
  * @public
603
613
  * @deprecated Please import from `@backstage/backend-defaults/auth` instead.
604
614
  */
605
- declare const authServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.AuthService, "plugin">;
615
+ declare const authServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.AuthService, "plugin", undefined>;
606
616
 
607
617
  /**
608
618
  * @public
609
619
  * @deprecated Please import from `@backstage/backend-defaults/httpAuth` instead.
610
620
  */
611
- declare const httpAuthServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.HttpAuthService, "plugin">;
612
-
613
- /**
614
- * @public
615
- */
616
- interface HttpRouterFactoryOptions$1 {
617
- /**
618
- * A callback used to generate the path for each plugin, defaults to `/api/{pluginId}`.
619
- */
620
- getPath?(pluginId: string): string;
621
- }
621
+ declare const httpAuthServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.HttpAuthService, "plugin", undefined>;
622
622
 
623
- /**
624
- * @public
625
- * @deprecated Please import from `@backstage/backend-defaults/httpRouter` instead.
626
- */
627
- type HttpRouterFactoryOptions = HttpRouterFactoryOptions$1;
628
623
  /**
629
624
  * HTTP route registration for plugins.
630
625
  *
@@ -635,7 +630,7 @@ type HttpRouterFactoryOptions = HttpRouterFactoryOptions$1;
635
630
  * @public
636
631
  * @deprecated Please import from `@backstage/backend-defaults/httpRouter` instead.
637
632
  */
638
- declare const httpRouterServiceFactory: (options?: HttpRouterFactoryOptions$1 | undefined) => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.HttpRouterService, "plugin">;
633
+ declare const httpRouterServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.HttpRouterService, "plugin", undefined>;
639
634
 
640
635
  /**
641
636
  * Options for {@link createLifecycleMiddleware}.
@@ -699,7 +694,7 @@ declare const createLifecycleMiddleware: typeof createLifecycleMiddleware$1;
699
694
  * @public
700
695
  * @deprecated Please import from `@backstage/backend-defaults/logger` instead.
701
696
  */
702
- declare const loggerServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.LoggerService, "plugin">;
697
+ declare const loggerServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.LoggerService, "plugin", undefined>;
703
698
 
704
699
  /**
705
700
  * @public
@@ -753,7 +748,7 @@ type RootHttpRouterFactoryOptions = RootHttpRouterFactoryOptions$1;
753
748
  * @public
754
749
  * @deprecated Please import from `@backstage/backend-defaults/rootHttpRouter` instead.
755
750
  */
756
- declare const rootHttpRouterServiceFactory: (options?: RootHttpRouterFactoryOptions$1 | undefined) => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.RootHttpRouterService, "root">;
751
+ declare const rootHttpRouterServiceFactory: ((options?: RootHttpRouterFactoryOptions$1 | undefined) => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.RootHttpRouterService, "root">) & _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.RootHttpRouterService, "root">;
757
752
 
758
753
  /**
759
754
  * Options for the {@link DefaultRootHttpRouter} class.
@@ -800,18 +795,18 @@ declare class DefaultRootHttpRouter implements RootHttpRouterService {
800
795
  * @public
801
796
  * @deprecated Please import from `@backstage/backend-defaults/rootLogger` instead.
802
797
  */
803
- declare const rootLoggerServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.RootLoggerService, "root">;
798
+ declare const rootLoggerServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.RootLoggerService, "root", undefined>;
804
799
 
805
800
  /**
806
801
  * @public
807
802
  * @deprecated Please import from `@backstage/backend-defaults/scheduler` instead.
808
803
  */
809
- declare const schedulerServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.SchedulerService, "plugin">;
804
+ declare const schedulerServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.SchedulerService, "plugin", undefined>;
810
805
 
811
806
  /**
812
807
  * @public
813
808
  * @deprecated Please import from `@backstage/backend-defaults/userInfo` instead.
814
809
  */
815
- declare const userInfoServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.UserInfoService, "plugin">;
810
+ declare const userInfoServiceFactory: _backstage_backend_plugin_api.ServiceFactoryCompat<_backstage_backend_plugin_api.UserInfoService, "plugin", undefined>;
816
811
 
817
- export { type Backend, type CreateSpecializedBackendOptions, DefaultRootHttpRouter, type DefaultRootHttpRouterOptions, type ExtendedHttpServer, HostDiscovery, type HttpRouterFactoryOptions, type HttpServerCertificateOptions, type HttpServerOptions, type IdentityFactoryOptions, type LifecycleMiddlewareOptions, MiddlewareFactory, type MiddlewareFactoryErrorOptions, type MiddlewareFactoryOptions, type RootConfigFactoryOptions, type RootHttpRouterConfigureContext, type RootHttpRouterFactoryOptions, WinstonLogger, type WinstonLoggerOptions, authServiceFactory, cacheServiceFactory, createConfigSecretEnumerator, createHttpServer, createLifecycleMiddleware, createSpecializedBackend, databaseServiceFactory, discoveryServiceFactory, httpAuthServiceFactory, httpRouterServiceFactory, identityServiceFactory, lifecycleServiceFactory, loadBackendConfig, loggerServiceFactory, permissionsServiceFactory, readCorsOptions, readHelmetOptions, readHttpServerOptions, rootConfigServiceFactory, rootHttpRouterServiceFactory, rootLifecycleServiceFactory, rootLoggerServiceFactory, schedulerServiceFactory, tokenManagerServiceFactory, urlReaderServiceFactory, userInfoServiceFactory };
812
+ export { type Backend, type CreateSpecializedBackendOptions, DefaultRootHttpRouter, type DefaultRootHttpRouterOptions, type ExtendedHttpServer, HostDiscovery, type HttpServerCertificateOptions, type HttpServerOptions, type IdentityFactoryOptions, type LifecycleMiddlewareOptions, MiddlewareFactory, type MiddlewareFactoryErrorOptions, type MiddlewareFactoryOptions, type RootConfigFactoryOptions, type RootHttpRouterConfigureContext, type RootHttpRouterFactoryOptions, WinstonLogger, type WinstonLoggerOptions, authServiceFactory, cacheServiceFactory, createConfigSecretEnumerator, createHttpServer, createLifecycleMiddleware, createSpecializedBackend, databaseServiceFactory, discoveryServiceFactory, httpAuthServiceFactory, httpRouterServiceFactory, identityServiceFactory, lifecycleServiceFactory, loadBackendConfig, loggerServiceFactory, permissionsServiceFactory, readCorsOptions, readHelmetOptions, readHttpServerOptions, rootConfigServiceFactory, rootHttpRouterServiceFactory, rootLifecycleServiceFactory, rootLoggerServiceFactory, schedulerServiceFactory, tokenManagerServiceFactory, urlReaderServiceFactory, userInfoServiceFactory };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/backend-app-api",
3
- "version": "0.7.10-next.1",
3
+ "version": "0.8.1-next.0",
4
4
  "description": "Core API used by Backstage backend apps",
5
5
  "backstage": {
6
6
  "role": "node-library"
@@ -49,16 +49,16 @@
49
49
  "test": "backstage-cli package test"
50
50
  },
51
51
  "dependencies": {
52
- "@backstage/backend-common": "^0.23.3-next.1",
53
- "@backstage/backend-plugin-api": "^0.6.22-next.1",
54
- "@backstage/backend-tasks": "^0.5.27-next.1",
52
+ "@backstage/backend-common": "^0.23.4-next.0",
53
+ "@backstage/backend-plugin-api": "^0.7.1-next.0",
54
+ "@backstage/backend-tasks": "^0.5.28-next.0",
55
55
  "@backstage/cli-common": "^0.1.14",
56
- "@backstage/cli-node": "^0.2.6",
56
+ "@backstage/cli-node": "^0.2.7",
57
57
  "@backstage/config": "^1.2.0",
58
- "@backstage/config-loader": "^1.8.1",
58
+ "@backstage/config-loader": "^1.8.2-next.0",
59
59
  "@backstage/errors": "^1.2.4",
60
- "@backstage/plugin-auth-node": "^0.4.17-next.1",
61
- "@backstage/plugin-permission-node": "^0.7.33-next.1",
60
+ "@backstage/plugin-auth-node": "^0.4.18-next.0",
61
+ "@backstage/plugin-permission-node": "^0.8.1-next.0",
62
62
  "@backstage/types": "^1.1.1",
63
63
  "@manypkg/get-packages": "^1.1.3",
64
64
  "@types/cors": "^2.8.6",
@@ -89,9 +89,9 @@
89
89
  "winston-transport": "^4.5.0"
90
90
  },
91
91
  "devDependencies": {
92
- "@backstage/backend-defaults": "^0.3.4-next.1",
93
- "@backstage/backend-test-utils": "^0.4.4-next.1",
94
- "@backstage/cli": "^0.26.11-next.1",
92
+ "@backstage/backend-defaults": "^0.4.2-next.0",
93
+ "@backstage/backend-test-utils": "^0.4.5-next.0",
94
+ "@backstage/cli": "^0.27.0-next.0",
95
95
  "@types/compression": "^1.7.0",
96
96
  "@types/fs-extra": "^11.0.0",
97
97
  "@types/http-errors": "^2.0.0",