@azure/arm-appcomplianceautomation 1.0.1-alpha.20250108.1 → 1.0.1-alpha.20250109.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.
Files changed (2) hide show
  1. package/README.md +28 -15
  2. package/package.json +13 -16
package/README.md CHANGED
@@ -48,23 +48,35 @@ Set the values of the client ID, tenant ID, and client secret of the AAD applica
48
48
 
49
49
  For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
50
50
 
51
- ```javascript
52
- const { AppComplianceAutomationToolForMicrosoft365 } = require("@azure/arm-appcomplianceautomation");
53
- const { DefaultAzureCredential } = require("@azure/identity");
54
- // For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
55
-
56
- const client = new AppComplianceAutomationToolForMicrosoft365(new DefaultAzureCredential());
57
-
58
- // For client-side applications running in the browser, use this code instead:
59
- // const credential = new InteractiveBrowserCredential({
60
- // tenantId: "<YOUR_TENANT_ID>",
61
- // clientId: "<YOUR_CLIENT_ID>"
62
- // });
63
- // const client = new AppComplianceAutomationToolForMicrosoft365(credential);
51
+ Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.
52
+
53
+ ```ts snippet:ReadmeSampleCreateClient_Node
54
+ import { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation";
55
+ import { DefaultAzureCredential } from "@azure/identity";
56
+
57
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
58
+ const client = new AppComplianceAutomationToolForMicrosoft365(
59
+ new DefaultAzureCredential(),
60
+ subscriptionId,
61
+ );
64
62
  ```
65
63
 
64
+ For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.
65
+
66
+ ```ts snippet:ReadmeSampleCreateClient_Browser
67
+ import { InteractiveBrowserCredential } from "@azure/identity";
68
+ import { AppComplianceAutomationToolForMicrosoft365 } from "@azure/arm-appcomplianceautomation";
69
+
70
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
71
+ const credential = new InteractiveBrowserCredential({
72
+ tenantId: "<YOUR_TENANT_ID>",
73
+ clientId: "<YOUR_CLIENT_ID>",
74
+ });
75
+ const client = new AppComplianceAutomationToolForMicrosoft365(credential, subscriptionId);
76
+ ```
66
77
 
67
78
  ### JavaScript Bundle
79
+
68
80
  To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
69
81
 
70
82
  ## Key concepts
@@ -79,8 +91,9 @@ To use this client library in the browser, first you need to use a bundler. For
79
91
 
80
92
  Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
81
93
 
82
- ```javascript
83
- const { setLogLevel } = require("@azure/logger");
94
+ ```ts snippet:SetLogLevel
95
+ import { setLogLevel } from "@azure/logger";
96
+
84
97
  setLogLevel("info");
85
98
  ```
86
99
 
package/package.json CHANGED
@@ -3,25 +3,26 @@
3
3
  "sdk-type": "mgmt",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "A generated SDK for AppComplianceAutomationToolForMicrosoft365.",
6
- "version": "1.0.1-alpha.20250108.1",
6
+ "version": "1.0.1-alpha.20250109.2",
7
7
  "engines": {
8
8
  "node": ">=18.0.0"
9
9
  },
10
10
  "dependencies": {
11
- "@azure/abort-controller": "^1.0.0",
12
- "@azure/core-auth": "^1.6.0",
13
- "@azure/core-client": "^1.7.0",
14
- "@azure/core-lro": "^2.5.4",
15
- "@azure/core-paging": "^1.2.0",
16
- "@azure/core-rest-pipeline": "^1.14.0",
17
- "tslib": "^2.2.0"
11
+ "@azure/abort-controller": "^2.1.2",
12
+ "@azure/core-auth": "^1.9.0",
13
+ "@azure/core-client": "^1.9.2",
14
+ "@azure/core-lro": "^2.7.2",
15
+ "@azure/core-paging": "^1.6.2",
16
+ "@azure/core-rest-pipeline": "^1.18.1",
17
+ "tslib": "^2.8.1"
18
18
  },
19
19
  "keywords": [
20
20
  "node",
21
21
  "azure",
22
22
  "typescript",
23
23
  "browser",
24
- "isomorphic"
24
+ "isomorphic",
25
+ "cloud"
25
26
  ],
26
27
  "license": "MIT",
27
28
  "main": "./dist/commonjs/index.js",
@@ -32,20 +33,16 @@
32
33
  "@azure-tools/test-recorder": ">=4.1.0-alpha <4.1.0-alphb",
33
34
  "@azure-tools/test-utils-vitest": ">=1.0.0-alpha <1.0.0-alphb",
34
35
  "@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
35
- "@azure/identity": "^4.0.1",
36
+ "@azure/identity": "^4.5.0",
36
37
  "@types/node": "^18.0.0",
37
38
  "@vitest/browser": "^2.1.8",
38
39
  "@vitest/coverage-istanbul": "^2.1.8",
39
40
  "dotenv": "^16.0.0",
40
41
  "playwright": "^1.49.1",
41
- "tsx": "^4.7.1",
42
42
  "typescript": "~5.7.2",
43
43
  "vitest": "^2.1.8"
44
44
  },
45
- "repository": {
46
- "type": "git",
47
- "url": "https://github.com/Azure/azure-sdk-for-js.git"
48
- },
45
+ "repository": "github:Azure/azure-sdk-for-js",
49
46
  "bugs": {
50
47
  "url": "https://github.com/Azure/azure-sdk-for-js/issues"
51
48
  },
@@ -80,7 +77,7 @@
80
77
  "unit-test": "npm run unit-test:node && npm run unit-test:browser",
81
78
  "unit-test:browser": "echo skipped",
82
79
  "unit-test:node": "dev-tool run test:vitest",
83
- "update-snippets": "echo skipped"
80
+ "update-snippets": "dev-tool run update-snippets"
84
81
  },
85
82
  "sideEffects": false,
86
83
  "//metadata": {