@backstage/plugin-search-backend-module-pg 0.5.36-next.2 → 0.5.36

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,17 @@
1
1
  # @backstage/plugin-search-backend-module-pg
2
2
 
3
+ ## 0.5.36
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
+ - Updated dependencies
10
+ - @backstage/plugin-search-backend-node@1.3.3
11
+ - @backstage/backend-plugin-api@1.0.1
12
+ - @backstage/config@1.2.0
13
+ - @backstage/plugin-search-common@1.2.14
14
+
3
15
  ## 0.5.36-next.2
4
16
 
5
17
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-search-backend-module-pg__alpha",
3
- "version": "0.5.36-next.2",
3
+ "version": "0.5.36",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/alpha.cjs.js CHANGED
@@ -2,38 +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 PgSearchEngine = require('./PgSearchEngine/PgSearchEngine.cjs.js');
5
+ var module$1 = require('./module.cjs.js');
8
6
 
9
- var alpha = backendPluginApi.createBackendModule({
10
- pluginId: "search",
11
- moduleId: "postgres-engine",
12
- register(env) {
13
- env.registerInit({
14
- deps: {
15
- searchEngineRegistry: alpha$1.searchEngineRegistryExtensionPoint,
16
- database: backendPluginApi.coreServices.database,
17
- config: backendPluginApi.coreServices.rootConfig,
18
- logger: backendPluginApi.coreServices.logger
19
- },
20
- async init({ searchEngineRegistry, database, config, logger }) {
21
- if (await PgSearchEngine.PgSearchEngine.supported(database)) {
22
- searchEngineRegistry.setSearchEngine(
23
- await PgSearchEngine.PgSearchEngine.fromConfig(config, {
24
- database,
25
- logger
26
- })
27
- );
28
- } else {
29
- logger.warn(
30
- "Postgres search engine is not supported, skipping registration of search-backend-module-pg"
31
- );
32
- }
33
- }
34
- });
35
- }
36
- });
7
+ const _feature = module$1.default;
37
8
 
38
- exports.default = alpha;
9
+ exports.default = _feature;
39
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 */\nimport {\n coreServices,\n createBackendModule,\n} from '@backstage/backend-plugin-api';\nimport { searchEngineRegistryExtensionPoint } from '@backstage/plugin-search-backend-node/alpha';\nimport { PgSearchEngine } from './PgSearchEngine';\n\n/**\n * @alpha\n * Search backend module for the Postgres engine.\n */\nexport default createBackendModule({\n pluginId: 'search',\n moduleId: 'postgres-engine',\n register(env) {\n env.registerInit({\n deps: {\n searchEngineRegistry: searchEngineRegistryExtensionPoint,\n database: coreServices.database,\n config: coreServices.rootConfig,\n logger: coreServices.logger,\n },\n async init({ searchEngineRegistry, database, config, logger }) {\n if (await PgSearchEngine.supported(database)) {\n searchEngineRegistry.setSearchEngine(\n await PgSearchEngine.fromConfig(config, {\n database,\n logger,\n }),\n );\n } else {\n logger.warn(\n 'Postgres search engine is not supported, skipping registration of search-backend-module-pg',\n );\n }\n },\n });\n },\n});\n"],"names":["createBackendModule","searchEngineRegistryExtensionPoint","coreServices","PgSearchEngine"],"mappings":";;;;;;;;AA0BA,YAAeA,oCAAoB,CAAA;AAAA,EACjC,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,iBAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,oBAAsB,EAAAC,0CAAA;AAAA,QACtB,UAAUC,6BAAa,CAAA,QAAA;AAAA,QACvB,QAAQA,6BAAa,CAAA,UAAA;AAAA,QACrB,QAAQA,6BAAa,CAAA,MAAA;AAAA,OACvB;AAAA,MACA,MAAM,IAAK,CAAA,EAAE,sBAAsB,QAAU,EAAA,MAAA,EAAQ,QAAU,EAAA;AAC7D,QAAA,IAAI,MAAMC,6BAAA,CAAe,SAAU,CAAA,QAAQ,CAAG,EAAA;AAC5C,UAAqB,oBAAA,CAAA,eAAA;AAAA,YACnB,MAAMA,6BAAe,CAAA,UAAA,CAAW,MAAQ,EAAA;AAAA,cACtC,QAAA;AAAA,cACA,MAAA;AAAA,aACD,CAAA;AAAA,WACH,CAAA;AAAA,SACK,MAAA;AACL,UAAO,MAAA,CAAA,IAAA;AAAA,YACL,4FAAA;AAAA,WACF,CAAA;AAAA,SACF;AAAA,OACF;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,9 +1,6 @@
1
1
  import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
