microsoft-graph 2.2.1 → 2.2.2
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/.github/dependabot.yml +12 -0
- package/README.md +4 -9
- package/SECURITY.md +9 -0
- package/package.json +7 -5
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "npm"
|
|
9
|
+
directory: "/"
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
12
|
+
|
package/README.md
CHANGED
|
@@ -4,11 +4,6 @@ This is an extensible library that allows access to Microsoft's GraphAPI, includ
|
|
|
4
4
|
|
|
5
5
|
Note that this is a THIRD PARTY library and not associated with Microsoft.
|
|
6
6
|
|
|
7
|
-
## Breaking changes
|
|
8
|
-
### v2.0.0
|
|
9
|
-
* Contextual authentication. Authentication details are no longer automatically loaded from envs. You need to call `const contextRef = register(tenantId, clientId, clientSecret, httpProxy);`
|
|
10
|
-
* References are created with new funcs. Like `createSiteRef`.
|
|
11
|
-
|
|
12
7
|
## Usage
|
|
13
8
|
Install the NPM package `npm i microsoft-graph`, then:
|
|
14
9
|
|
|
@@ -19,8 +14,8 @@ Something like this, but whatever works in your context.
|
|
|
19
14
|
const tenantId = getEnvironmentVariable("AZURE_TENANT_ID") as TenantId;
|
|
20
15
|
const clientId = getEnvironmentVariable("AZURE_CLIENT_ID") as ClientId;
|
|
21
16
|
const clientSecret = getEnvironmentVariable("AZURE_CLIENT_SECRET") as ClientSecret;
|
|
22
|
-
const siteId = getEnvironmentVariable("
|
|
23
|
-
const driveId = getEnvironmentVariable("
|
|
17
|
+
const siteId = getEnvironmentVariable("SHAREPOINT_SITE_ID") as SiteId;
|
|
18
|
+
const driveId = getEnvironmentVariable("SHAREPOINT_DRIVE_ID") as DriveId;
|
|
24
19
|
```
|
|
25
20
|
|
|
26
21
|
### Get reference to drive
|
|
@@ -61,8 +56,8 @@ for (const item of await listDriveItems(folder)) {
|
|
|
61
56
|
|
|
62
57
|
### Cleanup
|
|
63
58
|
```typescript
|
|
64
|
-
await
|
|
65
|
-
await
|
|
59
|
+
await safeDeleteWorkbook(workbook); // Closes session and waits for unlock
|
|
60
|
+
await deleteDriveItem(folder);
|
|
66
61
|
```
|
|
67
62
|
|
|
68
63
|
From here, have a look at:
|
package/SECURITY.md
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microsoft-graph",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "Microsoft GraphAPI SDK for NodeJS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"fix": "biome check --fix",
|
|
10
10
|
"build": "npm run check && tsc && npx tsx update-exports.ts",
|
|
11
11
|
"release": "npm run build && npm publish --access public",
|
|
12
|
-
"test": "vitest --bail=3"
|
|
12
|
+
"test": "vitest --bail=3",
|
|
13
|
+
"update": "npm-check-updates -u"
|
|
13
14
|
},
|
|
14
15
|
"keywords": [
|
|
15
16
|
"Microsoft",
|
|
@@ -27,14 +28,15 @@
|
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@biomejs/biome": "^1.9.4",
|
|
29
30
|
"@microsoft/microsoft-graph-types": "^2.40.0",
|
|
30
|
-
"@types/node": "^22.13.
|
|
31
|
+
"@types/node": "^22.13.14",
|
|
31
32
|
"globals": "^16.0.0",
|
|
33
|
+
"npm-check-updates": "^17.1.16",
|
|
32
34
|
"tsx": "^4.19.3",
|
|
33
|
-
"typescript": "^5.
|
|
35
|
+
"typescript": "^5.8.2",
|
|
34
36
|
"vitest": "^3.0.9"
|
|
35
37
|
},
|
|
36
38
|
"dependencies": {
|
|
37
|
-
"@azure/identity": "^4.
|
|
39
|
+
"@azure/identity": "^4.8.0",
|
|
38
40
|
"https-proxy-agent": "^7.0.6",
|
|
39
41
|
"node-fetch": "^3.3.2"
|
|
40
42
|
},
|