@backstage/plugin-search-backend-module-techdocs 0.1.7-next.2 → 0.1.7
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 +68 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.cjs.js +6 -8
- package/dist/alpha.cjs.js.map +1 -1
- package/dist/alpha.d.ts +2 -2
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
# @backstage/plugin-search-backend-module-techdocs
|
|
2
2
|
|
|
3
|
+
## 0.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 71114ac50e02: The export for the new backend system has been moved to be the `default` export.
|
|
8
|
+
|
|
9
|
+
For example, if you are currently importing the plugin using the following pattern:
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { examplePlugin } from '@backstage/plugin-example-backend';
|
|
13
|
+
|
|
14
|
+
backend.add(examplePlugin);
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
It should be migrated to this:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
backend.add(import('@backstage/plugin-example-backend'));
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
- @backstage/backend-tasks@0.5.8
|
|
25
|
+
- @backstage/backend-common@0.19.5
|
|
26
|
+
- @backstage/config@1.1.0
|
|
27
|
+
- @backstage/catalog-client@1.4.4
|
|
28
|
+
- @backstage/catalog-model@1.4.2
|
|
29
|
+
- @backstage/plugin-catalog-common@1.0.16
|
|
30
|
+
- @backstage/plugin-permission-common@0.7.8
|
|
31
|
+
- @backstage/plugin-search-common@1.2.6
|
|
32
|
+
- @backstage/backend-plugin-api@0.6.3
|
|
33
|
+
- @backstage/plugin-techdocs-node@1.8.0
|
|
34
|
+
- @backstage/plugin-catalog-node@1.4.4
|
|
35
|
+
- @backstage/plugin-search-backend-node@1.2.7
|
|
36
|
+
|
|
37
|
+
## 0.1.7-next.3
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- 71114ac50e02: The export for the new backend system has been moved to be the `default` export.
|
|
42
|
+
|
|
43
|
+
For example, if you are currently importing the plugin using the following pattern:
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import { examplePlugin } from '@backstage/plugin-example-backend';
|
|
47
|
+
|
|
48
|
+
backend.add(examplePlugin);
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
It should be migrated to this:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
backend.add(import('@backstage/plugin-example-backend'));
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
- Updated dependencies
|
|
58
|
+
- @backstage/catalog-client@1.4.4-next.2
|
|
59
|
+
- @backstage/catalog-model@1.4.2-next.2
|
|
60
|
+
- @backstage/config@1.1.0-next.2
|
|
61
|
+
- @backstage/plugin-catalog-common@1.0.16-next.2
|
|
62
|
+
- @backstage/plugin-permission-common@0.7.8-next.2
|
|
63
|
+
- @backstage/plugin-search-common@1.2.6-next.2
|
|
64
|
+
- @backstage/backend-plugin-api@0.6.3-next.3
|
|
65
|
+
- @backstage/backend-common@0.19.5-next.3
|
|
66
|
+
- @backstage/backend-tasks@0.5.8-next.3
|
|
67
|
+
- @backstage/plugin-catalog-node@1.4.4-next.3
|
|
68
|
+
- @backstage/plugin-search-backend-node@1.2.7-next.3
|
|
69
|
+
- @backstage/plugin-techdocs-node@1.8.0-next.3
|
|
70
|
+
|
|
3
71
|
## 0.1.7-next.2
|
|
4
72
|
|
|
5
73
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.cjs.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var backendCommon = require('@backstage/backend-common');
|
|
6
4
|
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
7
5
|
var backendTasks = require('@backstage/backend-tasks');
|
|
8
|
-
var alpha = require('@backstage/plugin-catalog-node/alpha');
|
|
6
|
+
var alpha$1 = require('@backstage/plugin-catalog-node/alpha');
|
|
9
7
|
var pluginSearchBackendModuleTechdocs = require('@backstage/plugin-search-backend-module-techdocs');
|
|
10
|
-
var alpha$
|
|
8
|
+
var alpha$2 = require('@backstage/plugin-search-backend-node/alpha');
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
var alpha = backendPluginApi.createBackendModule({
|
|
13
11
|
moduleId: "techDocsCollator",
|
|
14
12
|
pluginId: "search",
|
|
15
13
|
register(env) {
|
|
@@ -20,8 +18,8 @@ const searchModuleTechDocsCollator = backendPluginApi.createBackendModule({
|
|
|
20
18
|
discovery: backendPluginApi.coreServices.discovery,
|
|
21
19
|
tokenManager: backendPluginApi.coreServices.tokenManager,
|
|
22
20
|
scheduler: backendPluginApi.coreServices.scheduler,
|
|
23
|
-
catalog: alpha.catalogServiceRef,
|
|
24
|
-
indexRegistry: alpha$
|
|
21
|
+
catalog: alpha$1.catalogServiceRef,
|
|
22
|
+
indexRegistry: alpha$2.searchIndexRegistryExtensionPoint
|
|
25
23
|
},
|
|
26
24
|
async init({
|
|
27
25
|
config,
|
|
@@ -54,5 +52,5 @@ const searchModuleTechDocsCollator = backendPluginApi.createBackendModule({
|
|
|
54
52
|
}
|
|
55
53
|
});
|
|
56
54
|
|
|
57
|
-
exports
|
|
55
|
+
module.exports = alpha;
|
|
58
56
|
//# sourceMappingURL=alpha.cjs.js.map
|
package/dist/alpha.cjs.js.map
CHANGED
|
@@ -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 TechDocs modules.\n */\n\nimport { loggerToWinstonLogger } from '@backstage/backend-common';\nimport {\n coreServices,\n createBackendModule,\n} from '@backstage/backend-plugin-api';\nimport { readTaskScheduleDefinitionFromConfig } from '@backstage/backend-tasks';\nimport { catalogServiceRef } from '@backstage/plugin-catalog-node/alpha';\nimport { DefaultTechDocsCollatorFactory } from '@backstage/plugin-search-backend-module-techdocs';\nimport { searchIndexRegistryExtensionPoint } from '@backstage/plugin-search-backend-node/alpha';\n\n/**\n * @alpha\n * Search backend module for the TechDocs index.\n */\nexport
|
|
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 TechDocs modules.\n */\n\nimport { loggerToWinstonLogger } from '@backstage/backend-common';\nimport {\n coreServices,\n createBackendModule,\n} from '@backstage/backend-plugin-api';\nimport { readTaskScheduleDefinitionFromConfig } from '@backstage/backend-tasks';\nimport { catalogServiceRef } from '@backstage/plugin-catalog-node/alpha';\nimport { DefaultTechDocsCollatorFactory } from '@backstage/plugin-search-backend-module-techdocs';\nimport { searchIndexRegistryExtensionPoint } from '@backstage/plugin-search-backend-node/alpha';\n\n/**\n * @alpha\n * Search backend module for the TechDocs index.\n */\nexport default createBackendModule({\n moduleId: 'techDocsCollator',\n pluginId: 'search',\n register(env) {\n env.registerInit({\n deps: {\n config: coreServices.rootConfig,\n logger: coreServices.logger,\n discovery: coreServices.discovery,\n tokenManager: coreServices.tokenManager,\n scheduler: coreServices.scheduler,\n catalog: catalogServiceRef,\n indexRegistry: searchIndexRegistryExtensionPoint,\n },\n async init({\n config,\n logger,\n discovery,\n tokenManager,\n scheduler,\n catalog,\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.techdocs.schedule')\n ? readTaskScheduleDefinitionFromConfig(\n config.getConfig('search.collators.techdocs.schedule'),\n )\n : defaultSchedule;\n\n indexRegistry.addCollator({\n schedule: scheduler.createScheduledTaskRunner(schedule),\n factory: DefaultTechDocsCollatorFactory.fromConfig(config, {\n discovery,\n tokenManager,\n logger: loggerToWinstonLogger(logger),\n catalogClient: catalog,\n }),\n });\n },\n });\n },\n});\n"],"names":["createBackendModule","coreServices","catalogServiceRef","searchIndexRegistryExtensionPoint","readTaskScheduleDefinitionFromConfig","DefaultTechDocsCollatorFactory","loggerToWinstonLogger"],"mappings":";;;;;;;;;AAmCA,YAAeA,oCAAoB,CAAA;AAAA,EACjC,QAAU,EAAA,kBAAA;AAAA,EACV,QAAU,EAAA,QAAA;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,cAAcA,6BAAa,CAAA,YAAA;AAAA,QAC3B,WAAWA,6BAAa,CAAA,SAAA;AAAA,QACxB,OAAS,EAAAC,yBAAA;AAAA,QACT,aAAe,EAAAC,yCAAA;AAAA,OACjB;AAAA,MACA,MAAM,IAAK,CAAA;AAAA,QACT,MAAA;AAAA,QACA,MAAA;AAAA,QACA,SAAA;AAAA,QACA,YAAA;AAAA,QACA,SAAA;AAAA,QACA,OAAA;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,oCAAoC,CAC5D,GAAAC,iDAAA;AAAA,UACE,MAAA,CAAO,UAAU,oCAAoC,CAAA;AAAA,SAEvD,GAAA,eAAA,CAAA;AAEJ,QAAA,aAAA,CAAc,WAAY,CAAA;AAAA,UACxB,QAAA,EAAU,SAAU,CAAA,yBAAA,CAA0B,QAAQ,CAAA;AAAA,UACtD,OAAA,EAASC,gEAA+B,CAAA,UAAA,CAAW,MAAQ,EAAA;AAAA,YACzD,SAAA;AAAA,YACA,YAAA;AAAA,YACA,MAAA,EAAQC,oCAAsB,MAAM,CAAA;AAAA,YACpC,aAAe,EAAA,OAAA;AAAA,WAChB,CAAA;AAAA,SACF,CAAA,CAAA;AAAA,OACH;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC,CAAA;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
|
4
4
|
* @alpha
|
|
5
5
|
* Search backend module for the TechDocs index.
|
|
6
6
|
*/
|
|
7
|
-
declare const
|
|
7
|
+
declare const _default: () => _backstage_backend_plugin_api.BackendFeature;
|
|
8
8
|
|
|
9
|
-
export {
|
|
9
|
+
export { _default as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-search-backend-module-techdocs",
|
|
3
3
|
"description": "A module for the search backend that exports techdocs modules",
|
|
4
|
-
"version": "0.1.7
|
|
4
|
+
"version": "0.1.7",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -40,26 +40,26 @@
|
|
|
40
40
|
"clean": "backstage-cli package clean"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@backstage/backend-common": "^0.19.5
|
|
44
|
-
"@backstage/backend-plugin-api": "^0.6.3
|
|
45
|
-
"@backstage/backend-tasks": "^0.5.8
|
|
46
|
-
"@backstage/catalog-client": "^1.4.4
|
|
47
|
-
"@backstage/catalog-model": "^1.4.2
|
|
48
|
-
"@backstage/config": "^1.1.0
|
|
49
|
-
"@backstage/plugin-catalog-common": "^1.0.16
|
|
50
|
-
"@backstage/plugin-catalog-node": "^1.4.4
|
|
51
|
-
"@backstage/plugin-permission-common": "^0.7.8
|
|
52
|
-
"@backstage/plugin-search-backend-node": "^1.2.7
|
|
53
|
-
"@backstage/plugin-search-common": "^1.2.6
|
|
54
|
-
"@backstage/plugin-techdocs-node": "^1.8.0
|
|
43
|
+
"@backstage/backend-common": "^0.19.5",
|
|
44
|
+
"@backstage/backend-plugin-api": "^0.6.3",
|
|
45
|
+
"@backstage/backend-tasks": "^0.5.8",
|
|
46
|
+
"@backstage/catalog-client": "^1.4.4",
|
|
47
|
+
"@backstage/catalog-model": "^1.4.2",
|
|
48
|
+
"@backstage/config": "^1.1.0",
|
|
49
|
+
"@backstage/plugin-catalog-common": "^1.0.16",
|
|
50
|
+
"@backstage/plugin-catalog-node": "^1.4.4",
|
|
51
|
+
"@backstage/plugin-permission-common": "^0.7.8",
|
|
52
|
+
"@backstage/plugin-search-backend-node": "^1.2.7",
|
|
53
|
+
"@backstage/plugin-search-common": "^1.2.6",
|
|
54
|
+
"@backstage/plugin-techdocs-node": "^1.8.0",
|
|
55
55
|
"lodash": "^4.17.21",
|
|
56
56
|
"node-fetch": "^2.6.7",
|
|
57
57
|
"p-limit": "^3.1.0",
|
|
58
58
|
"winston": "^3.2.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@backstage/backend-test-utils": "^0.2.3
|
|
62
|
-
"@backstage/cli": "^0.22.13
|
|
61
|
+
"@backstage/backend-test-utils": "^0.2.3",
|
|
62
|
+
"@backstage/cli": "^0.22.13",
|
|
63
63
|
"msw": "^1.0.0"
|
|
64
64
|
},
|
|
65
65
|
"files": [
|