@backstage/plugin-events-backend-test-utils 0.1.46 → 0.1.47

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,19 @@
1
1
  # @backstage/plugin-events-backend-test-utils
2
2
 
3
+ ## 0.1.47
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/plugin-events-node@0.4.14
9
+
10
+ ## 0.1.47-next.0
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ - @backstage/plugin-events-node@0.4.14-next.0
16
+
3
17
  ## 0.1.46
4
18
 
5
19
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"TestEventBroker.cjs.js","sources":["../../src/testUtils/TestEventBroker.ts"],"sourcesContent":["/*\n * Copyright 2022 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 EventBroker,\n EventParams,\n EventSubscriber,\n} from '@backstage/plugin-events-node';\n\n/**\n * @public\n * @deprecated use `TestEventsService` instead\n */\nexport class TestEventBroker implements EventBroker {\n readonly published: EventParams[] = [];\n readonly subscribed: EventSubscriber[] = [];\n\n async publish(params: EventParams): Promise<void> {\n this.published.push(params);\n }\n\n subscribe(\n ...subscribers: Array<EventSubscriber | Array<EventSubscriber>>\n ): void {\n this.subscribed.push(...subscribers.flat());\n }\n}\n"],"names":[],"mappings":";;AA0BO,MAAM,eAAuC,CAAA;AAAA,EACzC,YAA2B,EAAC;AAAA,EAC5B,aAAgC,EAAC;AAAA,EAE1C,MAAM,QAAQ,MAAoC,EAAA;AAChD,IAAK,IAAA,CAAA,SAAA,CAAU,KAAK,MAAM,CAAA;AAAA;AAC5B,EAEA,aACK,WACG,EAAA;AACN,IAAA,IAAA,CAAK,UAAW,CAAA,IAAA,CAAK,GAAG,WAAA,CAAY,MAAM,CAAA;AAAA;AAE9C;;;;"}
1
+ {"version":3,"file":"TestEventBroker.cjs.js","sources":["../../src/testUtils/TestEventBroker.ts"],"sourcesContent":["/*\n * Copyright 2022 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 EventBroker,\n EventParams,\n EventSubscriber,\n} from '@backstage/plugin-events-node';\n\n/**\n * @public\n * @deprecated use `TestEventsService` instead\n */\nexport class TestEventBroker implements EventBroker {\n readonly published: EventParams[] = [];\n readonly subscribed: EventSubscriber[] = [];\n\n async publish(params: EventParams): Promise<void> {\n this.published.push(params);\n }\n\n subscribe(\n ...subscribers: Array<EventSubscriber | Array<EventSubscriber>>\n ): void {\n this.subscribed.push(...subscribers.flat());\n }\n}\n"],"names":[],"mappings":";;AA0BO,MAAM,eAAA,CAAuC;AAAA,EACzC,YAA2B,EAAC;AAAA,EAC5B,aAAgC,EAAC;AAAA,EAE1C,MAAM,QAAQ,MAAA,EAAoC;AAChD,IAAA,IAAA,CAAK,SAAA,CAAU,KAAK,MAAM,CAAA;AAAA,EAC5B;AAAA,EAEA,aACK,WAAA,EACG;AACN,IAAA,IAAA,CAAK,UAAA,CAAW,IAAA,CAAK,GAAG,WAAA,CAAY,MAAM,CAAA;AAAA,EAC5C;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TestEventPublisher.cjs.js","sources":["../../src/testUtils/TestEventPublisher.ts"],"sourcesContent":["/*\n * Copyright 2022 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 { EventBroker, EventPublisher } from '@backstage/plugin-events-node';\n\n/**\n * @public\n * @deprecated `EventPublisher` was replaced by `EventsService.publish`\n */\nexport class TestEventPublisher implements EventPublisher {\n #eventBroker?: EventBroker;\n\n async setEventBroker(eventBroker: EventBroker): Promise<void> {\n this.#eventBroker = eventBroker;\n }\n\n get eventBroker() {\n return this.#eventBroker;\n }\n}\n"],"names":[],"mappings":";;AAsBO,MAAM,kBAA6C,CAAA;AAAA,EACxD,YAAA;AAAA,EAEA,MAAM,eAAe,WAAyC,EAAA;AAC5D,IAAA,IAAA,CAAK,YAAe,GAAA,WAAA;AAAA;AACtB,EAEA,IAAI,WAAc,GAAA;AAChB,IAAA,OAAO,IAAK,CAAA,YAAA;AAAA;AAEhB;;;;"}
1
+ {"version":3,"file":"TestEventPublisher.cjs.js","sources":["../../src/testUtils/TestEventPublisher.ts"],"sourcesContent":["/*\n * Copyright 2022 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 { EventBroker, EventPublisher } from '@backstage/plugin-events-node';\n\n/**\n * @public\n * @deprecated `EventPublisher` was replaced by `EventsService.publish`\n */\nexport class TestEventPublisher implements EventPublisher {\n #eventBroker?: EventBroker;\n\n async setEventBroker(eventBroker: EventBroker): Promise<void> {\n this.#eventBroker = eventBroker;\n }\n\n get eventBroker() {\n return this.#eventBroker;\n }\n}\n"],"names":[],"mappings":";;AAsBO,MAAM,kBAAA,CAA6C;AAAA,EACxD,YAAA;AAAA,EAEA,MAAM,eAAe,WAAA,EAAyC;AAC5D,IAAA,IAAA,CAAK,YAAA,GAAe,WAAA;AAAA,EACtB;AAAA,EAEA,IAAI,WAAA,GAAc;AAChB,IAAA,OAAO,IAAA,CAAK,YAAA;AAAA,EACd;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TestEventSubscriber.cjs.js","sources":["../../src/testUtils/TestEventSubscriber.ts"],"sourcesContent":["/*\n * Copyright 2022 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 { EventParams, EventSubscriber } from '@backstage/plugin-events-node';\n\n/**\n * @public\n * @deprecated `EventSubscriber` was replaced by `EventsService.subscribe`.\n */\nexport class TestEventSubscriber implements EventSubscriber {\n readonly name: string;\n readonly topics: string[];\n\n readonly receivedEvents: Record<string, EventParams[]> = {};\n\n constructor(name: string, topics: string[]) {\n this.name = name;\n this.topics = topics;\n }\n\n supportsEventTopics(): string[] {\n return this.topics;\n }\n\n async onEvent(params: EventParams): Promise<void> {\n this.receivedEvents[params.topic] = this.receivedEvents[params.topic] ?? [];\n this.receivedEvents[params.topic].push(params);\n }\n}\n"],"names":[],"mappings":";;AAsBO,MAAM,mBAA+C,CAAA;AAAA,EACjD,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,iBAAgD,EAAC;AAAA,EAE1D,WAAA,CAAY,MAAc,MAAkB,EAAA;AAC1C,IAAA,IAAA,CAAK,IAAO,GAAA,IAAA;AACZ,IAAA,IAAA,CAAK,MAAS,GAAA,MAAA;AAAA;AAChB,EAEA,mBAAgC,GAAA;AAC9B,IAAA,OAAO,IAAK,CAAA,MAAA;AAAA;AACd,EAEA,MAAM,QAAQ,MAAoC,EAAA;AAChD,IAAK,IAAA,CAAA,cAAA,CAAe,OAAO,KAAK,CAAA,GAAI,KAAK,cAAe,CAAA,MAAA,CAAO,KAAK,CAAA,IAAK,EAAC;AAC1E,IAAA,IAAA,CAAK,cAAe,CAAA,MAAA,CAAO,KAAK,CAAA,CAAE,KAAK,MAAM,CAAA;AAAA;AAEjD;;;;"}
1
+ {"version":3,"file":"TestEventSubscriber.cjs.js","sources":["../../src/testUtils/TestEventSubscriber.ts"],"sourcesContent":["/*\n * Copyright 2022 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 { EventParams, EventSubscriber } from '@backstage/plugin-events-node';\n\n/**\n * @public\n * @deprecated `EventSubscriber` was replaced by `EventsService.subscribe`.\n */\nexport class TestEventSubscriber implements EventSubscriber {\n readonly name: string;\n readonly topics: string[];\n\n readonly receivedEvents: Record<string, EventParams[]> = {};\n\n constructor(name: string, topics: string[]) {\n this.name = name;\n this.topics = topics;\n }\n\n supportsEventTopics(): string[] {\n return this.topics;\n }\n\n async onEvent(params: EventParams): Promise<void> {\n this.receivedEvents[params.topic] = this.receivedEvents[params.topic] ?? [];\n this.receivedEvents[params.topic].push(params);\n }\n}\n"],"names":[],"mappings":";;AAsBO,MAAM,mBAAA,CAA+C;AAAA,EACjD,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,iBAAgD,EAAC;AAAA,EAE1D,WAAA,CAAY,MAAc,MAAA,EAAkB;AAC1C,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAChB;AAAA,EAEA,mBAAA,GAAgC;AAC9B,IAAA,OAAO,IAAA,CAAK,MAAA;AAAA,EACd;AAAA,EAEA,MAAM,QAAQ,MAAA,EAAoC;AAChD,IAAA,IAAA,CAAK,cAAA,CAAe,OAAO,KAAK,CAAA,GAAI,KAAK,cAAA,CAAe,MAAA,CAAO,KAAK,CAAA,IAAK,EAAC;AAC1E,IAAA,IAAA,CAAK,cAAA,CAAe,MAAA,CAAO,KAAK,CAAA,CAAE,KAAK,MAAM,CAAA;AAAA,EAC/C;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TestEventsService.cjs.js","sources":["../../src/testUtils/TestEventsService.ts"],"sourcesContent":["/*\n * Copyright 2024 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 EventParams,\n EventsService,\n EventsServiceSubscribeOptions,\n} from '@backstage/plugin-events-node';\n\n/** @public */\nexport class TestEventsService implements EventsService {\n #published: EventParams[] = [];\n #subscribed: EventsServiceSubscribeOptions[] = [];\n\n async publish(params: EventParams): Promise<void> {\n this.#published.push(params);\n }\n\n async subscribe(options: EventsServiceSubscribeOptions): Promise<void> {\n this.#subscribed.push(options);\n }\n\n get published(): EventParams[] {\n return this.#published;\n }\n\n get subscribed(): EventsServiceSubscribeOptions[] {\n return this.#subscribed;\n }\n\n reset(): void {\n this.#published = [];\n this.#subscribed = [];\n }\n}\n"],"names":[],"mappings":";;AAuBO,MAAM,iBAA2C,CAAA;AAAA,EACtD,aAA4B,EAAC;AAAA,EAC7B,cAA+C,EAAC;AAAA,EAEhD,MAAM,QAAQ,MAAoC,EAAA;AAChD,IAAK,IAAA,CAAA,UAAA,CAAW,KAAK,MAAM,CAAA;AAAA;AAC7B,EAEA,MAAM,UAAU,OAAuD,EAAA;AACrE,IAAK,IAAA,CAAA,WAAA,CAAY,KAAK,OAAO,CAAA;AAAA;AAC/B,EAEA,IAAI,SAA2B,GAAA;AAC7B,IAAA,OAAO,IAAK,CAAA,UAAA;AAAA;AACd,EAEA,IAAI,UAA8C,GAAA;AAChD,IAAA,OAAO,IAAK,CAAA,WAAA;AAAA;AACd,EAEA,KAAc,GAAA;AACZ,IAAA,IAAA,CAAK,aAAa,EAAC;AACnB,IAAA,IAAA,CAAK,cAAc,EAAC;AAAA;AAExB;;;;"}
1
+ {"version":3,"file":"TestEventsService.cjs.js","sources":["../../src/testUtils/TestEventsService.ts"],"sourcesContent":["/*\n * Copyright 2024 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 EventParams,\n EventsService,\n EventsServiceSubscribeOptions,\n} from '@backstage/plugin-events-node';\n\n/** @public */\nexport class TestEventsService implements EventsService {\n #published: EventParams[] = [];\n #subscribed: EventsServiceSubscribeOptions[] = [];\n\n async publish(params: EventParams): Promise<void> {\n this.#published.push(params);\n }\n\n async subscribe(options: EventsServiceSubscribeOptions): Promise<void> {\n this.#subscribed.push(options);\n }\n\n get published(): EventParams[] {\n return this.#published;\n }\n\n get subscribed(): EventsServiceSubscribeOptions[] {\n return this.#subscribed;\n }\n\n reset(): void {\n this.#published = [];\n this.#subscribed = [];\n }\n}\n"],"names":[],"mappings":";;AAuBO,MAAM,iBAAA,CAA2C;AAAA,EACtD,aAA4B,EAAC;AAAA,EAC7B,cAA+C,EAAC;AAAA,EAEhD,MAAM,QAAQ,MAAA,EAAoC;AAChD,IAAA,IAAA,CAAK,UAAA,CAAW,KAAK,MAAM,CAAA;AAAA,EAC7B;AAAA,EAEA,MAAM,UAAU,OAAA,EAAuD;AACrE,IAAA,IAAA,CAAK,WAAA,CAAY,KAAK,OAAO,CAAA;AAAA,EAC/B;AAAA,EAEA,IAAI,SAAA,GAA2B;AAC7B,IAAA,OAAO,IAAA,CAAK,UAAA;AAAA,EACd;AAAA,EAEA,IAAI,UAAA,GAA8C;AAChD,IAAA,OAAO,IAAA,CAAK,WAAA;AAAA,EACd;AAAA,EAEA,KAAA,GAAc;AACZ,IAAA,IAAA,CAAK,aAAa,EAAC;AACnB,IAAA,IAAA,CAAK,cAAc,EAAC;AAAA,EACtB;AACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-events-backend-test-utils",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "The plugin-events-backend-test-utils for @backstage/plugin-events-node",
5
5
  "backstage": {
6
6
  "role": "node-library",
@@ -38,10 +38,10 @@
38
38
  "test": "backstage-cli package test"
39
39
  },
40
40
  "dependencies": {
41
- "@backstage/plugin-events-node": "^0.4.13"
41
+ "@backstage/plugin-events-node": "^0.4.14"
42
42
  },
43
43
  "devDependencies": {
44
- "@backstage/cli": "^0.33.1"
44
+ "@backstage/cli": "^0.34.0"
45
45
  },
46
46
  "typesVersions": {
47
47
  "*": {