@backstage/plugin-catalog-backend-module-msgraph 0.4.3-next.2 → 0.4.4-next.0
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 +28 -0
- package/README.md +19 -7
- package/alpha/package.json +6 -0
- package/config.d.ts +13 -9
- package/dist/index.alpha.d.ts +610 -0
- package/dist/index.beta.d.ts +584 -0
- package/dist/index.cjs.js +57 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +346 -306
- package/package.json +18 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend-module-msgraph
|
|
2
2
|
|
|
3
|
+
## 0.4.4-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8d1a5e08ca: `MicrosoftGraphOrgEntityProvider`: Add option to configure schedule via `app-config.yaml` instead of in code.
|
|
8
|
+
|
|
9
|
+
Please find how to configure the schedule at the config at
|
|
10
|
+
https://github.com/backstage/backstage/tree/master/plugins/catalog-backend-module-msgraph#readme
|
|
11
|
+
|
|
12
|
+
- 384f99c276: Add `microsoftGraphOrgEntityProviderCatalogModule` (new backend-plugin-api, alpha).
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @backstage/plugin-catalog-backend@1.5.1-next.0
|
|
15
|
+
- @backstage/backend-tasks@0.3.7-next.0
|
|
16
|
+
- @backstage/catalog-model@1.1.3-next.0
|
|
17
|
+
- @backstage/backend-plugin-api@0.1.4-next.0
|
|
18
|
+
- @backstage/plugin-catalog-node@1.2.1-next.0
|
|
19
|
+
- @backstage/config@1.0.4-next.0
|
|
20
|
+
|
|
21
|
+
## 0.4.3
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
- @backstage/catalog-model@1.1.2
|
|
27
|
+
- @backstage/plugin-catalog-backend@1.5.0
|
|
28
|
+
- @backstage/backend-tasks@0.3.6
|
|
29
|
+
- @backstage/config@1.0.3
|
|
30
|
+
|
|
3
31
|
## 0.4.3-next.2
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -85,6 +85,13 @@ catalog:
|
|
|
85
85
|
# in order to add extra information to your groups that can be used on your custom groupTransformers
|
|
86
86
|
# See https://docs.microsoft.com/en-us/graph/api/resources/schemaextension?view=graph-rest-1.0
|
|
87
87
|
select: ['id', 'displayName', 'description']
|
|
88
|
+
schedule: # optional; same options as in TaskScheduleDefinition
|
|
89
|
+
# supports cron, ISO duration, "human duration" as used in code
|
|
90
|
+
frequency: { hours: 1 }
|
|
91
|
+
# supports ISO duration, "human duration" as used in code
|
|
92
|
+
timeout: { minutes: 50 }
|
|
93
|
+
# supports ISO duration, "human duration" as used in code
|
|
94
|
+
initialDelay: { seconds: 15},
|
|
88
95
|
```
|
|
89
96
|
|
|
90
97
|
`user.filter` and `userGroupMember.filter` are mutually exclusive, only one can be provided. If both are provided, an error will be thrown.
|
|
@@ -116,13 +123,21 @@ yarn add --cwd packages/backend @backstage/plugin-catalog-backend-module-msgraph
|
|
|
116
123
|
+ builder.addEntityProvider(
|
|
117
124
|
+ MicrosoftGraphOrgEntityProvider.fromConfig(env.config, {
|
|
118
125
|
+ logger: env.logger,
|
|
126
|
+
+ scheduler,
|
|
127
|
+
+ }),
|
|
128
|
+
+ );
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Instead of configuring the refresh schedule inside the config (per provider instance),
|
|
132
|
+
you can define it in code (for all of them):
|
|
133
|
+
|
|
134
|
+
```diff
|
|
135
|
+
- scheduler,
|
|
119
136
|
+ schedule: env.scheduler.createScheduledTaskRunner({
|
|
120
137
|
+ frequency: { hours: 1 },
|
|
121
138
|
+ timeout: { minutes: 50 },
|
|
122
|
-
+ initialDelay: { seconds: 15}
|
|
139
|
+
+ initialDelay: { seconds: 15},
|
|
123
140
|
+ }),
|
|
124
|
-
+ }),
|
|
125
|
-
+ );
|
|
126
141
|
```
|
|
127
142
|
|
|
128
143
|
## Customize the Processor or Entity Provider
|
|
@@ -161,10 +176,7 @@ export async function myGroupTransformer(
|
|
|
161
176
|
builder.addEntityProvider(
|
|
162
177
|
MicrosoftGraphOrgEntityProvider.fromConfig(env.config, {
|
|
163
178
|
logger: env.logger,
|
|
164
|
-
|
|
165
|
-
frequency: { minutes: 5 },
|
|
166
|
-
timeout: { minutes: 3 },
|
|
167
|
-
}),
|
|
179
|
+
scheduler,
|
|
168
180
|
+ groupTransformer: myGroupTransformer,
|
|
169
181
|
}),
|
|
170
182
|
);
|
package/config.d.ts
CHANGED
|
@@ -14,14 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
import { TaskScheduleDefinitionConfig } from '@backstage/backend-tasks';
|
|
18
|
+
|
|
17
19
|
export interface Config {
|
|
18
|
-
/**
|
|
19
|
-
* Configuration options for the catalog plugin.
|
|
20
|
-
*/
|
|
21
20
|
catalog?: {
|
|
22
|
-
/**
|
|
23
|
-
* List of processor-specific options and attributes
|
|
24
|
-
*/
|
|
25
21
|
processors?: {
|
|
26
22
|
/**
|
|
27
23
|
* MicrosoftGraphOrgReaderProcessor configuration
|
|
@@ -109,9 +105,7 @@ export interface Config {
|
|
|
109
105
|
}>;
|
|
110
106
|
};
|
|
111
107
|
};
|
|
112
|
-
|
|
113
|
-
* List of provider-specific options and attributes
|
|
114
|
-
*/
|
|
108
|
+
|
|
115
109
|
providers?: {
|
|
116
110
|
/**
|
|
117
111
|
* MicrosoftGraphOrgEntityProvider configuration.
|
|
@@ -209,6 +203,11 @@ export interface Config {
|
|
|
209
203
|
*/
|
|
210
204
|
search?: string;
|
|
211
205
|
};
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* (Optional) TaskScheduleDefinition for the refresh.
|
|
209
|
+
*/
|
|
210
|
+
schedule?: TaskScheduleDefinitionConfig;
|
|
212
211
|
}
|
|
213
212
|
| Record<
|
|
214
213
|
string,
|
|
@@ -292,6 +291,11 @@ export interface Config {
|
|
|
292
291
|
*/
|
|
293
292
|
search?: string;
|
|
294
293
|
};
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* (Optional) TaskScheduleDefinition for the refresh.
|
|
297
|
+
*/
|
|
298
|
+
schedule?: TaskScheduleDefinitionConfig;
|
|
295
299
|
}
|
|
296
300
|
>;
|
|
297
301
|
};
|