@backstage/plugin-catalog-backend-module-incremental-ingestion 0.0.0-nightly-20250626024305 → 0.0.0-nightly-20250627024218
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,19 +1,20 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend-module-incremental-ingestion
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20250627024218
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
+
- 3507fcd: Just some more circular dep cleanup
|
|
7
8
|
- e2dd095: Fixed bug in `IncrementalIngestionEngine` by adding `burstLength` check when a burst completes
|
|
8
9
|
- Updated dependencies
|
|
9
|
-
- @backstage/plugin-catalog-backend@0.0.0-nightly-
|
|
10
|
-
- @backstage/config@0.0.0-nightly-
|
|
11
|
-
- @backstage/
|
|
12
|
-
- @backstage/
|
|
13
|
-
- @backstage/
|
|
14
|
-
- @backstage/plugin-
|
|
15
|
-
- @backstage/plugin-
|
|
16
|
-
- @backstage/
|
|
10
|
+
- @backstage/plugin-catalog-backend@0.0.0-nightly-20250627024218
|
|
11
|
+
- @backstage/config@0.0.0-nightly-20250627024218
|
|
12
|
+
- @backstage/plugin-permission-common@0.0.0-nightly-20250627024218
|
|
13
|
+
- @backstage/catalog-model@0.0.0-nightly-20250627024218
|
|
14
|
+
- @backstage/backend-defaults@0.0.0-nightly-20250627024218
|
|
15
|
+
- @backstage/backend-plugin-api@0.0.0-nightly-20250627024218
|
|
16
|
+
- @backstage/plugin-catalog-node@0.0.0-nightly-20250627024218
|
|
17
|
+
- @backstage/plugin-events-node@0.0.0-nightly-20250627024218
|
|
17
18
|
- @backstage/errors@1.2.7
|
|
18
19
|
- @backstage/types@1.2.1
|
|
19
20
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,62 +1,8 @@
|
|
|
1
1
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
-
import { IncrementalEntityProviderOptions as IncrementalEntityProviderOptions$1, IncrementalEntityProvider as IncrementalEntityProvider$1 } from '@backstage/plugin-catalog-backend-module-incremental-ingestion';
|
|
3
2
|
import { DeferredEntity } from '@backstage/plugin-catalog-node';
|
|
4
3
|
import { EventParams } from '@backstage/plugin-events-node';
|
|
5
4
|
import { HumanDuration } from '@backstage/types';
|
|
6
5
|
|
|
7
|
-
/**
|
|
8
|
-
* @public
|
|
9
|
-
* Interface for {@link incrementalIngestionProvidersExtensionPoint}.
|
|
10
|
-
*/
|
|
11
|
-
interface IncrementalIngestionProviderExtensionPoint {
|
|
12
|
-
/** Adds a new incremental entity provider */
|
|
13
|
-
addProvider<TCursor, TContext>(config: {
|
|
14
|
-
options: IncrementalEntityProviderOptions$1;
|
|
15
|
-
provider: IncrementalEntityProvider$1<TCursor, TContext>;
|
|
16
|
-
}): void;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @public
|
|
20
|
-
*
|
|
21
|
-
* Extension point for registering incremental ingestion providers.
|
|
22
|
-
* The `catalogModuleIncrementalIngestionEntityProvider` must be installed for these providers to work.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
*
|
|
26
|
-
* ```ts
|
|
27
|
-
* backend.add(createBackendModule({
|
|
28
|
-
* pluginId: 'catalog',
|
|
29
|
-
* moduleId: 'my-incremental-provider',
|
|
30
|
-
* register(env) {
|
|
31
|
-
* env.registerInit({
|
|
32
|
-
* deps: {
|
|
33
|
-
* extension: incrementalIngestionProvidersExtensionPoint,
|
|
34
|
-
* },
|
|
35
|
-
* async init({ extension }) {
|
|
36
|
-
* extension.addProvider({
|
|
37
|
-
* burstInterval: ...,
|
|
38
|
-
* burstLength: ...,
|
|
39
|
-
* restLength: ...,
|
|
40
|
-
* }, {
|
|
41
|
-
* next(context, cursor) {
|
|
42
|
-
* ...
|
|
43
|
-
* },
|
|
44
|
-
* ...
|
|
45
|
-
* })
|
|
46
|
-
* })
|
|
47
|
-
* })
|
|
48
|
-
* }
|
|
49
|
-
* }))
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
declare const incrementalIngestionProvidersExtensionPoint: _backstage_backend_plugin_api.ExtensionPoint<IncrementalIngestionProviderExtensionPoint>;
|
|
53
|
-
/**
|
|
54
|
-
* Registers the incremental entity provider with the catalog processing extension point.
|
|
55
|
-
*
|
|
56
|
-
* @public
|
|
57
|
-
*/
|
|
58
|
-
declare const catalogModuleIncrementalIngestionEntityProvider: _backstage_backend_plugin_api.BackendFeature;
|
|
59
|
-
|
|
60
6
|
/**
|
|
61
7
|
* Ingest entities into the catalog in bite-sized chunks.
|
|
62
8
|
*
|
|
@@ -192,4 +138,57 @@ interface IncrementalEntityProviderOptions {
|
|
|
192
138
|
rejectEmptySourceCollections?: boolean;
|
|
193
139
|
}
|
|
194
140
|
|
|
141
|
+
/**
|
|
142
|
+
* @public
|
|
143
|
+
* Interface for {@link incrementalIngestionProvidersExtensionPoint}.
|
|
144
|
+
*/
|
|
145
|
+
interface IncrementalIngestionProviderExtensionPoint {
|
|
146
|
+
/** Adds a new incremental entity provider */
|
|
147
|
+
addProvider<TCursor, TContext>(config: {
|
|
148
|
+
options: IncrementalEntityProviderOptions;
|
|
149
|
+
provider: IncrementalEntityProvider<TCursor, TContext>;
|
|
150
|
+
}): void;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* @public
|
|
154
|
+
*
|
|
155
|
+
* Extension point for registering incremental ingestion providers.
|
|
156
|
+
* The `catalogModuleIncrementalIngestionEntityProvider` must be installed for these providers to work.
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
*
|
|
160
|
+
* ```ts
|
|
161
|
+
* backend.add(createBackendModule({
|
|
162
|
+
* pluginId: 'catalog',
|
|
163
|
+
* moduleId: 'my-incremental-provider',
|
|
164
|
+
* register(env) {
|
|
165
|
+
* env.registerInit({
|
|
166
|
+
* deps: {
|
|
167
|
+
* extension: incrementalIngestionProvidersExtensionPoint,
|
|
168
|
+
* },
|
|
169
|
+
* async init({ extension }) {
|
|
170
|
+
* extension.addProvider({
|
|
171
|
+
* burstInterval: ...,
|
|
172
|
+
* burstLength: ...,
|
|
173
|
+
* restLength: ...,
|
|
174
|
+
* }, {
|
|
175
|
+
* next(context, cursor) {
|
|
176
|
+
* ...
|
|
177
|
+
* },
|
|
178
|
+
* ...
|
|
179
|
+
* })
|
|
180
|
+
* })
|
|
181
|
+
* })
|
|
182
|
+
* }
|
|
183
|
+
* }))
|
|
184
|
+
* ```
|
|
185
|
+
*/
|
|
186
|
+
declare const incrementalIngestionProvidersExtensionPoint: _backstage_backend_plugin_api.ExtensionPoint<IncrementalIngestionProviderExtensionPoint>;
|
|
187
|
+
/**
|
|
188
|
+
* Registers the incremental entity provider with the catalog processing extension point.
|
|
189
|
+
*
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
declare const catalogModuleIncrementalIngestionEntityProvider: _backstage_backend_plugin_api.BackendFeature;
|
|
193
|
+
|
|
195
194
|
export { type EntityIteratorResult, type IncrementalEntityEventResult, type IncrementalEntityProvider, type IncrementalEntityProviderOptions, type IncrementalIngestionProviderExtensionPoint, catalogModuleIncrementalIngestionEntityProvider as default, incrementalIngestionProvidersExtensionPoint };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalogModuleIncrementalIngestionEntityProvider.cjs.js","sources":["../../src/module/catalogModuleIncrementalIngestionEntityProvider.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 coreServices,\n createBackendModule,\n createExtensionPoint,\n} from '@backstage/backend-plugin-api';\nimport { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';\nimport {
|
|
1
|
+
{"version":3,"file":"catalogModuleIncrementalIngestionEntityProvider.cjs.js","sources":["../../src/module/catalogModuleIncrementalIngestionEntityProvider.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 coreServices,\n createBackendModule,\n createExtensionPoint,\n} from '@backstage/backend-plugin-api';\nimport { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';\nimport { WrapperProviders } from './WrapperProviders';\nimport { eventsServiceRef } from '@backstage/plugin-events-node';\nimport {\n IncrementalEntityProvider,\n IncrementalEntityProviderOptions,\n} from '../types';\n\n/**\n * @public\n * Interface for {@link incrementalIngestionProvidersExtensionPoint}.\n */\nexport interface IncrementalIngestionProviderExtensionPoint {\n /** Adds a new incremental entity provider */\n addProvider<TCursor, TContext>(config: {\n options: IncrementalEntityProviderOptions;\n provider: IncrementalEntityProvider<TCursor, TContext>;\n }): void;\n}\n\n/**\n * @public\n *\n * Extension point for registering incremental ingestion providers.\n * The `catalogModuleIncrementalIngestionEntityProvider` must be installed for these providers to work.\n *\n * @example\n *\n * ```ts\n * backend.add(createBackendModule({\n * pluginId: 'catalog',\n * moduleId: 'my-incremental-provider',\n * register(env) {\n * env.registerInit({\n * deps: {\n * extension: incrementalIngestionProvidersExtensionPoint,\n * },\n * async init({ extension }) {\n * extension.addProvider({\n * burstInterval: ...,\n * burstLength: ...,\n * restLength: ...,\n * }, {\n * next(context, cursor) {\n * ...\n * },\n * ...\n * })\n * })\n * })\n * }\n * }))\n * ```\n */\nexport const incrementalIngestionProvidersExtensionPoint =\n createExtensionPoint<IncrementalIngestionProviderExtensionPoint>({\n id: 'catalog.incrementalIngestionProvider.providers',\n });\n\n/**\n * Registers the incremental entity provider with the catalog processing extension point.\n *\n * @public\n */\nexport const catalogModuleIncrementalIngestionEntityProvider =\n createBackendModule({\n pluginId: 'catalog',\n moduleId: 'incremental-ingestion-entity-provider',\n register(env) {\n const addedProviders = new Array<{\n provider: IncrementalEntityProvider<unknown, unknown>;\n options: IncrementalEntityProviderOptions;\n }>();\n\n env.registerExtensionPoint(incrementalIngestionProvidersExtensionPoint, {\n addProvider({ options, provider }) {\n addedProviders.push({ options, provider });\n },\n });\n\n env.registerInit({\n deps: {\n catalog: catalogProcessingExtensionPoint,\n config: coreServices.rootConfig,\n database: coreServices.database,\n httpRouter: coreServices.httpRouter,\n logger: coreServices.logger,\n scheduler: coreServices.scheduler,\n events: eventsServiceRef,\n },\n async init({\n catalog,\n config,\n database,\n httpRouter,\n logger,\n scheduler,\n events,\n }) {\n const client = await database.getClient();\n\n const providers = new WrapperProviders({\n config,\n logger,\n client,\n scheduler,\n events,\n });\n\n for (const entry of addedProviders) {\n const wrapped = providers.wrap(entry.provider, entry.options);\n catalog.addEntityProvider(wrapped);\n }\n\n httpRouter.use(providers.adminRouter());\n },\n });\n },\n });\n"],"names":["createExtensionPoint","createBackendModule","catalogProcessingExtensionPoint","coreServices","eventsServiceRef","WrapperProviders"],"mappings":";;;;;;;AA2EO,MAAM,8CACXA,qCAAiE,CAAA;AAAA,EAC/D,EAAI,EAAA;AACN,CAAC;AAOI,MAAM,kDACXC,oCAAoB,CAAA;AAAA,EAClB,QAAU,EAAA,SAAA;AAAA,EACV,QAAU,EAAA,uCAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAM,MAAA,cAAA,GAAiB,IAAI,KAGxB,EAAA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
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-backend-module-incremental-ingestion",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20250627024218",
|
|
4
4
|
"description": "An entity provider for streaming large asset sources into the catalog",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin-module",
|
|
@@ -55,15 +55,15 @@
|
|
|
55
55
|
"test": "backstage-cli package test"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@backstage/backend-defaults": "0.0.0-nightly-
|
|
59
|
-
"@backstage/backend-plugin-api": "0.0.0-nightly-
|
|
60
|
-
"@backstage/catalog-model": "
|
|
61
|
-
"@backstage/config": "0.0.0-nightly-
|
|
58
|
+
"@backstage/backend-defaults": "0.0.0-nightly-20250627024218",
|
|
59
|
+
"@backstage/backend-plugin-api": "0.0.0-nightly-20250627024218",
|
|
60
|
+
"@backstage/catalog-model": "0.0.0-nightly-20250627024218",
|
|
61
|
+
"@backstage/config": "0.0.0-nightly-20250627024218",
|
|
62
62
|
"@backstage/errors": "1.2.7",
|
|
63
|
-
"@backstage/plugin-catalog-backend": "0.0.0-nightly-
|
|
64
|
-
"@backstage/plugin-catalog-node": "0.0.0-nightly-
|
|
65
|
-
"@backstage/plugin-events-node": "0.0.0-nightly-
|
|
66
|
-
"@backstage/plugin-permission-common": "0.0.0-nightly-
|
|
63
|
+
"@backstage/plugin-catalog-backend": "0.0.0-nightly-20250627024218",
|
|
64
|
+
"@backstage/plugin-catalog-node": "0.0.0-nightly-20250627024218",
|
|
65
|
+
"@backstage/plugin-events-node": "0.0.0-nightly-20250627024218",
|
|
66
|
+
"@backstage/plugin-permission-common": "0.0.0-nightly-20250627024218",
|
|
67
67
|
"@backstage/types": "1.2.1",
|
|
68
68
|
"@opentelemetry/api": "^1.9.0",
|
|
69
69
|
"express": "^4.17.1",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"uuid": "^11.0.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@backstage/backend-test-utils": "0.0.0-nightly-
|
|
77
|
-
"@backstage/cli": "0.0.0-nightly-
|
|
76
|
+
"@backstage/backend-test-utils": "0.0.0-nightly-20250627024218",
|
|
77
|
+
"@backstage/cli": "0.0.0-nightly-20250627024218",
|
|
78
78
|
"@types/express": "^4.17.6",
|
|
79
79
|
"@types/luxon": "^3.0.0"
|
|
80
80
|
}
|