@backstage/plugin-proxy-backend 0.5.7-next.1 → 0.5.8-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/plugin-proxy-backend
2
2
 
3
+ ## 0.5.8-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-plugin-api@1.0.2-next.0
9
+ - @backstage/config@1.2.0
10
+ - @backstage/types@1.1.1
11
+
12
+ ## 0.5.7
13
+
14
+ ### Patch Changes
15
+
16
+ - 094eaa3: Remove references to in-repo backend-common
17
+ - 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.
18
+ - Updated dependencies
19
+ - @backstage/backend-plugin-api@1.0.1
20
+ - @backstage/config@1.2.0
21
+ - @backstage/types@1.1.1
22
+
3
23
  ## 0.5.7-next.1
4
24
 
5
25
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-proxy-backend__alpha",
3
- "version": "0.5.7-next.1",
3
+ "version": "0.5.8-next.0",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/alpha.cjs.js CHANGED
@@ -2,31 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var backendCommon = require('@backstage/backend-common');
6
- var backendPluginApi = require('@backstage/backend-plugin-api');
7
- var router = require('./service/router.cjs.js');
5
+ var plugin = require('./plugin.cjs.js');
8
6
 
9
- var alpha = backendPluginApi.createBackendPlugin({
10
- pluginId: "proxy",
11
- register(env) {
12
- env.registerInit({
13
- deps: {
14
- config: backendPluginApi.coreServices.rootConfig,
15
- discovery: backendPluginApi.coreServices.discovery,
16
- logger: backendPluginApi.coreServices.logger,
17
- httpRouter: backendPluginApi.coreServices.httpRouter
18
- },
19
- async init({ config, discovery, logger, httpRouter }) {
20
- await router.createRouterInternal({
21
- config,
22
- discovery,
23
- logger: backendCommon.loggerToWinstonLogger(logger),
24
- httpRouterService: httpRouter
25
- });
26
- }
27
- });
28
- }
29
- });
7
+ const _feature = plugin.proxyPlugin;
30
8
 
31
- exports.default = alpha;
9
+ exports.default = _feature;
32
10
  //# sourceMappingURL=alpha.cjs.js.map
@@ -1 +1 @@
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 { loggerToWinstonLogger } from '@backstage/backend-common';\nimport {\n createBackendPlugin,\n coreServices,\n} from '@backstage/backend-plugin-api';\nimport { createRouterInternal } from './service/router';\n\n/**\n * The proxy backend plugin.\n *\n * @alpha\n */\nexport default createBackendPlugin({\n pluginId: 'proxy',\n register(env) {\n env.registerInit({\n deps: {\n config: coreServices.rootConfig,\n discovery: coreServices.discovery,\n logger: coreServices.logger,\n httpRouter: coreServices.httpRouter,\n },\n async init({ config, discovery, logger, httpRouter }) {\n await createRouterInternal({\n config,\n discovery,\n logger: loggerToWinstonLogger(logger),\n httpRouterService: httpRouter,\n });\n },\n });\n },\n});\n"],"names":["createBackendPlugin","coreServices","createRouterInternal","loggerToWinstonLogger"],"mappings":";;;;;;;;AA4BA,YAAeA,oCAAoB,CAAA;AAAA,EACjC,QAAU,EAAA,OAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,QAAQC,6BAAa,CAAA,UAAA;AAAA,QACrB,WAAWA,6BAAa,CAAA,SAAA;AAAA,QACxB,QAAQA,6BAAa,CAAA,MAAA;AAAA,QACrB,YAAYA,6BAAa,CAAA,UAAA;AAAA,OAC3B;AAAA,MACA,MAAM,IAAK,CAAA,EAAE,QAAQ,SAAW,EAAA,MAAA,EAAQ,YAAc,EAAA;AACpD,QAAA,MAAMC,2BAAqB,CAAA;AAAA,UACzB,MAAA;AAAA,UACA,SAAA;AAAA,UACA,MAAA,EAAQC,oCAAsB,MAAM,CAAA;AAAA,UACpC,iBAAmB,EAAA,UAAA;AAAA,SACpB,CAAA,CAAA;AAAA,OACH;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC,CAAA;;;;"}
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 { proxyPlugin } from './plugin';\n\n/** @alpha */\nconst _feature = proxyPlugin;\nexport default _feature;\n"],"names":["proxyPlugin"],"mappings":";;;;;;AAmBA,MAAM,QAAW,GAAAA;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,10 +1,6 @@
1
1
  import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
2
 
3
- /**
4
- * The proxy backend plugin.
5
- *
6
- * @alpha
7
- */
8
- declare const _default: _backstage_backend_plugin_api.BackendFeature;
3
+ /** @alpha */
4
+ declare const _feature: _backstage_backend_plugin_api.BackendFeature;
9
5
 
