@backstage/backend-plugin-api 0.4.1-next.2 → 0.5.1-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/dist/index.d.ts +37 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @backstage/backend-plugin-api
|
|
2
2
|
|
|
3
|
+
## 0.5.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/config@1.0.7
|
|
9
|
+
- @backstage/backend-tasks@0.5.1-next.0
|
|
10
|
+
- @backstage/types@1.0.2
|
|
11
|
+
- @backstage/plugin-auth-node@0.2.13-next.0
|
|
12
|
+
- @backstage/plugin-permission-common@0.7.4
|
|
13
|
+
|
|
14
|
+
## 0.5.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- c1ee073a82b: Added `lastModifiedAt` field on `UrlReaderService` responses and a `lastModifiedAfter` option to `UrlReaderService.readUrl`.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 928a12a9b3e: Internal refactor of `/alpha` exports.
|
|
23
|
+
- 482dae5de1c: Updated link to docs.
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @backstage/plugin-auth-node@0.2.12
|
|
26
|
+
- @backstage/backend-tasks@0.5.0
|
|
27
|
+
- @backstage/plugin-permission-common@0.7.4
|
|
28
|
+
- @backstage/config@1.0.7
|
|
29
|
+
- @backstage/types@1.0.2
|
|
30
|
+
|
|
3
31
|
## 0.4.1-next.2
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -56,6 +56,25 @@ declare type ReadUrlOptions = {
|
|
|
56
56
|
* of the response along with a new ETag.
|
|
57
57
|
*/
|
|
58
58
|
etag?: string;
|
|
59
|
+
/**
|
|
60
|
+
* A date which can be provided to check whether a
|
|
61
|
+
* {@link UrlReaderService.readUrl} response has changed since the lastModifiedAt.
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
*
|
|
65
|
+
* In the {@link UrlReaderService.readUrl} response, an lastModifiedAt is returned
|
|
66
|
+
* along with data. The lastModifiedAt date represents the last time the data
|
|
67
|
+
* was modified.
|
|
68
|
+
*
|
|
69
|
+
* When an lastModifiedAfter is given in ReadUrlOptions, {@link UrlReaderService.readUrl}
|
|
70
|
+
* will compare the lastModifiedAfter against the lastModifiedAt of the target. If
|
|
71
|
+
* the data has not been modified since this date, the {@link UrlReaderService.readUrl}
|
|
72
|
+
* will throw a {@link @backstage/errors#NotModifiedError} indicating that the
|
|
73
|
+
* response does not contain any new data. If they do not match,
|
|
74
|
+
* {@link UrlReaderService.readUrl} will return the rest of the response along with new
|
|
75
|
+
* lastModifiedAt date.
|
|
76
|
+
*/
|
|
77
|
+
lastModifiedAfter?: Date;
|
|
59
78
|
/**
|
|
60
79
|
* An abort signal to pass down to the underlying request.
|
|
61
80
|
*
|
|
@@ -91,6 +110,10 @@ declare type ReadUrlResponse = {
|
|
|
91
110
|
* Can be used to compare and cache responses when doing subsequent calls.
|
|
92
111
|
*/
|
|
93
112
|
etag?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Last modified date of the file contents.
|
|
115
|
+
*/
|
|
116
|
+
lastModifiedAt?: Date;
|
|
94
117
|
};
|
|
95
118
|
/**
|
|
96
119
|
* An options object for {@link UrlReaderService.readTree} operations.
|
|
@@ -195,8 +218,18 @@ declare type ReadTreeResponse = {
|
|
|
195
218
|
* @public
|
|
196
219
|
*/
|
|
197
220
|
declare type ReadTreeResponseFile = {
|
|
221
|
+
/**
|
|
222
|
+
* The filepath of the data.
|
|
223
|
+
*/
|
|
198
224
|
path: string;
|
|
225
|
+
/**
|
|
226
|
+
* The binary contents of the file.
|
|
227
|
+
*/
|
|
199
228
|
content(): Promise<Buffer>;
|
|
229
|
+
/**
|
|
230
|
+
* The last modified timestamp of the data.
|
|
231
|
+
*/
|
|
232
|
+
lastModifiedAt?: Date;
|
|
200
233
|
};
|
|
201
234
|
/**
|
|
202
235
|
* An options object for search operations.
|
|
@@ -254,6 +287,10 @@ declare type SearchResponseFile = {
|
|
|
254
287
|
* The binary contents of the file.
|
|
255
288
|
*/
|
|
256
289
|
content(): Promise<Buffer>;
|
|
290
|
+
/**
|
|
291
|
+
* The last modified timestamp of the data.
|
|
292
|
+
*/
|
|
293
|
+
lastModifiedAt?: Date;
|
|
257
294
|
};
|
|
258
295
|
|
|
259
296
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/backend-plugin-api",
|
|
3
3
|
"description": "Core API used by Backstage backend plugins",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.1-next.0",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"publishConfig": {
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
"start": "backstage-cli package start"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@backstage/backend-tasks": "^0.5.
|
|
36
|
-
"@backstage/config": "^1.0.7
|
|
37
|
-
"@backstage/plugin-auth-node": "^0.2.
|
|
38
|
-
"@backstage/plugin-permission-common": "^0.7.4
|
|
35
|
+
"@backstage/backend-tasks": "^0.5.1-next.0",
|
|
36
|
+
"@backstage/config": "^1.0.7",
|
|
37
|
+
"@backstage/plugin-auth-node": "^0.2.13-next.0",
|
|
38
|
+
"@backstage/plugin-permission-common": "^0.7.4",
|
|
39
39
|
"@backstage/types": "^1.0.2",
|
|
40
40
|
"@types/express": "^4.17.6",
|
|
41
41
|
"express": "^4.17.1",
|
|
42
42
|
"knex": "^2.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@backstage/cli": "^0.22.
|
|
45
|
+
"@backstage/cli": "^0.22.6-next.0"
|
|
46
46
|
},
|
|
47
47
|
"files": [
|
|
48
48
|
"dist",
|