@backstage/plugin-catalog-common 0.1.4 → 0.2.2-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,47 @@
1
1
  # @backstage/plugin-catalog-common
2
2
 
3
+ ## 0.2.2-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - b1aacbf96a: Applied the fix for the `/alpha` entry point resolution that was part of the `v0.70.1` release of Backstage.
8
+ - Updated dependencies
9
+ - @backstage/search-common@0.3.1-next.0
10
+
11
+ ## 0.2.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Fixed runtime resolution of the `/alpha` entry point.
16
+
17
+ ## 0.2.0
18
+
19
+ ### Minor Changes
20
+
21
+ - e3c2bfef11: Remove resourceType property from catalogEntityCreatePermission. Resource type refers to the type of resources whose resourceRefs should be passed along with authorize requests, to allow conditional responses for that resource type. Since creation does not correspond to an entity (as the entity does not exist at the time of authorization), the resourceRef should not be included on the permission.
22
+ - 81273e95cf: **Breaking**: Mark permission-related exports as alpha. This means that the exports below should now be imported from `@backstage/plugin-catalog-common/alpha` instead of `@backstage/plugin-catalog-common`.
23
+
24
+ - `RESOURCE_TYPE_CATALOG_ENTITY`
25
+ - `catalogEntityReadPermission`
26
+ - `catalogEntityCreatePermission`
27
+ - `catalogEntityDeletePermission`
28
+ - `catalogEntityRefreshPermission`
29
+ - `catalogLocationReadPermission`
30
+ - `catalogLocationCreatePermission`
31
+ - `catalogLocationDeletePermission`
32
+
33
+ ### Patch Changes
34
+
35
+ - ab7b6cb7b1: **DEPRECATION**: Moved the `CatalogEntityDocument` to `@backstage/plugin-catalog-common` and deprecated the export from `@backstage/plugin-catalog-backend`.
36
+
37
+ A new `type` field has also been added to `CatalogEntityDocument` as a replacement for `componentType`, which is now deprecated. Both fields are still present and should be set to the same value in order to avoid issues with indexing.
38
+
39
+ Any search customizations need to be updated to use this new `type` field instead, including any custom frontend filters, custom frontend result components, custom search decorators, or non-default Catalog collator implementations.
40
+
41
+ - Updated dependencies
42
+ - @backstage/plugin-permission-common@0.5.2
43
+ - @backstage/search-common@0.3.0
44
+
3
45
  ## 0.1.4
4
46
 