10
- export { _default as default };
6
+ export { _feature 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 plugin = require('./plugin.cjs.js');
3
6
  var router = require('./service/router.cjs.js');
4
7
 
5
8
 
6
9
 
10
+ exports.default = plugin.proxyPlugin;
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,6 +1,14 @@
1
+ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
+ import { RootConfigService, DiscoveryService } from '@backstage/backend-plugin-api';
1
3
  import express from 'express';
2
4
  import { Logger } from 'winston';
3
- import { RootConfigService, DiscoveryService } from '@backstage/backend-plugin-api';
5
+
6
+ /**
7
+ * The proxy backend plugin.
8
+ *
9
+ * @public
10
+ */
11
+ declare const proxyPlugin: _backstage_backend_plugin_api.BackendFeature;
4
12
 
5
13
  /**
6
14
  * @public
@@ -40,4 +48,4 @@ interface RouterOptions {
40
48
  */
41
49
  declare function createRouter(options: RouterOptions): Promise<express.Router>;
42
50
 
43
- export { type RouterOptions, createRouter };
51
+ export { type RouterOptions, createRouter, proxyPlugin as default };
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var backendCommon = require('@backstage/backend-common');
4
+ var backendPluginApi = require('@backstage/backend-plugin-api');
5
+ var router = require('./service/router.cjs.js');
6
+
7
+ const proxyPlugin = backendPluginApi.createBackendPlugin({
8
+ pluginId: "proxy",
9
+ register(env) {
10
+ env.registerInit({
11
+ deps: {
12
+ config: backendPluginApi.coreServices.rootConfig,
13
+ discovery: backendPluginApi.coreServices.discovery,
14
+ logger: backendPluginApi.coreServices.logger,
15
+ httpRouter: backendPluginApi.coreServices.httpRouter
16
+ },
17
+ async init({ config, discovery, logger, httpRouter }) {
18
+ await router.createRouterInternal({
19
+ config,
20
+ discovery,
21
+ logger: backendCommon.loggerToWinstonLogger(logger),
22
+ httpRouterService: httpRouter
23
+ });
24
+ }
25
+ });
26
+ }
27
+ });
28
+
29
+ exports.proxyPlugin = proxyPlugin;
30
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":["../src/plugin.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 { loggerToWinstonLogger } from '@backstage/backend-common';\nimport {\n createBackendPlugin,\n coreServices,\n} from '@backstage/backend-plugin-api';\nimport { createRouterInternal } from './service/router';\n\n/**\n * The proxy backend plugin.\n *\n * @public\n */\nexport const proxyPlugin = createBackendPlugin({\n pluginId: 'proxy',\n register(env) {\n env.registerInit({\n deps: {\n config: coreServices.rootConfig,\n discovery: coreServices.discovery,\n logger: coreServices.logger,\n httpRouter: coreServices.httpRouter,\n },\n async init({ config, discovery, logger, httpRouter }) {\n await createRouterInternal({\n config,\n discovery,\n logger: loggerToWinstonLogger(logger),\n httpRouterService: httpRouter,\n });\n },\n });\n },\n});\n"],"names":["createBackendPlugin","coreServices","createRouterInternal","loggerToWinstonLogger"],"mappings":";;;;;;AA4BO,MAAM,cAAcA,oCAAoB,CAAA;AAAA,EAC7C,QAAU,EAAA,OAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,QAAQC,6BAAa,CAAA,UAAA;AAAA,QACrB,WAAWA,6BAAa,CAAA,SAAA;AAAA,QACxB,QAAQA,6BAAa,CAAA,MAAA;AAAA,QACrB,YAAYA,6BAAa,CAAA,UAAA;AAAA,OAC3B;AAAA,MACA,MAAM,IAAK,CAAA,EAAE,QAAQ,SAAW,EAAA,MAAA,EAAQ,YAAc,EAAA;AACpD,QAAA,MAAMC,2BAAqB,CAAA;AAAA,UACzB,MAAA;AAAA,UACA,SAAA;AAAA,UACA,MAAA,EAAQC,oCAAsB,MAAM,CAAA;AAAA,UACpC,iBAAmB,EAAA,UAAA;AAAA,SACpB,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-proxy-backend",
3
- "version": "0.5.7-next.1",
3
+ "version": "0.5.8-next.0",
4
4
  "description": "A Backstage backend plugin that helps you set up proxy endpoints in the backend",
5
5
  "backstage": {
6
6
  "role": "backend-plugin",
@@ -24,6 +24,7 @@
24
24
  "license": "Apache-2.0",
25
25
  "exports": {
26
26
  ".": {
27
+ "backstage": "@backstage/BackendFeature",
27
28
  "require": "./dist/index.cjs.js",
28
29
  "types": "./dist/index.d.ts",
29
30
  "default": "./dist/index.cjs.js"
@@ -54,7 +55,7 @@
54
55
  },
55
56
  "dependencies": {
56
57
  "@backstage/backend-common": "^0.25.0",
57
- "@backstage/backend-plugin-api": "1.0.1-next.1",
58
+ "@backstage/backend-plugin-api": "1.0.2-next.0",
58
59
  "@backstage/config": "1.2.0",
59
60
  "@backstage/types": "1.1.1",
60
61
  "@types/express": "^4.17.6",
@@ -69,10 +70,10 @@
69
70
  "yup": "^1.0.0"
70
71
  },
71
72
  "devDependencies": {
72
- "@backstage/backend-app-api": "1.0.1-next.1",
73
- "@backstage/backend-defaults": "0.5.1-next.2",
74
- "@backstage/backend-test-utils": "1.0.1-next.2",
75
- "@backstage/cli": "0.28.0-next.2",
73
+ "@backstage/backend-app-api": "1.0.2-next.0",
74
+ "@backstage/backend-defaults": "0.5.3-next.0",
75
+ "@backstage/backend-test-utils": "1.0.3-next.0",
76
+ "@backstage/cli": "0.29.0-next.0",
76
77
  "@backstage/config-loader": "1.9.1",
77
78
  "@backstage/errors": "1.2.4",
78
79
  "@types/http-proxy-middleware": "^1.0.0",