Skip to content

[AutoPR @azure/arm-computefleet] [TEST] Spec-gen-sdk Before add test coverage code in azure fleet #15559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
23 changes: 16 additions & 7 deletions sdk/computefleet/arm-computefleet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# Release History

## 1.0.1 (Unreleased)

## 2.0.0 (2025-05-09)
### Features Added

### Breaking Changes
- Added Interface ErrorAdditionalInfo
- Added Interface ErrorDetail
- Added Interface ErrorResponse
- Interface VirtualMachineScaleSetDataDisk has a new optional parameter diskIopsReadWrite
- Added Enum KnownVersions
- Enum KnownAcceleratorType has a new value Fpga
- Enum KnownDiskControllerTypes has a new value Scsi

### Bugs Fixed

### Other Changes
### Breaking Changes

- Interface VirtualMachineScaleSetDataDisk no longer has parameter diskIOPSReadWrite
- Enum KnownAcceleratorType no longer has value FPGA
- Enum KnownDiskControllerTypes no longer has value SCSI


## 1.0.0 (2024-10-21)

### Features Added
Expand Down
2 changes: 1 addition & 1 deletion sdk/computefleet/arm-computefleet/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.
19 changes: 10 additions & 9 deletions sdk/computefleet/arm-computefleet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureFleet client.

Azure Fleet Service

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

Key links:

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

## Getting started

