@backstage/plugin-catalog-backend-module-github 0.3.8-next.2 → 0.4.0-next.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 +39 -0
- package/alpha/package.json +1 -1
- package/config.d.ts +63 -0
- package/dist/alpha.cjs.js +73 -2
- package/dist/alpha.cjs.js.map +1 -1
- package/dist/alpha.d.ts +32 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend-module-github
|
|
2
2
|
|
|
3
|
+
## 0.4.0-next.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- fa7004d9722c: Added a `catalogModuleGithubOrgEntityProvider` for the new backend system
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 71114ac50e02: The export for the new backend system has been moved to be the `default` export.
|
|
12
|
+
|
|
13
|
+
For example, if you are currently importing the plugin using the following pattern:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { examplePlugin } from '@backstage/plugin-example-backend';
|
|
17
|
+
|
|
18
|
+
backend.add(examplePlugin);
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
It should be migrated to this:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
backend.add(import('@backstage/plugin-example-backend'));
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
- @backstage/plugin-catalog-backend@1.13.0-next.3
|
|
29
|
+
- @backstage/catalog-client@1.4.4-next.2
|
|
30
|
+
- @backstage/catalog-model@1.4.2-next.2
|
|
31
|
+
- @backstage/config@1.1.0-next.2
|
|
32
|
+
- @backstage/errors@1.2.2-next.0
|
|
33
|
+
- @backstage/integration@1.7.0-next.3
|
|
34
|
+
- @backstage/plugin-catalog-common@1.0.16-next.2
|
|
35
|
+
- @backstage/types@1.1.1-next.0
|
|
36
|
+
- @backstage/backend-plugin-api@0.6.3-next.3
|
|
37
|
+
- @backstage/backend-common@0.19.5-next.3
|
|
38
|
+
- @backstage/backend-tasks@0.5.8-next.3
|
|
39
|
+
- @backstage/plugin-catalog-node@1.4.4-next.3
|
|
40
|
+
- @backstage/plugin-events-node@0.2.12-next.3
|
|
41
|
+
|
|
3
42
|
## 0.3.8-next.2
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/config.d.ts
CHANGED
|
@@ -183,6 +183,69 @@ export interface Config {
|
|
|
183
183
|
schedule?: TaskScheduleDefinitionConfig;
|
|
184
184
|
};
|
|
185
185
|
};
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Configuration for catalogModuleGithubOrgEntityProvider
|
|
189
|
+
*/
|
|
190
|
+
githubOrg?:
|
|
191
|
+
| {
|
|
192
|
+
/**
|
|
193
|
+
* A stable id for this provider. Entities from this provider will
|
|
194
|
+
* be associated with this ID, so you should take care not to change
|
|
195
|
+
* it over time since that may lead to orphaned entities and/or
|
|
196
|
+
* conflicts.
|
|
197
|
+
*
|
|
198
|
+
* @example "ghe"
|
|
199
|
+
*/
|
|
200
|
+
id: string;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* The target that this provider should consume.
|
|
204
|
+
*
|
|
205
|
+
* @example "https://mycompany.github.com"
|
|
206
|
+
*/
|
|
207
|
+
githubUrl: string;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* The list of the GitHub orgs to consume. By default will consume all accessible
|
|
211
|
+
* orgs on the given GitHub instance (support for GitHub App integration only).
|
|
212
|
+
*/
|
|
213
|
+
orgs?: string[];
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* The refresh schedule to use.
|
|
217
|
+
*/
|
|
218
|
+
schedule: TaskScheduleDefinitionConfig;
|
|
219
|
+
}
|
|
220
|
+
| Array<{
|
|
221
|
+
/**
|
|
222
|
+
* A stable id for this provider. Entities from this provider will
|
|
223
|
+
* be associated with this ID, so you should take care not to change
|
|
224
|
+
* it over time since that may lead to orphaned entities and/or
|
|
225
|
+
* conflicts.
|
|
226
|
+
*
|
|
227
|
+
* @example "ghe"
|
|
228
|
+
*/
|
|
229
|
+
id: string;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* The target that this provider should consume.
|
|
233
|
+
*
|
|
234
|
+
* @example "https://mycompany.github.com"
|
|
235
|
+
*/
|
|
236
|
+
githubUrl: string;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* The list of the GitHub orgs to consume. By default will consume all accessible
|
|
240
|
+
* orgs on the given GitHub instance (support for GitHub App integration only).
|
|
241
|
+
*/
|
|
242
|
+
orgs?: string[];
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The refresh schedule to use.
|
|
246
|
+
*/
|
|
247
|
+
schedule: TaskScheduleDefinitionConfig;
|
|
248
|
+
}>;
|
|
186
249
|
};
|
|
187
250
|
};
|
|
188
251
|
}
|
package/dist/alpha.cjs.js
CHANGED
|
@@ -6,11 +6,12 @@ var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
|
6
6
|
var backendCommon = require('@backstage/backend-common');
|
|
7
7
|
var alpha = require('@backstage/plugin-catalog-node/alpha');
|
|
8
8
|
var GithubEntityProvider = require('./cjs/GithubEntityProvider-9bc718e3.cjs.js');
|
|
9
|
+
var backendTasks = require('@backstage/backend-tasks');
|
|
10
|
+
var pluginCatalogBackendModuleGithub = require('@backstage/plugin-catalog-backend-module-github');
|
|
9
11
|
require('@backstage/integration');
|
|
10
12
|
require('@backstage/plugin-catalog-node');
|
|
11
13
|
require('@octokit/graphql');
|
|
12
14
|
require('uuid');
|
|
13
|
-
require('@backstage/backend-tasks');
|
|
14
15
|
require('@backstage/catalog-model');
|
|
15
16
|
require('lodash');
|
|
16
17
|
require('minimatch');
|
|
@@ -38,5 +39,75 @@ const catalogModuleGithubEntityProvider = backendPluginApi.createBackendModule({
|
|
|
38
39
|
}
|
|
39
40
|
});
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
const githubOrgEntityProviderTransformsExtensionPoint = backendPluginApi.createExtensionPoint({
|
|
43
|
+
id: "catalog.githubOrgEntityProvider"
|
|
44
|
+
});
|
|
45
|
+
const catalogModuleGithubOrgEntityProvider = backendPluginApi.createBackendModule({
|
|
46
|
+
pluginId: "catalog",
|
|
47
|
+
moduleId: "githubOrgEntityProvider",
|
|
48
|
+
register(env) {
|
|
49
|
+
let userTransformer;
|
|
50
|
+
let teamTransformer;
|
|
51
|
+
env.registerExtensionPoint(
|
|
52
|
+
githubOrgEntityProviderTransformsExtensionPoint,
|
|
53
|
+
{
|
|
54
|
+
setUserTransformer(transformer) {
|
|
55
|
+
if (userTransformer) {
|
|
56
|
+
throw new Error("User transformer may only be set once");
|
|
57
|
+
}
|
|
58
|
+
userTransformer = transformer;
|
|
59
|
+
},
|
|
60
|
+
setTeamTransformer(transformer) {
|
|
61
|
+
if (teamTransformer) {
|
|
62
|
+
throw new Error("Team transformer may only be set once");
|
|
63
|
+
}
|
|
64
|
+
teamTransformer = transformer;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
env.registerInit({
|
|
69
|
+
deps: {
|
|
70
|
+
catalog: alpha.catalogProcessingExtensionPoint,
|
|
71
|
+
config: backendPluginApi.coreServices.rootConfig,
|
|
72
|
+
logger: backendPluginApi.coreServices.logger,
|
|
73
|
+
scheduler: backendPluginApi.coreServices.scheduler
|
|
74
|
+
},
|
|
75
|
+
async init({ catalog, config, logger, scheduler }) {
|
|
76
|
+
for (const definition of readDefinitionsFromConfig(config)) {
|
|
77
|
+
catalog.addEntityProvider(
|
|
78
|
+
pluginCatalogBackendModuleGithub.GithubMultiOrgEntityProvider.fromConfig(config, {
|
|
79
|
+
id: definition.id,
|
|
80
|
+
githubUrl: definition.githubUrl,
|
|
81
|
+
orgs: definition.orgs,
|
|
82
|
+
schedule: scheduler.createScheduledTaskRunner(
|
|
83
|
+
definition.schedule
|
|
84
|
+
),
|
|
85
|
+
logger: backendCommon.loggerToWinstonLogger(logger),
|
|
86
|
+
userTransformer,
|
|
87
|
+
teamTransformer
|
|
88
|
+
})
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
function readDefinitionsFromConfig(rootConfig) {
|
|
96
|
+
const baseKey = "catalog.providers.githubOrg";
|
|
97
|
+
const baseConfig = rootConfig.getOptional(baseKey);
|
|
98
|
+
if (!baseConfig) {
|
|
99
|
+
return [];
|
|
100
|
+
}
|
|
101
|
+
const configs = Array.isArray(baseConfig) ? rootConfig.getConfigArray(baseKey) : [rootConfig.getConfig(baseKey)];
|
|
102
|
+
return configs.map((c) => ({
|
|
103
|
+
id: c.getString("id"),
|
|
104
|
+
githubUrl: c.getString("githubUrl"),
|
|
105
|
+
orgs: c.getOptionalStringArray("orgs"),
|
|
106
|
+
schedule: backendTasks.readTaskScheduleDefinitionFromConfig(c.getConfig("schedule"))
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
exports.catalogModuleGithubOrgEntityProvider = catalogModuleGithubOrgEntityProvider;
|
|
111
|
+
exports["default"] = catalogModuleGithubEntityProvider;
|
|
112
|
+
exports.githubOrgEntityProviderTransformsExtensionPoint = githubOrgEntityProviderTransformsExtensionPoint;
|
|
42
113
|
//# sourceMappingURL=alpha.cjs.js.map
|
package/dist/alpha.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.cjs.js","sources":["../src/module/catalogModuleGithubEntityProvider.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 createBackendModule,\n coreServices,\n} from '@backstage/backend-plugin-api';\nimport { loggerToWinstonLogger } from '@backstage/backend-common';\nimport { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';\nimport { GithubEntityProvider } from '../providers/GithubEntityProvider';\n\n/**\n * Registers the `GithubEntityProvider` with the catalog processing extension point.\n *\n * @alpha\n */\nexport const catalogModuleGithubEntityProvider = createBackendModule({\n pluginId: 'catalog',\n moduleId: 'githubEntityProvider',\n register(env) {\n env.registerInit({\n deps: {\n catalog: catalogProcessingExtensionPoint,\n config: coreServices.rootConfig,\n logger: coreServices.logger,\n scheduler: coreServices.scheduler,\n },\n async init({ catalog, config, logger, scheduler }) {\n catalog.addEntityProvider(\n GithubEntityProvider.fromConfig(config, {\n logger: loggerToWinstonLogger(logger),\n scheduler,\n }),\n );\n },\n });\n },\n});\n"],"names":["createBackendModule","catalogProcessingExtensionPoint","coreServices","GithubEntityProvider","loggerToWinstonLogger"],"mappings":"
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":["../src/module/catalogModuleGithubEntityProvider.ts","../src/module/catalogModuleGithubOrgEntityProvider.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 createBackendModule,\n coreServices,\n} from '@backstage/backend-plugin-api';\nimport { loggerToWinstonLogger } from '@backstage/backend-common';\nimport { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';\nimport { GithubEntityProvider } from '../providers/GithubEntityProvider';\n\n/**\n * Registers the `GithubEntityProvider` with the catalog processing extension point.\n *\n * @alpha\n */\nexport const catalogModuleGithubEntityProvider = createBackendModule({\n pluginId: 'catalog',\n moduleId: 'githubEntityProvider',\n register(env) {\n env.registerInit({\n deps: {\n catalog: catalogProcessingExtensionPoint,\n config: coreServices.rootConfig,\n logger: coreServices.logger,\n scheduler: coreServices.scheduler,\n },\n async init({ catalog, config, logger, scheduler }) {\n catalog.addEntityProvider(\n GithubEntityProvider.fromConfig(config, {\n logger: loggerToWinstonLogger(logger),\n scheduler,\n }),\n );\n },\n });\n },\n});\n","/*\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 { loggerToWinstonLogger } from '@backstage/backend-common';\nimport {\n coreServices,\n createBackendModule,\n createExtensionPoint,\n} from '@backstage/backend-plugin-api';\nimport {\n readTaskScheduleDefinitionFromConfig,\n TaskScheduleDefinition,\n} from '@backstage/backend-tasks';\nimport { Config } from '@backstage/config';\nimport {\n GithubMultiOrgEntityProvider,\n TeamTransformer,\n UserTransformer,\n} from '@backstage/plugin-catalog-backend-module-github';\nimport { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';\n\n/**\n * Interface for {@link githubOrgEntityProviderTransformsExtensionPoint}.\n *\n * @alpha\n */\nexport interface GithubOrgEntityProviderTransformsExtensionPoint {\n /**\n * Set a custom transformer for transforming from GitHub users to catalog\n * entities.\n */\n setUserTransformer(transformer: UserTransformer): void;\n\n /**\n * Set a custom transformer for transforming from GitHub teams to catalog\n * entities.\n */\n setTeamTransformer(transformer: TeamTransformer): void;\n}\n\n/**\n * Extension point for runtime configuration of {@link catalogModuleGithubOrgEntityProvider}.\n *\n * @alpha\n */\nexport const githubOrgEntityProviderTransformsExtensionPoint =\n createExtensionPoint<GithubOrgEntityProviderTransformsExtensionPoint>({\n id: 'catalog.githubOrgEntityProvider',\n });\n\n/**\n * Registers the `GithubMultiOrgEntityProvider` with the catalog processing extension point.\n *\n * @alpha\n */\nexport const catalogModuleGithubOrgEntityProvider = createBackendModule({\n pluginId: 'catalog',\n moduleId: 'githubOrgEntityProvider',\n register(env) {\n let userTransformer: UserTransformer | undefined;\n let teamTransformer: TeamTransformer | undefined;\n\n env.registerExtensionPoint(\n githubOrgEntityProviderTransformsExtensionPoint,\n {\n setUserTransformer(transformer) {\n if (userTransformer) {\n throw new Error('User transformer may only be set once');\n }\n userTransformer = transformer;\n },\n setTeamTransformer(transformer) {\n if (teamTransformer) {\n throw new Error('Team transformer may only be set once');\n }\n teamTransformer = transformer;\n },\n },\n );\n\n env.registerInit({\n deps: {\n catalog: catalogProcessingExtensionPoint,\n config: coreServices.rootConfig,\n logger: coreServices.logger,\n scheduler: coreServices.scheduler,\n },\n async init({ catalog, config, logger, scheduler }) {\n for (const definition of readDefinitionsFromConfig(config)) {\n catalog.addEntityProvider(\n GithubMultiOrgEntityProvider.fromConfig(config, {\n id: definition.id,\n githubUrl: definition.githubUrl,\n orgs: definition.orgs,\n schedule: scheduler.createScheduledTaskRunner(\n definition.schedule,\n ),\n logger: loggerToWinstonLogger(logger),\n userTransformer,\n teamTransformer,\n }),\n );\n }\n },\n });\n },\n});\n\nfunction readDefinitionsFromConfig(rootConfig: Config): Array<{\n id: string;\n githubUrl: string;\n orgs?: string[];\n schedule: TaskScheduleDefinition;\n}> {\n const baseKey = 'catalog.providers.githubOrg';\n const baseConfig = rootConfig.getOptional(baseKey);\n if (!baseConfig) {\n return [];\n }\n\n const configs = Array.isArray(baseConfig)\n ? rootConfig.getConfigArray(baseKey)\n : [rootConfig.getConfig(baseKey)];\n\n return configs.map(c => ({\n id: c.getString('id'),\n githubUrl: c.getString('githubUrl'),\n orgs: c.getOptionalStringArray('orgs'),\n schedule: readTaskScheduleDefinitionFromConfig(c.getConfig('schedule')),\n }));\n}\n"],"names":["createBackendModule","catalogProcessingExtensionPoint","coreServices","GithubEntityProvider","loggerToWinstonLogger","createExtensionPoint","GithubMultiOrgEntityProvider","readTaskScheduleDefinitionFromConfig"],"mappings":"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"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
+
import { UserTransformer, TeamTransformer } from '@backstage/plugin-catalog-backend-module-github';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Registers the `GithubEntityProvider` with the catalog processing extension point.
|
|
@@ -7,4 +8,34 @@ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
|
7
8
|
*/
|
|
8
9
|
declare const catalogModuleGithubEntityProvider: () => _backstage_backend_plugin_api.BackendFeature;
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Interface for {@link githubOrgEntityProviderTransformsExtensionPoint}.
|
|
13
|
+
*
|
|
14
|
+
* @alpha
|
|
15
|
+
*/
|
|
16
|
+
interface GithubOrgEntityProviderTransformsExtensionPoint {
|
|
17
|
+
/**
|
|
18
|
+
* Set a custom transformer for transforming from GitHub users to catalog
|
|
19
|
+
* entities.
|
|
20
|
+
*/
|
|
21
|
+
setUserTransformer(transformer: UserTransformer): void;
|
|
22
|
+
/**
|
|
23
|
+
* Set a custom transformer for transforming from GitHub teams to catalog
|
|
24
|
+
* entities.
|
|
25
|
+
*/
|
|
26
|
+
setTeamTransformer(transformer: TeamTransformer): void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Extension point for runtime configuration of {@link catalogModuleGithubOrgEntityProvider}.
|
|
30
|
+
*
|
|
31
|
+
* @alpha
|
|
32
|
+
*/
|
|
33
|
+
declare const githubOrgEntityProviderTransformsExtensionPoint: _backstage_backend_plugin_api.ExtensionPoint<GithubOrgEntityProviderTransformsExtensionPoint>;
|
|
34
|
+
/**
|
|
35
|
+
* Registers the `GithubMultiOrgEntityProvider` with the catalog processing extension point.
|
|
36
|
+
*
|
|
37
|
+
* @alpha
|
|
38
|
+
*/
|
|
39
|
+
declare const catalogModuleGithubOrgEntityProvider: () => _backstage_backend_plugin_api.BackendFeature;
|
|
40
|
+
|
|
41
|
+
export { GithubOrgEntityProviderTransformsExtensionPoint, catalogModuleGithubOrgEntityProvider, catalogModuleGithubEntityProvider as default, githubOrgEntityProviderTransformsExtensionPoint };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-backend-module-github",
|
|
3
3
|
"description": "A Backstage catalog backend module that helps integrate towards GitHub",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0-next.3",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -43,19 +43,19 @@
|
|
|
43
43
|
"start": "backstage-cli package start"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@backstage/backend-common": "^0.19.5-next.
|
|
47
|
-
"@backstage/backend-plugin-api": "^0.6.3-next.
|
|
48
|
-
"@backstage/backend-tasks": "^0.5.8-next.
|
|
49
|
-
"@backstage/catalog-client": "^1.4.4-next.
|
|
50
|
-
"@backstage/catalog-model": "^1.4.2-next.
|
|
51
|
-
"@backstage/config": "^1.1.0-next.
|
|
52
|
-
"@backstage/errors": "^1.2.
|
|
53
|
-
"@backstage/integration": "^1.7.0-next.
|
|
54
|
-
"@backstage/plugin-catalog-backend": "^1.13.0-next.
|
|
55
|
-
"@backstage/plugin-catalog-common": "^1.0.16-next.
|
|
56
|
-
"@backstage/plugin-catalog-node": "^1.4.4-next.
|
|
57
|
-
"@backstage/plugin-events-node": "^0.2.12-next.
|
|
58
|
-
"@backstage/types": "^1.1.0",
|
|
46
|
+
"@backstage/backend-common": "^0.19.5-next.3",
|
|
47
|
+
"@backstage/backend-plugin-api": "^0.6.3-next.3",
|
|
48
|
+
"@backstage/backend-tasks": "^0.5.8-next.3",
|
|
49
|
+
"@backstage/catalog-client": "^1.4.4-next.2",
|
|
50
|
+
"@backstage/catalog-model": "^1.4.2-next.2",
|
|
51
|
+
"@backstage/config": "^1.1.0-next.2",
|
|
52
|
+
"@backstage/errors": "^1.2.2-next.0",
|
|
53
|
+
"@backstage/integration": "^1.7.0-next.3",
|
|
54
|
+
"@backstage/plugin-catalog-backend": "^1.13.0-next.3",
|
|
55
|
+
"@backstage/plugin-catalog-common": "^1.0.16-next.2",
|
|
56
|
+
"@backstage/plugin-catalog-node": "^1.4.4-next.3",
|
|
57
|
+
"@backstage/plugin-events-node": "^0.2.12-next.3",
|
|
58
|
+
"@backstage/types": "^1.1.1-next.0",
|
|
59
59
|
"@octokit/graphql": "^5.0.0",
|
|
60
60
|
"@octokit/rest": "^19.0.3",
|
|
61
61
|
"git-url-parse": "^13.0.0",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"winston": "^3.2.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@backstage/backend-test-utils": "^0.2.3-next.
|
|
70
|
-
"@backstage/cli": "^0.22.13-next.
|
|
69
|
+
"@backstage/backend-test-utils": "^0.2.3-next.3",
|
|
70
|
+
"@backstage/cli": "^0.22.13-next.3",
|
|
71
71
|
"@types/lodash": "^4.14.151",
|
|
72
72
|
"luxon": "^3.0.0",
|
|
73
73
|
"msw": "^1.0.0"
|