diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index f52e8265a995..a31f18e9aaa7 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2692,7 +2692,7 @@ packages: version: 0.0.0 '@rush-temp/arm-confluent@file:projects/arm-confluent.tgz': - resolution: {integrity: sha512-LyR0wtT6/smPX+yMvftXoDVp4ZQd8jMyDyCP+LnhI605m/qTe5Fm3vupvUlXb/HV5wUSCO6CgXAMzKZ8CIjYVA==, tarball: file:projects/arm-confluent.tgz} + resolution: {integrity: sha512-756/jZc43qNMkncd8WLbTr7E0iESMxvwgwJIA9vz2Y75j1gy0fg7pOnv7VfYkDS+hEPKbFaDc8kr/riMtsbavg==, tarball: file:projects/arm-confluent.tgz} version: 0.0.0 '@rush-temp/arm-connectedcache@file:projects/arm-connectedcache.tgz': @@ -11247,17 +11247,17 @@ snapshots: dependencies: '@azure-tools/test-credential': 1.3.1 '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 '@types/chai': 4.3.20 '@types/mocha': 10.0.10 '@types/node': 18.19.68 chai: 4.5.0 dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + mocha: 10.8.2 + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) tslib: 2.8.1 - typescript: 5.7.2 + tsx: 4.19.2 + typescript: 5.6.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' diff --git a/sdk/confluent/arm-confluent/README.md b/sdk/confluent/arm-confluent/README.md index b8c3545ba633..792138c96780 100644 --- a/sdk/confluent/arm-confluent/README.md +++ b/sdk/confluent/arm-confluent/README.md @@ -2,9 +2,11 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ConfluentManagement client. + + [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confluent/arm-confluent) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-confluent) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-confluent) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-confluent) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -42,9 +44,8 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure ConfluentManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -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`. -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). +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). ```javascript const { ConfluentManagementClient } = require("@azure/arm-confluent"); @@ -62,8 +63,8 @@ const client = new ConfluentManagementClient(new DefaultAzureCredential(), subsc // const client = new ConfluentManagementClient(credential, subscriptionId); ``` -### JavaScript Bundle +### JavaScript Bundle 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). ## Key concepts @@ -99,7 +100,7 @@ If you'd like to contribute to this library, please read the [contributing guide ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fconfluent%2Farm-confluent%2FREADME.png) -[azure_cli]: https://learn.microsoft.com/cli/azure +[azure_cli]: https://docs.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/ [azure_sub]: https://azure.microsoft.com/free/ [azure_portal]: https://portal.azure.com diff --git a/sdk/confluent/arm-confluent/_meta.json b/sdk/confluent/arm-confluent/_meta.json index 00c51770a19f..535ece9488e7 100644 --- a/sdk/confluent/arm-confluent/_meta.json +++ b/sdk/confluent/arm-confluent/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3004d02873a4b583ba6a3966a370f1ba19b5da1d", + "commit": "07553490c3269e53a744ea490531c82c3e02a26d", "readme": "specification/confluent/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\confluent\\resource-manager\\readme.md --use=@autorest/typescript@6.0.17 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/confluent/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", - "use": "@autorest/typescript@6.0.17" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/confluent/arm-confluent/package.json b/sdk/confluent/arm-confluent/package.json index 888b815e3ac1..2787a1aced93 100644 --- a/sdk/confluent/arm-confluent/package.json +++ b/sdk/confluent/arm-confluent/package.json @@ -8,11 +8,11 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, @@ -28,18 +28,19 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-confluent.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "typescript": "~5.6.2", + "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", + "@azure/identity": "^4.2.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", + "tsx": "^4.7.1", + "@types/chai": "^4.2.8", "chai": "^4.2.0", - "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -67,28 +68,28 @@ ], "scripts": { "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", "test": "npm run integration-test", - "test:browser": "echo skipped", "test:node": "echo skipped", + "test:browser": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -101,13 +102,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confluent/arm-confluent", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-confluent?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confluent/arm-confluent" +} \ No newline at end of file diff --git a/sdk/confluent/arm-confluent/sample.env b/sdk/confluent/arm-confluent/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/confluent/arm-confluent/sample.env +++ b/sdk/confluent/arm-confluent/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/confluent/arm-confluent/test/sampleTest.ts b/sdk/confluent/arm-confluent/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/confluent/arm-confluent/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env, +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/confluent/arm-confluent/tsconfig.json b/sdk/confluent/arm-confluent/tsconfig.json index dabc91bb234f..b35d05ad6e9d 100644 --- a/sdk/confluent/arm-confluent/tsconfig.json +++ b/sdk/confluent/arm-confluent/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-confluent": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "src/**/*.ts", + "test/**/*.ts" ], "exclude": [ "node_modules"