@backstage/plugin-catalog-node 1.15.2-next.0 → 1.16.0-next.1
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,23 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-node
|
|
2
2
|
|
|
3
|
+
## 1.16.0-next.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9b9737c: Added the `locationKey` option to `processingResult.entity(...)`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/backend-plugin-api@1.2.0-next.0
|
|
13
|
+
- @backstage/catalog-client@1.9.1
|
|
14
|
+
- @backstage/catalog-model@1.7.3
|
|
15
|
+
- @backstage/errors@1.2.7
|
|
16
|
+
- @backstage/types@1.2.1
|
|
17
|
+
- @backstage/plugin-catalog-common@1.1.3
|
|
18
|
+
- @backstage/plugin-permission-common@0.8.4
|
|
19
|
+
- @backstage/plugin-permission-node@0.8.8-next.0
|
|
20
|
+
|
|
3
21
|
## 1.15.2-next.0
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -40,8 +40,13 @@ const processingResult = Object.freeze({
|
|
|
40
40
|
/**
|
|
41
41
|
* Emits a child of the current entity, associated with a certain location.
|
|
42
42
|
*/
|
|
43
|
-
entity(atLocation, newEntity) {
|
|
44
|
-
return {
|
|
43
|
+
entity(atLocation, newEntity, options) {
|
|
44
|
+
return {
|
|
45
|
+
type: "entity",
|
|
46
|
+
location: atLocation,
|
|
47
|
+
entity: newEntity,
|
|
48
|
+
locationKey: options?.locationKey
|
|
49
|
+
};
|
|
45
50
|
},
|
|
46
51
|
/**
|
|
47
52
|
* Emits a relation owned by the current entity. The relation does not have to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processingResult.cjs.js","sources":["../../src/api/processingResult.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
|
|
1
|
+
{"version":3,"file":"processingResult.cjs.js","sources":["../../src/api/processingResult.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(\n atLocation: LocationSpec,\n newEntity: Entity,\n options?: {\n /**\n * Sets the location key of the emitted entity, overriding the default one derived from the location.\n *\n * To set a `null` location key the value `null` must be used.\n */\n locationKey?: string | null;\n },\n ): CatalogProcessorResult {\n return {\n type: 'entity',\n location: atLocation,\n entity: newEntity,\n locationKey: options?.locationKey,\n };\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"],"names":["NotFoundError","InputError"],"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;AAAA,KAClC;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;AAAA,KAC/B;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;AAAA,GAC1E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAS,WAAmD,EAAA;AAC1D,IAAA,OAAO,EAAE,IAAA,EAAM,UAAY,EAAA,QAAA,EAAU,WAAY,EAAA;AAAA,GACnD;AAAA;AAAA;AAAA;AAAA,EAKA,MAAA,CACE,UACA,EAAA,SAAA,EACA,OAQwB,EAAA;AACxB,IAAO,OAAA;AAAA,MACL,IAAM,EAAA,QAAA;AAAA,MACN,QAAU,EAAA,UAAA;AAAA,MACV,MAAQ,EAAA,SAAA;AAAA,MACR,aAAa,OAAS,EAAA;AAAA,KACxB;AAAA,GACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAS,IAAkD,EAAA;AACzD,IAAA,OAAO,EAAE,IAAA,EAAM,UAAY,EAAA,QAAA,EAAU,IAAK,EAAA;AAAA,GAC5C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,QAAQ,GAAqC,EAAA;AAC3C,IAAO,OAAA,EAAE,IAAM,EAAA,SAAA,EAAW,GAAI,EAAA;AAAA;AAElC,CAAU;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -180,6 +180,7 @@ type CatalogProcessorEntityResult = {
|
|
|
180
180
|
type: 'entity';
|
|
181
181
|
entity: Entity;
|
|
182
182
|
location: LocationSpec$1;
|
|
183
|
+
locationKey?: string | null;
|
|
183
184
|
};
|
|
184
185
|
/** @public */
|
|
185
186
|
type CatalogProcessorRelationResult = {
|
|
@@ -227,7 +228,14 @@ declare const processingResult: Readonly<{
|
|
|
227
228
|
/**
|
|
228
229
|
* Emits a child of the current entity, associated with a certain location.
|
|
229
230
|
*/
|
|
230
|
-
readonly entity: (atLocation: LocationSpec$1, newEntity: Entity
|
|
231
|
+
readonly entity: (atLocation: LocationSpec$1, newEntity: Entity, options?: {
|
|
232
|
+
/**
|
|
233
|
+
* Sets the location key of the emitted entity, overriding the default one derived from the location.
|
|
234
|
+
*
|
|
235
|
+
* To set a `null` location key the value `null` must be used.
|
|
236
|
+
*/
|
|
237
|
+
locationKey?: string | null;
|
|
238
|
+
}) => CatalogProcessorResult;
|
|
231
239
|
/**
|
|
232
240
|
* Emits a relation owned by the current entity. The relation does not have to
|
|
233
241
|
* start or end at the current entity. The relation only lives for as long as
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0-next.1",
|
|
4
4
|
"description": "The plugin-catalog-node module for @backstage/plugin-catalog-backend",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "node-library",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"@backstage/types": "1.2.1"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@backstage/backend-test-utils": "1.3.0-next.
|
|
86
|
-
"@backstage/cli": "0.30.0-next.
|
|
85
|
+
"@backstage/backend-test-utils": "1.3.0-next.1",
|
|
86
|
+
"@backstage/cli": "0.30.0-next.1",
|
|
87
87
|
"msw": "^1.0.0"
|
|
88
88
|
}
|
|
89
89
|
}
|