@backstage/plugin-catalog-node 1.4.6 → 1.4.7-next.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 CHANGED
@@ -1,18 +1,41 @@
1
1
  # @backstage/plugin-catalog-node
2
2
 
3
- ## 1.4.6
3
+ ## 1.4.7-next.2
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Updated dependencies
8
- - @backstage/backend-plugin-api@0.6.5
8
+ - @backstage/catalog-model@1.4.3-next.0
9
+ - @backstage/errors@1.2.3-next.0
10
+ - @backstage/backend-plugin-api@0.6.6-next.2
11
+ - @backstage/catalog-client@1.4.5-next.0
12
+ - @backstage/types@1.1.1
13
+ - @backstage/plugin-catalog-common@1.0.17-next.0
14
+
15
+ ## 1.4.6-next.1
16
+
17
+ ### Patch Changes
18
+
19
+ - 7a2e2924c7: Added docs to `processingResult`
20
+ - Updated dependencies
21
+ - @backstage/backend-plugin-api@0.6.5-next.1
22
+ - @backstage/catalog-client@1.4.4
23
+ - @backstage/catalog-model@1.4.2
24
+ - @backstage/errors@1.2.2
25
+ - @backstage/types@1.1.1
26
+ - @backstage/plugin-catalog-common@1.0.16
9
27
 
10
- ## 1.4.5
28
+ ## 1.4.6-next.0
11
29
 
12
30
  ### Patch Changes
13
31
 
14
32
  - Updated dependencies
15
- - @backstage/backend-plugin-api@0.6.4
33
+ - @backstage/backend-plugin-api@0.6.5-next.0
34
+ - @backstage/catalog-client@1.4.4
35
+ - @backstage/catalog-model@1.4.2
36
+ - @backstage/errors@1.2.2
37
+ - @backstage/types@1.1.1
38
+ - @backstage/plugin-catalog-common@1.0.16
16
39
 
17
40
  ## 1.4.4
18
41
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-node",
3
- "version": "1.4.6",
3
+ "version": "1.4.7-next.2",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/index.cjs.js CHANGED
@@ -7,6 +7,9 @@ var catalogModel = require('@backstage/catalog-model');
7
7
  var crypto = require('crypto');
8
8
 
