Skip to content

Commit f0b02f7

Browse files
author
SDKAuto
committed
CodeGen from PR 33936 in Azure/azure-rest-api-specs
Merge 2639ceb1b4a2fe3149ee579ce686306c1cd7ea95 into b80151d5b8b7784d08a689bb040bfd0563aa3afb
1 parent 5471724 commit f0b02f7

File tree

317 files changed

+2887
-1884
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+2887
-1884
lines changed

sdk/sql/arm-sql/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

sdk/sql/arm-sql/README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,36 +44,33 @@ npm install @azure/identity
4444
```
4545

4646
You will also need to **register a new AAD application and grant access to Azure SqlManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
47-
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
4847

4948
For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
5049

5150
Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.
52-
51+
5352
```ts snippet:ReadmeSampleCreateClient_Node
5453
import { SqlManagementClient } from "@azure/arm-sql";
5554
import { DefaultAzureCredential } from "@azure/identity";
5655

5756
const subscriptionId = "00000000-0000-0000-0000-000000000000";
5857
const client = new SqlManagementClient(new DefaultAzureCredential(), subscriptionId);
5958
```
60-
59+
6160
For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.
62-
61+
6362
```ts snippet:ReadmeSampleCreateClient_Browser
6463
import { InteractiveBrowserCredential } from "@azure/identity";
6564
import { SqlManagementClient } from "@azure/arm-sql";
6665

