@adobe/helix-onedrive-support 10.1.2 → 10.2.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 +14 -0
- package/package.json +6 -6
- package/src/OneDriveAuth.d.ts +2 -1
- package/src/OneDriveAuth.js +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [10.2.0](https://github.com/adobe/helix-onedrive-support/compare/v10.1.3...v10.2.0) (2023-07-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* support onedrive-auth initialisation with accessToken without clientId ([d616cdd](https://github.com/adobe/helix-onedrive-support/commit/d616cdd12b5eda8f50471a98ea2555763ed4e61a))
|
|
7
|
+
|
|
8
|
+
## [10.1.3](https://github.com/adobe/helix-onedrive-support/compare/v10.1.2...v10.1.3) (2023-07-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency @adobe/helix-shared-tokencache to v1.2.8 ([3b35bf9](https://github.com/adobe/helix-onedrive-support/commit/3b35bf90cfdc1f4d7ad6598c21a13aff05dff72d))
|
|
14
|
+
|
|
1
15
|
## [10.1.2](https://github.com/adobe/helix-onedrive-support/compare/v10.1.1...v10.1.2) (2023-06-26)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-onedrive-support",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.0",
|
|
4
4
|
"description": "Helix OneDrive Support",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"homepage": "https://github.com/adobe/helix-onedrive-support#readme",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@adobe/fetch": "4.0.13",
|
|
31
|
-
"@adobe/helix-shared-tokencache": "1.2.
|
|
31
|
+
"@adobe/helix-shared-tokencache": "1.2.8",
|
|
32
32
|
"@azure/msal-node": "1.17.3",
|
|
33
33
|
"jose": "4.14.4"
|
|
34
34
|
},
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"@adobe/eslint-config-helix": "2.0.2",
|
|
37
37
|
"@semantic-release/changelog": "6.0.3",
|
|
38
38
|
"@semantic-release/git": "10.0.1",
|
|
39
|
-
"@aws-sdk/client-s3": "3.
|
|
39
|
+
"@aws-sdk/client-s3": "3.363.0",
|
|
40
40
|
"ajv": "8.12.0",
|
|
41
41
|
"c8": "8.0.0",
|
|
42
42
|
"codecov": "3.8.3",
|
|
43
43
|
"dotenv": "16.3.1",
|
|
44
|
-
"eslint": "8.
|
|
44
|
+
"eslint": "8.44.0",
|
|
45
45
|
"eslint-plugin-header": "3.1.1",
|
|
46
46
|
"eslint-plugin-import": "2.27.5",
|
|
47
47
|
"husky": "8.0.3",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"jsdoc-to-markdown": "8.0.0",
|
|
50
50
|
"jsdoc-tsimport-plugin": "1.0.5",
|
|
51
51
|
"junit-report-builder": "3.0.1",
|
|
52
|
-
"lint-staged": "13.2.
|
|
52
|
+
"lint-staged": "13.2.3",
|
|
53
53
|
"mocha": "10.2.0",
|
|
54
54
|
"mocha-multi-reporters": "1.5.1",
|
|
55
55
|
"nock": "13.3.1",
|
|
56
56
|
"npm": "9.7.2",
|
|
57
|
-
"semantic-release": "21.0.
|
|
57
|
+
"semantic-release": "21.0.6"
|
|
58
58
|
},
|
|
59
59
|
"lint-staged": {
|
|
60
60
|
"*.js": "eslint"
|
package/src/OneDriveAuth.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export enum AcquireMethod {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export declare interface OneDriveAuthOptions {
|
|
20
|
-
clientId
|
|
20
|
+
clientId?: string;
|
|
21
21
|
clientSecret?: string;
|
|
22
22
|
log?: Console;
|
|
23
23
|
tenant?: string;
|
|
@@ -25,6 +25,7 @@ export declare interface OneDriveAuthOptions {
|
|
|
25
25
|
onCode?: Function;
|
|
26
26
|
localAuthCache?:boolean;
|
|
27
27
|
acquireMethod?: AcquireMethod;
|
|
28
|
+
accessToken?: string;
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* use cache plugin instead for default (global) token cache.
|
package/src/OneDriveAuth.js
CHANGED
|
@@ -58,8 +58,8 @@ export class OneDriveAuth {
|
|
|
58
58
|
constructor(opts) {
|
|
59
59
|
this.fetchContext = keepAliveNoCache({ userAgent: 'adobe-fetch' });
|
|
60
60
|
|
|
61
|
-
if (!opts.clientId) {
|
|
62
|
-
throw new Error('
|
|
61
|
+
if (!opts.clientId && !opts.accessToken) {
|
|
62
|
+
throw new Error('Either clientId or accessToken must not be null.');
|
|
63
63
|
}
|
|
64
64
|
if (opts.username || opts.password) {
|
|
65
65
|
throw new Error('Username/password authentication no longer supported.');
|
|
@@ -100,6 +100,10 @@ export class OneDriveAuth {
|
|
|
100
100
|
caches: new Map(),
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
|
+
|
|
104
|
+
if (opts.accessToken) {
|
|
105
|
+
this.setAccessToken(opts.accessToken);
|
|
106
|
+
}
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
get app() {
|