2
 
3
- /**
4
- * @alpha
5
- * Search backend module for the Postgres engine.
6
- */
7
- declare const _default: _backstage_backend_plugin_api.BackendFeature;
3
+ /** @alpha */
4
+ declare const _feature: _backstage_backend_plugin_api.BackendFeature;
8
5
 
9
- export { _default as default };
6
+ export { _feature as default };
package/dist/index.cjs.js CHANGED
@@ -1,10 +1,14 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var module$1 = require('./module.cjs.js');
3
6
  var DatabaseDocumentStore = require('./database/DatabaseDocumentStore.cjs.js');
4
7
  var PgSearchEngine = require('./PgSearchEngine/PgSearchEngine.cjs.js');
5
8
 
6
9
 
7
10
 
11
+ exports.default = module$1.default;
8
12
  exports.DatabaseDocumentStore = DatabaseDocumentStore.DatabaseDocumentStore;
9
13
  exports.PgSearchEngine = PgSearchEngine.PgSearchEngine;
10
14
  //# 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,9 +1,16 @@
1
+ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
1
2
  import { LoggerService, DatabaseService } from '@backstage/backend-plugin-api';
2
3
  import { IndexableDocument, SearchQuery, IndexableResultSet } from '@backstage/plugin-search-common';
3
4
  import { Knex } from 'knex';
4
5
  import { BatchSearchEngineIndexer, SearchEngine } from '@backstage/plugin-search-backend-node';
5
6
  import { Config } from '@backstage/config';
6
7
 
8
+ /**
9
+ * @public
10
+ * Search backend module for the Postgres engine.
11
+ */
12
+ declare const _default: _backstage_backend_plugin_api.BackendFeature;
13
+
7
14
  /** @public */
