@backstage/plugin-proxy-node 0.0.0-nightly-20250116022939

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 ADDED
@@ -0,0 +1,19 @@
1
+ # @backstage/plugin-proxy-node
2
+
3
+ ## 0.0.0-nightly-20250116022939
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-plugin-api@0.0.0-nightly-20250116022939
9
+
10
+ ## 0.1.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 11b001c: Added `proxyEndpointsExtensionPoint` to allow addition of proxy configuration through an extension point in the new backend system.
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+ - @backstage/backend-plugin-api@1.1.1
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # backstage-plugin-proxy-node-node
2
+
3
+ Welcome to the Node.js library package for the proxy-node plugin!
4
+
5
+ _This plugin was created through the Backstage CLI_
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var backendPluginApi = require('@backstage/backend-plugin-api');
4
+
5
+ const proxyEndpointsExtensionPoint = backendPluginApi.createExtensionPoint({
6
+ id: "proxy.endpoints"
7
+ });
8
+
9
+ exports.proxyEndpointsExtensionPoint = proxyEndpointsExtensionPoint;
10
+ //# sourceMappingURL=alpha.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpha.cjs.js","sources":["../src/alpha/index.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 */\nimport { createExtensionPoint } from '@backstage/backend-plugin-api';\nimport { Options } from 'http-proxy-middleware';\n\n/**\n * http-proxy-middleware proxy config interface.\n *\n * @alpha\n */\nexport interface ProxyConfig extends Options {\n allowedMethods?: string[];\n allowedHeaders?: string[];\n reviveRequestBody?: boolean;\n credentials?: 'require' | 'forward' | 'dangerously-allow-unauthenticated';\n}\n\n/**\n * Extension point interface for managing proxy endpoints.\n *\n * @alpha\n */\nexport interface ProxyEndpointsExtensionPoint {\n addProxyEndpoints(endpoints: Record<string, string | ProxyConfig>): void;\n}\n\n/**\n * Extension point for managing proxy endpoints.\n *\n * @alpha\n */\nexport const proxyEndpointsExtensionPoint =\n createExtensionPoint<ProxyEndpointsExtensionPoint>({\n id: 'proxy.endpoints',\n });\n"],"names":["createExtensionPoint"],"mappings":";;;;AA4CO,MAAM,+BACXA,qCAAmD,CAAA;AAAA,EACjD,EAAI,EAAA;AACN,CAAC;;;;"}
@@ -0,0 +1,30 @@
1
+ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
+ import { Options } from 'http-proxy-middleware';
3
+
4
+ /**
5
+ * http-proxy-middleware proxy config interface.
6
+ *
7
+ * @alpha
8
+ */
9
+ interface ProxyConfig extends Options {
10
+ allowedMethods?: string[];
11
+ allowedHeaders?: string[];
12
+ reviveRequestBody?: boolean;
13
+ credentials?: 'require' | 'forward' | 'dangerously-allow-unauthenticated';
14
+ }
15
+ /**
16
+ * Extension point interface for managing proxy endpoints.
17
+ *
18
+ * @alpha
19
+ */
20
+ interface ProxyEndpointsExtensionPoint {
21
+ addProxyEndpoints(endpoints: Record<string, string | ProxyConfig>): void;
22
+ }
23
+ /**
24
+ * Extension point for managing proxy endpoints.
25
+ *
26
+ * @alpha
27
+ */
28
+ declare const proxyEndpointsExtensionPoint: _backstage_backend_plugin_api.ExtensionPoint<ProxyEndpointsExtensionPoint>;
29
+
30
+ export { type ProxyConfig, type ProxyEndpointsExtensionPoint, proxyEndpointsExtensionPoint };
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@backstage/plugin-proxy-node",
3
+ "version": "0.0.0-nightly-20250116022939",
4
+ "description": "The plugin-proxy-node module for @backstage/plugin-proxy-backend",
5
+ "backstage": {
6
+ "role": "node-library",
7
+ "pluginId": "proxy-backend",
8
+ "pluginPackages": [
9
+ "@backstage/plugin-proxy-node"
10
+ ]
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "homepage": "https://backstage.io",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/backstage/backstage",
19
+ "directory": "plugins/proxy-node"
20
+ },
21
+ "license": "Apache-2.0",
22
+ "exports": {
23
+ "./alpha": {
24
+ "require": "./dist/alpha.cjs.js",
25
+ "types": "./dist/alpha.d.ts",
26
+ "default": "./dist/alpha.cjs.js"
27
+ },
28
+ "./package.json": "./package.json"
29
+ },
30
+ "main": "src/alpha/index.ts",
31
+ "types": "src/alpha/index.ts",
32
+ "typesVersions": {
33
+ "*": {
34
+ "alpha": [
35
+ "dist/alpha.d.ts"
36
+ ]
37
+ }
38
+ },
39
+ "files": [
40
+ "dist"
41
+ ],
42
+ "scripts": {
43
+ "build": "backstage-cli package build",
44
+ "clean": "backstage-cli package clean",
45
+ "lint": "backstage-cli package lint",
46
+ "prepack": "backstage-cli package prepack",
47
+ "postpack": "backstage-cli package postpack",
48
+ "start": "backstage-cli package start",
49
+ "test": "backstage-cli package test"
50
+ },
51
+ "dependencies": {
52
+ "@backstage/backend-plugin-api": "0.0.0-nightly-20250116022939",
53
+ "http-proxy-middleware": "^2.0.0"
54
+ },
55
+ "devDependencies": {
56
+ "@backstage/backend-test-utils": "0.0.0-nightly-20250116022939",
57
+ "@backstage/cli": "0.29.5",
58
+ "@backstage/config": "1.3.2",
59
+ "@types/http-proxy-middleware": "^1.0.0"
60
+ }
61
+ }
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Copyright 2024 The Backstage Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { createExtensionPoint } from '@backstage/backend-plugin-api';
17
+ import { Options } from 'http-proxy-middleware';
18
+
19
+ /**
20
+ * http-proxy-middleware proxy config interface.
21
+ *
22
+ * @alpha
23
+ */
24
+ export interface ProxyConfig extends Options {
25
+ allowedMethods?: string[];
26
+ allowedHeaders?: string[];
27
+ reviveRequestBody?: boolean;
28
+ credentials?: 'require' | 'forward' | 'dangerously-allow-unauthenticated';
29
+ }
30
+
31
+ /**
32
+ * Extension point interface for managing proxy endpoints.
33
+ *
34
+ * @alpha
35
+ */
36
+ export interface ProxyEndpointsExtensionPoint {
37
+ addProxyEndpoints(endpoints: Record<string, string | ProxyConfig>): void;
38
+ }
39
+
40
+ /**
41
+ * Extension point for managing proxy endpoints.
42
+ *
43
+ * @alpha
44
+ */
45
+ export const proxyEndpointsExtensionPoint =
46
+ createExtensionPoint<ProxyEndpointsExtensionPoint>({
47
+ id: 'proxy.endpoints',
48
+ });