9
9
  const processingResult = Object.freeze({
10
+ /**
11
+ * Associates a NotFoundError with the processing state of the current entity.
12
+ */
10
13
  notFoundError(atLocation, message) {
11
14
  return {
12
15
  type: "error",
@@ -14,6 +17,9 @@ const processingResult = Object.freeze({
14
17
  error: new errors.NotFoundError(message)
15
18
  };
16
19
  },
20
+ /**
21
+ * Associates an InputError with the processing state of the current entity.
22
+ */
17
23
  inputError(atLocation, message) {
18
24
  return {
19
25
  type: "error",
@@ -21,18 +27,39 @@ const processingResult = Object.freeze({
21
27
  error: new errors.InputError(message)
22
28
  };
23
29
  },
30
+ /**
31
+ * Associates a general Error with the processing state of the current entity.
32
+ */
24
33
  generalError(atLocation, message) {
25
34
  return { type: "error", location: atLocation, error: new Error(message) };
26
35
  },
36
+ /**
37
+ * Emits a location. In effect, this is analogous to emitting a Location kind
38
+ * child entity. This is commonly used in discovery processors. Do not use
39
+ * this while processing Location entities.
40
+ */
27
41
  location(newLocation) {
28
42
  return { type: "location", location: newLocation };
29
43
  },
44
+ /**
45
+ * Emits a child of the current entity, associated with a certain location.
46
+ */
30
47
  entity(atLocation, newEntity) {
31
48
  return { type: "entity", location: atLocation, entity: newEntity };
32
49
  },
50
+ /**
51
+ * Emits a relation owned by the current entity. The relation does not have to
52
+ * start or end at the current entity. The relation only lives for as long as
53
+ * the current entity lives.
54
+ */
33
55
  relation(spec) {
34
56
  return { type: "relation", relation: spec };
35
57
  },
58
+ /**
59
+ * Associates the given refresh key with the current entity. The effect of
60
+ * this is that the entity will be marked for refresh when such requests are
61
+ * made.
62
+ */
36
63
  refresh(key) {
37
64
  return { type: "refresh", key };
38
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/api/processingResult.ts","../src/conversion.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 { InputError, NotFoundError } from '@backstage/errors';\nimport { Entity } from '@backstage/catalog-model';\nimport { CatalogProcessorResult } from './processor';\nimport { EntityRelationSpec } from './common';\nimport { LocationSpec } from '@backstage/plugin-catalog-common';\n\n/**\n * Factory functions for the standard processing result types.\n *\n * @public\n */\nexport const processingResult = Object.freeze({\n notFoundError(\n atLocation: LocationSpec,\n message: string,\n ): CatalogProcessorResult {\n return {\n type: 'error',\n location: atLocation,\n error: new NotFoundError(message),\n };\n },\n\n inputError(\n atLocation: LocationSpec,\n message: string,\n ): CatalogProcessorResult {\n return {\n type: 'error',\n location: atLocation,\n error: new InputError(message),\n };\n },\n\n generalError(\n atLocation: LocationSpec,\n message: string,\n ): CatalogProcessorResult {\n return { type: 'error', location: atLocation, error: new Error(message) };\n },\n\n location(newLocation: LocationSpec): CatalogProcessorResult {\n return { type: 'location', location: newLocation };\n },\n\n entity(atLocation: LocationSpec, newEntity: Entity): CatalogProcessorResult {\n return { type: 'entity', location: atLocation, entity: newEntity };\n },\n\n relation(spec: EntityRelationSpec): CatalogProcessorResult {\n return { type: 'relation', relation: spec };\n },\n\n refresh(key: string): CatalogProcessorResult {\n return { type: 'refresh', key };\n },\n} as const);\n","/*\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 Entity,\n LocationEntityV1alpha1,\n ANNOTATION_LOCATION,\n ANNOTATION_ORIGIN_LOCATION,\n stringifyEntityRef,\n stringifyLocationRef,\n} from '@backstage/catalog-model';\nimport { createHash } from 'crypto';\nimport { LocationSpec } from '@backstage/plugin-catalog-common';\n\n/**\n * A standard way of producing a machine generated name for a location.\n *\n * @public\n */\nexport function locationSpecToMetadataName(location: LocationSpec) {\n const hash = createHash('sha1')\n .update(`${location.type}:${location.target}`)\n .digest('hex');\n return `generated-${hash}`;\n}\n\n/**\n * A standard way of producing a machine generated Location kind entity for a\n * location.\n *\n * @public\n */\nexport function locationSpecToLocationEntity(opts: {\n location: LocationSpec;\n parentEntity?: Entity;\n}): LocationEntityV1alpha1 {\n const location = opts.location;\n const parentEntity = opts.parentEntity;\n\n let ownLocation: string;\n let originLocation: string;\n if (parentEntity) {\n const maybeOwnLocation =\n parentEntity.metadata.annotations?.[ANNOTATION_LOCATION];\n if (!maybeOwnLocation) {\n throw new Error(\n `Parent entity '${stringifyEntityRef(\n parentEntity,\n )}' of location '${stringifyLocationRef(\n location,\n )}' does not have a location annotation`,\n );\n }\n ownLocation = maybeOwnLocation;\n const maybeOriginLocation =\n parentEntity.metadata.annotations?.[ANNOTATION_ORIGIN_LOCATION];\n if (!maybeOriginLocation) {\n throw new Error(\n `Parent entity '${stringifyEntityRef(\n parentEntity,\n )}' of location '${stringifyLocationRef(\n location,\n )}' does not have an origin location annotation`,\n );\n }\n originLocation = maybeOriginLocation;\n } else {\n ownLocation = stringifyLocationRef(location);\n originLocation = ownLocation;\n }\n\n const result: LocationEntityV1alpha1 = {\n apiVersion: 'backstage.io/v1alpha1',\n kind: 'Location',\n metadata: {\n name: locationSpecToMetadataName(location),\n annotations: {\n [ANNOTATION_LOCATION]: ownLocation,\n [ANNOTATION_ORIGIN_LOCATION]: originLocation,\n },\n },\n spec: {\n type: location.type,\n target: location.target,\n presence: location.presence,\n },\n };\n\n return result;\n}\n"],"names":["NotFoundError","InputError","createHash","ANNOTATION_LOCATION","stringifyEntityRef","stringifyLocationRef","ANNOTATION_ORIGIN_LOCATION"],"mappings":";;;;;;;;AA2Ba,MAAA,gBAAA,GAAmB,OAAO,MAAO,CAAA;AAAA,EAC5C,aAAA,CACE,YACA,OACwB,EAAA;AACxB,IAAO,OAAA;AAAA,MACL,IAAM,EAAA,OAAA;AAAA,MACN,QAAU,EAAA,UAAA;AAAA,MACV,KAAA,EAAO,IAAIA,oBAAA,CAAc,OAAO,CAAA;AAAA,KAClC,CAAA;AAAA,GACF;AAAA,EAEA,UAAA,CACE,YACA,OACwB,EAAA;AACxB,IAAO,OAAA;AAAA,MACL,IAAM,EAAA,OAAA;AAAA,MACN,QAAU,EAAA,UAAA;AAAA,MACV,KAAA,EAAO,IAAIC,iBAAA,CAAW,OAAO,CAAA;AAAA,KAC/B,CAAA;AAAA,GACF;AAAA,EAEA,YAAA,CACE,YACA,OACwB,EAAA;AACxB,IAAO,OAAA,EAAE,MAAM,OAAS,EAAA,QAAA,EAAU,YAAY,KAAO,EAAA,IAAI,KAAM,CAAA,OAAO,CAAE,EAAA,CAAA;AAAA,GAC1E;AAAA,EAEA,SAAS,WAAmD,EAAA;AAC1D,IAAA,OAAO,EAAE,IAAA,EAAM,UAAY,EAAA,QAAA,EAAU,WAAY,EAAA,CAAA;AAAA,GACnD;AAAA,EAEA,MAAA,CAAO,YAA0B,SAA2C,EAAA;AAC1E,IAAA,OAAO,EAAE,IAAM,EAAA,QAAA,EAAU,QAAU,EAAA,UAAA,EAAY,QAAQ,SAAU,EAAA,CAAA;AAAA,GACnE;AAAA,EAEA,SAAS,IAAkD,EAAA;AACzD,IAAA,OAAO,EAAE,IAAA,EAAM,UAAY,EAAA,QAAA,EAAU,IAAK,EAAA,CAAA;AAAA,GAC5C;AAAA,EAEA,QAAQ,GAAqC,EAAA;AAC3C,IAAO,OAAA,EAAE,IAAM,EAAA,SAAA,EAAW,GAAI,EA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ACR,CAAkB,eAAA,EAAAF,+BAAA;AAAA,UAChB,YAAA;AAAA,SACD,CAAkB,eAAA,EAAAC,iCAAA;AAAA,UACjB,QAAA;AAAA,SACD,CAAA,6CAAA,CAAA;AAAA,OACH,CAAA;AAAA,KACF;AACA,IAAiB,cAAA,GAAA,mBAAA,CAAA;AAAA,GACZ,MAAA;AACL,IAAA,WAAA,GAAcA,kCAAqB,QAAQ,CAAA,CAAA;AAC3C,IAAiB,cAAA,GAAA,WAAA,CAAA;AAAA,GACnB;AAEA,EAAA,MAAM,MAAiC,GAAA;AAAA,IACrC,UAAY,EAAA,uBAAA;AAAA,IACZ,IAAM,EAAA,UAAA;AAAA,IACN,QAAU,EAAA;AAAA,MACR,IAAA,EAAM,2BAA2B,QAAQ,CAAA;AAAA,MACzC,WAAa,EAAA;AAAA,QACX,CAACF,gCAAmB,GAAG,WAAA;AAAA,QACvB,CAACG,uCAA0B,GAAG,cAAA;AAAA,OAChC;AAAA,KACF;AAAA,IACA,IAAM,EAAA;AAAA,MACJ,MAAM,QAAS,CAAA,IAAA;AAAA,MACf,QAAQ,QAAS,CAAA,MAAA;AAAA,MACjB,UAAU,QAAS,CAAA,QAAA;AAAA,KACrB;AAAA,GACF,CAAA;AAEA,EAAO,OAAA,MAAA,CAAA;AACT;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/api/processingResult.ts","../src/conversion.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 { InputError, NotFoundError } from '@backstage/errors';\nimport { Entity } from '@backstage/catalog-model';\nimport { CatalogProcessorResult } from './processor';\nimport { EntityRelationSpec } from './common';\nimport { LocationSpec } from '@backstage/plugin-catalog-common';\n\n/**\n * Factory functions for the standard processing result types.\n *\n * @public\n */\nexport const processingResult = Object.freeze({\n /**\n * Associates a NotFoundError with the processing state of the current entity.\n */\n notFoundError(\n atLocation: LocationSpec,\n message: string,\n ): CatalogProcessorResult {\n return {\n type: 'error',\n location: atLocation,\n error: new NotFoundError(message),\n };\n },\n\n /**\n * Associates an InputError with the processing state of the current entity.\n */\n inputError(\n atLocation: LocationSpec,\n message: string,\n ): CatalogProcessorResult {\n return {\n type: 'error',\n location: atLocation,\n error: new InputError(message),\n };\n },\n\n /**\n * Associates a general Error with the processing state of the current entity.\n */\n generalError(\n atLocation: LocationSpec,\n message: string,\n ): CatalogProcessorResult {\n return { type: 'error', location: atLocation, error: new Error(message) };\n },\n\n /**\n * Emits a location. In effect, this is analogous to emitting a Location kind\n * child entity. This is commonly used in discovery processors. Do not use\n * this while processing Location entities.\n */\n location(newLocation: LocationSpec): CatalogProcessorResult {\n return { type: 'location', location: newLocation };\n },\n\n /**\n * Emits a child of the current entity, associated with a certain location.\n */\n entity(atLocation: LocationSpec, newEntity: Entity): CatalogProcessorResult {\n return { type: 'entity', location: atLocation, entity: newEntity };\n },\n\n /**\n * Emits a relation owned by the current entity. The relation does not have to\n * start or end at the current entity. The relation only lives for as long as\n * the current entity lives.\n */\n relation(spec: EntityRelationSpec): CatalogProcessorResult {\n return { type: 'relation', relation: spec };\n },\n\n /**\n * Associates the given refresh key with the current entity. The effect of\n * this is that the entity will be marked for refresh when such requests are\n * made.\n */\n refresh(key: string): CatalogProcessorResult {\n return { type: 'refresh', key };\n },\n} as const);\n","/*\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 Entity,\n LocationEntityV1alpha1,\n ANNOTATION_LOCATION,\n ANNOTATION_ORIGIN_LOCATION,\n stringifyEntityRef,\n stringifyLocationRef,\n} from '@backstage/catalog-model';\nimport { createHash } from 'crypto';\nimport { LocationSpec } from '@backstage/plugin-catalog-common';\n\n/**\n * A standard way of producing a machine generated name for a location.\n *\n * @public\n */\nexport function locationSpecToMetadataName(location: LocationSpec) {\n const hash = createHash('sha1')\n .update(`${location.type}:${location.target}`)\n .digest('hex');\n return `generated-${hash}`;\n}\n\n/**\n * A standard way of producing a machine generated Location kind entity for a\n * location.\n *\n * @public\n */\nexport function locationSpecToLocationEntity(opts: {\n location: LocationSpec;\n parentEntity?: Entity;\n}): LocationEntityV1alpha1 {\n const location = opts.location;\n const parentEntity = opts.parentEntity;\n\n let ownLocation: string;\n let originLocation: string;\n if (parentEntity) {\n const maybeOwnLocation =\n parentEntity.metadata.annotations?.[ANNOTATION_LOCATION];\n if (!maybeOwnLocation) {\n throw new Error(\n `Parent entity '${stringifyEntityRef(\n parentEntity,\n )}' of location '${stringifyLocationRef(\n location,\n )}' does not have a location annotation`,\n );\n }\n ownLocation = maybeOwnLocation;\n const maybeOriginLocation =\n parentEntity.metadata.annotations?.[ANNOTATION_ORIGIN_LOCATION];\n if (!maybeOriginLocation) {\n throw new Error(\n `Parent entity '${stringifyEntityRef(\n parentEntity,\n )}' of location '${stringifyLocationRef(\n location,\n )}' does not have an origin location annotation`,\n );\n }\n originLocation = maybeOriginLocation;\n } else {\n ownLocation = stringifyLocationRef(location);\n originLocation = ownLocation;\n }\n\n const result: LocationEntityV1alpha1 = {\n apiVersion: 'backstage.io/v1alpha1',\n kind: 'Location',\n metadata: {\n name: locationSpecToMetadataName(location),\n annotations: {\n [ANNOTATION_LOCATION]: ownLocation,\n [ANNOTATION_ORIGIN_LOCATION]: originLocation,\n },\n },\n spec: {\n type: location.type,\n target: location.target,\n presence: location.presence,\n },\n };\n\n return result;\n}\n"],"names":["NotFoundError","InputError","createHash","ANNOTATION_LOCATION","stringifyEntityRef","stringifyLocationRef","ANNOTATION_ORIGIN_LOCATION"],"mappings":";;;;;;;;AA2Ba,MAAA,gBAAA,GAAmB,OAAO,MAAO,CAAA;AAAA;AAAA;AAAA;AAAA,EAI5C,aAAA,CACE,YACA,OACwB,EAAA;AACxB,IAAO,OAAA;AAAA,MACL,IAAM,EAAA,OAAA;AAAA,MACN,QAAU,EAAA,UAAA;AAAA,MACV,KAAA,EAAO,IAAIA,oBAAA,CAAc,OAAO,CAAA;AAAA,KAClC,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA,EAKA,UAAA,CACE,YACA,OACwB,EAAA;AACxB,IAAO,OAAA;AAAA,MACL,IAAM,EAAA,OAAA;AAAA,MACN,QAAU,EAAA,UAAA;AAAA,MACV,KAAA,EAAO,IAAIC,iBAAA,CAAW,OAAO,CAAA;AAAA,KAC/B,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA,EAKA,YAAA,CACE,YACA,OACwB,EAAA;AACxB,IAAO,OAAA,EAAE,MAAM,OAAS,EAAA,QAAA,EAAU,YAAY,KAAO,EAAA,IAAI,KAAM,CAAA,OAAO,CAAE,EAAA,CAAA;AAAA,GAC1E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAS,WAAmD,EAAA;AAC1D,IAAA,OAAO,EAAE,IAAA,EAAM,UAAY,EAAA,QAAA,EAAU,WAAY,EAAA,CAAA;AAAA,GACnD;AAAA;AAAA;AAAA;AAAA,EAKA,MAAA,CAAO,YAA0B,SAA2C,EAAA;AAC1E,IAAA,OAAO,EAAE,IAAM,EAAA,QAAA,EAAU,QAAU,EAAA,UAAA,EAAY,QAAQ,SAAU,EAAA,CAAA;AAAA,GACnE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SA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AA;AACd,IAAA,MAAM,mBACJ,GAAA,CAAA,EAAA,GAAA,YAAA,CAAa,QAAS,CAAA,WAAA,KAAtB,IAAoC,GAAA,KAAA,CAAA,GAAA,EAAA,CAAAC,uCAAA,CAAA,CAAA;AACtC,IAAA,IAAI,CAAC,mBAAqB,EAAA;AACxB,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,CAAkB,eAAA,EAAAF,+BAAA;AAAA,UAChB,YAAA;AAAA,SACD,CAAkB,eAAA,EAAAC,iCAAA;AAAA,UACjB,QAAA;AAAA,SACD,CAAA,6CAAA,CAAA;AAAA,OACH,CAAA;AAAA,KACF;AACA,IAAiB,cAAA,GAAA,mBAAA,CAAA;AAAA,GACZ,MAAA;AACL,IAAA,WAAA,GAAcA,kCAAqB,QAAQ,CAAA,CAAA;AAC3C,IAAiB,cAAA,GAAA,WAAA,CAAA;AAAA,GACnB;AAEA,EAAA,MAAM,MAAiC,GAAA;AAAA,IACrC,UAAY,EAAA,uBAAA;AAAA,IACZ,IAAM,EAAA,UAAA;AAAA,IACN,QAAU,EAAA;AAAA,MACR,IAAA,EAAM,2BAA2B,QAAQ,CAAA;AAAA,MACzC,WAAa,EAAA;AAAA,QACX,CAACF,gCAAmB,GAAG,WAAA;AAAA,QACvB,CAACG,uCAA0B,GAAG,cAAA;AAAA,OAChC;AAAA,KACF;AAAA,IACA,IAAM,EAAA;AAAA,MACJ,MAAM,QAAS,CAAA,IAAA;AAAA,MACf,QAAQ,QAAS,CAAA,MAAA;AAAA,MACjB,UAAU,QAAS,CAAA,QAAA;AAAA,KACrB;AAAA,GACF,CAAA;AAEA,EAAO,OAAA,MAAA,CAAA;AACT;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -171,12 +171,39 @@ type CatalogProcessorResult = CatalogProcessorLocationResult | CatalogProcessorE
171
171
  * @public
172
172
  */
173
173
  declare const processingResult: Readonly<{
174
+ /**
175
+ * Associates a NotFoundError with the processing state of the current entity.
176
+ */
174
177
  readonly notFoundError: (atLocation: LocationSpec$1, message: string) => CatalogProcessorResult;
178
+ /**
179
+ * Associates an InputError with the processing state of the current entity.
180
+ */
175
181
  readonly inputError: (atLocation: LocationSpec$1, message: string) => CatalogProcessorResult;
182
+ /**
183
+ * Associates a general Error with the processing state of the current entity.
184
+ */
176
185
  readonly generalError: (atLocation: LocationSpec$1, message: string) => CatalogProcessorResult;
186
+ /**
187
+ * Emits a location. In effect, this is analogous to emitting a Location kind
188
+ * child entity. This is commonly used in discovery processors. Do not use
189
+ * this while processing Location entities.
190
+ */
177
191
  readonly location: (newLocation: LocationSpec$1) => CatalogProcessorResult;
192
+ /**
193
+ * Emits a child of the current entity, associated with a certain location.
194
+ */
178
195
  readonly entity: (atLocation: LocationSpec$1, newEntity: Entity) => CatalogProcessorResult;
196
+ /**
197
+ * Emits a relation owned by the current entity. The relation does not have to
198
+ * start or end at the current entity. The relation only lives for as long as
199
+ * the current entity lives.
200
+ */
179
201
  readonly relation: (spec: EntityRelationSpec) => CatalogProcessorResult;
202
+ /**
203
+ * Associates the given refresh key with the current entity. The effect of
204
+ * this is that the entity will be marked for refresh when such requests are
205
+ * made.
206
+ */
180
207
  readonly refresh: (key: string) => CatalogProcessorResult;
181
208
  }>;
182
209
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-node",
3
3
  "description": "The plugin-catalog-node module for @backstage/plugin-catalog-backend",
4
- "version": "1.4.6",
4
+ "version": "1.4.7-next.2",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -40,17 +40,17 @@
40
40
  "postpack": "backstage-cli package postpack"
41
41
  },
42
42
  "dependencies": {
43
- "@backstage/backend-plugin-api": "^0.6.5",
44
- "@backstage/catalog-client": "^1.4.4",
45
- "@backstage/catalog-model": "^1.4.2",
46
- "@backstage/errors": "^1.2.2",
47
- "@backstage/plugin-catalog-common": "^1.0.16",
43
+ "@backstage/backend-plugin-api": "^0.6.6-next.2",
44
+ "@backstage/catalog-client": "^1.4.5-next.0",
45
+ "@backstage/catalog-model": "^1.4.3-next.0",
46
+ "@backstage/errors": "^1.2.3-next.0",
47
+ "@backstage/plugin-catalog-common": "^1.0.17-next.0",
48
48
  "@backstage/types": "^1.1.1"
49
49
  },
50
50
  "devDependencies": {
51
- "@backstage/backend-common": "^0.19.7",
52
- "@backstage/backend-test-utils": "^0.2.6",
53
- "@backstage/cli": "^0.22.13"
51
+ "@backstage/backend-common": "^0.19.8-next.2",
52
+ "@backstage/backend-test-utils": "^0.2.7-next.2",
53
+ "@backstage/cli": "^0.23.0-next.2"
54
54
  },
55
55
  "files": [
56
56
  "dist",