@backstage/backend-app-api 0.6.0-next.0 → 0.6.0-next.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @backstage/backend-app-api
2
2
 
3
+ ## 0.6.0-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 15fda44: Provide some sane defaults for `WinstonLogger.create` making some of the arguments optional
8
+ - 9d91128: Add the possibility to disable watching files in the new backend system
9
+ - Updated dependencies
10
+ - @backstage/backend-common@0.21.4-next.2
11
+ - @backstage/plugin-auth-node@0.4.9-next.2
12
+ - @backstage/backend-plugin-api@0.6.14-next.2
13
+ - @backstage/backend-tasks@0.5.19-next.2
14
+ - @backstage/cli-common@0.1.13
15
+ - @backstage/cli-node@0.2.4-next.0
16
+ - @backstage/config@1.2.0-next.1
17
+ - @backstage/config-loader@1.7.0-next.1
18
+ - @backstage/errors@1.2.4-next.0
19
+ - @backstage/types@1.1.1
20
+ - @backstage/plugin-permission-node@0.7.25-next.2
21
+
22
+ ## 0.6.0-next.1
23
+
24
+ ### Patch Changes
25
+
26
+ - 81e0120: Fixed an issue where configuration schema for the purpose of redacting secrets from logs was not being read correctly.
27
+ - f235ca7: Make sure to not filter out schemas in `createConfigSecretEnumerator`
28
+ - Updated dependencies
29
+ - @backstage/config@1.2.0-next.1
30
+ - @backstage/config-loader@1.7.0-next.1
31
+ - @backstage/backend-common@0.21.4-next.1
32
+ - @backstage/backend-plugin-api@0.6.14-next.1
33
+ - @backstage/backend-tasks@0.5.19-next.1
34
+ - @backstage/plugin-auth-node@0.4.9-next.1
35
+ - @backstage/plugin-permission-node@0.7.25-next.1
36
+ - @backstage/cli-common@0.1.13
37
+ - @backstage/cli-node@0.2.4-next.0
38
+ - @backstage/errors@1.2.4-next.0
39
+ - @backstage/types@1.1.1
40
+
3
41
  ## 0.6.0-next.0
4
42
 
5
43
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/backend-app-api",
3
- "version": "0.6.0-next.0",
3
+ "version": "0.6.0-next.2",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/index.cjs.js CHANGED
@@ -199,7 +199,7 @@ async function createConfigSecretEnumerator(options) {
199
199
  const { logger, dir = process.cwd() } = options;
200
200
  const { packages } = await getPackages.getPackages(dir);
201
201
  const schema = (_a = options.schema) != null ? _a : await configLoader.loadConfigSchema({
202
- dependencies: packages.map((p) => p.packageJson.name).filter(() => false)
202
+ dependencies: packages.map((p) => p.packageJson.name)
203
203
  });
204
204
  return (config) => {
205
205
  var _a2;
@@ -212,7 +212,7 @@ async function createConfigSecretEnumerator(options) {
212
212
  );
213
213
  const secrets = /* @__PURE__ */ new Set();
214
214
  JSON.parse(
215
- JSON.stringify(secretsData),
215
+ JSON.stringify(secretsData.data),
216
216
  (_, v) => typeof v === "string" && secrets.add(v)
217
217
  );
218
218
  logger.info(
@@ -835,12 +835,16 @@ const _WinstonLogger = class _WinstonLogger {
835
835
  * Creates a {@link WinstonLogger} instance.
836
836
  */
837
837
  static create(options) {
838
- var _a;
838
+ var _a, _b;
839
839
  const redacter = _WinstonLogger.redacter();
840
+ const defaultFormatter = process.env.NODE_ENV === "production" ? winston.format.json() : _WinstonLogger.colorFormat();
840
841
  let logger = winston.createLogger({
841
- level: options.level,
842
- format: winston.format.combine(redacter.format, options.format),
843
- transports: (_a = options.transports) != null ? _a : new winston.transports.Console()
842
+ level: process.env.LOG_LEVEL || options.level || "info",
843
+ format: winston.format.combine(
844
+ redacter.format,
845
+ (_a = options.format) != null ? _a : defaultFormatter
846
+ ),
847
+ transports: (_b = options.transports) != null ? _b : new winston.transports.Console()
844
848
  });
845
849
  if (options.meta) {
846
850
  logger = logger.child(options.meta);
@@ -2121,7 +2125,8 @@ const rootConfigServiceFactory = backendPluginApi.createServiceFactory(
2121
2125
  async factory() {
2122
2126
  const source = configLoader.ConfigSources.default({
2123
2127
  argv: options == null ? void 0 : options.argv,
2124
- remote: options == null ? void 0 : options.remote
2128
+ remote: options == null ? void 0 : options.remote,
2129
+ watch: options == null ? void 0 : options.watch
2125
2130
  });
2126
2131
  console.log(`Loading config from ${source}`);
2127
2132
  return await configLoader.ConfigSources.toConfig(source);