@backstage/plugin-catalog-common 1.0.22 → 1.0.23-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,14 @@
1
1
  # @backstage/plugin-catalog-common
2
2
 
3
+ ## 1.0.23-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/catalog-model@1.5.0-next.0
9
+ - @backstage/plugin-permission-common@0.7.13
10
+ - @backstage/plugin-search-common@1.2.11
11
+
3
12
  ## 1.0.22
4
13
 
5
14
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-common",
3
- "version": "1.0.22",
3
+ "version": "1.0.23-next.0",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
package/dist/alpha.cjs.js CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var pluginPermissionCommon = require('@backstage/plugin-permission-common');
6
4
 
7
5
  const RESOURCE_TYPE_CATALOG_ENTITY = "catalog-entity";
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.cjs.js","sources":["../src/permissions.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 createPermission,\n ResourcePermission,\n} from '@backstage/plugin-permission-common';\n\n/**\n * Permission resource type which corresponds to catalog entities.\n *\n * {@link https://backstage.io/docs/features/software-catalog/}\n * @alpha\n */\nexport const RESOURCE_TYPE_CATALOG_ENTITY = 'catalog-entity';\n\n/**\n * Convenience type for catalog entity\n * {@link @backstage/plugin-permission-common#ResourcePermission}s.\n * @alpha\n */\nexport type CatalogEntityPermission = ResourcePermission<\n typeof RESOURCE_TYPE_CATALOG_ENTITY\n>;\n\n/**\n * This permission is used to authorize actions that involve reading one or more\n * entities from the catalog.\n *\n * If this permission is not authorized, it will appear that the entity does not\n * exist in the catalog — both in the frontend and in API responses.\n * @alpha\n */\nexport const catalogEntityReadPermission = createPermission({\n name: 'catalog.entity.read',\n attributes: {\n action: 'read',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to authorize actions that involve creating a new\n * catalog entity. This includes registering an existing component into the\n * catalog.\n * @alpha\n */\nexport const catalogEntityCreatePermission = createPermission({\n name: 'catalog.entity.create',\n attributes: {\n action: 'create',\n },\n});\n\n/**\n * This permission is used to designate actions that involve removing one or\n * more entities from the catalog.\n * @alpha\n */\nexport const catalogEntityDeletePermission = createPermission({\n name: 'catalog.entity.delete',\n attributes: {\n action: 'delete',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to designate refreshing one or more entities from the\n * catalog.\n * @alpha\n */\nexport const catalogEntityRefreshPermission = createPermission({\n name: 'catalog.entity.refresh',\n attributes: {\n action: 'update',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to designate actions that involve reading one or more\n * locations from the catalog.\n *\n * If this permission is not authorized, it will appear that the location does\n * not exist in the catalog — both in the frontend and in API responses.\n * @alpha\n */\nexport const catalogLocationReadPermission = createPermission({\n name: 'catalog.location.read',\n attributes: {\n action: 'read',\n },\n});\n\n/**\n * This permission is used to designate actions that involve creating catalog\n * locations.\n * @alpha\n */\nexport const catalogLocationCreatePermission = createPermission({\n name: 'catalog.location.create',\n attributes: {\n action: 'create',\n },\n});\n\n/**\n * This permission is used to designate actions that involve deleting locations\n * from the catalog.\n * @alpha\n */\nexport const catalogLocationDeletePermission = createPermission({\n name: 'catalog.location.delete',\n attributes: {\n action: 'delete',\n },\n});\n\n/**\n * List of all catalog permissions.\n * @alpha\n */\nexport const catalogPermissions = [\n catalogEntityReadPermission,\n catalogEntityCreatePermission,\n catalogEntityDeletePermission,\n catalogEntityRefreshPermission,\n catalogLocationReadPermission,\n catalogLocationCreatePermission,\n catalogLocationDeletePermission,\n];\n"],"names":["createPermission"],"mappings":";;;;;;AA2BO,MAAM,4BAA+B,GAAA,iBAAA;AAmBrC,MAAM,8BAA8BA,uCAAiB,CAAA;AAAA,EAC1D,IAAM,EAAA,qBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,MAAA;AAAA,GACV;AAAA,EACA,YAAc,EAAA,4BAAA;AAChB,CAAC,EAAA;AAQM,MAAM,gCAAgCA,uCAAiB,CAAA;AAAA,EAC5D,IAAM,EAAA,uBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AACF,CAAC,EAAA;AAOM,MAAM,gCAAgCA,uCAAiB,CAAA;AAAA,EAC5D,IAAM,EAAA,uBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AAAA,EACA,YAAc,EAAA,4BAAA;AAChB,CAAC,EAAA;AAOM,MAAM,iCAAiCA,uCAAiB,CAAA;AAAA,EAC7D,IAAM,EAAA,wBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AAAA,EACA,YAAc,EAAA,4BAAA;AAChB,CAAC,EAAA;AAUM,MAAM,gCAAgCA,uCAAiB,CAAA;AAAA,EAC5D,IAAM,EAAA,uBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,MAAA;AAAA,GACV;AACF,CAAC,EAAA;AAOM,MAAM,kCAAkCA,uCAAiB,CAAA;AAAA,EAC9D,IAAM,EAAA,yBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AACF,CAAC,EAAA;AAOM,MAAM,kCAAkCA,uCAAiB,CAAA;AAAA,EAC9D,IAAM,EAAA,yBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AACF,CAAC,EAAA;AAMM,MAAM,kBAAqB,GAAA;AAAA,EAChC,2BAAA;AAAA,EACA,6BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,+BAAA;AAAA,EACA,+BAAA;AACF;;;;;;;;;;;;"}
1
+ {"version":3,"file":"alpha.cjs.js","sources":["../src/permissions.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 createPermission,\n ResourcePermission,\n} from '@backstage/plugin-permission-common';\n\n/**\n * Permission resource type which corresponds to catalog entities.\n *\n * {@link https://backstage.io/docs/features/software-catalog/}\n * @alpha\n */\nexport const RESOURCE_TYPE_CATALOG_ENTITY = 'catalog-entity';\n\n/**\n * Convenience type for catalog entity\n * {@link @backstage/plugin-permission-common#ResourcePermission}s.\n * @alpha\n */\nexport type CatalogEntityPermission = ResourcePermission<\n typeof RESOURCE_TYPE_CATALOG_ENTITY\n>;\n\n/**\n * This permission is used to authorize actions that involve reading one or more\n * entities from the catalog.\n *\n * If this permission is not authorized, it will appear that the entity does not\n * exist in the catalog — both in the frontend and in API responses.\n * @alpha\n */\nexport const catalogEntityReadPermission = createPermission({\n name: 'catalog.entity.read',\n attributes: {\n action: 'read',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to authorize actions that involve creating a new\n * catalog entity. This includes registering an existing component into the\n * catalog.\n * @alpha\n */\nexport const catalogEntityCreatePermission = createPermission({\n name: 'catalog.entity.create',\n attributes: {\n action: 'create',\n },\n});\n\n/**\n * This permission is used to designate actions that involve removing one or\n * more entities from the catalog.\n * @alpha\n */\nexport const catalogEntityDeletePermission = createPermission({\n name: 'catalog.entity.delete',\n attributes: {\n action: 'delete',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to designate refreshing one or more entities from the\n * catalog.\n * @alpha\n */\nexport const catalogEntityRefreshPermission = createPermission({\n name: 'catalog.entity.refresh',\n attributes: {\n action: 'update',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to designate actions that involve reading one or more\n * locations from the catalog.\n *\n * If this permission is not authorized, it will appear that the location does\n * not exist in the catalog — both in the frontend and in API responses.\n * @alpha\n */\nexport const catalogLocationReadPermission = createPermission({\n name: 'catalog.location.read',\n attributes: {\n action: 'read',\n },\n});\n\n/**\n * This permission is used to designate actions that involve creating catalog\n * locations.\n * @alpha\n */\nexport const catalogLocationCreatePermission = createPermission({\n name: 'catalog.location.create',\n attributes: {\n action: 'create',\n },\n});\n\n/**\n * This permission is used to designate actions that involve deleting locations\n * from the catalog.\n * @alpha\n */\nexport const catalogLocationDeletePermission = createPermission({\n name: 'catalog.location.delete',\n attributes: {\n action: 'delete',\n },\n});\n\n/**\n * List of all catalog permissions.\n * @alpha\n */\nexport const catalogPermissions = [\n catalogEntityReadPermission,\n catalogEntityCreatePermission,\n catalogEntityDeletePermission,\n catalogEntityRefreshPermission,\n catalogLocationReadPermission,\n catalogLocationCreatePermission,\n catalogLocationDeletePermission,\n];\n"],"names":["createPermission"],"mappings":";;;;AA2BO,MAAM,4BAA+B,GAAA,iBAAA;AAmBrC,MAAM,8BAA8BA,uCAAiB,CAAA;AAAA,EAC1D,IAAM,EAAA,qBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,MAAA;AAAA,GACV;AAAA,EACA,YAAc,EAAA,4BAAA;AAChB,CAAC,EAAA;AAQM,MAAM,gCAAgCA,uCAAiB,CAAA;AAAA,EAC5D,IAAM,EAAA,uBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AACF,CAAC,EAAA;AAOM,MAAM,gCAAgCA,uCAAiB,CAAA;AAAA,EAC5D,IAAM,EAAA,uBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AAAA,EACA,YAAc,EAAA,4BAAA;AAChB,CAAC,EAAA;AAOM,MAAM,iCAAiCA,uCAAiB,CAAA;AAAA,EAC7D,IAAM,EAAA,wBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AAAA,EACA,YAAc,EAAA,4BAAA;AAChB,CAAC,EAAA;AAUM,MAAM,gCAAgCA,uCAAiB,CAAA;AAAA,EAC5D,IAAM,EAAA,uBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,MAAA;AAAA,GACV;AACF,CAAC,EAAA;AAOM,MAAM,kCAAkCA,uCAAiB,CAAA;AAAA,EAC9D,IAAM,EAAA,yBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AACF,CAAC,EAAA;AAOM,MAAM,kCAAkCA,uCAAiB,CAAA;AAAA,EAC9D,IAAM,EAAA,yBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AACF,CAAC,EAAA;AAMM,MAAM,kBAAqB,GAAA;AAAA,EAChC,2BAAA;AAAA,EACA,6BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,+BAAA;AAAA,EACA,+BAAA;AACF;;;;;;;;;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -69,4 +69,4 @@ declare const catalogLocationDeletePermission: _backstage_plugin_permission_comm
69
69
  */
70
70
  declare const catalogPermissions: (_backstage_plugin_permission_common.BasicPermission | ResourcePermission<"catalog-entity">)[];
71
71
 
72
- export { CatalogEntityPermission, RESOURCE_TYPE_CATALOG_ENTITY, catalogEntityCreatePermission, catalogEntityDeletePermission, catalogEntityReadPermission, catalogEntityRefreshPermission, catalogLocationCreatePermission, catalogLocationDeletePermission, catalogLocationReadPermission, catalogPermissions };
72
+ export { type CatalogEntityPermission, RESOURCE_TYPE_CATALOG_ENTITY, catalogEntityCreatePermission, catalogEntityDeletePermission, catalogEntityReadPermission, catalogEntityRefreshPermission, catalogLocationCreatePermission, catalogLocationDeletePermission, catalogLocationReadPermission, catalogPermissions };
package/dist/alpha.esm.js CHANGED
@@ -1,60 +1,2 @@
1
- import { createPermission } from '@backstage/plugin-permission-common';
2
-
3
- const RESOURCE_TYPE_CATALOG_ENTITY = "catalog-entity";
4
- const catalogEntityReadPermission = createPermission({
5
- name: "catalog.entity.read",
6
- attributes: {
7
- action: "read"
8
- },
9
- resourceType: RESOURCE_TYPE_CATALOG_ENTITY
10
- });
11
- const catalogEntityCreatePermission = createPermission({
12
- name: "catalog.entity.create",
13
- attributes: {
14
- action: "create"
15
- }
16
- });
17
- const catalogEntityDeletePermission = createPermission({
18
- name: "catalog.entity.delete",
19
- attributes: {
20
- action: "delete"
21
- },
22
- resourceType: RESOURCE_TYPE_CATALOG_ENTITY
23
- });
24
- const catalogEntityRefreshPermission = createPermission({
25
- name: "catalog.entity.refresh",
26
- attributes: {
27
- action: "update"
28
- },
29
- resourceType: RESOURCE_TYPE_CATALOG_ENTITY
30
- });
31
- const catalogLocationReadPermission = createPermission({
32
- name: "catalog.location.read",
33
- attributes: {
34
- action: "read"
35
- }
36
- });
37
- const catalogLocationCreatePermission = createPermission({
38
- name: "catalog.location.create",
39
- attributes: {
40
- action: "create"
41
- }
42
- });
43
- const catalogLocationDeletePermission = createPermission({
44
- name: "catalog.location.delete",
45
- attributes: {
46
- action: "delete"
47
- }
48
- });
49
- const catalogPermissions = [
50
- catalogEntityReadPermission,
51
- catalogEntityCreatePermission,
52
- catalogEntityDeletePermission,
53
- catalogEntityRefreshPermission,
54
- catalogLocationReadPermission,
55
- catalogLocationCreatePermission,
56
- catalogLocationDeletePermission
57
- ];
58
-
59
- export { RESOURCE_TYPE_CATALOG_ENTITY, catalogEntityCreatePermission, catalogEntityDeletePermission, catalogEntityReadPermission, catalogEntityRefreshPermission, catalogLocationCreatePermission, catalogLocationDeletePermission, catalogLocationReadPermission, catalogPermissions };
1
+ export { RESOURCE_TYPE_CATALOG_ENTITY, catalogEntityCreatePermission, catalogEntityDeletePermission, catalogEntityReadPermission, catalogEntityRefreshPermission, catalogLocationCreatePermission, catalogLocationDeletePermission, catalogLocationReadPermission, catalogPermissions } from './permissions.esm.js';
60
2
  //# sourceMappingURL=alpha.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/permissions.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 createPermission,\n ResourcePermission,\n} from '@backstage/plugin-permission-common';\n\n/**\n * Permission resource type which corresponds to catalog entities.\n *\n * {@link https://backstage.io/docs/features/software-catalog/}\n * @alpha\n */\nexport const RESOURCE_TYPE_CATALOG_ENTITY = 'catalog-entity';\n\n/**\n * Convenience type for catalog entity\n * {@link @backstage/plugin-permission-common#ResourcePermission}s.\n * @alpha\n */\nexport type CatalogEntityPermission = ResourcePermission<\n typeof RESOURCE_TYPE_CATALOG_ENTITY\n>;\n\n/**\n * This permission is used to authorize actions that involve reading one or more\n * entities from the catalog.\n *\n * If this permission is not authorized, it will appear that the entity does not\n * exist in the catalog — both in the frontend and in API responses.\n * @alpha\n */\nexport const catalogEntityReadPermission = createPermission({\n name: 'catalog.entity.read',\n attributes: {\n action: 'read',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to authorize actions that involve creating a new\n * catalog entity. This includes registering an existing component into the\n * catalog.\n * @alpha\n */\nexport const catalogEntityCreatePermission = createPermission({\n name: 'catalog.entity.create',\n attributes: {\n action: 'create',\n },\n});\n\n/**\n * This permission is used to designate actions that involve removing one or\n * more entities from the catalog.\n * @alpha\n */\nexport const catalogEntityDeletePermission = createPermission({\n name: 'catalog.entity.delete',\n attributes: {\n action: 'delete',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to designate refreshing one or more entities from the\n * catalog.\n * @alpha\n */\nexport const catalogEntityRefreshPermission = createPermission({\n name: 'catalog.entity.refresh',\n attributes: {\n action: 'update',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to designate actions that involve reading one or more\n * locations from the catalog.\n *\n * If this permission is not authorized, it will appear that the location does\n * not exist in the catalog — both in the frontend and in API responses.\n * @alpha\n */\nexport const catalogLocationReadPermission = createPermission({\n name: 'catalog.location.read',\n attributes: {\n action: 'read',\n },\n});\n\n/**\n * This permission is used to designate actions that involve creating catalog\n * locations.\n * @alpha\n */\nexport const catalogLocationCreatePermission = createPermission({\n name: 'catalog.location.create',\n attributes: {\n action: 'create',\n },\n});\n\n/**\n * This permission is used to designate actions that involve deleting locations\n * from the catalog.\n * @alpha\n */\nexport const catalogLocationDeletePermission = createPermission({\n name: 'catalog.location.delete',\n attributes: {\n action: 'delete',\n },\n});\n\n/**\n * List of all catalog permissions.\n * @alpha\n */\nexport const catalogPermissions = [\n catalogEntityReadPermission,\n catalogEntityCreatePermission,\n catalogEntityDeletePermission,\n catalogEntityRefreshPermission,\n catalogLocationReadPermission,\n catalogLocationCreatePermission,\n catalogLocationDeletePermission,\n];\n"],"names":[],"mappings":";;AA2BO,MAAM,4BAA+B,GAAA,iBAAA;AAmBrC,MAAM,8BAA8B,gBAAiB,CAAA;AAAA,EAC1D,IAAM,EAAA,qBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,MAAA;AAAA,GACV;AAAA,EACA,YAAc,EAAA,4BAAA;AAChB,CAAC,EAAA;AAQM,MAAM,gCAAgC,gBAAiB,CAAA;AAAA,EAC5D,IAAM,EAAA,uBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AACF,CAAC,EAAA;AAOM,MAAM,gCAAgC,gBAAiB,CAAA;AAAA,EAC5D,IAAM,EAAA,uBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AAAA,EACA,YAAc,EAAA,4BAAA;AAChB,CAAC,EAAA;AAOM,MAAM,iCAAiC,gBAAiB,CAAA;AAAA,EAC7D,IAAM,EAAA,wBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AAAA,EACA,YAAc,EAAA,4BAAA;AAChB,CAAC,EAAA;AAUM,MAAM,gCAAgC,gBAAiB,CAAA;AAAA,EAC5D,IAAM,EAAA,uBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,MAAA;AAAA,GACV;AACF,CAAC,EAAA;AAOM,MAAM,kCAAkC,gBAAiB,CAAA;AAAA,EAC9D,IAAM,EAAA,yBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AACF,CAAC,EAAA;AAOM,MAAM,kCAAkC,gBAAiB,CAAA;AAAA,EAC9D,IAAM,EAAA,yBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AACF,CAAC,EAAA;AAMM,MAAM,kBAAqB,GAAA;AAAA,EAChC,2BAAA;AAAA,EACA,6BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,+BAAA;AAAA,EACA,+BAAA;AACF;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -94,4 +94,4 @@ type AnalyzeLocationEntityField = {
94
94
  description: string;
95
95
  };
96
96
 
97
- export { AnalyzeLocationEntityField, AnalyzeLocationExistingEntity, AnalyzeLocationGenerateEntity, AnalyzeLocationRequest, AnalyzeLocationResponse, CatalogEntityDocument, LocationSpec };
97
+ export type { AnalyzeLocationEntityField, AnalyzeLocationExistingEntity, AnalyzeLocationGenerateEntity, AnalyzeLocationRequest, AnalyzeLocationResponse, CatalogEntityDocument, LocationSpec };
@@ -0,0 +1,60 @@
1
+ import { createPermission } from '@backstage/plugin-permission-common';
2
+
3
+ const RESOURCE_TYPE_CATALOG_ENTITY = "catalog-entity";
4
+ const catalogEntityReadPermission = createPermission({
5
+ name: "catalog.entity.read",
6
+ attributes: {
7
+ action: "read"
8
+ },
9
+ resourceType: RESOURCE_TYPE_CATALOG_ENTITY
10
+ });
11
+ const catalogEntityCreatePermission = createPermission({
12
+ name: "catalog.entity.create",
13
+ attributes: {
14
+ action: "create"
15
+ }
16
+ });
17
+ const catalogEntityDeletePermission = createPermission({
18
+ name: "catalog.entity.delete",
19
+ attributes: {
20
+ action: "delete"
21
+ },
22
+ resourceType: RESOURCE_TYPE_CATALOG_ENTITY
23
+ });
24
+ const catalogEntityRefreshPermission = createPermission({
25
+ name: "catalog.entity.refresh",
26
+ attributes: {
27
+ action: "update"
28
+ },
29
+ resourceType: RESOURCE_TYPE_CATALOG_ENTITY
30
+ });
31
+ const catalogLocationReadPermission = createPermission({
32
+ name: "catalog.location.read",
33
+ attributes: {
34
+ action: "read"
35
+ }
36
+ });
37
+ const catalogLocationCreatePermission = createPermission({
38
+ name: "catalog.location.create",
39
+ attributes: {
40
+ action: "create"
41
+ }
42
+ });
43
+ const catalogLocationDeletePermission = createPermission({
44
+ name: "catalog.location.delete",
45
+ attributes: {
46
+ action: "delete"
47
+ }
48
+ });
49
+ const catalogPermissions = [
50
+ catalogEntityReadPermission,
51
+ catalogEntityCreatePermission,
52
+ catalogEntityDeletePermission,
53
+ catalogEntityRefreshPermission,
54
+ catalogLocationReadPermission,
55
+ catalogLocationCreatePermission,
56
+ catalogLocationDeletePermission
57
+ ];
58
+
59
+ export { RESOURCE_TYPE_CATALOG_ENTITY, catalogEntityCreatePermission, catalogEntityDeletePermission, catalogEntityReadPermission, catalogEntityRefreshPermission, catalogLocationCreatePermission, catalogLocationDeletePermission, catalogLocationReadPermission, catalogPermissions };
60
+ //# sourceMappingURL=permissions.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.esm.js","sources":["../src/permissions.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 createPermission,\n ResourcePermission,\n} from '@backstage/plugin-permission-common';\n\n/**\n * Permission resource type which corresponds to catalog entities.\n *\n * {@link https://backstage.io/docs/features/software-catalog/}\n * @alpha\n */\nexport const RESOURCE_TYPE_CATALOG_ENTITY = 'catalog-entity';\n\n/**\n * Convenience type for catalog entity\n * {@link @backstage/plugin-permission-common#ResourcePermission}s.\n * @alpha\n */\nexport type CatalogEntityPermission = ResourcePermission<\n typeof RESOURCE_TYPE_CATALOG_ENTITY\n>;\n\n/**\n * This permission is used to authorize actions that involve reading one or more\n * entities from the catalog.\n *\n * If this permission is not authorized, it will appear that the entity does not\n * exist in the catalog — both in the frontend and in API responses.\n * @alpha\n */\nexport const catalogEntityReadPermission = createPermission({\n name: 'catalog.entity.read',\n attributes: {\n action: 'read',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to authorize actions that involve creating a new\n * catalog entity. This includes registering an existing component into the\n * catalog.\n * @alpha\n */\nexport const catalogEntityCreatePermission = createPermission({\n name: 'catalog.entity.create',\n attributes: {\n action: 'create',\n },\n});\n\n/**\n * This permission is used to designate actions that involve removing one or\n * more entities from the catalog.\n * @alpha\n */\nexport const catalogEntityDeletePermission = createPermission({\n name: 'catalog.entity.delete',\n attributes: {\n action: 'delete',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to designate refreshing one or more entities from the\n * catalog.\n * @alpha\n */\nexport const catalogEntityRefreshPermission = createPermission({\n name: 'catalog.entity.refresh',\n attributes: {\n action: 'update',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to designate actions that involve reading one or more\n * locations from the catalog.\n *\n * If this permission is not authorized, it will appear that the location does\n * not exist in the catalog — both in the frontend and in API responses.\n * @alpha\n */\nexport const catalogLocationReadPermission = createPermission({\n name: 'catalog.location.read',\n attributes: {\n action: 'read',\n },\n});\n\n/**\n * This permission is used to designate actions that involve creating catalog\n * locations.\n * @alpha\n */\nexport const catalogLocationCreatePermission = createPermission({\n name: 'catalog.location.create',\n attributes: {\n action: 'create',\n },\n});\n\n/**\n * This permission is used to designate actions that involve deleting locations\n * from the catalog.\n * @alpha\n */\nexport const catalogLocationDeletePermission = createPermission({\n name: 'catalog.location.delete',\n attributes: {\n action: 'delete',\n },\n});\n\n/**\n * List of all catalog permissions.\n * @alpha\n */\nexport const catalogPermissions = [\n catalogEntityReadPermission,\n catalogEntityCreatePermission,\n catalogEntityDeletePermission,\n catalogEntityRefreshPermission,\n catalogLocationReadPermission,\n catalogLocationCreatePermission,\n catalogLocationDeletePermission,\n];\n"],"names":[],"mappings":";;AA2BO,MAAM,4BAA+B,GAAA,iBAAA;AAmBrC,MAAM,8BAA8B,gBAAiB,CAAA;AAAA,EAC1D,IAAM,EAAA,qBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,MAAA;AAAA,GACV;AAAA,EACA,YAAc,EAAA,4BAAA;AAChB,CAAC,EAAA;AAQM,MAAM,gCAAgC,gBAAiB,CAAA;AAAA,EAC5D,IAAM,EAAA,uBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AACF,CAAC,EAAA;AAOM,MAAM,gCAAgC,gBAAiB,CAAA;AAAA,EAC5D,IAAM,EAAA,uBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AAAA,EACA,YAAc,EAAA,4BAAA;AAChB,CAAC,EAAA;AAOM,MAAM,iCAAiC,gBAAiB,CAAA;AAAA,EAC7D,IAAM,EAAA,wBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AAAA,EACA,YAAc,EAAA,4BAAA;AAChB,CAAC,EAAA;AAUM,MAAM,gCAAgC,gBAAiB,CAAA;AAAA,EAC5D,IAAM,EAAA,uBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,MAAA;AAAA,GACV;AACF,CAAC,EAAA;AAOM,MAAM,kCAAkC,gBAAiB,CAAA;AAAA,EAC9D,IAAM,EAAA,yBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AACF,CAAC,EAAA;AAOM,MAAM,kCAAkC,gBAAiB,CAAA;AAAA,EAC9D,IAAM,EAAA,yBAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA,QAAA;AAAA,GACV;AACF,CAAC,EAAA;AAMM,MAAM,kBAAqB,GAAA;AAAA,EAChC,2BAAA;AAAA,EACA,6BAAA;AAAA,EACA,6BAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,+BAAA;AAAA,EACA,+BAAA;AACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-common",
3
- "version": "1.0.22",
3
+ "version": "1.0.23-next.0",
4
4
  "description": "Common functionalities for the catalog plugin",
5
5
  "backstage": {
6
6
  "role": "common-library"
@@ -49,12 +49,12 @@
49
49
  "test": "backstage-cli package test"
50
50
  },
51
51
  "dependencies": {
52
- "@backstage/catalog-model": "^1.4.5",
52
+ "@backstage/catalog-model": "^1.5.0-next.0",
53
53
  "@backstage/plugin-permission-common": "^0.7.13",
54
54
  "@backstage/plugin-search-common": "^1.2.11"
55
55
  },
56
56
  "devDependencies": {
57
- "@backstage/cli": "^0.26.0"
57
+ "@backstage/cli": "^0.26.5-next.0"
58
58
  },
59
59
  "module": "./dist/index.esm.js"
60
60
  }