@backstage/plugin-permission-react 0.4.37 → 0.4.38

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-permission-react
2
2
 
3
+ ## 0.4.38
4
+
5
+ ### Patch Changes
6
+
7
+ - 05f60e1: Refactored constructor parameter properties to explicit property declarations for compatibility with TypeScript's `erasableSyntaxOnly` setting. This internal refactoring maintains all existing functionality while ensuring TypeScript compilation compatibility.
8
+ - Updated dependencies
9
+ - @backstage/core-plugin-api@1.12.0
10
+ - @backstage/plugin-permission-common@0.9.3
11
+ - @backstage/config@1.3.6
12
+
13
+ ## 0.4.38-next.0
14
+
15
+ ### Patch Changes
16
+
17
+ - 05f60e1: Refactored constructor parameter properties to explicit property declarations for compatibility with TypeScript's `erasableSyntaxOnly` setting. This internal refactoring maintains all existing functionality while ensuring TypeScript compilation compatibility.
18
+ - Updated dependencies
19
+ - @backstage/core-plugin-api@1.11.2-next.0
20
+ - @backstage/config@1.3.6-next.0
21
+ - @backstage/plugin-permission-common@0.9.3-next.0
22
+
3
23
  ## 0.4.37
4
24
 
5
25
  ### Patch Changes
@@ -1,6 +1,8 @@
1
1
  import { PermissionClient } from '@backstage/plugin-permission-common';
2
2
 