67-
const subscriptionId = "00000000-0000-0000-0000-000000000000";
6866
const credential = new InteractiveBrowserCredential({
6967
tenantId: "<YOUR_TENANT_ID>",
70-
clientId: "<YOUR_CLIENT_ID>",
71-
});
68+
clientId: "<YOUR_CLIENT_ID>"
69+
});
7270
const client = new SqlManagementClient(credential, subscriptionId);
7371
```
7472

7573
### JavaScript Bundle
76-
7774
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).
7875

7976
## Key concepts
@@ -109,7 +106,6 @@ If you'd like to contribute to this library, please read the [contributing guide
109106
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
110107

111108

112-
113109
[azure_cli]: https://learn.microsoft.com/cli/azure
114110
[azure_sub]: https://azure.microsoft.com/free/
115111
[azure_sub]: https://azure.microsoft.com/free/

sdk/sql/arm-sql/api-extractor.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3-
"mainEntryPointFilePath": "dist/esm/index.d.ts",
3+
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
44
"docModel": {
55
"enabled": true
66
},
@@ -11,7 +11,7 @@
1111
"dtsRollup": {
1212
"enabled": true,
1313
"untrimmedFilePath": "",
14-
"publicTrimmedFilePath": "dist/arm-sql.d.ts"
14+
"publicTrimmedFilePath": "./types/arm-sql.d.ts"
1515
},
1616
"messages": {
1717
"tsdocMessageReporting": {
@@ -28,4 +28,4 @@
2828
}
2929
}
3030
}
31-
}
31+
}

sdk/sql/arm-sql/package.json

Lines changed: 50 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for SqlManagementClient.",
6-
"version": "11.0.0-beta.3",
6+
"version": "1.0.0-beta.1",
77
"engines": {
88
"node": ">=18.0.0"
99
},
1010
"dependencies": {
11-
"@azure/abort-controller": "^2.1.2",
12-
"@azure/core-auth": "^1.9.0",
13-
"@azure/core-client": "^1.9.2",
1411
"@azure/core-lro": "^2.5.4",
15-
"@azure/core-paging": "^1.6.2",
16-
"@azure/core-rest-pipeline": "^1.19.0",
17-
"tslib": "^2.8.1"
12+
"@azure/abort-controller": "^2.1.2",
13+
"@azure/core-paging": "^1.2.0",
14+
"@azure/core-client": "^1.7.0",
15+
"@azure/core-auth": "^1.6.0",
16+
"@azure/core-rest-pipeline": "^1.14.0",
17+
"tslib": "^2.2.0"
1818
},
1919
"keywords": [
2020
"node",
@@ -24,23 +24,24 @@
2424
"isomorphic"
2525
],
2626
"license": "MIT",
27-
"main": "./dist/commonjs/index.js",
28-
"module": "./dist/esm/index.js",
29-
"types": "./dist/commonjs/index.d.ts",
27+
"main": "./dist/index.js",
28+
"module": "./dist-esm/src/index.js",
29+
"types": "./types/arm-sql.d.ts",
3030
"devDependencies": {
31-
"@azure-tools/test-credential": "^2.0.0",
32-
"@azure-tools/test-recorder": "^4.1.0",
33-
"@azure-tools/test-utils-vitest": "^1.0.0",
31+
"typescript": "~5.8.2",
32+
"dotenv": "^16.0.0",
3433
"@azure/dev-tool": "^1.0.0",
35-
"@azure/identity": "^4.6.0",
34+
"@azure/identity": "^4.2.1",
3635
"@azure/logger": "^1.1.4",
36+
"@azure-tools/test-recorder": "^3.0.0",
37+
"@azure-tools/test-credential": "^1.1.0",
38+
"mocha": "^11.0.2",
39+
"@types/mocha": "^10.0.0",
40+
"tsx": "^4.7.1",
41+
"@types/chai": "^4.2.8",
42+
"chai": "^4.2.0",
3743
"@types/node": "^18.0.0",
38-
"@vitest/browser": "^3.0.9",
39-
"@vitest/coverage-istanbul": "^3.0.9",
40-
"dotenv": "^16.0.0",
41-
"playwright": "^1.50.1",
42-
"typescript": "~5.8.2",
43-
"vitest": "^3.0.9"
44+
"ts-node": "^10.0.0"
4445
},
4546
"repository": {
4647
"type": "git",
@@ -50,36 +51,46 @@
5051
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
5152
},
5253
"files": [
53-
"dist/",
54+
"dist/**/*.js",
55+
"dist/**/*.js.map",
56+
"dist/**/*.d.ts",
57+
"dist/**/*.d.ts.map",
58+
"dist-esm/**/*.js",
59+
"dist-esm/**/*.js.map",
60+
"dist-esm/**/*.d.ts",
61+
"dist-esm/**/*.d.ts.map",
62+
"src/**/*.ts",
5463
"README.md",
5564
"LICENSE",
56-
"review/",
57-
"CHANGELOG.md"
65+
"tsconfig.json",
66+
"review/*",
67+
"CHANGELOG.md",
68+
"types/*"
5869
],
5970
"scripts": {
60-
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
61-
"build:browser": "echo skipped",
71+
"build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api",
72+
"minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
73+
"prepack": "npm run build",
74+
"pack": "npm pack 2>&1",
75+
"extract-api": "dev-tool run extract-api",
76+
"lint": "echo skipped",
77+
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
6278
"build:node": "echo skipped",
63-
"build:samples": "echo skipped.",
79+
"build:browser": "echo skipped",
6480
"build:test": "echo skipped",
81+
"build:samples": "echo skipped.",
6582
"check-format": "echo skipped",
66-
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
6783
"execute:samples": "echo skipped",
68-
"extract-api": "dev-tool run extract-api",
6984
"format": "echo skipped",
70-
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
71-
"integration-test:browser": "echo skipped",
72-
"integration-test:node": "dev-tool run test:vitest --esm",
73-
"lint": "echo skipped",
74-
"minify": "echo skipped",
75-
"pack": "npm pack 2>&1",
76-
"prepack": "npm run build",
7785
"test": "npm run integration-test",
78-
"test:browser": "echo skipped",
7986
"test:node": "echo skipped",
87+
"test:browser": "echo skipped",
8088
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
89+
"unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node",
8190
"unit-test:browser": "echo skipped",
82-
"unit-test:node": "dev-tool run test:vitest",
91+
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
92+
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
93+
"integration-test:browser": "echo skipped",
8394
"update-snippets": "dev-tool run update-snippets"
8495
},
8596
"sideEffects": false,
@@ -92,53 +103,5 @@
92103
]
93104
},
94105
"autoPublish": true,
95-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/sql/arm-sql",
96-
"//sampleConfiguration": {
97-
"productName": "",
98-
"productSlugs": [
99-
"azure"
100-
],
101-
"disableDocsMs": true,
102-
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-sql?view=azure-node-preview"
103-
},
104-
"type": "module",
105-
"tshy": {
106-
"project": "./tsconfig.src.json",
107-
"exports": {
108-
"./package.json": "./package.json",
109-
".": "./src/index.ts"
110-
},
111-
"dialects": [
112-
"esm",
113-
"commonjs"
114-
],
115-
"esmDialects": [
116-
"browser",
117-
"react-native"
118-
],
119-
"selfLink": false
120-
},
121-
"browser": "./dist/browser/index.js",
122-
"react-native": "./dist/react-native/index.js",
123-
"exports": {
124-
"./package.json": "./package.json",
125-
".": {
126-
"browser": {
127-
"types": "./dist/browser/index.d.ts",
128-
"default": "./dist/browser/index.js"
129-
},
130-
"react-native": {
131-
"types": "./dist/react-native/index.d.ts",
132-
"default": "./dist/react-native/index.js"
133-
},
134-
"import": {
135-
"types": "./dist/esm/index.d.ts",
136-
"default": "./dist/esm/index.js"
137-
},
138-
"require": {
139-
"types": "./dist/commonjs/index.d.ts",
140-
"default": "./dist/commonjs/index.js"
141-
}
142-
}
143-
}
144-
}
106+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/sql/arm-sql"
107+
}

sdk/sql/arm-sql/sample.env

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
# App registration secret for AAD authentication
2-
AZURE_CLIENT_SECRET=
3-
AZURE_CLIENT_ID=
4-
AZURE_TENANT_ID=
1+
# Feel free to add your own environment variables.

sdk/sql/arm-sql/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
/// <reference lib="esnext.asynciterable" />
10-
export { getContinuationToken } from "./pagingHelper.js";
11-
export * from "./models/index.js";
12-
export { SqlManagementClient } from "./sqlManagementClient.js";
13-
export * from "./operationsInterfaces/index.js";
10+
export { getContinuationToken } from "./pagingHelper";
11+
export * from "./models";
12+
export { SqlManagementClient } from "./sqlManagementClient";
13+
export * from "./operationsInterfaces";

sdk/sql/arm-sql/src/lroImpl.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
*/
8+
9+
// Copyright (c) Microsoft Corporation.
10+
// Licensed under the MIT License.
11+
812
import { AbortSignalLike } from "@azure/abort-controller";
913
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
1014

0 commit comments

Comments
 (0)