@backstage/backend-defaults 0.14.0 → 0.14.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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @backstage/backend-defaults
2
2
 
3
+ ## 0.14.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 7126bf2: Fixed a spelling mistake in root health service shutdown response.
8
+ - Updated dependencies
9
+ - @backstage/backend-app-api@1.4.0
10
+ - @backstage/backend-dev-utils@0.1.6
11
+ - @backstage/backend-plugin-api@1.6.0
12
+ - @backstage/cli-node@0.2.16
13
+ - @backstage/config@1.3.6
14
+ - @backstage/config-loader@1.10.7
15
+ - @backstage/errors@1.2.7
16
+ - @backstage/integration@1.19.0
17
+ - @backstage/integration-aws-node@0.1.19
18
+ - @backstage/types@1.2.2
19
+ - @backstage/plugin-auth-node@0.6.10
20
+ - @backstage/plugin-events-node@0.4.18
21
+ - @backstage/plugin-permission-node@0.10.7
22
+
3
23
  ## 0.14.0
4
24
 
5
25
  ### Minor Changes
@@ -27,7 +27,7 @@ class DefaultRootHealthService {
27
27
  if (this.#state === "down") {
28
28
  return {
29
29
  status: 503,
30
- payload: { message: "Backend is shuttting down", status: "error" }
30
+ payload: { message: "Backend is shutting down", status: "error" }
31
31
  };
32
32
  }
33
33
  return { status: 200, payload: { status: "ok" } };
@@ -1 +1 @@
1
- {"version":3,"file":"rootHealthServiceFactory.cjs.js","sources":["../../../src/entrypoints/rootHealth/rootHealthServiceFactory.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n RootHealthService,\n RootLifecycleService,\n coreServices,\n createServiceFactory,\n} from '@backstage/backend-plugin-api';\n\n/** @internal */\nexport class DefaultRootHealthService implements RootHealthService {\n #state: 'init' | 'up' | 'down' = 'init';\n readonly options: { lifecycle: RootLifecycleService };\n\n constructor(options: { lifecycle: RootLifecycleService }) {\n this.options = options;\n options.lifecycle.addStartupHook(() => {\n this.#state = 'up';\n });\n options.lifecycle.addBeforeShutdownHook(() => {\n this.#state = 'down';\n });\n }\n\n async getLiveness(): Promise<{ status: number; payload?: any }> {\n return { status: 200, payload: { status: 'ok' } };\n }\n\n async getReadiness(): Promise<{ status: number; payload?: any }> {\n if (this.#state === 'init') {\n return {\n status: 503,\n payload: { message: 'Backend has not started yet', status: 'error' },\n };\n }\n if (this.#state === 'down') {\n return {\n status: 503,\n payload: { message: 'Backend is shuttting down', status: 'error' },\n };\n }\n\n return { status: 200, payload: { status: 'ok' } };\n }\n}\n\n/**\n * @public\n */\nexport const rootHealthServiceFactory = createServiceFactory({\n service: coreServices.rootHealth,\n deps: {\n lifecycle: coreServices.rootLifecycle,\n },\n async factory({ lifecycle }) {\n return new DefaultRootHealthService({ lifecycle });\n },\n});\n"],"names":["createServiceFactory","coreServices"],"mappings":";;;;AAwBO,MAAM,wBAAA,CAAsD;AAAA,EACjE,MAAA,GAAiC,MAAA;AAAA,EACxB,OAAA;AAAA,EAET,YAAY,OAAA,EAA8C;AACxD,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AACf,IAAA,OAAA,CAAQ,SAAA,CAAU,eAAe,MAAM;AACrC,MAAA,IAAA,CAAK,MAAA,GAAS,IAAA;AAAA,IAChB,CAAC,CAAA;AACD,IAAA,OAAA,CAAQ,SAAA,CAAU,sBAAsB,MAAM;AAC5C,MAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,IAChB,CAAC,CAAA;AAAA,EACH;AAAA,EAEA,MAAM,WAAA,GAA0D;AAC9D,IAAA,OAAO,EAAE,MAAA,EAAQ,GAAA,EAAK,SAAS,EAAE,MAAA,EAAQ,MAAK,EAAE;AAAA,EAClD;AAAA,EAEA,MAAM,YAAA,GAA2D;AAC/D,IAAA,IAAI,IAAA,CAAK,WAAW,MAAA,EAAQ;AAC1B,MAAA,OAAO;AAAA,QACL,MAAA,EAAQ,GAAA;AAAA,QACR,OAAA,EAAS,EAAE,OAAA,EAAS,6BAAA,EAA+B,QAAQ,OAAA;AAAQ,OACrE;AAAA,IACF;AACA,IAAA,IAAI,IAAA,CAAK,WAAW,MAAA,EAAQ;AAC1B,MAAA,OAAO;AAAA,QACL,MAAA,EAAQ,GAAA;AAAA,QACR,OAAA,EAAS,EAAE,OAAA,EAAS,2BAAA,EAA6B,QAAQ,OAAA;AAAQ,OACnE;AAAA,IACF;AAEA,IAAA,OAAO,EAAE,MAAA,EAAQ,GAAA,EAAK,SAAS,EAAE,MAAA,EAAQ,MAAK,EAAE;AAAA,EAClD;AACF;AAKO,MAAM,2BAA2BA,qCAAA,CAAqB;AAAA,EAC3D,SAASC,6BAAA,CAAa,UAAA;AAAA,EACtB,IAAA,EAAM;AAAA,IACJ,WAAWA,6BAAA,CAAa;AAAA,GAC1B;AAAA,EACA,MAAM,OAAA,CAAQ,EAAE,SAAA,EAAU,EAAG;AAC3B,IAAA,OAAO,IAAI,wBAAA,CAAyB,EAAE,SAAA,EAAW,CAAA;AAAA,EACnD;AACF,CAAC;;;;;"}
1
+ {"version":3,"file":"rootHealthServiceFactory.cjs.js","sources":["../../../src/entrypoints/rootHealth/rootHealthServiceFactory.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n RootHealthService,\n RootLifecycleService,\n coreServices,\n createServiceFactory,\n} from '@backstage/backend-plugin-api';\n\n/** @internal */\nexport class DefaultRootHealthService implements RootHealthService {\n #state: 'init' | 'up' | 'down' = 'init';\n readonly options: { lifecycle: RootLifecycleService };\n\n constructor(options: { lifecycle: RootLifecycleService }) {\n this.options = options;\n options.lifecycle.addStartupHook(() => {\n this.#state = 'up';\n });\n options.lifecycle.addBeforeShutdownHook(() => {\n this.#state = 'down';\n });\n }\n\n async getLiveness(): Promise<{ status: number; payload?: any }> {\n return { status: 200, payload: { status: 'ok' } };\n }\n\n async getReadiness(): Promise<{ status: number; payload?: any }> {\n if (this.#state === 'init') {\n return {\n status: 503,\n payload: { message: 'Backend has not started yet', status: 'error' },\n };\n }\n if (this.#state === 'down') {\n return {\n status: 503,\n payload: { message: 'Backend is shutting down', status: 'error' },\n };\n }\n\n return { status: 200, payload: { status: 'ok' } };\n }\n}\n\n/**\n * @public\n */\nexport const rootHealthServiceFactory = createServiceFactory({\n service: coreServices.rootHealth,\n deps: {\n lifecycle: coreServices.rootLifecycle,\n },\n async factory({ lifecycle }) {\n return new DefaultRootHealthService({ lifecycle });\n },\n});\n"],"names":["createServiceFactory","coreServices"],"mappings":";;;;AAwBO,MAAM,wBAAA,CAAsD;AAAA,EACjE,MAAA,GAAiC,MAAA;AAAA,EACxB,OAAA;AAAA,EAET,YAAY,OAAA,EAA8C;AACxD,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AACf,IAAA,OAAA,CAAQ,SAAA,CAAU,eAAe,MAAM;AACrC,MAAA,IAAA,CAAK,MAAA,GAAS,IAAA;AAAA,IAChB,CAAC,CAAA;AACD,IAAA,OAAA,CAAQ,SAAA,CAAU,sBAAsB,MAAM;AAC5C,MAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,IAChB,CAAC,CAAA;AAAA,EACH;AAAA,EAEA,MAAM,WAAA,GAA0D;AAC9D,IAAA,OAAO,EAAE,MAAA,EAAQ,GAAA,EAAK,SAAS,EAAE,MAAA,EAAQ,MAAK,EAAE;AAAA,EAClD;AAAA,EAEA,MAAM,YAAA,GAA2D;AAC/D,IAAA,IAAI,IAAA,CAAK,WAAW,MAAA,EAAQ;AAC1B,MAAA,OAAO;AAAA,QACL,MAAA,EAAQ,GAAA;AAAA,QACR,OAAA,EAAS,EAAE,OAAA,EAAS,6BAAA,EAA+B,QAAQ,OAAA;AAAQ,OACrE;AAAA,IACF;AACA,IAAA,IAAI,IAAA,CAAK,WAAW,MAAA,EAAQ;AAC1B,MAAA,OAAO;AAAA,QACL,MAAA,EAAQ,GAAA;AAAA,QACR,OAAA,EAAS,EAAE,OAAA,EAAS,0BAAA,EAA4B,QAAQ,OAAA;AAAQ,OAClE;AAAA,IACF;AAEA,IAAA,OAAO,EAAE,MAAA,EAAQ,GAAA,EAAK,SAAS,EAAE,MAAA,EAAQ,MAAK,EAAE;AAAA,EAClD;AACF;AAKO,MAAM,2BAA2BA,qCAAA,CAAqB;AAAA,EAC3D,SAASC,6BAAA,CAAa,UAAA;AAAA,EACtB,IAAA,EAAM;AAAA,IACJ,WAAWA,6BAAA,CAAa;AAAA,GAC1B;AAAA,EACA,MAAM,OAAA,CAAQ,EAAE,SAAA,EAAU,EAAG;AAC3B,IAAA,OAAO,IAAI,wBAAA,CAAyB,EAAE,SAAA,EAAW,CAAA;AAAA,EACnD;AACF,CAAC;;;;;"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "0.14.0";
5
+ var version = "0.14.1-next.0";
6
6
  var packageinfo = {
7
7
  version: version};
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/backend-defaults",
3
- "version": "0.14.0",
3
+ "version": "0.14.1-next.0",
4
4
  "description": "Backend defaults used by Backstage backend apps",
5
5
  "backstage": {
6
6
  "role": "node-library"
@@ -216,19 +216,19 @@
216
216
  "@aws-sdk/credential-providers": "^3.350.0",
217
217
  "@aws-sdk/types": "^3.347.0",
218
218
  "@azure/storage-blob": "^12.5.0",
219
- "@backstage/backend-app-api": "^1.4.0",
220
- "@backstage/backend-dev-utils": "^0.1.6",
221
- "@backstage/backend-plugin-api": "^1.6.0",
222
- "@backstage/cli-node": "^0.2.16",
223
- "@backstage/config": "^1.3.6",
224
- "@backstage/config-loader": "^1.10.7",
225
- "@backstage/errors": "^1.2.7",
226
- "@backstage/integration": "^1.19.0",
227
- "@backstage/integration-aws-node": "^0.1.19",
228
- "@backstage/plugin-auth-node": "^0.6.10",
229
- "@backstage/plugin-events-node": "^0.4.18",
230
- "@backstage/plugin-permission-node": "^0.10.7",
231
- "@backstage/types": "^1.2.2",
219
+ "@backstage/backend-app-api": "1.4.0",
220
+ "@backstage/backend-dev-utils": "0.1.6",
221
+ "@backstage/backend-plugin-api": "1.6.0",
222
+ "@backstage/cli-node": "0.2.16",
223
+ "@backstage/config": "1.3.6",
224
+ "@backstage/config-loader": "1.10.7",
225
+ "@backstage/errors": "1.2.7",
226
+ "@backstage/integration": "1.19.0",
227
+ "@backstage/integration-aws-node": "0.1.19",
228
+ "@backstage/plugin-auth-node": "0.6.10",
229
+ "@backstage/plugin-events-node": "0.4.18",
230
+ "@backstage/plugin-permission-node": "0.10.7",
231
+ "@backstage/types": "1.2.2",
232
232
  "@google-cloud/storage": "^7.0.0",
233
233
  "@keyv/memcache": "^2.0.1",
234
234
  "@keyv/redis": "^4.0.1",
@@ -283,9 +283,9 @@
283
283
  },
284
284
  "devDependencies": {
285
285
  "@aws-sdk/util-stream-node": "^3.350.0",
286
- "@backstage/backend-plugin-api": "^1.6.0",
287
- "@backstage/backend-test-utils": "^1.10.2",
288
- "@backstage/cli": "^0.35.0",
286
+ "@backstage/backend-plugin-api": "1.6.0",
287
+ "@backstage/backend-test-utils": "1.10.3-next.0",
288
+ "@backstage/cli": "0.35.2-next.0",
289
289
  "@google-cloud/cloud-sql-connector": "^1.4.0",
290
290
  "@types/archiver": "^7.0.0",
291
291
  "@types/base64-stream": "^1.0.2",