@backstage/plugin-search-backend-module-explore 0.2.3-next.2 → 0.2.3

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-search-backend-module-explore
2
2
 
3
+ ## 0.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 094eaa3: Remove references to in-repo backend-common
8
+ - 3109c24: The export for the new backend system at the `/alpha` export is now also available via the main entry point, which means that you can remove the `/alpha` suffix from the import.
9
+ - c052931: Updated dependency `@backstage-community/plugin-explore-common` to `^0.0.6`.
10
+ - 2f88f88: Updated backend installation instructions.
11
+ - Updated dependencies
12
+ - @backstage/plugin-search-backend-node@1.3.3
13
+ - @backstage/backend-plugin-api@1.0.1
14
+ - @backstage/config@1.2.0
15
+ - @backstage/plugin-search-common@1.2.14
16
+
3
17
  ## 0.2.3-next.2
4
18
 
5
19
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-search-backend-module-explore__alpha",
3
- "version": "0.2.3-next.2",
3
+ "version": "0.2.3",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/alpha.cjs.js CHANGED
@@ -2,51 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var backendPluginApi = require('@backstage/backend-plugin-api');
6
- var alpha$1 = require('@backstage/plugin-search-backend-node/alpha');
7
- var pluginSearchBackendModuleExplore = require('@backstage/plugin-search-backend-module-explore');
5
+ var module$1 = require('./module.cjs.js');
8
6
 
9
- var alpha = backendPluginApi.createBackendModule({
10
- pluginId: "search",
11
- moduleId: "explore-collator",
12
- register(env) {
13
- env.registerInit({
14
- deps: {
15
- config: backendPluginApi.coreServices.rootConfig,
16
- logger: backendPluginApi.coreServices.logger,
17
- discovery: backendPluginApi.coreServices.discovery,
18
- scheduler: backendPluginApi.coreServices.scheduler,
19
- auth: backendPluginApi.coreServices.auth,
20
- indexRegistry: alpha$1.searchIndexRegistryExtensionPoint
21
- },
22
- async init({
23
- config,
24
- logger,
25
- discovery,
26
- scheduler,
27
- auth,
28
- indexRegistry
29
- }) {
30
- const defaultSchedule = {
31
- frequency: { minutes: 10 },
32
- timeout: { minutes: 15 },
33
- initialDelay: { seconds: 3 }
34
- };
35
- const schedule = config.has("search.collators.explore.schedule") ? backendPluginApi.readSchedulerServiceTaskScheduleDefinitionFromConfig(
36
- config.getConfig("search.collators.explore.schedule")
37
- ) : defaultSchedule;
38
- indexRegistry.addCollator({
39
- schedule: scheduler.createScheduledTaskRunner(schedule),
40
- factory: pluginSearchBackendModuleExplore.ToolDocumentCollatorFactory.fromConfig(config, {
41
- discovery,
42
- logger,
43
- auth
44
- })
45
- });
46
- }
47
- });
48
- }
49
- });
7
+ const _feature = module$1.default;
50
8
 
51
- exports.default = alpha;
9
+ exports.default = _feature;
52
10
  //# sourceMappingURL=alpha.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.cjs.js","sources":["../src/alpha.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';\n\nimport { ToolDocumentCollatorFactory } from '@backstage/plugin-search-backend-module-explore';\n\n/**\n * Search backend module for the Explore index.\n *\n * @alpha\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,YAAeA,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,yCAAA;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;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,EAAA;AAAA,SAC7B,CAAA;AAEA,QAAA,MAAM,QAAW,GAAA,MAAA,CAAO,GAAI,CAAA,mCAAmC,CAC3D,GAAAC,qEAAA;AAAA,UACE,MAAA,CAAO,UAAU,mCAAmC,CAAA;AAAA,SAEtD,GAAA,eAAA,CAAA;AAEJ,QAAA,aAAA,CAAc,WAAY,CAAA;AAAA,UACxB,QAAA,EAAU,SAAU,CAAA,yBAAA,CAA0B,QAAQ,CAAA;AAAA,UACtD,OAAA,EAASC,4DAA4B,CAAA,UAAA,CAAW,MAAQ,EAAA;AAAA,YACtD,SAAA;AAAA,YACA,MAAA;AAAA,YACA,IAAA;AAAA,WACD,CAAA;AAAA,SACF,CAAA,CAAA;AAAA,OACH;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC,CAAA;;;;"}
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;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,10 +1,6 @@
1
1
  import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
2
 
3
- /**
4
- * Search backend module for the Explore index.
5
- *
6
- * @alpha
7
- */
8
- declare const _default: _backstage_backend_plugin_api.BackendFeature;
3
+ /** @alpha */
4
+ declare const _feature: _backstage_backend_plugin_api.BackendFeature;
9
5
 
10
- export { _default as default };
6
+ export { _feature as default };
package/dist/index.cjs.js CHANGED
@@ -1,8 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var ToolDocumentCollatorFactory = require('./collators/ToolDocumentCollatorFactory.cjs.js');
6
+ var module$1 = require('./module.cjs.js');
4
7
 
5
8
 
6
9
 
7
10
  exports.ToolDocumentCollatorFactory = ToolDocumentCollatorFactory.ToolDocumentCollatorFactory;
