@backstage/backend-defaults 0.15.2-next.1 → 0.15.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 +22 -0
- package/dist/entrypoints/httpRouter/http/createRateLimitMiddleware.cjs.js.map +1 -1
- package/dist/entrypoints/httpRouter/httpRouterServiceFactory.cjs.js +1 -1
- package/dist/httpRouter.cjs.js +2 -0
- package/dist/httpRouter.cjs.js.map +1 -1
- package/dist/httpRouter.d.ts +10 -1
- package/dist/package.json.cjs.js +1 -1
- package/package.json +17 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @backstage/backend-defaults
|
|
2
2
|
|
|
3
|
+
## 0.15.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7455dae: Use node prefix on native imports
|
|
8
|
+
- 44f5d04: Minor internal restructure of the postgres config loading code
|
|
9
|
+
- 4fc7bf0: Bump to tar v7
|
|
10
|
+
- 5dd683f: `createRateLimitMiddleware` is now exported from `@backstage/backend-defaults/httpRouter`
|
|
11
|
+
- 8dd518a: Support `connection.type: azure` in database client to use Microsoft Entra authentication with Azure database for PostgreSQL
|
|
12
|
+
- 69d880e: Bump to latest zod to ensure it has the latest features
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @backstage/backend-app-api@1.5.0
|
|
15
|
+
- @backstage/integration@1.20.0
|
|
16
|
+
- @backstage/integration-aws-node@0.1.20
|
|
17
|
+
- @backstage/backend-plugin-api@1.7.0
|
|
18
|
+
- @backstage/backend-dev-utils@0.1.7
|
|
19
|
+
- @backstage/config-loader@1.10.8
|
|
20
|
+
- @backstage/cli-node@0.2.18
|
|
21
|
+
- @backstage/plugin-auth-node@0.6.13
|
|
22
|
+
- @backstage/plugin-permission-node@0.10.10
|
|
23
|
+
- @backstage/plugin-events-node@0.4.19
|
|
24
|
+
|
|
3
25
|
## 0.15.2-next.1
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRateLimitMiddleware.cjs.js","sources":["../../../../src/entrypoints/httpRouter/http/createRateLimitMiddleware.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { NextFunction, Request, Response } from 'express';\nimport { RateLimitStoreFactory } from '../../../lib/RateLimitStoreFactory.ts';\nimport {
|
|
1
|
+
{"version":3,"file":"createRateLimitMiddleware.cjs.js","sources":["../../../../src/entrypoints/httpRouter/http/createRateLimitMiddleware.ts"],"sourcesContent":["/*\n * Copyright 2025 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 { NextFunction, Request, Response, RequestHandler } from 'express';\nimport { RateLimitStoreFactory } from '../../../lib/RateLimitStoreFactory.ts';\nimport { RootConfigService } from '@backstage/backend-plugin-api';\n\nimport { rateLimitMiddleware } from '../../../lib/rateLimitMiddleware.ts';\n\n/**\n * @public\n * Creates a middleware that applies rate limiting to requests based on the provided configuration.\n */\nexport const createRateLimitMiddleware = (options: {\n pluginId: string;\n config: RootConfigService;\n}): RequestHandler => {\n const { pluginId, config } = options;\n const configKey = `backend.rateLimit.plugin.${pluginId}`;\n const enabled = config.has(configKey);\n if (!enabled) {\n return (_req: Request, _res: Response, next: NextFunction) => {\n next();\n };\n }\n\n const rateLimitOptions = config.getConfig(configKey);\n\n return rateLimitMiddleware({\n store: RateLimitStoreFactory.create({ config, prefix: pluginId }),\n config: rateLimitOptions,\n });\n};\n"],"names":["rateLimitMiddleware","RateLimitStoreFactory"],"mappings":";;;;;AAyBO,MAAM,yBAAA,GAA4B,CAAC,OAAA,KAGpB;AACpB,EAAA,MAAM,EAAE,QAAA,EAAU,MAAA,EAAO,GAAI,OAAA;AAC7B,EAAA,MAAM,SAAA,GAAY,4BAA4B,QAAQ,CAAA,CAAA;AACtD,EAAA,MAAM,OAAA,GAAU,MAAA,CAAO,GAAA,CAAI,SAAS,CAAA;AACpC,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,OAAO,CAAC,IAAA,EAAe,IAAA,EAAgB,IAAA,KAAuB;AAC5D,MAAA,IAAA,EAAK;AAAA,IACP,CAAA;AAAA,EACF;AAEA,EAAA,MAAM,gBAAA,GAAmB,MAAA,CAAO,SAAA,CAAU,SAAS,CAAA;AAEnD,EAAA,OAAOA,uCAAA,CAAoB;AAAA,IACzB,OAAOC,2CAAA,CAAsB,MAAA,CAAO,EAAE,MAAA,EAAQ,MAAA,EAAQ,UAAU,CAAA;AAAA,IAChE,MAAA,EAAQ;AAAA,GACT,CAAA;AACH;;;;"}
|
|
@@ -6,6 +6,7 @@ var createAuthIntegrationRouter = require('./http/createAuthIntegrationRouter.cj
|
|
|
6
6
|
var createCredentialsBarrier = require('./http/createCredentialsBarrier.cjs.js');
|
|
7
7
|
var createLifecycleMiddleware = require('./http/createLifecycleMiddleware.cjs.js');
|
|
8
8
|
var createCookieAuthRefreshMiddleware = require('./http/createCookieAuthRefreshMiddleware.cjs.js');
|
|
9
|
+
var createRateLimitMiddleware = require('./http/createRateLimitMiddleware.cjs.js');
|
|
9
10
|
require('express');
|
|
10
11
|
require('lodash/trimEnd');
|
|
11
12
|
require('node:http');
|
|
@@ -18,7 +19,6 @@ require('minimatch');
|
|
|
18
19
|
require('helmet');
|
|
19
20
|
require('lodash/kebabCase');
|
|
20
21
|
require('../rootHttpRouter/rootHttpRouterServiceFactory.cjs.js');
|
|
21
|
-
var createRateLimitMiddleware = require('./http/createRateLimitMiddleware.cjs.js');
|
|
22
22
|
|
|
23
23
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
24
24
|
|
package/dist/httpRouter.cjs.js
CHANGED
|
@@ -5,6 +5,7 @@ var createAuthIntegrationRouter = require('./entrypoints/httpRouter/http/createA
|
|
|
5
5
|
var createCredentialsBarrier = require('./entrypoints/httpRouter/http/createCredentialsBarrier.cjs.js');
|
|
6
6
|
var createLifecycleMiddleware = require('./entrypoints/httpRouter/http/createLifecycleMiddleware.cjs.js');
|
|
7
7
|
var createCookieAuthRefreshMiddleware = require('./entrypoints/httpRouter/http/createCookieAuthRefreshMiddleware.cjs.js');
|
|
8
|
+
var createRateLimitMiddleware = require('./entrypoints/httpRouter/http/createRateLimitMiddleware.cjs.js');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
@@ -13,4 +14,5 @@ exports.createAuthIntegrationRouter = createAuthIntegrationRouter.createAuthInte
|
|
|
13
14
|
exports.createCredentialsBarrier = createCredentialsBarrier.createCredentialsBarrier;
|
|
14
15
|
exports.createLifecycleMiddleware = createLifecycleMiddleware.createLifecycleMiddleware;
|
|
15
16
|
exports.createCookieAuthRefreshMiddleware = createCookieAuthRefreshMiddleware.createCookieAuthRefreshMiddleware;
|
|
17
|
+
exports.createRateLimitMiddleware = createRateLimitMiddleware.createRateLimitMiddleware;
|
|
16
18
|
//# sourceMappingURL=httpRouter.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpRouter.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"httpRouter.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
package/dist/httpRouter.d.ts
CHANGED
|
@@ -65,5 +65,14 @@ declare function createCookieAuthRefreshMiddleware(options: {
|
|
|
65
65
|
httpAuth: HttpAuthService;
|
|
66
66
|
}): express.Router;
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
/**
|
|
69
|
+
* @public
|
|
70
|
+
* Creates a middleware that applies rate limiting to requests based on the provided configuration.
|
|
71
|
+
*/
|
|
72
|
+
declare const createRateLimitMiddleware: (options: {
|
|
73
|
+
pluginId: string;
|
|
74
|
+
config: RootConfigService;
|
|
75
|
+
}) => RequestHandler;
|
|
76
|
+
|
|
77
|
+
export { createAuthIntegrationRouter, createCookieAuthRefreshMiddleware, createCredentialsBarrier, createLifecycleMiddleware, createRateLimitMiddleware, httpRouterServiceFactory };
|
|
69
78
|
export type { LifecycleMiddlewareOptions };
|
package/dist/package.json.cjs.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/backend-defaults",
|
|
3
|
-
"version": "0.15.2
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "Backend defaults used by Backstage backend apps",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "node-library"
|
|
@@ -217,19 +217,19 @@
|
|
|
217
217
|
"@aws-sdk/types": "^3.347.0",
|
|
218
218
|
"@azure/identity": "^4.0.0",
|
|
219
219
|
"@azure/storage-blob": "^12.5.0",
|
|
220
|
-
"@backstage/backend-app-api": "1.5.0
|
|
221
|
-
"@backstage/backend-dev-utils": "0.1.7
|
|
222
|
-
"@backstage/backend-plugin-api": "1.7.0
|
|
223
|
-
"@backstage/cli-node": "0.2.18
|
|
224
|
-
"@backstage/config": "1.3.6",
|
|
225
|
-
"@backstage/config-loader": "1.10.8
|
|
226
|
-
"@backstage/errors": "1.2.7",
|
|
227
|
-
"@backstage/integration": "1.20.0
|
|
228
|
-
"@backstage/integration-aws-node": "0.1.20
|
|
229
|
-
"@backstage/plugin-auth-node": "0.6.13
|
|
230
|
-
"@backstage/plugin-events-node": "0.4.19
|
|
231
|
-
"@backstage/plugin-permission-node": "0.10.10
|
|
232
|
-
"@backstage/types": "1.2.2",
|
|
220
|
+
"@backstage/backend-app-api": "^1.5.0",
|
|
221
|
+
"@backstage/backend-dev-utils": "^0.1.7",
|
|
222
|
+
"@backstage/backend-plugin-api": "^1.7.0",
|
|
223
|
+
"@backstage/cli-node": "^0.2.18",
|
|
224
|
+
"@backstage/config": "^1.3.6",
|
|
225
|
+
"@backstage/config-loader": "^1.10.8",
|
|
226
|
+
"@backstage/errors": "^1.2.7",
|
|
227
|
+
"@backstage/integration": "^1.20.0",
|
|
228
|
+
"@backstage/integration-aws-node": "^0.1.20",
|
|
229
|
+
"@backstage/plugin-auth-node": "^0.6.13",
|
|
230
|
+
"@backstage/plugin-events-node": "^0.4.19",
|
|
231
|
+
"@backstage/plugin-permission-node": "^0.10.10",
|
|
232
|
+
"@backstage/types": "^1.2.2",
|
|
233
233
|
"@google-cloud/storage": "^7.0.0",
|
|
234
234
|
"@keyv/memcache": "^2.0.1",
|
|
235
235
|
"@keyv/redis": "^4.0.1",
|
|
@@ -284,9 +284,9 @@
|
|
|
284
284
|
},
|
|
285
285
|
"devDependencies": {
|
|
286
286
|
"@aws-sdk/util-stream-node": "^3.350.0",
|
|
287
|
-
"@backstage/backend-plugin-api": "1.7.0
|
|
288
|
-
"@backstage/backend-test-utils": "1.
|
|
289
|
-
"@backstage/cli": "0.35.4
|
|
287
|
+
"@backstage/backend-plugin-api": "^1.7.0",
|
|
288
|
+
"@backstage/backend-test-utils": "^1.11.0",
|
|
289
|
+
"@backstage/cli": "^0.35.4",
|
|
290
290
|
"@google-cloud/cloud-sql-connector": "^1.4.0",
|
|
291
291
|
"@types/archiver": "^7.0.0",
|
|
292
292
|
"@types/base64-stream": "^1.0.2",
|