@backstage/backend-app-api 0.0.0-nightly-20230207022622 → 0.0.0-nightly-20230209023017
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.
Potentially problematic release.
This version of @backstage/backend-app-api might be problematic. Click here for more details.
- package/CHANGELOG.md +44 -6
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +33 -40
- package/dist/index.beta.d.ts +33 -40
- package/dist/index.cjs.js +135 -121
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +33 -40
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,25 +1,63 @@
|
|
|
1
1
|
# @backstage/backend-app-api
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20230209023017
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 01a075ec1d: **BREAKING**: Renamed `RootHttpRouterConfigureOptions` to `RootHttpRouterConfigureContext`, and removed the unused type `ServiceOrExtensionPoint`.
|
|
8
|
+
- 4ae71b7f2e: **BREAKING** Renaming `*Factory` exports to `*ServiceFactory` instead. For example `configFactory` now is exported as `configServiceFactory`.
|
|
9
|
+
- d31d8e00b3: **BREAKING** `HttpServerCertificateOptions` when specified with a `key` and `cert` should also have the `type: 'pem'` instead of `type: 'plain'`
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
6
12
|
|
|
7
13
|
- a18da2f8b5: Fixed an issue were the log redaction didn't properly escape RegExp characters.
|
|
8
14
|
- e716946103: Updated usage of the lifecycle service.
|
|
9
15
|
- f60cca9da1: Updated database factory to pass service deps required for restoring database state during development.
|
|
16
|
+
- 610d65e143: Updates to match new `BackendFeature` type.
|
|
17
|
+
- b86efa2d04: Updated usage of `ServiceFactory`.
|
|
10
18
|
- ab22515647: The shutdown signal handlers are now installed as part of the backend instance rather than the lifecycle service, and explicitly cause the process to exit.
|
|
19
|
+
- b729f9f31f: Moved the options of the `config` and `rootHttpRouter` services out to the factories themselves, where they belong
|
|
11
20
|
- ed8b5967d7: `HttpRouterFactoryOptions.getPath` is now optional as a default value is always provided in the factory.
|
|
21
|
+
- 71a5ec0f06: Updated usages of `LogMeta`.
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @backstage/backend-plugin-api@0.0.0-nightly-20230209023017
|
|
24
|
+
- @backstage/backend-common@0.0.0-nightly-20230209023017
|
|
25
|
+
- @backstage/backend-tasks@0.0.0-nightly-20230209023017
|
|
26
|
+
- @backstage/cli-common@0.1.11
|
|
27
|
+
- @backstage/config@1.0.6
|
|
28
|
+
- @backstage/config-loader@1.1.8
|
|
29
|
+
- @backstage/errors@1.1.4
|
|
30
|
+
- @backstage/types@1.0.2
|
|
31
|
+
- @backstage/plugin-auth-node@0.0.0-nightly-20230209023017
|
|
32
|
+
- @backstage/plugin-permission-node@0.0.0-nightly-20230209023017
|
|
33
|
+
|
|
34
|
+
## 0.4.0-next.2
|
|
35
|
+
|
|
36
|
+
### Minor Changes
|
|
37
|
+
|
|
38
|
+
- 01a075ec1d: **BREAKING**: Renamed `RootHttpRouterConfigureOptions` to `RootHttpRouterConfigureContext`, and removed the unused type `ServiceOrExtensionPoint`.
|
|
39
|
+
- 4ae71b7f2e: **BREAKING** Renaming `*Factory` exports to `*ServiceFactory` instead. For example `configFactory` now is exported as `configServiceFactory`.
|
|
40
|
+
- d31d8e00b3: **BREAKING** `HttpServerCertificateOptions` when specified with a `key` and `cert` should also have the `type: 'pem'` instead of `type: 'plain'`
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- e716946103: Updated usage of the lifecycle service.
|
|
45
|
+
- f60cca9da1: Updated database factory to pass service deps required for restoring database state during development.
|
|
46
|
+
- 610d65e143: Updates to match new `BackendFeature` type.
|
|
47
|
+
- ab22515647: The shutdown signal handlers are now installed as part of the backend instance rather than the lifecycle service, and explicitly cause the process to exit.
|
|
48
|
+
- b729f9f31f: Moved the options of the `config` and `rootHttpRouter` services out to the factories themselves, where they belong
|
|
49
|
+
- 71a5ec0f06: Updated usages of `LogMeta`.
|
|
12
50
|
- Updated dependencies
|
|
13
|
-
- @backstage/backend-plugin-api@0.
|
|
14
|
-
- @backstage/backend-common@0.
|
|
15
|
-
- @backstage/backend-tasks@0.
|
|
51
|
+
- @backstage/backend-plugin-api@0.4.0-next.2
|
|
52
|
+
- @backstage/backend-common@0.18.2-next.2
|
|
53
|
+
- @backstage/backend-tasks@0.4.3-next.2
|
|
54
|
+
- @backstage/plugin-auth-node@0.2.11-next.2
|
|
55
|
+
- @backstage/plugin-permission-node@0.7.5-next.2
|
|
16
56
|
- @backstage/cli-common@0.1.11
|
|
17
57
|
- @backstage/config@1.0.6
|
|
18
58
|
- @backstage/config-loader@1.1.8
|
|
19
59
|
- @backstage/errors@1.1.4
|
|
20
60
|
- @backstage/types@1.0.2
|
|
21
|
-
- @backstage/plugin-auth-node@0.0.0-nightly-20230207022622
|
|
22
|
-
- @backstage/plugin-permission-node@0.0.0-nightly-20230207022622
|
|
23
61
|
|
|
24
62
|
## 0.3.2-next.1
|
|
25
63
|
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -12,17 +12,16 @@ import { ConfigService } from '@backstage/backend-plugin-api';
|
|
|
12
12
|
import { CorsOptions } from 'cors';
|
|
13
13
|
import { ErrorRequestHandler } from 'express';
|
|
14
14
|
import { Express as Express_2 } from 'express';
|
|
15
|
-
import { ExtensionPoint } from '@backstage/backend-plugin-api';
|
|
16
15
|
import { Format } from 'logform';
|
|
17
16
|
import { Handler } from 'express';
|
|
18
17
|
import { HelmetOptions } from 'helmet';
|
|
19
18
|
import * as http from 'http';
|
|
20
19
|
import { HttpRouterService } from '@backstage/backend-plugin-api';
|
|
21
20
|
import { IdentityService } from '@backstage/backend-plugin-api';
|
|
21
|
+
import { JsonObject } from '@backstage/types';
|
|
22
22
|
import { LifecycleService } from '@backstage/backend-plugin-api';
|
|
23
23
|
import { LoadConfigOptionsRemote } from '@backstage/config-loader';
|
|
24
24
|
import { LoggerService } from '@backstage/backend-plugin-api';
|
|
25
|
-
import { LogMeta } from '@backstage/backend-plugin-api';
|
|
26
25
|
import { PermissionsService } from '@backstage/backend-plugin-api';
|
|
27
26
|
import { PluginCacheManager } from '@backstage/backend-common';
|
|
28
27
|
import { PluginDatabaseManager } from '@backstage/backend-common';
|
|
@@ -35,7 +34,6 @@ import { RootLoggerService } from '@backstage/backend-plugin-api';
|
|
|
35
34
|
import { SchedulerService } from '@backstage/backend-plugin-api';
|
|
36
35
|
import { ServiceFactory } from '@backstage/backend-plugin-api';
|
|
37
36
|
import { ServiceFactoryOrFunction } from '@backstage/backend-plugin-api';
|
|
38
|
-
import { ServiceRef } from '@backstage/backend-plugin-api';
|
|
39
37
|
import { TokenManagerService } from '@backstage/backend-plugin-api';
|
|
40
38
|
import { transport } from 'winston';
|
|
41
39
|
import { UrlReader } from '@backstage/backend-common';
|
|
@@ -50,10 +48,7 @@ export declare interface Backend {
|
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
/** @public */
|
|
53
|
-
export declare const
|
|
54
|
-
|
|
55
|
-
/** @public */
|
|
56
|
-
export declare const configFactory: () => ServiceFactory<ConfigService>;
|
|
51
|
+
export declare const cacheServiceFactory: () => ServiceFactory<PluginCacheManager, "plugin">;
|
|
57
52
|
|
|
58
53
|
/** @public */
|
|
59
54
|
export declare interface ConfigFactoryOptions {
|
|
@@ -67,6 +62,9 @@ export declare interface ConfigFactoryOptions {
|
|
|
67
62
|
remote?: LoadConfigOptionsRemote;
|
|
68
63
|
}
|
|
69
64
|
|
|
65
|
+
/** @public */
|
|
66
|
+
export declare const configServiceFactory: (options?: ConfigFactoryOptions | undefined) => ServiceFactory<ConfigService, "root">;
|
|
67
|
+
|
|
70
68
|
/** @public */
|
|
71
69
|
export declare function createConfigSecretEnumerator(options: {
|
|
72
70
|
logger: LoggerService;
|
|
@@ -95,7 +93,7 @@ export declare interface CreateSpecializedBackendOptions {
|
|
|
95
93
|
}
|
|
96
94
|
|
|
97
95
|
/** @public */
|
|
98
|
-
export declare const
|
|
96
|
+
export declare const databaseServiceFactory: () => ServiceFactory<PluginDatabaseManager, "plugin">;
|
|
99
97
|
|
|
100
98
|
/**
|
|
101
99
|
* The default implementation of the {@link @backstage/backend-plugin-api#RootHttpRouterService} interface for
|
|
@@ -125,7 +123,7 @@ export declare interface DefaultRootHttpRouterOptions {
|
|
|
125
123
|
}
|
|
126
124
|
|
|
127
125
|
/** @public */
|
|
128
|
-
export declare const
|
|
126
|
+
export declare const discoveryServiceFactory: () => ServiceFactory<PluginEndpointDiscovery, "plugin">;
|
|
129
127
|
|
|
130
128
|
/**
|
|
131
129
|
* An HTTP server extended with utility methods.
|
|
@@ -138,9 +136,6 @@ export declare interface ExtendedHttpServer extends http.Server {
|
|
|
138
136
|
port(): number;
|
|
139
137
|
}
|
|
140
138
|
|
|
141
|
-
/** @public */
|
|
142
|
-
export declare const httpRouterFactory: (options?: HttpRouterFactoryOptions | undefined) => ServiceFactory<HttpRouterService>;
|
|
143
|
-
|
|
144
139
|
/**
|
|
145
140
|
* @public
|
|
146
141
|
*/
|
|
@@ -151,13 +146,16 @@ export declare interface HttpRouterFactoryOptions {
|
|
|
151
146
|
getPath?(pluginId: string): string;
|
|
152
147
|
}
|
|
153
148
|
|
|
149
|
+
/** @public */
|
|
150
|
+
export declare const httpRouterServiceFactory: (options?: HttpRouterFactoryOptions | undefined) => ServiceFactory<HttpRouterService, "plugin">;
|
|
151
|
+
|
|
154
152
|
/**
|
|
155
153
|
* Options for configuring HTTPS for an HTTP server.
|
|
156
154
|
*
|
|
157
155
|
* @public
|
|
158
156
|
*/
|
|
159
157
|
export declare type HttpServerCertificateOptions = {
|
|
160
|
-
type: '
|
|
158
|
+
type: 'pem';
|
|
161
159
|
key: string;
|
|
162
160
|
cert: string;
|
|
163
161
|
} | {
|
|
@@ -180,9 +178,6 @@ export declare type HttpServerOptions = {
|
|
|
180
178
|
};
|
|
181
179
|
};
|
|
182
180
|
|
|
183
|
-
/** @public */
|
|
184
|
-
export declare const identityFactory: (options?: IdentityFactoryOptions | undefined) => ServiceFactory<IdentityService>;
|
|
185
|
-
|
|
186
181
|
/**
|
|
187
182
|
* An identity client options object which allows extra configurations
|
|
188
183
|
*
|
|
@@ -195,11 +190,14 @@ export declare type IdentityFactoryOptions = {
|
|
|
195
190
|
algorithms?: string[];
|
|
196
191
|
};
|
|
197
192
|
|
|
193
|
+
/** @public */
|
|
194
|
+
export declare const identityServiceFactory: (options?: IdentityFactoryOptions | undefined) => ServiceFactory<IdentityService, "plugin">;
|
|
195
|
+
|
|
198
196
|
/**
|
|
199
197
|
* Allows plugins to register shutdown hooks that are run when the process is about to exit.
|
|
200
198
|
* @public
|
|
201
199
|
*/
|
|
202
|
-
export declare const
|
|
200
|
+
export declare const lifecycleServiceFactory: () => ServiceFactory<LifecycleService, "plugin">;
|
|
203
201
|
|
|
204
202
|
/**
|
|
205
203
|
* Load configuration for a Backend.
|
|
@@ -216,7 +214,7 @@ export declare function loadBackendConfig(options: {
|
|
|
216
214
|
}>;
|
|
217
215
|
|
|
218
216
|
/** @public */
|
|
219
|
-
export declare const
|
|
217
|
+
export declare const loggerServiceFactory: () => ServiceFactory<LoggerService, "plugin">;
|
|
220
218
|
|
|
221
219
|
/**
|
|
222
220
|
* A utility to configure common middleware.
|
|
@@ -342,7 +340,7 @@ export declare interface MiddlewareFactoryOptions {
|
|
|
342
340
|
}
|
|
343
341
|
|
|
344
342
|
/** @public */
|
|
345
|
-
export declare const
|
|
343
|
+
export declare const permissionsServiceFactory: () => ServiceFactory<PermissionsService, "plugin">;
|
|
346
344
|
|
|
347
345
|
/**
|
|
348
346
|
* Attempts to read a CORS options object from the backend configuration object.
|
|
@@ -391,7 +389,7 @@ export declare function readHttpServerOptions(config?: Config): HttpServerOption
|
|
|
391
389
|
/**
|
|
392
390
|
* @public
|
|
393
391
|
*/
|
|
394
|
-
export declare interface
|
|
392
|
+
export declare interface RootHttpRouterConfigureContext {
|
|
395
393
|
app: Express_2;
|
|
396
394
|
middleware: MiddlewareFactory;
|
|
397
395
|
routes: RequestHandler;
|
|
@@ -400,9 +398,6 @@ export declare interface RootHttpRouterConfigureOptions {
|
|
|
400
398
|
lifecycle: LifecycleService;
|
|
401
399
|
}
|
|
402
400
|
|
|
403
|
-
/** @public */
|
|
404
|
-
export declare const rootHttpRouterFactory: () => ServiceFactory<RootHttpRouterService>;
|
|
405
|
-
|
|
406
401
|
/**
|
|
407
402
|
* @public
|
|
408
403
|
*/
|
|
@@ -412,32 +407,30 @@ export declare type RootHttpRouterFactoryOptions = {
|
|
|
412
407
|
* not given. Disables index path behavior if false is given.
|
|
413
408
|
*/
|
|
414
409
|
indexPath?: string | false;
|
|
415
|
-
configure?(
|
|
410
|
+
configure?(context: RootHttpRouterConfigureContext): void;
|
|
416
411
|
};
|
|
417
412
|
|
|
413
|
+
/** @public */
|
|
414
|
+
export declare const rootHttpRouterServiceFactory: (options?: RootHttpRouterFactoryOptions | undefined) => ServiceFactory<RootHttpRouterService, "root">;
|
|
415
|
+
|
|
418
416
|
/**
|
|
419
417
|
* Allows plugins to register shutdown hooks that are run when the process is about to exit.
|
|
420
418
|
*
|
|
421
419
|
* @public
|
|
422
420
|
*/
|
|
423
|
-
export declare const
|
|
421
|
+
export declare const rootLifecycleServiceFactory: () => ServiceFactory<RootLifecycleService, "root">;
|
|
424
422
|
|
|
425
423
|
/** @public */
|
|
426
|
-
export declare const
|
|
424
|
+
export declare const rootLoggerServiceFactory: () => ServiceFactory<RootLoggerService, "root">;
|
|
427
425
|
|
|
428
426
|
/** @public */
|
|
429
|
-
export declare const
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* @public
|
|
433
|
-
*/
|
|
434
|
-
export declare type ServiceOrExtensionPoint<T = unknown> = ExtensionPoint<T> | ServiceRef<T>;
|
|
427
|
+
export declare const schedulerServiceFactory: () => ServiceFactory<SchedulerService, "plugin">;
|
|
435
428
|
|
|
436
429
|
/** @public */
|
|
437
|
-
export declare const
|
|
430
|
+
export declare const tokenManagerServiceFactory: () => ServiceFactory<TokenManagerService, "plugin">;
|
|
438
431
|
|
|
439
432
|
/** @public */
|
|
440
|
-
export declare const
|
|
433
|
+
export declare const urlReaderServiceFactory: () => ServiceFactory<UrlReader, "plugin">;
|
|
441
434
|
|
|
442
435
|
/**
|
|
443
436
|
* A {@link @backstage/backend-plugin-api#LoggerService} implementation based on winston.
|
|
@@ -462,11 +455,11 @@ export declare class WinstonLogger implements RootLoggerService {
|
|
|
462
455
|
*/
|
|
463
456
|
static colorFormat(): Format;
|
|
464
457
|
private constructor();
|
|
465
|
-
error(message: string, meta?:
|
|
466
|
-
warn(message: string, meta?:
|
|
467
|
-
info(message: string, meta?:
|
|
468
|
-
debug(message: string, meta?:
|
|
469
|
-
child(meta:
|
|
458
|
+
error(message: string, meta?: JsonObject): void;
|
|
459
|
+
warn(message: string, meta?: JsonObject): void;
|
|
460
|
+
info(message: string, meta?: JsonObject): void;
|
|
461
|
+
debug(message: string, meta?: JsonObject): void;
|
|
462
|
+
child(meta: JsonObject): LoggerService;
|
|
470
463
|
addRedactions(redactions: Iterable<string>): void;
|
|
471
464
|
}
|
|
472
465
|
|
|
@@ -474,7 +467,7 @@ export declare class WinstonLogger implements RootLoggerService {
|
|
|
474
467
|
* @public
|
|
475
468
|
*/
|
|
476
469
|
export declare interface WinstonLoggerOptions {
|
|
477
|
-
meta?:
|
|
470
|
+
meta?: JsonObject;
|
|
478
471
|
level: string;
|
|
479
472
|
format: Format;
|
|
480
473
|
transports: transport[];
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -12,17 +12,16 @@ import { ConfigService } from '@backstage/backend-plugin-api';
|
|
|
12
12
|
import { CorsOptions } from 'cors';
|
|
13
13
|
import { ErrorRequestHandler } from 'express';
|
|
14
14
|
import { Express as Express_2 } from 'express';
|
|
15
|
-
import { ExtensionPoint } from '@backstage/backend-plugin-api';
|
|
16
15
|
import { Format } from 'logform';
|
|
17
16
|
import { Handler } from 'express';
|
|
18
17
|
import { HelmetOptions } from 'helmet';
|
|
19
18
|
import * as http from 'http';
|
|
20
19
|
import { HttpRouterService } from '@backstage/backend-plugin-api';
|
|
21
20
|
import { IdentityService } from '@backstage/backend-plugin-api';
|
|
21
|
+
import { JsonObject } from '@backstage/types';
|
|
22
22
|
import { LifecycleService } from '@backstage/backend-plugin-api';
|
|
23
23
|
import { LoadConfigOptionsRemote } from '@backstage/config-loader';
|
|
24
24
|
import { LoggerService } from '@backstage/backend-plugin-api';
|
|
25
|
-
import { LogMeta } from '@backstage/backend-plugin-api';
|
|
26
25
|
import { PermissionsService } from '@backstage/backend-plugin-api';
|
|
27
26
|
import { PluginCacheManager } from '@backstage/backend-common';
|
|
28
27
|
import { PluginDatabaseManager } from '@backstage/backend-common';
|
|
@@ -35,7 +34,6 @@ import { RootLoggerService } from '@backstage/backend-plugin-api';
|
|
|
35
34
|
import { SchedulerService } from '@backstage/backend-plugin-api';
|
|
36
35
|
import { ServiceFactory } from '@backstage/backend-plugin-api';
|
|
37
36
|
import { ServiceFactoryOrFunction } from '@backstage/backend-plugin-api';
|
|
38
|
-
import { ServiceRef } from '@backstage/backend-plugin-api';
|
|
39
37
|
import { TokenManagerService } from '@backstage/backend-plugin-api';
|
|
40
38
|
import { transport } from 'winston';
|
|
41
39
|
import { UrlReader } from '@backstage/backend-common';
|
|
@@ -50,10 +48,7 @@ export declare interface Backend {
|
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
/** @public */
|
|
53
|
-
export declare const
|
|
54
|
-
|
|
55
|
-
/** @public */
|
|
56
|
-
export declare const configFactory: () => ServiceFactory<ConfigService>;
|
|
51
|
+
export declare const cacheServiceFactory: () => ServiceFactory<PluginCacheManager, "plugin">;
|
|
57
52
|
|
|
58
53
|
/** @public */
|
|
59
54
|
export declare interface ConfigFactoryOptions {
|
|
@@ -67,6 +62,9 @@ export declare interface ConfigFactoryOptions {
|
|
|
67
62
|
remote?: LoadConfigOptionsRemote;
|
|
68
63
|
}
|
|
69
64
|
|
|
65
|
+
/** @public */
|
|
66
|
+
export declare const configServiceFactory: (options?: ConfigFactoryOptions | undefined) => ServiceFactory<ConfigService, "root">;
|
|
67
|
+
|
|
70
68
|
/** @public */
|
|
71
69
|
export declare function createConfigSecretEnumerator(options: {
|
|
72
70
|
logger: LoggerService;
|
|
@@ -95,7 +93,7 @@ export declare interface CreateSpecializedBackendOptions {
|
|
|
95
93
|
}
|
|
96
94
|
|
|
97
95
|
/** @public */
|
|
98
|
-
export declare const
|
|
96
|
+
export declare const databaseServiceFactory: () => ServiceFactory<PluginDatabaseManager, "plugin">;
|
|
99
97
|
|
|
100
98
|
/**
|
|
101
99
|
* The default implementation of the {@link @backstage/backend-plugin-api#RootHttpRouterService} interface for
|
|
@@ -125,7 +123,7 @@ export declare interface DefaultRootHttpRouterOptions {
|
|
|
125
123
|
}
|
|
126
124
|
|
|
127
125
|
/** @public */
|
|
128
|
-
export declare const
|
|
126
|
+
export declare const discoveryServiceFactory: () => ServiceFactory<PluginEndpointDiscovery, "plugin">;
|
|
129
127
|
|
|
130
128
|
/**
|
|
131
129
|
* An HTTP server extended with utility methods.
|
|
@@ -138,9 +136,6 @@ export declare interface ExtendedHttpServer extends http.Server {
|
|
|
138
136
|
port(): number;
|
|
139
137
|
}
|
|
140
138
|
|
|
141
|
-
/** @public */
|
|
142
|
-
export declare const httpRouterFactory: (options?: HttpRouterFactoryOptions | undefined) => ServiceFactory<HttpRouterService>;
|
|
143
|
-
|
|
144
139
|
/**
|
|
145
140
|
* @public
|
|
146
141
|
*/
|
|
@@ -151,13 +146,16 @@ export declare interface HttpRouterFactoryOptions {
|
|
|
151
146
|
getPath?(pluginId: string): string;
|
|
152
147
|
}
|
|
153
148
|
|
|
149
|
+
/** @public */
|
|
150
|
+
export declare const httpRouterServiceFactory: (options?: HttpRouterFactoryOptions | undefined) => ServiceFactory<HttpRouterService, "plugin">;
|
|
151
|
+
|
|
154
152
|
/**
|
|
155
153
|
* Options for configuring HTTPS for an HTTP server.
|
|
156
154
|
*
|
|
157
155
|
* @public
|
|
158
156
|
*/
|
|
159
157
|
export declare type HttpServerCertificateOptions = {
|
|
160
|
-
type: '
|
|
158
|
+
type: 'pem';
|
|
161
159
|
key: string;
|
|
162
160
|
cert: string;
|
|
163
161
|
} | {
|
|
@@ -180,9 +178,6 @@ export declare type HttpServerOptions = {
|
|
|
180
178
|
};
|
|
181
179
|
};
|
|
182
180
|
|
|
183
|
-
/** @public */
|
|
184
|
-
export declare const identityFactory: (options?: IdentityFactoryOptions | undefined) => ServiceFactory<IdentityService>;
|
|
185
|
-
|
|
186
181
|
/**
|
|
187
182
|
* An identity client options object which allows extra configurations
|
|
188
183
|
*
|
|
@@ -195,11 +190,14 @@ export declare type IdentityFactoryOptions = {
|
|
|
195
190
|
algorithms?: string[];
|
|
196
191
|
};
|
|
197
192
|
|
|
193
|
+
/** @public */
|
|
194
|
+
export declare const identityServiceFactory: (options?: IdentityFactoryOptions | undefined) => ServiceFactory<IdentityService, "plugin">;
|
|
195
|
+
|
|
198
196
|
/**
|
|
199
197
|
* Allows plugins to register shutdown hooks that are run when the process is about to exit.
|
|
200
198
|
* @public
|
|
201
199
|
*/
|
|
202
|
-
export declare const
|
|
200
|
+
export declare const lifecycleServiceFactory: () => ServiceFactory<LifecycleService, "plugin">;
|
|
203
201
|
|
|
204
202
|
/**
|
|
205
203
|
* Load configuration for a Backend.
|
|
@@ -216,7 +214,7 @@ export declare function loadBackendConfig(options: {
|
|
|
216
214
|
}>;
|
|
217
215
|
|
|
218
216
|
/** @public */
|
|
219
|
-
export declare const
|
|
217
|
+
export declare const loggerServiceFactory: () => ServiceFactory<LoggerService, "plugin">;
|
|
220
218
|
|
|
221
219
|
/**
|
|
222
220
|
* A utility to configure common middleware.
|
|
@@ -342,7 +340,7 @@ export declare interface MiddlewareFactoryOptions {
|
|
|
342
340
|
}
|
|
343
341
|
|
|
344
342
|
/** @public */
|
|
345
|
-
export declare const
|
|
343
|
+
export declare const permissionsServiceFactory: () => ServiceFactory<PermissionsService, "plugin">;
|
|
346
344
|
|
|
347
345
|
/**
|
|
348
346
|
* Attempts to read a CORS options object from the backend configuration object.
|
|
@@ -391,7 +389,7 @@ export declare function readHttpServerOptions(config?: Config): HttpServerOption
|
|
|
391
389
|
/**
|
|
392
390
|
* @public
|
|
393
391
|
*/
|
|
394
|
-
export declare interface
|
|
392
|
+
export declare interface RootHttpRouterConfigureContext {
|
|
395
393
|
app: Express_2;
|
|
396
394
|
middleware: MiddlewareFactory;
|
|
397
395
|
routes: RequestHandler;
|
|
@@ -400,9 +398,6 @@ export declare interface RootHttpRouterConfigureOptions {
|
|
|
400
398
|
lifecycle: LifecycleService;
|
|
401
399
|
}
|
|
402
400
|
|
|
403
|
-
/** @public */
|
|
404
|
-
export declare const rootHttpRouterFactory: () => ServiceFactory<RootHttpRouterService>;
|
|
405
|
-
|
|
406
401
|
/**
|
|
407
402
|
* @public
|
|
408
403
|
*/
|
|
@@ -412,32 +407,30 @@ export declare type RootHttpRouterFactoryOptions = {
|
|
|
412
407
|
* not given. Disables index path behavior if false is given.
|
|
413
408
|
*/
|
|
414
409
|
indexPath?: string | false;
|
|
415
|
-
configure?(
|
|
410
|
+
configure?(context: RootHttpRouterConfigureContext): void;
|
|
416
411
|
};
|
|
417
412
|
|
|
413
|
+
/** @public */
|
|
414
|
+
export declare const rootHttpRouterServiceFactory: (options?: RootHttpRouterFactoryOptions | undefined) => ServiceFactory<RootHttpRouterService, "root">;
|
|
415
|
+
|
|
418
416
|
/**
|
|
419
417
|
* Allows plugins to register shutdown hooks that are run when the process is about to exit.
|
|
420
418
|
*
|
|
421
419
|
* @public
|
|
422
420
|
*/
|
|
423
|
-
export declare const
|
|
421
|
+
export declare const rootLifecycleServiceFactory: () => ServiceFactory<RootLifecycleService, "root">;
|
|
424
422
|
|
|
425
423
|
/** @public */
|
|
426
|
-
export declare const
|
|
424
|
+
export declare const rootLoggerServiceFactory: () => ServiceFactory<RootLoggerService, "root">;
|
|
427
425
|
|
|
428
426
|
/** @public */
|
|
429
|
-
export declare const
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* @public
|
|
433
|
-
*/
|
|
434
|
-
export declare type ServiceOrExtensionPoint<T = unknown> = ExtensionPoint<T> | ServiceRef<T>;
|
|
427
|
+
export declare const schedulerServiceFactory: () => ServiceFactory<SchedulerService, "plugin">;
|
|
435
428
|
|
|
436
429
|
/** @public */
|
|
437
|
-
export declare const
|
|
430
|
+
export declare const tokenManagerServiceFactory: () => ServiceFactory<TokenManagerService, "plugin">;
|
|
438
431
|
|
|
439
432
|
/** @public */
|
|
440
|
-
export declare const
|
|
433
|
+
export declare const urlReaderServiceFactory: () => ServiceFactory<UrlReader, "plugin">;
|
|
441
434
|
|
|
442
435
|
/**
|
|
443
436
|
* A {@link @backstage/backend-plugin-api#LoggerService} implementation based on winston.
|
|
@@ -462,11 +455,11 @@ export declare class WinstonLogger implements RootLoggerService {
|
|
|
462
455
|
*/
|
|
463
456
|
static colorFormat(): Format;
|
|
464
457
|
private constructor();
|
|
465
|
-
error(message: string, meta?:
|
|
466
|
-
warn(message: string, meta?:
|
|
467
|
-
info(message: string, meta?:
|
|
468
|
-
debug(message: string, meta?:
|
|
469
|
-
child(meta:
|
|
458
|
+
error(message: string, meta?: JsonObject): void;
|
|
459
|
+
warn(message: string, meta?: JsonObject): void;
|
|
460
|
+
info(message: string, meta?: JsonObject): void;
|
|
461
|
+
debug(message: string, meta?: JsonObject): void;
|
|
462
|
+
child(meta: JsonObject): LoggerService;
|
|
470
463
|
addRedactions(redactions: Iterable<string>): void;
|
|
471
464
|
}
|
|
472
465
|
|
|
@@ -474,7 +467,7 @@ export declare class WinstonLogger implements RootLoggerService {
|
|
|
474
467
|
* @public
|
|
475
468
|
*/
|
|
476
469
|
export declare interface WinstonLoggerOptions {
|
|
477
|
-
meta?:
|
|
470
|
+
meta?: JsonObject;
|
|
478
471
|
level: string;
|
|
479
472
|
format: Format;
|
|
480
473
|
transports: transport[];
|