5
47
  ### Patch Changes
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@backstage/plugin-catalog-common",
3
+ "version": "0.2.2-next.0",
4
+ "main": "../dist/index.cjs.js",
5
+ "module": "../dist/index.esm.js",
6
+ "types": "../dist/index.alpha.d.ts"
7
+ }
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Provides shared objects useful for interacting with the catalog and its
3
+ * entities, such as catalog permissions.
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+
8
+ import { IndexableDocument } from '@backstage/search-common';
9
+ import { Permission } from '@backstage/plugin-permission-common';
10
+
11
+ /**
12
+ * This permission is used to authorize actions that involve creating a new
13
+ * catalog entity. This includes registering an existing component into the
14
+ * catalog.
15
+ * @alpha
16
+ */
17
+ export declare const catalogEntityCreatePermission: Permission;
18
+
19
+ /**
20
+ * This permission is used to designate actions that involve removing one or
21
+ * more entities from the catalog.
22
+ * @alpha
23
+ */
24
+ export declare const catalogEntityDeletePermission: Permission;
25
+
26
+ /**
27
+ * The Document format for an Entity in the Catalog for search
28
+ *
29
+ * @public
30
+ */
31
+ export declare interface CatalogEntityDocument extends IndexableDocument {
32
+ /** @deprecated `componentType` is being renamed to `type`. During the transition both of these fields should be set to the same value, in order to avoid issues with indexing. */
33
+ componentType: string;
34
+ type: string;
35
+ namespace: string;
36
+ kind: string;
37
+ lifecycle: string;
38
+ owner: string;
39
+ }
40
+
41
+ /**
42
+ * This permission is used to authorize actions that involve reading one or more
43
+ * entities from the catalog.
44
+ *
45
+ * If this permission is not authorized, it will appear that the entity does not
46
+ * exist in the catalog — both in the frontend and in API responses.
47
+ * @alpha
48
+ */
49
+ export declare const catalogEntityReadPermission: Permission;
50
+
51
+ /**
52
+ * This permission is used to designate refreshing one or more entities from the
53
+ * catalog.
54
+ * @alpha
55
+ */
56
+ export declare const catalogEntityRefreshPermission: Permission;
57
+
58
+ /**
59
+ * This permission is used to designate actions that involve creating catalog
60
+ * locations.
61
+ * @alpha
62
+ */
63
+ export declare const catalogLocationCreatePermission: Permission;
64
+
65
+ /**
66
+ * This permission is used to designate actions that involve deleting locations
67
+ * from the catalog.
68
+ * @alpha
69
+ */
70
+ export declare const catalogLocationDeletePermission: Permission;
71
+
72
+ /**
73
+ * This permission is used to designate actions that involve reading one or more
74
+ * locations from the catalog.
75
+ *
76
+ * If this permission is not authorized, it will appear that the location does
77
+ * not exist in the catalog — both in the frontend and in API responses.
78
+ * @alpha
79
+ */
80
+ export declare const catalogLocationReadPermission: Permission;
81
+
82
+ /**
83
+ * Permission resource type which corresponds to catalog entities.
84
+ *
85
+ * {@link https://backstage.io/docs/features/software-catalog/software-catalog-overview}
86
+ * @alpha
87
+ */
88
+ export declare const RESOURCE_TYPE_CATALOG_ENTITY = "catalog-entity";
89
+
90
+ export { }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Provides shared objects useful for interacting with the catalog and its
3
+ * entities, such as catalog permissions.
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+
8
+ import { IndexableDocument } from '@backstage/search-common';
9
+ import { Permission } from '@backstage/plugin-permission-common';
10
+
11
+ /* Excluded from this release type: catalogEntityCreatePermission */
12
+
13
+ /* Excluded from this release type: catalogEntityDeletePermission */
14
+
15
+ /**
16
+ * The Document format for an Entity in the Catalog for search
17
+ *
18
+ * @public
19
+ */
20
+ export declare interface CatalogEntityDocument extends IndexableDocument {
21
+ /** @deprecated `componentType` is being renamed to `type`. During the transition both of these fields should be set to the same value, in order to avoid issues with indexing. */
22
+ componentType: string;
23
+ type: string;
24
+ namespace: string;
25
+ kind: string;
26
+ lifecycle: string;
27
+ owner: string;
28
+ }
29
+
30
+ /* Excluded from this release type: catalogEntityReadPermission */
31
+
32
+ /* Excluded from this release type: catalogEntityRefreshPermission */
33
+
34
+ /* Excluded from this release type: catalogLocationCreatePermission */
35
+
36
+ /* Excluded from this release type: catalogLocationDeletePermission */
37
+
38
+ /* Excluded from this release type: catalogLocationReadPermission */
39
+
40
+ /* Excluded from this release type: RESOURCE_TYPE_CATALOG_ENTITY */
41
+
42
+ export { }
package/dist/index.cjs.js CHANGED
@@ -14,8 +14,7 @@ const catalogEntityCreatePermission = {
14
14
  name: "catalog.entity.create",
15
15
  attributes: {
16
16
  action: "create"
17
- },
18
- resourceType: RESOURCE_TYPE_CATALOG_ENTITY
17
+ }
19
18
  };
