@backstage/plugin-app-backend 0.3.76-next.1 → 0.3.77-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,34 @@
1
1
  # @backstage/plugin-app-backend
2
2
 
3
+ ## 0.3.77-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/plugin-auth-node@0.5.4-next.0
9
+ - @backstage/backend-plugin-api@1.0.2-next.0
10
+ - @backstage/config@1.2.0
11
+ - @backstage/config-loader@1.9.1
12
+ - @backstage/errors@1.2.4
13
+ - @backstage/types@1.1.1
14
+ - @backstage/plugin-app-node@0.1.27-next.0
15
+
16
+ ## 0.3.76
17
+
18
+ ### Patch Changes
19
+
20
+ - 2c4ee26: Fixed unexpected behaviour where configuration supplied with `APP_CONFIG_*` environment variables where not filtered by the configuration schema.
21
+ - 094eaa3: Remove references to in-repo backend-common
22
+ - 3109c24: The export for the new backend system at the `/alpha` export is now also available via the main entry point, which means that you can remove the `/alpha` suffix from the import.
23
+ - Updated dependencies
24
+ - @backstage/plugin-auth-node@0.5.3
25
+ - @backstage/backend-plugin-api@1.0.1
26
+ - @backstage/config@1.2.0
27
+ - @backstage/config-loader@1.9.1
28
+ - @backstage/errors@1.2.4
29
+ - @backstage/types@1.1.1
30
+ - @backstage/plugin-app-node@0.1.26
31
+
3
32
  ## 0.3.76-next.1
4
33
 
5
34
  ### Patch Changes
package/README.md CHANGED
@@ -21,7 +21,7 @@ Now add the plugin to your app, creating it for example like this:
21
21
  import { createBackend } from '@backstage/backend-defaults';
22
22
 
23
23
  const backend = createBackend();
24
- backend.add(import('@backstage/plugin-app-backend/alpha'));
24
+ backend.add(import('@backstage/plugin-app-backend'));
25
25
  backend.start();