Expand Down Expand Up @@ -43,7 +45,6 @@ npm install @azure/identity
```

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

Expand All @@ -63,16 +64,15 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur
import { InteractiveBrowserCredential } from "@azure/identity";
import { AzureFleetClient } from "@azure/arm-computefleet";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new InteractiveBrowserCredential({
tenantId: "<YOUR_TENANT_ID>",
clientId: "<YOUR_CLIENT_ID>",
});
clientId: "<YOUR_CLIENT_ID>"
});
const client = new AzureFleetClient(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
Expand All @@ -95,6 +95,7 @@ setLogLevel("info");

For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).


## Contributing

If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
Expand Down
6 changes: 0 additions & 6 deletions sdk/computefleet/arm-computefleet/assets.json

This file was deleted.

14 changes: 14 additions & 0 deletions sdk/computefleet/arm-computefleet/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",
},
},
]);
118 changes: 88 additions & 30 deletions sdk/computefleet/arm-computefleet/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"name": "@azure/arm-computefleet",
"version": "1.0.1",
"description": "Azure Fleet Service",
"version": "2.0.0",
"description": "A generated SDK for AzureFleetClient.",
"engines": {
"node": ">=18.0.0"
},
"sideEffects": false,
"autoPublish": false,
"tshy": {
"project": "./tsconfig.src.json",
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts",
"./api": "./src/api/index.ts",
"./api/fleets": "./src/api/fleets/index.ts",
"./api/operations": "./src/api/operations/index.ts",
"./models": "./src/models/index.ts"
},
"dialects": [
Expand All @@ -22,7 +24,8 @@
"browser",
"react-native"
],
"selfLink": false
"selfLink": false,
"project": "./tsconfig.src.json"
},
"type": "module",
"keywords": [
Expand All @@ -47,6 +50,7 @@
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/computefleet/arm-computefleet/README.md",
"prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
"//metadata": {
"constantPaths": [
Expand All @@ -57,13 +61,13 @@
]
},
"dependencies": {
"@azure-rest/core-client": "^2.3.2",
"@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.18.2",
"@azure/core-util": "^1.11.0",
"@azure/logger": "^1.1.4",
"@azure/core-rest-pipeline": "^1.20.0",
"@azure/core-util": "^1.12.0",
"@azure/logger": "^1.2.0",
"tslib": "^2.8.1"
},
"devDependencies": {
Expand All @@ -72,42 +76,44 @@
"@azure-tools/test-utils-vitest": "^1.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@azure/identity": "^4.2.1",
"@azure/identity": "^4.9.1",
"@types/node": "^18.0.0",
"@vitest/browser": "^3.0.9",
"@vitest/coverage-istanbul": "^3.0.9",
"dotenv": "^16.0.0",
"eslint": "^9.9.0",
"playwright": "^1.49.1",
"playwright": "^1.52.0",
"typescript": "~5.8.2",
"vitest": "^3.0.9"
},
"scripts": {
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
"build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f",
"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\"",
"build:samples": "echo skipped",
"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}\" ",
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "dev-tool samples run samples-dev",
"execute:samples": "echo skipped",
"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\"",
"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}\" ",
"generate:client": "echo skipped",
"lint": "echo skipped",
"lint:fix": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "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",
"test": "npm run test:node && npm run test:browser",
"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": "echo skipped",
"test:node": "dev-tool run test:vitest",
"test:node:esm": "dev-tool run test:vitest --esm",
"update-snippets": "dev-tool run update-snippets"
},
"//sampleConfiguration": {
"productName": "@azure/arm-computefleet",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-computefleet?view=azure-node-preview"
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser",
"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "dev-tool run update-snippets",
"test:node:esm": "dev-tool run test:vitest --esm"
},
"browser": "./dist/browser/index.js",
"react-native": "./dist/react-native/index.js",
"exports": {
"./package.json": "./package.json",
".": {
Expand All @@ -128,6 +134,60 @@
"default": "./dist/commonjs/index.js"
}
},
"./api": {
"browser": {
"types": "./dist/browser/api/index.d.ts",
"default": "./dist/browser/api/index.js"
},
"react-native": {
"types": "./dist/react-native/api/index.d.ts",
"default": "./dist/react-native/api/index.js"
},
"import": {
"types": "./dist/esm/api/index.d.ts",
"default": "./dist/esm/api/index.js"
},
"require": {
"types": "./dist/commonjs/api/index.d.ts",
"default": "./dist/commonjs/api/index.js"
}
},
"./api/fleets": {
"browser": {
"types": "./dist/browser/api/fleets/index.d.ts",
"default": "./dist/browser/api/fleets/index.js"
},
"react-native": {
"types": "./dist/react-native/api/fleets/index.d.ts",
"default": "./dist/react-native/api/fleets/index.js"
},
"import": {
"types": "./dist/esm/api/fleets/index.d.ts",
"default": "./dist/esm/api/fleets/index.js"
},
"require": {
"types": "./dist/commonjs/api/fleets/index.d.ts",
"default": "./dist/commonjs/api/fleets/index.js"
}
},
"./api/operations": {
"browser": {
"types": "./dist/browser/api/operations/index.d.ts",
"default": "./dist/browser/api/operations/index.js"
},
"react-native": {
"types": "./dist/react-native/api/operations/index.d.ts",
"default": "./dist/react-native/api/operations/index.js"
},
"import": {
"types": "./dist/esm/api/operations/index.d.ts",
"default": "./dist/esm/api/operations/index.js"
},
"require": {
"types": "./dist/commonjs/api/operations/index.d.ts",
"default": "./dist/commonjs/api/operations/index.js"
}
},
"./models": {
"browser": {
"types": "./dist/browser/models/index.d.ts",
Expand All @@ -149,7 +209,5 @@
},
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
"module": "./dist/esm/index.js",
"browser": "./dist/browser/index.js",
"react-native": "./dist/react-native/index.js"
"module": "./dist/esm/index.js"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
## API Report File for "@azure/arm-computefleet"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { Client } from '@azure-rest/core-client';
import { OperationOptions } from '@azure-rest/core-client';
import { OperationState } from '@azure/core-lro';
import { PollerLike } from '@azure/core-lro';

// @public
export function $delete(context: AzureFleetContext, resourceGroupName: string, fleetName: string, options?: FleetsDeleteOptionalParams): PollerLike<OperationState<void>, void>;

// @public
export function createOrUpdate(context: AzureFleetContext, resourceGroupName: string, fleetName: string, resource: Fleet, options?: FleetsCreateOrUpdateOptionalParams): PollerLike<OperationState<Fleet>, Fleet>;

// @public
export interface FleetsCreateOrUpdateOptionalParams extends OperationOptions {
updateIntervalInMs?: number;
}

// @public
export interface FleetsDeleteOptionalParams extends OperationOptions {
updateIntervalInMs?: number;
}

// @public
export interface FleetsGetOptionalParams extends OperationOptions {
}

// @public
export interface FleetsListByResourceGroupOptionalParams extends OperationOptions {
}

// @public
export interface FleetsListBySubscriptionOptionalParams extends OperationOptions {
}

// @public
export interface FleetsListVirtualMachineScaleSetsOptionalParams extends OperationOptions {
}

// @public
export interface FleetsUpdateOptionalParams extends OperationOptions {
updateIntervalInMs?: number;
}

// @public
export function get(context: AzureFleetContext, resourceGroupName: string, fleetName: string, options?: FleetsGetOptionalParams): Promise<Fleet>;

// @public
export function listByResourceGroup(context: AzureFleetContext, resourceGroupName: string, options?: FleetsListByResourceGroupOptionalParams): PagedAsyncIterableIterator<Fleet>;

// @public
export function listBySubscription(context: AzureFleetContext, options?: FleetsListBySubscriptionOptionalParams): PagedAsyncIterableIterator<Fleet>;

// @public
export function listVirtualMachineScaleSets(context: AzureFleetContext, resourceGroupName: string, name: string, options?: FleetsListVirtualMachineScaleSetsOptionalParams): PagedAsyncIterableIterator<VirtualMachineScaleSet>;

// @public
export function update(context: AzureFleetContext, resourceGroupName: string, fleetName: string, properties: FleetUpdate, options?: FleetsUpdateOptionalParams): PollerLike<OperationState<Fleet>, Fleet>;

// (No @packageDocumentation comment for this package)

```
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## API Report File for "@azure/arm-computefleet"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { Client } from '@azure-rest/core-client';
import { OperationOptions } from '@azure-rest/core-client';

// @public
export function list(context: AzureFleetContext, options?: OperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;

// @public
export interface OperationsListOptionalParams extends OperationOptions {
}

// (No @packageDocumentation comment for this package)

```
Loading