20
19
  const catalogEntityDeletePermission = {
21
20
  name: "catalog.entity.delete",
@@ -1 +1 @@
1
- {"version":3,"file":"index.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 { Permission } from '@backstage/plugin-permission-common';\n\n/**\n * {@link https://backstage.io/docs/features/software-catalog/software-catalog-overview}\n * @public\n */\nexport const RESOURCE_TYPE_CATALOG_ENTITY = 'catalog-entity';\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 * @public\n */\nexport const catalogEntityReadPermission: Permission = {\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 * @public\n */\nexport const catalogEntityCreatePermission: Permission = {\n name: 'catalog.entity.create',\n attributes: {\n action: 'create',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n};\n\n/**\n * This permission is used to designate actions that involve removing one or\n * more entities from the catalog.\n * @public\n */\nexport const catalogEntityDeletePermission: Permission = {\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 * @public\n */\nexport const catalogEntityRefreshPermission: Permission = {\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 * @public\n */\nexport const catalogLocationReadPermission: Permission = {\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 * @public\n */\nexport const catalogLocationCreatePermission: Permission = {\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 * @public\n */\nexport const catalogLocationDeletePermission: Permission = {\n name: 'catalog.location.delete',\n attributes: {\n action: 'delete',\n },\n};\n"],"names":[],"mappings":";;;;MAsBa,+BAA+B;MAU/B,8BAA0C;AAAA,EACrD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MASH,gCAA4C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MAQH,gCAA4C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MAQH,iCAA6C;AAAA,EACxD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MAWH,gCAA4C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;MASC,kCAA8C;AAAA,EACzD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;MASC,kCAA8C;AAAA,EACzD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.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 { Permission } 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/software-catalog-overview}\n * @alpha\n */\nexport const RESOURCE_TYPE_CATALOG_ENTITY = 'catalog-entity';\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: Permission = {\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: Permission = {\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: Permission = {\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: Permission = {\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: Permission = {\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: Permission = {\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: Permission = {\n name: 'catalog.location.delete',\n attributes: {\n action: 'delete',\n },\n};\n"],"names":[],"mappings":";;;;MAwBa,+BAA+B;MAU/B,8BAA0C;AAAA,EACrD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MASH,gCAA4C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;MASC,gCAA4C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MAQH,iCAA6C;AAAA,EACxD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MAWH,gCAA4C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;MASC,kCAA8C;AAAA,EACzD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;MASC,kCAA8C;AAAA,EACzD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,58 +1,42 @@
1
- import { Permission } from '@backstage/plugin-permission-common';
2
-
3
- /**
4
- * {@link https://backstage.io/docs/features/software-catalog/software-catalog-overview}
5
- * @public
6
- */
7
- declare const RESOURCE_TYPE_CATALOG_ENTITY = "catalog-entity";
8
1
  /**
9
- * This permission is used to authorize actions that involve reading one or more
10
- * entities from the catalog.
2
+ * Provides shared objects useful for interacting with the catalog and its
3
+ * entities, such as catalog permissions.
11
4
  *
12
- * If this permission is not authorized, it will appear that the entity does not
13
- * exist in the catalog — both in the frontend and in API responses.
14
- * @public
15
- */
16
- declare const catalogEntityReadPermission: Permission;
17
- /**
18
- * This permission is used to authorize actions that involve creating a new
19
- * catalog entity. This includes registering an existing component into the
20
- * catalog.
21
- * @public
22
- */
23
- declare const catalogEntityCreatePermission: Permission;
24
- /**
25
- * This permission is used to designate actions that involve removing one or
26
- * more entities from the catalog.
27
- * @public
5
+ * @packageDocumentation
28
6
  */
29
- declare const catalogEntityDeletePermission: Permission;
30
- /**
31
- * This permission is used to designate refreshing one or more entities from the
32
- * catalog.
33
- * @public
34
- */
35
- declare const catalogEntityRefreshPermission: Permission;
7
+
8
+ import { IndexableDocument } from '@backstage/search-common';
9
+ import { Permission } from '@backstage/plugin-permission-common';
10
+
11
+ /* Excluded from this release type: catalogEntityCreatePermission */
12
+
13
+ /* Excluded from this release type: catalogEntityDeletePermission */
14
+
36
15
  /**
37
- * This permission is used to designate actions that involve reading one or more
38
- * locations from the catalog.
16
+ * The Document format for an Entity in the Catalog for search
39
17
  *
40
- * If this permission is not authorized, it will appear that the location does
41
- * not exist in the catalog — both in the frontend and in API responses.
42
- * @public
43
- */
44
- declare const catalogLocationReadPermission: Permission;
45
- /**
46
- * This permission is used to designate actions that involve creating catalog
47
- * locations.
48
- * @public
49
- */
50
- declare const catalogLocationCreatePermission: Permission;
51
- /**
52
- * This permission is used to designate actions that involve deleting locations
53
- * from the catalog.
54
18
  * @public
55
19
  */
56
- declare const catalogLocationDeletePermission: Permission;
20
+ export declare interface CatalogEntityDocument extends IndexableDocument {
21
+ /** @deprecated `componentType` is being renamed to `type`. During the transition both of these fields should be set to the same value, in order to avoid issues with indexing. */
22
+ componentType: string;
23
+ type: string;
24
+ namespace: string;
25
+ kind: string;
26
+ lifecycle: string;
27
+ owner: string;
28
+ }
29
+
30
+ /* Excluded from this release type: catalogEntityReadPermission */
31
+
32
+ /* Excluded from this release type: catalogEntityRefreshPermission */
33
+
34
+ /* Excluded from this release type: catalogLocationCreatePermission */
35
+
36
+ /* Excluded from this release type: catalogLocationDeletePermission */
37
+
38
+ /* Excluded from this release type: catalogLocationReadPermission */
39
+
40
+ /* Excluded from this release type: RESOURCE_TYPE_CATALOG_ENTITY */
57
41
 
58
- export { RESOURCE_TYPE_CATALOG_ENTITY, catalogEntityCreatePermission, catalogEntityDeletePermission, catalogEntityReadPermission, catalogEntityRefreshPermission, catalogLocationCreatePermission, catalogLocationDeletePermission, catalogLocationReadPermission };
42
+ export { }
package/dist/index.esm.js CHANGED
@@ -10,8 +10,7 @@ const catalogEntityCreatePermission = {
10
10
  name: "catalog.entity.create",
11
11
  attributes: {
12
12
  action: "create"
13
- },
14
- resourceType: RESOURCE_TYPE_CATALOG_ENTITY
13
+ }
15
14
  };
