@backstage/plugin-permission-backend 0.5.50-next.1 → 0.5.51-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,31 @@
1
1
  # @backstage/plugin-permission-backend
2
2
 
3
+ ## 0.5.51-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/errors@1.2.4
12
+ - @backstage/plugin-permission-common@0.8.1
13
+ - @backstage/plugin-permission-node@0.8.5-next.0
14
+
15
+ ## 0.5.50
16
+
17
+ ### Patch Changes
18
+
19
+ - 094eaa3: Remove references to in-repo backend-common
20
+ - 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.
21
+ - Updated dependencies
22
+ - @backstage/plugin-auth-node@0.5.3
23
+ - @backstage/plugin-permission-node@0.8.4
24
+ - @backstage/backend-plugin-api@1.0.1
25
+ - @backstage/config@1.2.0
26
+ - @backstage/errors@1.2.4
27
+ - @backstage/plugin-permission-common@0.8.1
28
+
3
29
  ## 0.5.50-next.1
4
30
 
5
31
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-permission-backend__alpha",
3
- "version": "0.5.50-next.1",
3
+ "version": "0.5.51-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 plugin = require('./plugin.cjs.js');
6
6
 
7
+ const _feature = plugin.permissionPlugin;
7
8
 
8
-
9
- exports.default = plugin.permissionPlugin;
9
+ exports.default = _feature;
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 2020 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 { permissionPlugin as feature } from './plugin';\n\n/** @alpha */\nconst _feature = feature;\nexport default _feature;\n"],"names":["feature"],"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
- * Permission plugin
5
- *
6
- * @alpha
7
- */
8
- declare const permissionPlugin: _backstage_backend_plugin_api.BackendFeature;
3
+ /** @alpha */
4
+ declare const _feature: _backstage_backend_plugin_api.BackendFeature;
9
5
 
