@backstage/plugin-search-backend-module-explore 0.3.5-next.0 → 0.3.6-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,25 @@
1
1
  # @backstage/plugin-search-backend-module-explore
2
2
 
3
+ ## 0.3.6-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 9a93520: Deprecate and mark explore collator as moved
8
+ - Updated dependencies
9
+ - @backstage/backend-plugin-api@1.4.2
10
+ - @backstage/config@1.3.3
11
+ - @backstage/plugin-search-backend-node@1.3.14
12
+ - @backstage/plugin-search-common@1.2.19
13
+
14
+ ## 0.3.5
15
+
16
+ ### Patch Changes
17
+
18
+ - 3b8fac1: Updated dependency `@backstage-community/plugin-explore-common` to `^0.5.0`.
19
+ - Updated dependencies
20
+ - @backstage/plugin-search-backend-node@1.3.14
21
+ - @backstage/backend-plugin-api@1.4.2
22
+
3
23
  ## 0.3.5-next.0
4
24
 
5
25
  ### Patch Changes
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # search-backend-module-explore
2
2
 
3
+ THIS ENTIRE PACKAGE IS DEPRECATED and has been moved to the Backstage community repository; please use the `@backstage-community/plugin-search-backend-module-explore` package instead.
4
+
3
5
  This package exports a module that extends the search backend to also indexing the tools exposed by the [`explore` service](https://github.com/backstage/community-plugins/tree/main/workspaces/explore/plugins/explore-backend).
4
6
 
5
7
  ## Installation
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.cjs.js","sources":["../src/alpha.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 { default as feature } from './module';\n\n/** @alpha */\nconst _feature = feature;\nexport default _feature;\n"],"names":["feature"],"mappings":";;;;;;AAmBA,MAAM,QAAW,GAAAA;;;;"}
1
+ {"version":3,"file":"alpha.cjs.js","sources":["../src/alpha.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 { default as feature } from './module';\n\n/**\n * @alpha\n * @deprecated This entire package is deprecated and has been moved to the Backstage community repository; please use the `@backstage-community/plugin-search-backend-module-explore` package instead.\n */\nconst _feature = feature;\nexport default _feature;\n"],"names":["feature"],"mappings":";;;;;;AAsBA,MAAM,QAAA,GAAWA;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
2
 
3
- /** @alpha */
3
+ /**
4
+ * @alpha
5
+ * @deprecated This entire package is deprecated and has been moved to the Backstage community repository; please use the `@backstage-community/plugin-search-backend-module-explore` package instead.
6
+ */
4
7
  declare const _feature: _backstage_backend_plugin_api.BackendFeature;
5
8
 
6
9
  export { _feature as default };
@@ -1 +1 @@
1
- {"version":3,"file":"ToolDocumentCollatorFactory.cjs.js","sources":["../../src/collators/ToolDocumentCollatorFactory.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 AuthService,\n DiscoveryService,\n LoggerService,\n} from '@backstage/backend-plugin-api';\nimport { Config } from '@backstage/config';\nimport { ExploreTool } from '@backstage-community/plugin-explore-common';\nimport {\n DocumentCollatorFactory,\n IndexableDocument,\n} from '@backstage/plugin-search-common';\nimport { Readable } from 'stream';\n\n/**\n * Extended IndexableDocument with explore tool specific properties\n *\n * @public\n */\nexport interface ToolDocument extends IndexableDocument, ExploreTool {}\n\n/**\n * @internal\n */\nexport type ToolDocumentCollatorFactoryOptions = {\n discovery: DiscoveryService;\n logger: LoggerService;\n auth: AuthService;\n};\n\n/**\n * Search collator responsible for collecting explore tools to index.\n *\n * @internal\n */\nexport class ToolDocumentCollatorFactory implements DocumentCollatorFactory {\n public readonly type: string = 'tools';\n\n private readonly discovery: DiscoveryService;\n private readonly logger: LoggerService;\n private readonly auth: AuthService;\n\n private constructor(options: ToolDocumentCollatorFactoryOptions) {\n this.discovery = options.discovery;\n this.logger = options.logger;\n this.auth = options.auth;\n }\n\n static fromConfig(\n _config: Config,\n options: ToolDocumentCollatorFactoryOptions,\n ) {\n return new ToolDocumentCollatorFactory(options);\n }\n\n async getCollator() {\n return Readable.from(this.execute());\n }\n\n async *execute(): AsyncGenerator<ToolDocument> {\n this.logger.info('Starting collation of explore tools');\n\n const tools = await this.fetchTools();\n\n for (const tool of tools) {\n yield {\n ...tool,\n text: tool.description,\n location: tool.url,\n };\n }\n\n this.logger.info('Finished collation of explore tools');\n }\n\n private async fetchTools() {\n const baseUrl = await this.discovery.getBaseUrl('explore');\n\n const { token } = await this.auth.getPluginRequestToken({\n onBehalfOf: await this.auth.getOwnServiceCredentials(),\n targetPluginId: 'explore',\n });\n const response = await fetch(`${baseUrl}/tools`, {\n headers: { Authorization: `Bearer ${token}` },\n });\n\n if (!response.ok) {\n throw new Error(\n `Failed to explore fetch tools, ${response.status}: ${response.statusText}`,\n );\n }\n\n const data = await response.json();\n return data.tools;\n }\n}\n"],"names":["Readable"],"mappings":";;;;AAkDO,MAAM,2BAA+D,CAAA;AAAA,EAC1D,IAAe,GAAA,OAAA;AAAA,EAEd,SAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EAET,YAAY,OAA6C,EAAA;AAC/D,IAAA,IAAA,CAAK,YAAY,OAAQ,CAAA,SAAA;AACzB,IAAA,IAAA,CAAK,SAAS,OAAQ,CAAA,MAAA;AACtB,IAAA,IAAA,CAAK,OAAO,OAAQ,CAAA,IAAA;AAAA;AACtB,EAEA,OAAO,UACL,CAAA,OAAA,EACA,OACA,EAAA;AACA,IAAO,OAAA,IAAI,4BAA4B,OAAO,CAAA;AAAA;AAChD,EAEA,MAAM,WAAc,GAAA;AAClB,IAAA,OAAOA,eAAS,CAAA,IAAA,CAAK,IAAK,CAAA,OAAA,EAAS,CAAA;AAAA;AACrC,EAEA,OAAO,OAAwC,GAAA;AAC7C,IAAK,IAAA,CAAA,MAAA,CAAO,KAAK,qCAAqC,CAAA;AAEtD,IAAM,MAAA,KAAA,GAAQ,MAAM,IAAA,CAAK,UAAW,EAAA;AAEpC,IAAA,KAAA,MAAW,QAAQ,KAAO,EAAA;AACxB,MAAM,MAAA;AAAA,QACJ,GAAG,IAAA;AAAA,QACH,MAAM,IAAK,CAAA,WAAA;AAAA,QACX,UAAU,IAAK,CAAA;AAAA,OACjB;AAAA;AAGF,IAAK,IAAA,CAAA,MAAA,CAAO,KAAK,qCAAqC,CAAA;AAAA;AACxD,EAEA,MAAc,UAAa,GAAA;AACzB,IAAA,MAAM,OAAU,GAAA,MAAM,IAAK,CAAA,SAAA,CAAU,WAAW,SAAS,CAAA;AAEzD,IAAA,MAAM,EAAE,KAAM,EAAA,GAAI,MAAM,IAAA,CAAK,KAAK,qBAAsB,CAAA;AAAA,MACtD,UAAY,EAAA,MAAM,IAAK,CAAA,IAAA,CAAK,wBAAyB,EAAA;AAAA,MACrD,cAAgB,EAAA;AAAA,KACjB,CAAA;AACD,IAAA,MAAM,QAAW,GAAA,MAAM,KAAM,CAAA,CAAA,EAAG,OAAO,CAAU,MAAA,CAAA,EAAA;AAAA,MAC/C,OAAS,EAAA,EAAE,aAAe,EAAA,CAAA,OAAA,EAAU,KAAK,CAAG,CAAA;AAAA,KAC7C,CAAA;AAED,IAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,CAAkC,+BAAA,EAAA,QAAA,CAAS,MAAM,CAAA,EAAA,EAAK,SAAS,UAAU,CAAA;AAAA,OAC3E;AAAA;AAGF,IAAM,MAAA,IAAA,GAAO,MAAM,QAAA,CAAS,IAAK,EAAA;AACjC,IAAA,OAAO,IAAK,CAAA,KAAA;AAAA;AAEhB;;;;"}
1
+ {"version":3,"file":"ToolDocumentCollatorFactory.cjs.js","sources":["../../src/collators/ToolDocumentCollatorFactory.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 AuthService,\n DiscoveryService,\n LoggerService,\n} from '@backstage/backend-plugin-api';\nimport { Config } from '@backstage/config';\nimport { ExploreTool } from '@backstage-community/plugin-explore-common';\nimport {\n DocumentCollatorFactory,\n IndexableDocument,\n} from '@backstage/plugin-search-common';\nimport { Readable } from 'stream';\n\n/**\n * Extended IndexableDocument with explore tool specific properties\n *\n * @deprecated This entire package is deprecated and has been moved to the Backstage community repository; please use the `@backstage-community/plugin-search-backend-module-explore` package instead.\n * @public\n */\nexport interface ToolDocument extends IndexableDocument, ExploreTool {}\n\n/**\n * @internal\n */\nexport type ToolDocumentCollatorFactoryOptions = {\n discovery: DiscoveryService;\n logger: LoggerService;\n auth: AuthService;\n};\n\n/**\n * Search collator responsible for collecting explore tools to index.\n *\n * @internal\n */\nexport class ToolDocumentCollatorFactory implements DocumentCollatorFactory {\n public readonly type: string = 'tools';\n\n private readonly discovery: DiscoveryService;\n private readonly logger: LoggerService;\n private readonly auth: AuthService;\n\n private constructor(options: ToolDocumentCollatorFactoryOptions) {\n this.discovery = options.discovery;\n this.logger = options.logger;\n this.auth = options.auth;\n }\n\n static fromConfig(\n _config: Config,\n options: ToolDocumentCollatorFactoryOptions,\n ) {\n return new ToolDocumentCollatorFactory(options);\n }\n\n async getCollator() {\n return Readable.from(this.execute());\n }\n\n async *execute(): AsyncGenerator<ToolDocument> {\n this.logger.info('Starting collation of explore tools');\n\n const tools = await this.fetchTools();\n\n for (const tool of tools) {\n yield {\n ...tool,\n text: tool.description,\n location: tool.url,\n };\n }\n\n this.logger.info('Finished collation of explore tools');\n }\n\n private async fetchTools() {\n const baseUrl = await this.discovery.getBaseUrl('explore');\n\n const { token } = await this.auth.getPluginRequestToken({\n onBehalfOf: await this.auth.getOwnServiceCredentials(),\n targetPluginId: 'explore',\n });\n const response = await fetch(`${baseUrl}/tools`, {\n headers: { Authorization: `Bearer ${token}` },\n });\n\n if (!response.ok) {\n throw new Error(\n `Failed to explore fetch tools, ${response.status}: ${response.statusText}`,\n );\n }\n\n const data = await response.json();\n return data.tools;\n }\n}\n"],"names":["Readable"],"mappings":";;;;AAmDO,MAAM,2BAAA,CAA+D;AAAA,EAC1D,IAAA,GAAe,OAAA;AAAA,EAEd,SAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EAET,YAAY,OAAA,EAA6C;AAC/D,IAAA,IAAA,CAAK,YAAY,OAAA,CAAQ,SAAA;AACzB,IAAA,IAAA,CAAK,SAAS,OAAA,CAAQ,MAAA;AACtB,IAAA,IAAA,CAAK,OAAO,OAAA,CAAQ,IAAA;AAAA,EACtB;AAAA,EAEA,OAAO,UAAA,CACL,OAAA,EACA,OAAA,EACA;AACA,IAAA,OAAO,IAAI,4BAA4B,OAAO,CAAA;AAAA,EAChD;AAAA,EAEA,MAAM,WAAA,GAAc;AAClB,IAAA,OAAOA,eAAA,CAAS,IAAA,CAAK,IAAA,CAAK,OAAA,EAAS,CAAA;AAAA,EACrC;AAAA,EAEA,OAAO,OAAA,GAAwC;AAC7C,IAAA,IAAA,CAAK,MAAA,CAAO,KAAK,qCAAqC,CAAA;AAEtD,IAAA,MAAM,KAAA,GAAQ,MAAM,IAAA,CAAK,UAAA,EAAW;AAEpC,IAAA,KAAA,MAAW,QAAQ,KAAA,EAAO;AACxB,MAAA,MAAM;AAAA,QACJ,GAAG,IAAA;AAAA,QACH,MAAM,IAAA,CAAK,WAAA;AAAA,QACX,UAAU,IAAA,CAAK;AAAA,OACjB;AAAA,IACF;AAEA,IAAA,IAAA,CAAK,MAAA,CAAO,KAAK,qCAAqC,CAAA;AAAA,EACxD;AAAA,EAEA,MAAc,UAAA,GAAa;AACzB,IAAA,MAAM,OAAA,GAAU,MAAM,IAAA,CAAK,SAAA,CAAU,WAAW,SAAS,CAAA;AAEzD,IAAA,MAAM,EAAE,KAAA,EAAM,GAAI,MAAM,IAAA,CAAK,KAAK,qBAAA,CAAsB;AAAA,MACtD,UAAA,EAAY,MAAM,IAAA,CAAK,IAAA,CAAK,wBAAA,EAAyB;AAAA,MACrD,cAAA,EAAgB;AAAA,KACjB,CAAA;AACD,IAAA,MAAM,QAAA,GAAW,MAAM,KAAA,CAAM,CAAA,EAAG,OAAO,CAAA,MAAA,CAAA,EAAU;AAAA,MAC/C,OAAA,EAAS,EAAE,aAAA,EAAe,CAAA,OAAA,EAAU,KAAK,CAAA,CAAA;AAAG,KAC7C,CAAA;AAED,IAAA,IAAI,CAAC,SAAS,EAAA,EAAI;AAChB,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,CAAA,+BAAA,EAAkC,QAAA,CAAS,MAAM,CAAA,EAAA,EAAK,SAAS,UAAU,CAAA;AAAA,OAC3E;AAAA,IACF;AAEA,IAAA,MAAM,IAAA,GAAO,MAAM,QAAA,CAAS,IAAA,EAAK;AACjC,IAAA,OAAO,IAAA,CAAK,KAAA;AAAA,EACd;AACF;;;;"}
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
5
5
  /**
6
6
  * Extended IndexableDocument with explore tool specific properties
7
7
  *
8
+ * @deprecated This entire package is deprecated and has been moved to the Backstage community repository; please use the `@backstage-community/plugin-search-backend-module-explore` package instead.
8
9
  * @public
9
10
  */
10
11
  interface ToolDocument extends IndexableDocument, ExploreTool {
@@ -13,6 +14,7 @@ interface ToolDocument extends IndexableDocument, ExploreTool {
13
14
  /**
14
15
  * Search backend module for the Explore index.
15
16
  *
17
+ * @deprecated This entire package is deprecated and has been moved to the Backstage community repository; please use the `@backstage-community/plugin-search-backend-module-explore` package instead.
16
18
  * @public
17
19
  */
18
20
  declare const _default: _backstage_backend_plugin_api.BackendFeature;
@@ -1 +1 @@
1
- {"version":3,"file":"module.cjs.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright 2023 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\n/**\n * @packageDocumentation\n * A module for the search backend that exports Explore modules.\n */\n\nimport {\n coreServices,\n createBackendModule,\n readSchedulerServiceTaskScheduleDefinitionFromConfig,\n} from '@backstage/backend-plugin-api';\nimport { searchIndexRegistryExtensionPoint } from '@backstage/plugin-search-backend-node/alpha';\nimport { ToolDocumentCollatorFactory } from './collators/ToolDocumentCollatorFactory';\n\n/**\n * Search backend module for the Explore index.\n *\n * @public\n */\nexport default createBackendModule({\n pluginId: 'search',\n moduleId: 'explore-collator',\n register(env) {\n env.registerInit({\n deps: {\n config: coreServices.rootConfig,\n logger: coreServices.logger,\n discovery: coreServices.discovery,\n scheduler: coreServices.scheduler,\n auth: coreServices.auth,\n indexRegistry: searchIndexRegistryExtensionPoint,\n },\n async init({\n config,\n logger,\n discovery,\n scheduler,\n auth,\n indexRegistry,\n }) {\n const defaultSchedule = {\n frequency: { minutes: 10 },\n timeout: { minutes: 15 },\n initialDelay: { seconds: 3 },\n };\n\n const schedule = config.has('search.collators.explore.schedule')\n ? readSchedulerServiceTaskScheduleDefinitionFromConfig(\n config.getConfig('search.collators.explore.schedule'),\n )\n : defaultSchedule;\n\n indexRegistry.addCollator({\n schedule: scheduler.createScheduledTaskRunner(schedule),\n factory: ToolDocumentCollatorFactory.fromConfig(config, {\n discovery,\n logger,\n auth,\n }),\n });\n },\n });\n },\n});\n"],"names":["createBackendModule","coreServices","searchIndexRegistryExtensionPoint","readSchedulerServiceTaskScheduleDefinitionFromConfig","ToolDocumentCollatorFactory"],"mappings":";;;;;;;;AAkCA,cAAeA,oCAAoB,CAAA;AAAA,EACjC,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,kBAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,QAAQC,6BAAa,CAAA,UAAA;AAAA,QACrB,QAAQA,6BAAa,CAAA,MAAA;AAAA,QACrB,WAAWA,6BAAa,CAAA,SAAA;AAAA,QACxB,WAAWA,6BAAa,CAAA,SAAA;AAAA,QACxB,MAAMA,6BAAa,CAAA,IAAA;AAAA,QACnB,aAAe,EAAAC;AAAA,OACjB;AAAA,MACA,MAAM,IAAK,CAAA;AAAA,QACT,MAAA;AAAA,QACA,MAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA;AAAA,QACA,IAAA;AAAA,QACA;AAAA,OACC,EAAA;AACD,QAAA,MAAM,eAAkB,GAAA;AAAA,UACtB,SAAA,EAAW,EAAE,OAAA,EAAS,EAAG,EAAA;AAAA,UACzB,OAAA,EAAS,EAAE,OAAA,EAAS,EAAG,EAAA;AAAA,UACvB,YAAA,EAAc,EAAE,OAAA,EAAS,CAAE;AAAA,SAC7B;AAEA,QAAA,MAAM,QAAW,GAAA,MAAA,CAAO,GAAI,CAAA,mCAAmC,CAC3D,GAAAC,qEAAA;AAAA,UACE,MAAA,CAAO,UAAU,mCAAmC;AAAA,SAEtD,GAAA,eAAA;AAEJ,QAAA,aAAA,CAAc,WAAY,CAAA;AAAA,UACxB,QAAA,EAAU,SAAU,CAAA,yBAAA,CAA0B,QAAQ,CAAA;AAAA,UACtD,OAAA,EAASC,uDAA4B,CAAA,UAAA,CAAW,MAAQ,EAAA;AAAA,YACtD,SAAA;AAAA,YACA,MAAA;AAAA,YACA;AAAA,WACD;AAAA,SACF,CAAA;AAAA;AACH,KACD,CAAA;AAAA;AAEL,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"module.cjs.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright 2023 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\n/**\n * @packageDocumentation\n * A module for the search backend that exports Explore modules.\n */\n\nimport {\n coreServices,\n createBackendModule,\n readSchedulerServiceTaskScheduleDefinitionFromConfig,\n} from '@backstage/backend-plugin-api';\nimport { searchIndexRegistryExtensionPoint } from '@backstage/plugin-search-backend-node/alpha';\nimport { ToolDocumentCollatorFactory } from './collators/ToolDocumentCollatorFactory';\n\n/**\n * Search backend module for the Explore index.\n *\n * @deprecated This entire package is deprecated and has been moved to the Backstage community repository; please use the `@backstage-community/plugin-search-backend-module-explore` package instead.\n * @public\n */\nexport default createBackendModule({\n pluginId: 'search',\n moduleId: 'explore-collator',\n register(env) {\n env.registerInit({\n deps: {\n config: coreServices.rootConfig,\n logger: coreServices.logger,\n discovery: coreServices.discovery,\n scheduler: coreServices.scheduler,\n auth: coreServices.auth,\n indexRegistry: searchIndexRegistryExtensionPoint,\n },\n async init({\n config,\n logger,\n discovery,\n scheduler,\n auth,\n indexRegistry,\n }) {\n const defaultSchedule = {\n frequency: { minutes: 10 },\n timeout: { minutes: 15 },\n initialDelay: { seconds: 3 },\n };\n\n const schedule = config.has('search.collators.explore.schedule')\n ? readSchedulerServiceTaskScheduleDefinitionFromConfig(\n config.getConfig('search.collators.explore.schedule'),\n )\n : defaultSchedule;\n\n indexRegistry.addCollator({\n schedule: scheduler.createScheduledTaskRunner(schedule),\n factory: ToolDocumentCollatorFactory.fromConfig(config, {\n discovery,\n logger,\n auth,\n }),\n });\n },\n });\n },\n});\n"],"names":["createBackendModule","coreServices","searchIndexRegistryExtensionPoint","readSchedulerServiceTaskScheduleDefinitionFromConfig","ToolDocumentCollatorFactory"],"mappings":";;;;;;;;AAmCA,cAAeA,oCAAA,CAAoB;AAAA,EACjC,QAAA,EAAU,QAAA;AAAA,EACV,QAAA,EAAU,kBAAA;AAAA,EACV,SAAS,GAAA,EAAK;AACZ,IAAA,GAAA,CAAI,YAAA,CAAa;AAAA,MACf,IAAA,EAAM;AAAA,QACJ,QAAQC,6BAAA,CAAa,UAAA;AAAA,QACrB,QAAQA,6BAAA,CAAa,MAAA;AAAA,QACrB,WAAWA,6BAAA,CAAa,SAAA;AAAA,QACxB,WAAWA,6BAAA,CAAa,SAAA;AAAA,QACxB,MAAMA,6BAAA,CAAa,IAAA;AAAA,QACnB,aAAA,EAAeC;AAAA,OACjB;AAAA,MACA,MAAM,IAAA,CAAK;AAAA,QACT,MAAA;AAAA,QACA,MAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA;AAAA,QACA,IAAA;AAAA,QACA;AAAA,OACF,EAAG;AACD,QAAA,MAAM,eAAA,GAAkB;AAAA,UACtB,SAAA,EAAW,EAAE,OAAA,EAAS,EAAA,EAAG;AAAA,UACzB,OAAA,EAAS,EAAE,OAAA,EAAS,EAAA,EAAG;AAAA,UACvB,YAAA,EAAc,EAAE,OAAA,EAAS,CAAA;AAAE,SAC7B;AAEA,QAAA,MAAM,QAAA,GAAW,MAAA,CAAO,GAAA,CAAI,mCAAmC,CAAA,GAC3DC,qEAAA;AAAA,UACE,MAAA,CAAO,UAAU,mCAAmC;AAAA,SACtD,GACA,eAAA;AAEJ,QAAA,aAAA,CAAc,WAAA,CAAY;AAAA,UACxB,QAAA,EAAU,SAAA,CAAU,yBAAA,CAA0B,QAAQ,CAAA;AAAA,UACtD,OAAA,EAASC,uDAAA,CAA4B,UAAA,CAAW,MAAA,EAAQ;AAAA,YACtD,SAAA;AAAA,YACA,MAAA;AAAA,YACA;AAAA,WACD;AAAA,SACF,CAAA;AAAA,MACH;AAAA,KACD,CAAA;AAAA,EACH;AACF,CAAC,CAAA;;;;"}
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@backstage/plugin-search-backend-module-explore",
3
- "version": "0.3.5-next.0",
3
+ "version": "0.3.6-next.0",
4
4
  "description": "A module for the search backend that exports explore modules",
5
5
  "backstage": {
6
+ "moved": "@backstage-community/plugin-search-backend-module-explore",
6
7
  "role": "backend-plugin-module",
7
8
  "pluginId": "search",
8
9
  "pluginPackage": "@backstage/plugin-search-backend",
@@ -62,15 +63,15 @@
62
63
  "test": "backstage-cli package test"
63
64
  },
64
65
  "dependencies": {
65
- "@backstage-community/plugin-explore-common": "^0.0.7",
66
- "@backstage/backend-plugin-api": "1.4.2-next.0",
66
+ "@backstage-community/plugin-explore-common": "^0.5.0",
67
+ "@backstage/backend-plugin-api": "1.4.2",
67
68
  "@backstage/config": "1.3.3",
68
- "@backstage/plugin-search-backend-node": "1.3.14-next.0",
69
+ "@backstage/plugin-search-backend-node": "1.3.14",
69
70
  "@backstage/plugin-search-common": "1.2.19"
70
71
  },
71
72
  "devDependencies": {
72
- "@backstage/backend-test-utils": "1.7.1-next.0",
73
- "@backstage/cli": "0.33.2-next.0",
73
+ "@backstage/backend-test-utils": "1.9.0-next.0",
74
+ "@backstage/cli": "0.34.1-next.0",
74
75
  "msw": "^1.2.1"
75
76
  },
76
77
  "configSchema": "config.d.ts"