11
+ exports.default = module$1.default;
8
12
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { TokenManager } from '@backstage/backend-common';
3
+ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
3
4
  import { DiscoveryService, LoggerService, AuthService } from '@backstage/backend-plugin-api';
4
5
  import { Config } from '@backstage/config';
5
6
  import { ExploreTool } from '@backstage-community/plugin-explore-common';
@@ -41,4 +42,11 @@ declare class ToolDocumentCollatorFactory implements DocumentCollatorFactory {
41
42
  private fetchTools;
42
43
  }
43
44
 
44
- export { type ToolDocument, ToolDocumentCollatorFactory, type ToolDocumentCollatorFactoryOptions };
45
+ /**
46
+ * Search backend module for the Explore index.
47
+ *
48
+ * @public
49
+ */
50
+ declare const _default: _backstage_backend_plugin_api.BackendFeature;
51
+
52
+ export { type ToolDocument, ToolDocumentCollatorFactory, type ToolDocumentCollatorFactoryOptions, _default as default };
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var backendPluginApi = require('@backstage/backend-plugin-api');
6
+ var alpha = require('@backstage/plugin-search-backend-node/alpha');
7
+ var pluginSearchBackendModuleExplore = require('@backstage/plugin-search-backend-module-explore');
8
+
9
+ var feature = backendPluginApi.createBackendModule({
10
+ pluginId: "search",
11
+ moduleId: "explore-collator",
12
+ register(env) {
13
+ env.registerInit({
14
+ deps: {
15
+ config: backendPluginApi.coreServices.rootConfig,
16
+ logger: backendPluginApi.coreServices.logger,
17
+ discovery: backendPluginApi.coreServices.discovery,
18
+ scheduler: backendPluginApi.coreServices.scheduler,
19
+ auth: backendPluginApi.coreServices.auth,
20
+ indexRegistry: alpha.searchIndexRegistryExtensionPoint
21
+ },
22
+ async init({
23
+ config,
24
+ logger,
25
+ discovery,
26
+ scheduler,
27
+ auth,
28
+ indexRegistry
29
+ }) {
30
+ const defaultSchedule = {
31
+ frequency: { minutes: 10 },
32
+ timeout: { minutes: 15 },
33
+ initialDelay: { seconds: 3 }
34
+ };
35
+ const schedule = config.has("search.collators.explore.schedule") ? backendPluginApi.readSchedulerServiceTaskScheduleDefinitionFromConfig(
36
+ config.getConfig("search.collators.explore.schedule")
37
+ ) : defaultSchedule;
38
+ indexRegistry.addCollator({
39
+ schedule: scheduler.createScheduledTaskRunner(schedule),
40
+ factory: pluginSearchBackendModuleExplore.ToolDocumentCollatorFactory.fromConfig(config, {
41
+ discovery,
42
+ logger,
43
+ auth
44
+ })
45
+ });
46
+ }
47
+ });
48
+ }
49
+ });
50
+
51
+ exports.default = feature;
52
+ //# sourceMappingURL=module.cjs.js.map
@@ -0,0 +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';\n\nimport { ToolDocumentCollatorFactory } from '@backstage/plugin-search-backend-module-explore';\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":";;;;;;;;AAmCA,cAAeA,oCAAoB,CAAA;AAAA,EACjC,QAAU,EAAA,QAAA;AAAA,EACV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
  "name": "@backstage/plugin-search-backend-module-explore",
3
- "version": "0.2.3-next.2",
3
+ "version": "0.2.3",
4
4
  "description": "A module for the search backend that exports explore modules",
5
5
  "backstage": {
6
6
  "role": "backend-plugin-module",
@@ -19,6 +19,7 @@
19
19
  "license": "Apache-2.0",
20
20
  "exports": {
21
21
  ".": {
22
+ "backstage": "@backstage/BackendFeature",
22
23
  "require": "./dist/index.cjs.js",
23
24
  "types": "./dist/index.d.ts",
24
25
  "default": "./dist/index.cjs.js"
@@ -50,15 +51,15 @@
50
51
  "dependencies": {
51
52
  "@backstage-community/plugin-explore-common": "^0.0.6",
52
53
  "@backstage/backend-common": "^0.25.0",
53
- "@backstage/backend-plugin-api": "1.0.1-next.1",
54
- "@backstage/config": "1.2.0",
55
- "@backstage/plugin-search-backend-node": "1.3.3-next.2",
56
- "@backstage/plugin-search-common": "1.2.14",
54
+ "@backstage/backend-plugin-api": "^1.0.1",
55
+ "@backstage/config": "^1.2.0",
56
+ "@backstage/plugin-search-backend-node": "^1.3.3",
57
+ "@backstage/plugin-search-common": "^1.2.14",
57
58
  "node-fetch": "^2.7.0"
58
59
  },
59
60
  "devDependencies": {
60
- "@backstage/backend-test-utils": "1.0.1-next.2",
61
- "@backstage/cli": "0.28.0-next.2",
61
+ "@backstage/backend-test-utils": "^1.0.1",
62
+ "@backstage/cli": "^0.28.0",
62
63
  "msw": "^1.2.1"
63
64
  },
64
65
  "configSchema": "config.d.ts"