10
- export { permissionPlugin 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.permissionPlugin;
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,15 @@
1
+ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
+ import { LoggerService, DiscoveryService, RootConfigService, AuthService, HttpAuthService, UserInfoService } from '@backstage/backend-plugin-api';
1
3
  import express from 'express';
2
4
  import { IdentityApi } from '@backstage/plugin-auth-node';
3
5
  import { PermissionPolicy } from '@backstage/plugin-permission-node';
4
- import { LoggerService, DiscoveryService, RootConfigService, AuthService, HttpAuthService, UserInfoService } from '@backstage/backend-plugin-api';
6
+
7
+ /**
8
+ * Permission plugin
9
+ *
10
+ * @public
11
+ */
12
+ declare const permissionPlugin: _backstage_backend_plugin_api.BackendFeature;
5
13
 
6
14
  /**
7
15
  * Options required when constructing a new {@link express#Router} using
@@ -29,4 +37,4 @@ interface RouterOptions {
29
37
  */
30
38
  declare function createRouter(options: RouterOptions): Promise<express.Router>;
31
39
 
32
- export { type RouterOptions, createRouter };
40
+ export { type RouterOptions, createRouter, permissionPlugin as default };
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2021 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 coreServices,\n createBackendPlugin,\n} from '@backstage/backend-plugin-api';\nimport { PermissionPolicy } from '@backstage/plugin-permission-node';\nimport {\n policyExtensionPoint,\n PolicyExtensionPoint,\n} from '@backstage/plugin-permission-node/alpha';\nimport { createRouter } from './service';\n\nclass PolicyExtensionPointImpl implements PolicyExtensionPoint {\n public policy: PermissionPolicy | undefined;\n\n setPolicy(policy: PermissionPolicy): void {\n if (this.policy) {\n throw new Error('Policy already set');\n }\n this.policy = policy;\n }\n}\n\n/**\n * Permission plugin\n *\n * @alpha\n */\nexport const permissionPlugin = createBackendPlugin({\n pluginId: 'permission',\n register(env) {\n const policies = new PolicyExtensionPointImpl();\n\n env.registerExtensionPoint(policyExtensionPoint, policies);\n\n env.registerInit({\n deps: {\n http: coreServices.httpRouter,\n config: coreServices.rootConfig,\n logger: coreServices.logger,\n discovery: coreServices.discovery,\n auth: coreServices.auth,\n httpAuth: coreServices.httpAuth,\n userInfo: coreServices.userInfo,\n },\n async init({\n http,\n config,\n logger,\n discovery,\n auth,\n httpAuth,\n userInfo,\n }) {\n if (!policies.policy) {\n throw new Error(\n 'No policy module installed! Please install a policy module. If you want to allow all requests, use @backstage/plugin-permission-backend-module-allow-all-policy permissionModuleAllowAllPolicy',\n );\n }\n\n http.use(\n await createRouter({\n config,\n discovery,\n logger,\n policy: policies.policy,\n auth,\n httpAuth,\n userInfo,\n }),\n );\n http.addAuthPolicy({\n path: '/health',\n allow: 'unauthenticated',\n });\n },\n });\n },\n});\n"],"names":["createBackendPlugin","policyExtensionPoint","coreServices","createRouter"],"mappings":";;;;;;AA2BA,MAAM,wBAAyD,CAAA;AAAA,EACtD,MAAA,CAAA;AAAA,EAEP,UAAU,MAAgC,EAAA;AACxC,IAAA,IAAI,KAAK,MAAQ,EAAA;AACf,MAAM,MAAA,IAAI,MAAM,oBAAoB,CAAA,CAAA;AAAA,KACtC;AACA,IAAA,IAAA,CAAK,MAAS,GAAA,MAAA,CAAA;AAAA,GAChB;AACF,CAAA;AAOO,MAAM,mBAAmBA,oCAAoB,CAAA;AAAA,EAClD,QAAU,EAAA,YAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAM,MAAA,QAAA,GAAW,IAAI,wBAAyB,EAAA,CAAA;AAE9C,IAAI,GAAA,CAAA,sBAAA,CAAuBC,4BAAsB,QAAQ,CAAA,CAAA;AAEzD,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,MAAMC,6BAAa,CAAA,UAAA;AAAA,QACnB,QAAQA,6BAAa,CAAA,UAAA;AAAA,QACrB,QAAQA,6BAAa,CAAA,MAAA;AAAA,QACrB,WAAWA,6BAAa,CAAA,SAAA;AAAA,QACxB,MAAMA,6BAAa,CAAA,IAAA;AAAA,QACnB,UAAUA,6BAAa,CAAA,QAAA;AAAA,QACvB,UAAUA,6BAAa,CAAA,QAAA;AAAA,OACzB;AAAA,MACA,MAAM,IAAK,CAAA;AAAA,QACT,IAAA;AAAA,QACA,MAAA;AAAA,QACA,MAAA;AAAA,QACA,SAAA;AAAA,QACA,IAAA;AAAA,QACA,QAAA;AAAA,QACA,QAAA;AAAA,OACC,EAAA;AACD,QAAI,IAAA,CAAC,SAAS,MAAQ,EAAA;AACpB,UAAA,MAAM,IAAI,KAAA;AAAA,YACR,gMAAA;AAAA,WACF,CAAA;AAAA,SACF;AAEA,QAAK,IAAA,CAAA,GAAA;AAAA,UACH,MAAMC,mBAAa,CAAA;AAAA,YACjB,MAAA;AAAA,YACA,SAAA;AAAA,YACA,MAAA;AAAA,YACA,QAAQ,QAAS,CAAA,MAAA;AAAA,YACjB,IAAA;AAAA,YACA,QAAA;AAAA,YACA,QAAA;AAAA,WACD,CAAA;AAAA,SACH,CAAA;AACA,QAAA,IAAA,CAAK,aAAc,CAAA;AAAA,UACjB,IAAM,EAAA,SAAA;AAAA,UACN,KAAO,EAAA,iBAAA;AAAA,SACR,CAAA,CAAA;AAAA,OACH;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2021 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 coreServices,\n createBackendPlugin,\n} from '@backstage/backend-plugin-api';\nimport { PermissionPolicy } from '@backstage/plugin-permission-node';\nimport {\n policyExtensionPoint,\n PolicyExtensionPoint,\n} from '@backstage/plugin-permission-node/alpha';\nimport { createRouter } from './service';\n\nclass PolicyExtensionPointImpl implements PolicyExtensionPoint {\n public policy: PermissionPolicy | undefined;\n\n setPolicy(policy: PermissionPolicy): void {\n if (this.policy) {\n throw new Error('Policy already set');\n }\n this.policy = policy;\n }\n}\n\n/**\n * Permission plugin\n *\n * @public\n */\nexport const permissionPlugin = createBackendPlugin({\n pluginId: 'permission',\n register(env) {\n const policies = new PolicyExtensionPointImpl();\n\n env.registerExtensionPoint(policyExtensionPoint, policies);\n\n env.registerInit({\n deps: {\n http: coreServices.httpRouter,\n config: coreServices.rootConfig,\n logger: coreServices.logger,\n discovery: coreServices.discovery,\n auth: coreServices.auth,\n httpAuth: coreServices.httpAuth,\n userInfo: coreServices.userInfo,\n },\n async init({\n http,\n config,\n logger,\n discovery,\n auth,\n httpAuth,\n userInfo,\n }) {\n if (!policies.policy) {\n throw new Error(\n 'No policy module installed! Please install a policy module. If you want to allow all requests, use @backstage/plugin-permission-backend-module-allow-all-policy permissionModuleAllowAllPolicy',\n );\n }\n\n http.use(\n await createRouter({\n config,\n discovery,\n logger,\n policy: policies.policy,\n auth,\n httpAuth,\n userInfo,\n }),\n );\n http.addAuthPolicy({\n path: '/health',\n allow: 'unauthenticated',\n });\n },\n });\n },\n});\n"],"names":["createBackendPlugin","policyExtensionPoint","coreServices","createRouter"],"mappings":";;;;;;AA2BA,MAAM,wBAAyD,CAAA;AAAA,EACtD,MAAA,CAAA;AAAA,EAEP,UAAU,MAAgC,EAAA;AACxC,IAAA,IAAI,KAAK,MAAQ,EAAA;AACf,MAA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AA;AAAA,UACjB,IAAM,EAAA,SAAA;AAAA,UACN,KAAO,EAAA,iBAAA;AAAA,SACR,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-permission-backend",
3
- "version": "0.5.50-next.1",
3
+ "version": "0.5.51-next.0",
4
4
  "backstage": {
5
5
  "role": "backend-plugin",
6
6
  "pluginId": "permission",
@@ -23,6 +23,7 @@
23
23
  "license": "Apache-2.0",
24
24
  "exports": {
25
25
  ".": {
26
+ "backstage": "@backstage/BackendFeature",
26
27
  "require": "./dist/index.cjs.js",
27
28
  "types": "./dist/index.d.ts",
28
29
  "default": "./dist/index.cjs.js"
@@ -52,12 +53,12 @@
52
53
  },
53
54
  "dependencies": {
54
55
  "@backstage/backend-common": "^0.25.0",
55
- "@backstage/backend-plugin-api": "1.0.1-next.1",
56
+ "@backstage/backend-plugin-api": "1.0.2-next.0",
56
57
  "@backstage/config": "1.2.0",
57
58
  "@backstage/errors": "1.2.4",
58
- "@backstage/plugin-auth-node": "0.5.3-next.1",
59
+ "@backstage/plugin-auth-node": "0.5.4-next.0",
59
60
  "@backstage/plugin-permission-common": "0.8.1",
60
- "@backstage/plugin-permission-node": "0.8.4-next.1",
61
+ "@backstage/plugin-permission-node": "0.8.5-next.0",
61
62
  "@types/express": "*",
62
63
  "dataloader": "^2.0.0",
63
64
  "express": "^4.17.1",
@@ -68,8 +69,8 @@
68
69
  "zod": "^3.22.4"
69
70
  },
70
71
  "devDependencies": {
71
- "@backstage/backend-test-utils": "1.0.1-next.2",
72
- "@backstage/cli": "0.28.0-next.2",
72
+ "@backstage/backend-test-utils": "1.0.3-next.0",
73
+ "@backstage/cli": "0.29.0-next.0",
73
74
  "@types/lodash": "^4.14.151",
74
75
  "@types/supertest": "^2.0.8",
75
76
  "msw": "^1.0.0",