26
26
  ```
27
27
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-app-backend__alpha",
3
- "version": "0.3.76-next.1",
3
+ "version": "0.3.77-next.0",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/alpha.cjs.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var appPlugin = require('./service/appPlugin.cjs.js');
6
6
 
7
+ const _appPlugin = appPlugin.appPlugin;
7
8
 
8
-
9
- exports.default = appPlugin.appPlugin;
9
+ exports.default = _appPlugin;
10
10
  //# sourceMappingURL=alpha.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"alpha.cjs.js","sources":["../src/alpha.ts"],"sourcesContent":["/*\n * Copyright 2023 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 { appPlugin } from './service/appPlugin';\n\n/** @alpha */\nconst _appPlugin = appPlugin;\nexport default _appPlugin;\n"],"names":["appPlugin"],"mappings":";;;;;;AAmBA,MAAM,UAAa,GAAAA;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,9 +1,6 @@
1
1
  import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
2
 
3
- /**
4
- * The App plugin is responsible for serving the frontend app bundle and static assets.
5
- * @alpha
6
- */
7
- declare const appPlugin: _backstage_backend_plugin_api.BackendFeature;
3
+ /** @alpha */
4
+ declare const _appPlugin: _backstage_backend_plugin_api.BackendFeature;
8
5
 
9
- export { appPlugin as default };
6
+ export { _appPlugin as default };
package/dist/index.cjs.js CHANGED
@@ -1,8 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var appPlugin = require('./service/appPlugin.cjs.js');
3
6
  var router = require('./service/router.cjs.js');
4
7
 
5
8
 
6
9
 
10
+ exports.default = appPlugin.appPlugin;
7
11
  exports.createRouter = router.createRouter;
8
12
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,14 @@
1
+ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
1
2
  import { RootConfigService, LoggerService, AuthService, HttpAuthService, DatabaseService } from '@backstage/backend-plugin-api';
2
3
  import express from 'express';
3
4
  import { ConfigSchema } from '@backstage/config-loader';
4
5
 
6
+ /**
7
+ * The App plugin is responsible for serving the frontend app bundle and static assets.
8
+ * @public
9
+ */
10
+ declare const appPlugin: _backstage_backend_plugin_api.BackendFeature;
11
+
5
12
  /**
6
13
  * @public
7
14
  * @deprecated Please migrate to the new backend system as this will be removed in the future.
@@ -60,4 +67,4 @@ interface RouterOptions {
60
67
  */
61
68
  declare function createRouter(options: RouterOptions): Promise<express.Router>;
62
69
 
63
- export { type RouterOptions, createRouter };
70
+ export { type RouterOptions, createRouter, appPlugin as default };
@@ -1 +1 @@
1
- {"version":3,"file":"appPlugin.cjs.js","sources":["../../src/service/appPlugin.ts"],"sourcesContent":["/*\n * Copyright 2022 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 express from 'express';\nimport {\n coreServices,\n createBackendPlugin,\n} from '@backstage/backend-plugin-api';\nimport { createRouter } from './router';\nimport {\n configSchemaExtensionPoint,\n staticFallbackHandlerExtensionPoint,\n} from '@backstage/plugin-app-node';\nimport { ConfigSchema } from '@backstage/config-loader';\n\n/**\n * The App plugin is responsible for serving the frontend app bundle and static assets.\n * @alpha\n */\nexport const appPlugin = createBackendPlugin({\n pluginId: 'app',\n register(env) {\n let staticFallbackHandler: express.Handler | undefined;\n let schema: ConfigSchema | undefined;\n\n env.registerExtensionPoint(staticFallbackHandlerExtensionPoint, {\n setStaticFallbackHandler(handler) {\n if (staticFallbackHandler) {\n throw new Error(\n 'Attempted to install a static fallback handler for the app-backend twice',\n );\n }\n staticFallbackHandler = handler;\n },\n });\n\n env.registerExtensionPoint(configSchemaExtensionPoint, {\n setConfigSchema(configSchema) {\n if (schema) {\n throw new Error(\n 'Attempted to set config schema for the app-backend twice',\n );\n }\n schema = configSchema;\n },\n });\n\n env.registerInit({\n deps: {\n logger: coreServices.logger,\n config: coreServices.rootConfig,\n database: coreServices.database,\n httpRouter: coreServices.httpRouter,\n auth: coreServices.auth,\n httpAuth: coreServices.httpAuth,\n },\n async init({ logger, config, database, httpRouter, auth, httpAuth }) {\n const appPackageName =\n config.getOptionalString('app.packageName') ?? 'app';\n\n const router = await createRouter({\n logger,\n config,\n database,\n auth,\n httpAuth,\n appPackageName,\n staticFallbackHandler,\n schema,\n });\n httpRouter.use(router);\n\n // Access control is handled within the router\n httpRouter.addAuthPolicy({\n allow: 'unauthenticated',\n path: '/',\n });\n },\n });\n },\n});\n"],"names":["createBackendPlugin","staticFallbackHandlerExtensionPoint","configSchemaExtensionPoint","coreServices","router","createRouter"],"mappings":";;;;;;AAgCO,MAAM,YAAYA,oCAAoB,CAAA;AAAA,EAC3C,QAAU,EAAA,KAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAI,IAAA,qBAAA,C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MAAA;AAAA,SACD,CAAA,CAAA;AACD,QAAA,UAAA,CAAW,IAAID,QAAM,CAAA,CAAA;AAGrB,QAAA,UAAA,CAAW,aAAc,CAAA;AAAA,UACvB,KAAO,EAAA,iBAAA;AAAA,UACP,IAAM,EAAA,GAAA;AAAA,SACP,CAAA,CAAA;AAAA,OACH;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"appPlugin.cjs.js","sources":["../../src/service/appPlugin.ts"],"sourcesContent":["/*\n * Copyright 2022 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 express from 'express';\nimport {\n coreServices,\n createBackendPlugin,\n} from '@backstage/backend-plugin-api';\nimport { createRouter } from './router';\nimport {\n configSchemaExtensionPoint,\n staticFallbackHandlerExtensionPoint,\n} from '@backstage/plugin-app-node';\nimport { ConfigSchema } from '@backstage/config-loader';\n\n/**\n * The App plugin is responsible for serving the frontend app bundle and static assets.\n * @public\n */\nexport const appPlugin = createBackendPlugin({\n pluginId: 'app',\n register(env) {\n let staticFallbackHandler: express.Handler | undefined;\n let schema: ConfigSchema | undefined;\n\n env.registerExtensionPoint(staticFallbackHandlerExtensionPoint, {\n setStaticFallbackHandler(handler) {\n if (staticFallbackHandler) {\n throw new Error(\n 'Attempted to install a static fallback handler for the app-backend twice',\n );\n }\n staticFallbackHandler = handler;\n },\n });\n\n env.registerExtensionPoint(configSchemaExtensionPoint, {\n setConfigSchema(configSchema) {\n if (schema) {\n throw new Error(\n 'Attempted to set config schema for the app-backend twice',\n );\n }\n schema = configSchema;\n },\n });\n\n env.registerInit({\n deps: {\n logger: coreServices.logger,\n config: coreServices.rootConfig,\n database: coreServices.database,\n httpRouter: coreServices.httpRouter,\n auth: coreServices.auth,\n httpAuth: coreServices.httpAuth,\n },\n async init({ logger, config, database, httpRouter, auth, httpAuth }) {\n const appPackageName =\n config.getOptionalString('app.packageName') ?? 'app';\n\n const router = await createRouter({\n logger,\n config,\n database,\n auth,\n httpAuth,\n appPackageName,\n staticFallbackHandler,\n schema,\n });\n httpRouter.use(router);\n\n // Access control is handled within the router\n httpRouter.addAuthPolicy({\n allow: 'unauthenticated',\n path: '/',\n });\n },\n });\n },\n});\n"],"names":["createBackendPlugin","staticFallbackHandlerExtensionPoint","configSchemaExtensionPoint","coreServices","router","createRouter"],"mappings":";;;;;;AAgCO,MAAM,YAAYA,oCAAoB,CAAA;AAAA,EAC3C,QAAU,EAAA,KAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAI,IAAA,qBAAA,CAAA;AACJ,IAAI,IAAA,MAAA,CAAA;AAEJ,IAAA,GAAA,CAAI,uBAAuBC,iDAAqC,EAAA;AAAA,MAC9D,yBAAyB,OAAS,EAAA;AAChC,QAAA,IAAI,qBAAuB,EAAA;AACzB,UAAA,MAAM,IAAI,KAAA;AAAA,YACR,0EAAA;AAAA,WACF,CAAA;AAAA,SACF;AACA,QAAwB,qBAAA,GAAA,OAAA,CAAA;AAAA,OAC1B;AAAA,KACD,CAAA,CAAA;AAED,IAAA,GAAA,CAAI,uBAAuBC,wCAA4B,EAAA;AAAA,MACrD,gBAAgB,YAAc,EAAA;AAC5B,QAAA,IAAI,MAAQ,EAAA;AACV,UAAA,MAAM,IAAI,KAAA;AAAA,YACR,0DAAA;AAAA,WACF,CAAA;AAAA,SACF;AACA,QAAS,MAAA,GAAA,YAAA,CAAA;AAAA,OACX;AAAA,KACD,CAAA,CAAA;AAED,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,QAAQC,6BAAa,CAAA,MAAA;AAAA,QACrB,QAAQA,6BAAa,CAAA,UAAA;AAAA,QACrB,UAAUA,6BAAa,CAAA,QAAA;AAAA,QACvB,YAAYA,6BAAa,CAAA,UAAA;AAAA,QACzB,MAAMA,6BAAa,CAAA,IAAA;AAAA,QACnB,UAAUA,6BAAa,CAAA,QAAA;AAAA,OACzB;AAAA,MACA,MAAM,KAAK,EAAE,MAAA,EAAQ,QAAQ,QAAU,EAAA,UAAA,EAAY,IAAM,EAAA,QAAA,EAAY,EAAA;AACnE,QAAA,MAAM,cACJ,GAAA,MAAA,CAAO,iBAAkB,CAAA,iBAAiB,CAAK,IAAA,KAAA,CAAA;AAEjD,QAAM,MAAAC,QAAA,GAAS,MAAMC,mBAAa,CAAA;AAAA,UAChC,MAAA;AAAA,UACA,MAAA;AAAA,UACA,QAAA;AAAA,UACA,IAAA;AAAA,UACA,QAAA;AAAA,UACA,cAAA;AAAA,UACA,qBAAA;AAAA,UACA,MAAA;AAAA,SACD,CAAA,CAAA;AACD,QAAA,UAAA,CAAW,IAAID,QAAM,CAAA,CAAA;AAGrB,QAAA,UAAA,CAAW,aAAc,CAAA;AAAA,UACvB,KAAO,EAAA,iBAAA;AAAA,UACP,IAAM,EAAA,GAAA;AAAA,SACP,CAAA,CAAA;AAAA,OACH;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-app-backend",
3
- "version": "0.3.76-next.1",
3
+ "version": "0.3.77-next.0",
4
4
  "description": "A Backstage backend plugin that serves the Backstage frontend app",
5
5
  "backstage": {
6
6
  "role": "backend-plugin",
@@ -26,6 +26,7 @@
26
26
  "license": "Apache-2.0",
27
27
  "exports": {
28
28
  ".": {
29
+ "backstage": "@backstage/BackendFeature",
29
30
  "require": "./dist/index.cjs.js",
30
31
  "types": "./dist/index.d.ts",
31
32
  "default": "./dist/index.cjs.js"
@@ -58,12 +59,12 @@
58
59
  },
59
60
  "dependencies": {
60
61
  "@backstage/backend-common": "^0.25.0",
61
- "@backstage/backend-plugin-api": "1.0.1-next.1",
62
+ "@backstage/backend-plugin-api": "1.0.2-next.0",
62
63
  "@backstage/config": "1.2.0",
63
64
  "@backstage/config-loader": "1.9.1",
64
65
  "@backstage/errors": "1.2.4",
65
- "@backstage/plugin-app-node": "0.1.26-next.1",
66
- "@backstage/plugin-auth-node": "0.5.3-next.1",
66
+ "@backstage/plugin-app-node": "0.1.27-next.0",
67
+ "@backstage/plugin-auth-node": "0.5.4-next.0",
67
68
  "@backstage/types": "1.1.1",
68
69
  "@types/express": "^4.17.6",
69
70
  "express": "^4.17.1",
@@ -77,10 +78,10 @@
77
78
  "yn": "^4.0.0"
78
79
  },
79
80
  "devDependencies": {
80
- "@backstage/backend-app-api": "1.0.1-next.1",
81
- "@backstage/backend-defaults": "0.5.1-next.2",
82
- "@backstage/backend-test-utils": "1.0.1-next.2",
83
- "@backstage/cli": "0.28.0-next.2",
81
+ "@backstage/backend-app-api": "1.0.2-next.0",
82
+ "@backstage/backend-defaults": "0.5.3-next.0",
83
+ "@backstage/backend-test-utils": "1.0.3-next.0",
84
+ "@backstage/cli": "0.29.0-next.0",
84
85
  "@backstage/types": "1.1.1",
85
86
  "@types/supertest": "^2.0.8",
86
87
  "node-fetch": "^2.7.0",