Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 85 additions & 49 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

17 changes: 0 additions & 17 deletions sdk/scvmm/arm-scvmm/CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion sdk/scvmm/arm-scvmm/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
38 changes: 17 additions & 21 deletions sdk/scvmm/arm-scvmm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f

The Microsoft.ScVmm Rest API spec.

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-scvmm) |
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-scvmm) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
Key links:

- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm)
- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-scvmm)
- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-scvmm?view=azure-node-preview)
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm/samples)

## Getting started

Expand All @@ -30,7 +32,7 @@ Install the Azure ScVmm client library for JavaScript with `npm`:
npm install @azure/arm-scvmm
```

### Create and authenticate a `ScVmm`
### Create and authenticate a `ScVmmClient`

To create a client object to access the Azure ScVmm API, you will need the `endpoint` of your Azure ScVmm resource and a `credential`. The Azure ScVmm client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure ScVmm resource in the [Azure Portal][azure_portal].
Expand All @@ -44,43 +46,41 @@ npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure ScVmm** 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).

Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.

```ts snippet:ReadmeSampleCreateClient_Node
import { ScVmm } from "@azure/arm-scvmm";
import { ScVmmClient } from "@azure/arm-scvmm";
import { DefaultAzureCredential } from "@azure/identity";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ScVmm(new DefaultAzureCredential(), subscriptionId);
const client = new ScVmmClient(new DefaultAzureCredential(), subscriptionId);
```

For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.

```ts snippet:ReadmeSampleCreateClient_Browser
import { InteractiveBrowserCredential } from "@azure/identity";
import { ScVmm } from "@azure/arm-scvmm";
import { ScVmmClient } from "@azure/arm-scvmm";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new InteractiveBrowserCredential({
tenantId: "<YOUR_TENANT_ID>",
clientId: "<YOUR_CLIENT_ID>",
});
const client = new ScVmm(credential, subscriptionId);
clientId: "<YOUR_CLIENT_ID>"
});
const client = new ScVmmClient(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

### ScVmm
### ScVmmClient

`ScVmm` is the primary interface for developers using the Azure ScVmm client library. Explore the methods on this client object to understand the different features of the Azure ScVmm service that you can access.
`ScVmmClient` is the primary interface for developers using the Azure ScVmm client library. Explore the methods on this client object to understand the different features of the Azure ScVmm service that you can access.

## Troubleshooting

Expand All @@ -98,7 +98,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur

## Next steps

Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm/samples) directory for detailed examples on how to use this library.

## Contributing

Expand All @@ -108,10 +108,6 @@ If you'd like to contribute to this library, please read the [contributing guide

- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)



[azure_cli]: https://learn.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[azure_sub]: https://azure.microsoft.com/free/
[azure_portal]: https://portal.azure.com
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
Expand Down
8 changes: 0 additions & 8 deletions sdk/scvmm/arm-scvmm/_meta.json

This file was deleted.

6 changes: 0 additions & 6 deletions sdk/scvmm/arm-scvmm/assets.json

This file was deleted.

14 changes: 14 additions & 0 deletions sdk/scvmm/arm-scvmm/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"@azure/azure-sdk/ts-package-json-files-required": "off",
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
"tsdoc/syntax": "warn",
},
},
]);
170 changes: 74 additions & 96 deletions sdk/scvmm/arm-scvmm/package.json
Original file line number Diff line number Diff line change
@@ -1,144 +1,122 @@
{
"name": "@azure/arm-scvmm",
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ScVmm.",
"version": "1.0.1",
"description": "A generated SDK for ScVmmClient.",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/abort-controller": "^2.1.2",
"@azure/core-auth": "^1.9.0",
"@azure/core-client": "^1.9.2",
"@azure/core-lro": "^2.5.4",
"@azure/core-paging": "^1.6.2",
"@azure/core-rest-pipeline": "^1.19.0",
"tslib": "^2.8.1"
"sideEffects": false,
"autoPublish": false,
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts",
"./models": "./src/models/index.ts",
"./api": "./src/api/index.ts"
},
"dialects": [
"esm",
"commonjs"
],
"esmDialects": [
"browser",
"react-native"
],
"selfLink": false,
"project": "./tsconfig.src.json"
},
"type": "module",
"keywords": [
"node",
"azure",
"cloud",
"typescript",
"browser",
"isomorphic"
],
"author": "Microsoft Corporation",
"license": "MIT",
"main": "./dist/commonjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/commonjs/index.d.ts",
"files": [
"dist/",
"README.md",
"LICENSE",
"review/",
"CHANGELOG.md"
],
"sdk-type": "mgmt",
"repository": "github:Azure/azure-sdk-for-js",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm/README.md",
"prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
"//metadata": {
"constantPaths": [
{
"path": "src/api/scVmmContext.ts",
"prefix": "userAgentInfo"
}
]
},
"dependencies": {
"@azure-rest/core-client": "^2.3.1",
"@azure/abort-controller": "^2.1.2",
"@azure/core-auth": "^1.9.0",
"@azure/core-lro": "^3.1.0",
"@azure/core-rest-pipeline": "^1.19.1",
"@azure/core-util": "^1.11.0",
"@azure/logger": "^1.1.4",
"tslib": "^2.8.1"
},
"devDependencies": {
"@azure-tools/test-credential": "^2.0.0",
"@azure-tools/test-recorder": "^4.1.0",
"@azure-tools/test-utils-vitest": "^1.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.6.0",
"@azure/logger": "^1.1.4",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@azure/identity": "^4.8.0",
"@types/node": "^18.0.0",
"@vitest/browser": "^3.0.9",
"@vitest/coverage-istanbul": "^3.0.9",
"dotenv": "^16.0.0",
"playwright": "^1.50.1",
"typescript": "~5.8.2",
"eslint": "^9.9.0",
"playwright": "^1.51.1",
"typescript": "~5.7.2",
"vitest": "^3.0.9"
},
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/",
"README.md",
"LICENSE",
"review/",
"CHANGELOG.md"
],
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"build:browser": "echo skipped",
"build:node": "echo skipped",
"build:samples": "echo skipped.",
"build:test": "echo skipped",
"check-format": "echo skipped",
"build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f",
"build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
"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",
"execute:samples": "dev-tool samples run samples-dev",
"extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
"generate:client": "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:vitest --esm",
"lint": "echo skipped",
"lint": "eslint package.json api-extractor.json src test",
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
"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": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
"test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "dev-tool run update-snippets"
},
"sideEffects": false,
"//metadata": {
"constantPaths": [
{
"path": "src/scVmm.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/scvmm/arm-scvmm",
"//sampleConfiguration": {
"productName": "",
"productName": "@azure/arm-scvmm",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-scvmm?view=azure-node-preview"
},
"type": "module",
"tshy": {
"project": "./tsconfig.src.json",
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
},
"dialects": [
"esm",
"commonjs"
],
"esmDialects": [
"browser",
"react-native"
],
"selfLink": false
},
"browser": "./dist/browser/index.js",
"react-native": "./dist/react-native/index.js",
"exports": {
"./package.json": "./package.json",
".": {
"browser": {
"types": "./dist/browser/index.d.ts",
"default": "./dist/browser/index.js"
},
"react-native": {
"types": "./dist/react-native/index.d.ts",
"default": "./dist/react-native/index.js"
},
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
}
"react-native": "./dist/react-native/index.js"
}
Loading