3
3
  class IdentityPermissionApi {
4
+ permissionClient;
5
+ identityApi;
4
6
  constructor(permissionClient, identityApi) {
5
7
  this.permissionClient = permissionClient;
6
8
  this.identityApi = identityApi;
@@ -1 +1 @@
1
- {"version":3,"file":"IdentityPermissionApi.esm.js","sources":["../../src/apis/IdentityPermissionApi.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 { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';\nimport { PermissionApi } from './PermissionApi';\nimport {\n AuthorizePermissionRequest,\n AuthorizePermissionResponse,\n PermissionClient,\n} from '@backstage/plugin-permission-common';\nimport { Config } from '@backstage/config';\n\n/**\n * The default implementation of the PermissionApi, which simply calls the authorize method of the given\n * {@link @backstage/plugin-permission-common#PermissionClient}.\n * @public\n */\nexport class IdentityPermissionApi implements PermissionApi {\n private constructor(\n private readonly permissionClient: PermissionClient,\n private readonly identityApi: IdentityApi,\n ) {}\n\n static create(options: {\n config: Config;\n discovery: DiscoveryApi;\n identity: IdentityApi;\n }) {\n const { config, discovery, identity } = options;\n const permissionClient = new PermissionClient({ discovery, config });\n return new IdentityPermissionApi(permissionClient, identity);\n }\n\n async authorize(\n request: AuthorizePermissionRequest,\n ): Promise<AuthorizePermissionResponse> {\n const response = await this.permissionClient.authorize(\n [request],\n await this.identityApi.getCredentials(),\n );\n return response[0];\n }\n}\n"],"names":[],"mappings":";;AA8BO,MAAM,qBAAA,CAA+C;AAAA,EAClD,WAAA,CACW,kBACA,WAAA,EACjB;AAFiB,IAAA,IAAA,CAAA,gBAAA,GAAA,gBAAA;AACA,IAAA,IAAA,CAAA,WAAA,GAAA,WAAA;AAAA,EAChB;AAAA,EAEH,OAAO,OAAO,OAAA,EAIX;AACD,IAAA,MAAM,EAAE,MAAA,EAAQ,SAAA,EAAW,QAAA,EAAS,GAAI,OAAA;AACxC,IAAA,MAAM,mBAAmB,IAAI,gBAAA,CAAiB,EAAE,SAAA,EAAW,QAAQ,CAAA;AACnE,IAAA,OAAO,IAAI,qBAAA,CAAsB,gBAAA,EAAkB,QAAQ,CAAA;AAAA,EAC7D;AAAA,EAEA,MAAM,UACJ,OAAA,EACsC;AACtC,IAAA,MAAM,QAAA,GAAW,MAAM,IAAA,CAAK,gBAAA,CAAiB,SAAA;AAAA,MAC3C,CAAC,OAAO,CAAA;AAAA,MACR,MAAM,IAAA,CAAK,WAAA,CAAY,cAAA;AAAe,KACxC;AACA,IAAA,OAAO,SAAS,CAAC,CAAA;AAAA,EACnB;AACF;;;;"}
1
+ {"version":3,"file":"IdentityPermissionApi.esm.js","sources":["../../src/apis/IdentityPermissionApi.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 { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';\nimport { PermissionApi } from './PermissionApi';\nimport {\n AuthorizePermissionRequest,\n AuthorizePermissionResponse,\n PermissionClient,\n} from '@backstage/plugin-permission-common';\nimport { Config } from '@backstage/config';\n\n/**\n * The default implementation of the PermissionApi, which simply calls the authorize method of the given\n * {@link @backstage/plugin-permission-common#PermissionClient}.\n * @public\n */\nexport class IdentityPermissionApi implements PermissionApi {\n private readonly permissionClient: PermissionClient;\n private readonly identityApi: IdentityApi;\n\n private constructor(\n permissionClient: PermissionClient,\n identityApi: IdentityApi,\n ) {\n this.permissionClient = permissionClient;\n this.identityApi = identityApi;\n }\n\n static create(options: {\n config: Config;\n discovery: DiscoveryApi;\n identity: IdentityApi;\n }) {\n const { config, discovery, identity } = options;\n const permissionClient = new PermissionClient({ discovery, config });\n return new IdentityPermissionApi(permissionClient, identity);\n }\n\n async authorize(\n request: AuthorizePermissionRequest,\n ): Promise<AuthorizePermissionResponse> {\n const response = await this.permissionClient.authorize(\n [request],\n await this.identityApi.getCredentials(),\n );\n return response[0];\n }\n}\n"],"names":[],"mappings":";;AA8BO,MAAM,qBAAA,CAA+C;AAAA,EACzC,gBAAA;AAAA,EACA,WAAA;AAAA,EAET,WAAA,CACN,kBACA,WAAA,EACA;AACA,IAAA,IAAA,CAAK,gBAAA,GAAmB,gBAAA;AACxB,IAAA,IAAA,CAAK,WAAA,GAAc,WAAA;AAAA,EACrB;AAAA,EAEA,OAAO,OAAO,OAAA,EAIX;AACD,IAAA,MAAM,EAAE,MAAA,EAAQ,SAAA,EAAW,QAAA,EAAS,GAAI,OAAA;AACxC,IAAA,MAAM,mBAAmB,IAAI,gBAAA,CAAiB,EAAE,SAAA,EAAW,QAAQ,CAAA;AACnE,IAAA,OAAO,IAAI,qBAAA,CAAsB,gBAAA,EAAkB,QAAQ,CAAA;AAAA,EAC7D;AAAA,EAEA,MAAM,UACJ,OAAA,EACsC;AACtC,IAAA,MAAM,QAAA,GAAW,MAAM,IAAA,CAAK,gBAAA,CAAiB,SAAA;AAAA,MAC3C,CAAC,OAAO,CAAA;AAAA,MACR,MAAM,IAAA,CAAK,WAAA,CAAY,cAAA;AAAe,KACxC;AACA,IAAA,OAAO,SAAS,CAAC,CAAA;AAAA,EACnB;AACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-permission-react",
3
- "version": "0.4.37",
3
+ "version": "0.4.38",
4
4
  "backstage": {
5
5
  "role": "web-library",
6
6
  "pluginId": "permission",
@@ -42,14 +42,14 @@
42
42
  "test": "backstage-cli package test"
43
43
  },
44
44
  "dependencies": {
45
- "@backstage/config": "^1.3.5",
46
- "@backstage/core-plugin-api": "^1.11.1",
47
- "@backstage/plugin-permission-common": "^0.9.2",
45
+ "@backstage/config": "^1.3.6",
46
+ "@backstage/core-plugin-api": "^1.12.0",
47
+ "@backstage/plugin-permission-common": "^0.9.3",
48
48
  "swr": "^2.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@backstage/cli": "^0.34.4",
52
- "@backstage/test-utils": "^1.7.12",
51
+ "@backstage/cli": "^0.34.5",
52
+ "@backstage/test-utils": "^1.7.13",
53
53
  "@testing-library/jest-dom": "^6.0.0",
54
54
  "@testing-library/react": "^16.0.0",
55
55
  "@types/react": "^18.0.0",