@adobe/helix-onedrive-support 11.3.38 → 11.4.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 +7 -0
- package/package.json +1 -1
- package/src/OneDrive.d.ts +6 -0
- package/src/OneDrive.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [11.4.0](https://github.com/adobe/helix-onedrive-support/compare/v11.3.38...v11.4.0) (2024-07-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* allow to set user agent ([070167d](https://github.com/adobe/helix-onedrive-support/commit/070167dd77b1c793f0afb1031edfce5cc8b23a92))
|
|
7
|
+
|
|
1
8
|
## [11.3.38](https://github.com/adobe/helix-onedrive-support/compare/v11.3.37...v11.3.38) (2024-06-29)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/OneDrive.d.ts
CHANGED
|
@@ -29,6 +29,12 @@ export declare interface OneDriveOptions {
|
|
|
29
29
|
* Note that the cache is only used, if the `noShareLinkCache` flag is `falsy`
|
|
30
30
|
*/
|
|
31
31
|
shareLinkCache?: Map<string, DriveItem>,
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* user agent to include by default in the requests
|
|
35
|
+
* @example "NONISV|Contoso|GovernanceCheck/1.0"
|
|
36
|
+
*/
|
|
37
|
+
userAgent: string;
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
export declare interface GraphResult {
|
package/src/OneDrive.js
CHANGED
|
@@ -87,7 +87,9 @@ export class OneDrive {
|
|
|
87
87
|
* @param {OneDriveOptions} opts Options
|
|
88
88
|
*/
|
|
89
89
|
constructor(opts) {
|
|
90
|
-
this.fetchContext = keepAliveNoCache({
|
|
90
|
+
this.fetchContext = keepAliveNoCache({
|
|
91
|
+
userAgent: opts.userAgent || 'adobe-fetch',
|
|
92
|
+
});
|
|
91
93
|
|
|
92
94
|
if (!opts.auth) {
|
|
93
95
|
throw new Error('Missing auth.');
|