8
15
  type PgSearchEngineIndexerOptions = {
9
16
  batchSize: number;
@@ -138,4 +145,4 @@ declare class DatabaseDocumentStore implements DatabaseStore {
138
145
  query(tx: Knex.Transaction, searchQuery: PgSearchQuery): Promise<DocumentResultRow[]>;
139
146
  }
140
147
 
141
- export { type ConcretePgSearchQuery, DatabaseDocumentStore, type DatabaseStore, type DocumentResultRow, PgSearchEngine, PgSearchEngineIndexer, type PgSearchEngineIndexerOptions, type PgSearchHighlightOptions, type PgSearchOptions, type PgSearchQuery, type PgSearchQueryTranslator, type PgSearchQueryTranslatorOptions, type RawDocumentRow };
148
+ export { type ConcretePgSearchQuery, DatabaseDocumentStore, type DatabaseStore, type DocumentResultRow, PgSearchEngine, PgSearchEngineIndexer, type PgSearchEngineIndexerOptions, type PgSearchHighlightOptions, type PgSearchOptions, type PgSearchQuery, type PgSearchQueryTranslator, type PgSearchQueryTranslatorOptions, type RawDocumentRow, _default as default };
@@ -0,0 +1,39 @@
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 PgSearchEngine = require('./PgSearchEngine/PgSearchEngine.cjs.js');
8
+
9
+ var feature = backendPluginApi.createBackendModule({
10
+ pluginId: "search",
11
+ moduleId: "postgres-engine",
12
+ register(env) {
13
+ env.registerInit({
14
+ deps: {
15
+ searchEngineRegistry: alpha.searchEngineRegistryExtensionPoint,
16
+ database: backendPluginApi.coreServices.database,
17
+ config: backendPluginApi.coreServices.rootConfig,
18
+ logger: backendPluginApi.coreServices.logger
19
+ },
20
+ async init({ searchEngineRegistry, database, config, logger }) {
21
+ if (await PgSearchEngine.PgSearchEngine.supported(database)) {
22
+ searchEngineRegistry.setSearchEngine(
23
+ await PgSearchEngine.PgSearchEngine.fromConfig(config, {
24
+ database,
25
+ logger
26
+ })
27
+ );
28
+ } else {
29
+ logger.warn(
30
+ "Postgres search engine is not supported, skipping registration of search-backend-module-pg"
31
+ );
32
+ }
33
+ }
34
+ });
35
+ }
36
+ });
37
+
38
+ exports.default = feature;
39
+ //# 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 */\nimport {\n coreServices,\n createBackendModule,\n} from '@backstage/backend-plugin-api';\nimport { searchEngineRegistryExtensionPoint } from '@backstage/plugin-search-backend-node/alpha';\nimport { PgSearchEngine } from './PgSearchEngine';\n\n/**\n * @public\n * Search backend module for the Postgres engine.\n */\nexport default createBackendModule({\n pluginId: 'search',\n moduleId: 'postgres-engine',\n register(env) {\n env.registerInit({\n deps: {\n searchEngineRegistry: searchEngineRegistryExtensionPoint,\n database: coreServices.database,\n config: coreServices.rootConfig,\n logger: coreServices.logger,\n },\n async init({ searchEngineRegistry, database, config, logger }) {\n if (await PgSearchEngine.supported(database)) {\n searchEngineRegistry.setSearchEngine(\n await PgSearchEngine.fromConfig(config, {\n database,\n logger,\n }),\n );\n } else {\n logger.warn(\n 'Postgres search engine is not supported, skipping registration of search-backend-module-pg',\n );\n }\n },\n });\n },\n});\n"],"names":["createBackendModule","searchEngineRegistryExtensionPoint","coreServices","PgSearchEngine"],"mappings":";;;;;;;;AA0BA,cAAeA,oCAAoB,CAAA;AAAA,EACjC,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,iBAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,oBAAsB,EAAAC,wCAAA;AAAA,QACtB,UAAUC,6BAAa,CAAA,QAAA;AAAA,QACvB,QAAQA,6BAAa,CAAA,UAAA;AAAA,QACrB,QAAQA,6BAAa,CAAA,MAAA;AAAA,OACvB;AAAA,MACA,MAAM,IAAK,CAAA,EAAE,sBAAsB,QAAU,EAAA,MAAA,EAAQ,QAAU,EAAA;AAC7D,QAAA,IAAI,MAAMC,6BAAA,CAAe,SAAU,CAAA,QAAQ,CAAG,EAAA;AAC5C,UAAqB,oBAAA,CAAA,eAAA;AAAA,YACnB,MAAMA,6BAAe,CAAA,UAAA,CAAW,MAAQ,EAAA;AAAA,cACtC,QAAA;AAAA,cACA,MAAA;AAAA,aACD,CAAA;AAAA,WACH,CAAA;AAAA,SACK,MAAA;AACL,UAAO,MAAA,CAAA,IAAA;AAAA,YACL,4FAAA;AAAA,WACF,CAAA;AAAA,SACF;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-search-backend-module-pg",
3
- "version": "0.5.36-next.2",
3
+ "version": "0.5.36",
4
4
  "description": "A module for the search backend that implements search using PostgreSQL",
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,17 +51,17 @@
50
51
  },
51
52
  "dependencies": {
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
  "knex": "^3.0.0",
58
59
  "lodash": "^4.17.21",
59
60
  "uuid": "^9.0.0"
60
61
  },
61
62
  "devDependencies": {
62
- "@backstage/backend-test-utils": "1.0.1-next.2",
63
- "@backstage/cli": "0.28.0-next.2"
63
+ "@backstage/backend-test-utils": "^1.0.1",
64
+ "@backstage/cli": "^0.28.0"
64
65
  },
65
66
  "configSchema": "config.d.ts"
66
67
  }