16
15
  const catalogEntityDeletePermission = {
17
16
  name: "catalog.entity.delete",
@@ -1 +1 @@
1
- {"version":3,"file":"index.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 { Permission } from '@backstage/plugin-permission-common';\n\n/**\n * {@link https://backstage.io/docs/features/software-catalog/software-catalog-overview}\n * @public\n */\nexport const RESOURCE_TYPE_CATALOG_ENTITY = 'catalog-entity';\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 * @public\n */\nexport const catalogEntityReadPermission: Permission = {\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 * @public\n */\nexport const catalogEntityCreatePermission: Permission = {\n name: 'catalog.entity.create',\n attributes: {\n action: 'create',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n};\n\n/**\n * This permission is used to designate actions that involve removing one or\n * more entities from the catalog.\n * @public\n */\nexport const catalogEntityDeletePermission: Permission = {\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 * @public\n */\nexport const catalogEntityRefreshPermission: Permission = {\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 * @public\n */\nexport const catalogLocationReadPermission: Permission = {\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 * @public\n */\nexport const catalogLocationCreatePermission: Permission = {\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 * @public\n */\nexport const catalogLocationDeletePermission: Permission = {\n name: 'catalog.location.delete',\n attributes: {\n action: 'delete',\n },\n};\n"],"names":[],"mappings":"MAsBa,+BAA+B;MAU/B,8BAA0C;AAAA,EACrD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MASH,gCAA4C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MAQH,gCAA4C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MAQH,iCAA6C;AAAA,EACxD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MAWH,gCAA4C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;MASC,kCAA8C;AAAA,EACzD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;MASC,kCAA8C;AAAA,EACzD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"index.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 { Permission } 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/software-catalog-overview}\n * @alpha\n */\nexport const RESOURCE_TYPE_CATALOG_ENTITY = 'catalog-entity';\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: Permission = {\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: Permission = {\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: Permission = {\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: Permission = {\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: Permission = {\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: Permission = {\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: Permission = {\n name: 'catalog.location.delete',\n attributes: {\n action: 'delete',\n },\n};\n"],"names":[],"mappings":"MAwBa,+BAA+B;MAU/B,8BAA0C;AAAA,EACrD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MASH,gCAA4C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;MASC,gCAA4C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MAQH,iCAA6C;AAAA,EACxD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA,EAEV,cAAc;AAAA;MAWH,gCAA4C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;MASC,kCAA8C;AAAA,EACzD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;MASC,kCAA8C;AAAA,EACzD,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ;AAAA;AAAA;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-common",
3
3
  "description": "Common functionalities for the catalog plugin",
4
- "version": "0.1.4",
4
+ "version": "0.2.2-next.0",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -10,7 +10,8 @@
10
10
  "access": "public",
11
11
  "main": "dist/index.cjs.js",
12
12
  "module": "dist/index.esm.js",
13
- "types": "dist/index.d.ts"
13
+ "types": "dist/index.d.ts",
14
+ "alphaTypes": "dist/index.alpha.d.ts"
14
15
  },
15
16
  "backstage": {
16
17
  "role": "common-library"
@@ -25,7 +26,7 @@
25
26
  "backstage"
26
27
  ],
27
28
  "scripts": {
28
- "build": "backstage-cli package build",
29
+ "build": "backstage-cli package build --experimental-type-build",
29
30
  "lint": "backstage-cli package lint",
30
31
  "test": "backstage-cli package test",
31
32
  "prepack": "backstage-cli package prepack",
@@ -33,14 +34,16 @@
33
34
  "clean": "backstage-cli package clean"
34
35
  },
35
36
  "dependencies": {
36
- "@backstage/plugin-permission-common": "^0.5.1"
37
+ "@backstage/plugin-permission-common": "^0.5.2",
38
+ "@backstage/search-common": "^0.3.1-next.0"
37
39
  },
38
40
  "devDependencies": {
39
- "@backstage/cli": "^0.14.0"
41
+ "@backstage/cli": "^0.15.2-next.0"
40
42
  },
41
43
  "files": [
42
- "dist"
44
+ "dist",
45
+ "alpha"
43
46
  ],
44
- "gitHead": "e244b348c473700e7d5e5fbcef38bd9f9fd1d0ba",
47
+ "gitHead": "e90d3ed129ebfce978f1adfa40c1dc2cef3f7e65",
45
48
  "module": "dist/index.esm.js"
46
49
  }