Skip to content

Commit 4816502

Browse files
author
SDKAuto
committed
CodeGen from PR 18842 in Azure/azure-rest-api-specs
Merge 9802b3bd5112e21ecdc3a1d75f55244fafca2a8a into 8db7df38fe5fca1fc4d2634f5c89e8acfeb1f4ce
1 parent 61daf06 commit 4816502

File tree

15 files changed

+211
-176
lines changed

15 files changed

+211
-176
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 8 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/deviceprovisioningservices/arm-deviceprovisioningservices/CHANGELOG.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# Release History
2+
3+
## 5.0.0 (2022-04-28)
4+
5+
**Features**
26

3-
## 4.1.2 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
7+
- Added Interface ErrorMessage
8+
- Added Interface IotDpsResourceDeletePrivateEndpointConnectionHeaders
109

11-
### Other Changes
10+
**Breaking Changes**
1211

12+
- Operation DpsCertificate.createOrUpdate has a new signature
13+
14+
1315
## 4.1.1 (2022-04-18)
1416

1517
**features**

sdk/deviceprovisioningservices/arm-deviceprovisioningservices/README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ API for using the Azure IoT Hub Device Provisioning Service features.
1616
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
1717
- Latest versions of Safari, Chrome, Edge and Firefox.
1818

19-
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
20-
2119
### Prerequisites
2220

2321
- An [Azure subscription][azure_sub].
@@ -51,17 +49,8 @@ For more information about how to create an Azure AD Application check out [this
5149
```javascript
5250
const { IotDpsClient } = require("@azure/arm-deviceprovisioningservices");
5351
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-
5652
const subscriptionId = "00000000-0000-0000-0000-000000000000";
5753
const client = new IotDpsClient(new DefaultAzureCredential(), subscriptionId);
58-
59-
// For client-side applications running in the browser, use this code instead:
60-
// const credential = new InteractiveBrowserCredential({
61-
// tenantId: "<YOUR_TENANT_ID>",
62-
// clientId: "<YOUR_CLIENT_ID>"
63-
// });
64-
// const client = new IotDpsClient(credential, subscriptionId);
6554
```
6655

6756

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "2a2aa10bc5e772934d22628faf45a53055ee96c6",
3-
"readme": "specification\\deviceprovisioningservices\\resource-manager\\readme.md",
4-
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\deviceprovisioningservices\\resource-manager\\readme.md --use=@autorest/[email protected].19.20220408.1 --generate-sample=true",
2+
"commit": "76532a48a1073f9556892e193d4d21bd10be3e37",
3+
"readme": "specification/deviceprovisioningservices/resource-manager/readme.md",
4+
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --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/deviceprovisioningservices/resource-manager/readme.md --use=@autorest/[email protected].16.20220105.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.6",
7-
"use": "@autorest/[email protected].19.20220408.1"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.3.0",
7+
"use": "@autorest/[email protected].16.20220105.1"
88
}

sdk/deviceprovisioningservices/arm-deviceprovisioningservices/package.json

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for IotDpsClient.",
6-
"version": "4.1.2",
6+
"version": "5.0.0",
77
"engines": {
88
"node": ">=12.0.0"
99
},
1010
"dependencies": {
1111
"@azure/core-lro": "^2.2.0",
1212
"@azure/abort-controller": "^1.0.0",
1313
"@azure/core-paging": "^1.2.0",
14-
"@azure/core-client": "^1.5.0",
14+
"@azure/core-client": "^1.0.0",
1515
"@azure/core-auth": "^1.3.0",
16-
"@azure/core-rest-pipeline": "^1.8.0",
16+
"@azure/core-rest-pipeline": "^1.1.0",
1717
"tslib": "^2.2.0"
1818
},
1919
"keywords": [
@@ -28,14 +28,14 @@
2828
"module": "./dist-esm/src/index.js",
2929
"types": "./types/arm-deviceprovisioningservices.d.ts",
3030
"devDependencies": {
31-
"@microsoft/api-extractor": "7.18.11",
32-
"@rollup/plugin-commonjs": "^21.0.1",
33-
"@rollup/plugin-json": "^4.1.0",
34-
"@rollup/plugin-multi-entry": "^4.1.0",
35-
"@rollup/plugin-node-resolve": "^13.1.3",
31+
"@microsoft/api-extractor": "^7.18.11",
32+
"@rollup/plugin-commonjs": "11.0.2",
33+
"@rollup/plugin-json": "^4.0.0",
34+
"@rollup/plugin-multi-entry": "^3.0.0",
35+
"@rollup/plugin-node-resolve": "^8.0.0",
3636
"mkdirp": "^1.0.4",
37-
"rollup": "^2.66.1",
38-
"rollup-plugin-sourcemaps": "^0.6.3",
37+
"rollup": "^1.16.3",
38+
"rollup-plugin-sourcemaps": "^0.4.2",
3939
"typescript": "~4.2.0",
4040
"uglify-js": "^3.4.9",
4141
"rimraf": "^3.0.0",
@@ -98,21 +98,5 @@
9898
"docs": "echo skipped"
9999
},
100100
"sideEffects": false,
101-
"//metadata": {
102-
"constantPaths": [
103-
{
104-
"path": "src/iotDpsClient.ts",
105-
"prefix": "packageDetails"
106-
}
107-
]
108-
},
109-
"autoPublish": true,
110-
"//sampleConfiguration": {
111-
"productName": "",
112-
"productSlugs": [
113-
"azure"
114-
],
115-
"disableDocsMs": true,
116-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-deviceprovisioningservices?view=azure-node-preview"
117-
}
118-
}
101+
"autoPublish": true
102+
}

sdk/deviceprovisioningservices/arm-deviceprovisioningservices/review/arm-deviceprovisioningservices.api.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export type AllocationPolicy = string;
1818

1919
// @public
2020
export interface AsyncOperationResult {
21-
error?: ErrorMesssage;
21+
error?: ErrorMessage;
2222
status?: string;
2323
}
2424

@@ -35,10 +35,10 @@ export interface CertificateListDescription {
3535

3636
// @public
3737
export interface CertificateProperties {
38-
readonly certificate?: Uint8Array;
38+
certificate?: Uint8Array;
3939
readonly created?: Date;
4040
readonly expiry?: Date;
41-
readonly isVerified?: boolean;
41+
isVerified?: boolean;
4242
readonly subject?: string;
4343
readonly thumbprint?: string;
4444
readonly updated?: Date;
@@ -62,7 +62,7 @@ export type CreatedByType = string;
6262

6363
// @public
6464
export interface DpsCertificate {
65-
createOrUpdate(resourceGroupName: string, provisioningServiceName: string, certificateName: string, certificateDescription: CertificateBodyDescription, options?: DpsCertificateCreateOrUpdateOptionalParams): Promise<DpsCertificateCreateOrUpdateResponse>;
65+
createOrUpdate(resourceGroupName: string, provisioningServiceName: string, certificateName: string, certificateDescription: CertificateResponse, options?: DpsCertificateCreateOrUpdateOptionalParams): Promise<DpsCertificateCreateOrUpdateResponse>;
6666
delete(resourceGroupName: string, ifMatch: string, provisioningServiceName: string, certificateName: string, options?: DpsCertificateDeleteOptionalParams): Promise<void>;
6767
generateVerificationCode(certificateName: string, ifMatch: string, resourceGroupName: string, provisioningServiceName: string, options?: DpsCertificateGenerateVerificationCodeOptionalParams): Promise<DpsCertificateGenerateVerificationCodeResponse>;
6868
get(certificateName: string, resourceGroupName: string, provisioningServiceName: string, options?: DpsCertificateGetOptionalParams): Promise<DpsCertificateGetResponse>;
@@ -144,7 +144,7 @@ export interface ErrorDetails {
144144
}
145145

146146
// @public
147-
export interface ErrorMesssage {
147+
export interface ErrorMessage {
148148
code?: string;
149149
details?: string;
150150
message?: string;
@@ -262,6 +262,13 @@ export interface IotDpsResourceDeleteOptionalParams extends coreClient.Operation
262262
updateIntervalInMs?: number;
263263
}
264264

265+
// @public
266+
export interface IotDpsResourceDeletePrivateEndpointConnectionHeaders {
267+
azureAsyncOperation?: string;
268+
location?: string;
269+
retryAfter?: string;
270+
}
271+
265272
// @public
266273
export interface IotDpsResourceDeletePrivateEndpointConnectionOptionalParams extends coreClient.OperationOptions {
267274
resumeFrom?: string;

sdk/deviceprovisioningservices/arm-deviceprovisioningservices/rollup.config.js

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,62 @@ import json from "@rollup/plugin-json";
1414

1515
import nodeBuiltins from "builtin-modules";
1616

17+
/**
18+
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
19+
*
20+
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
21+
* __exportStar downleveled helper function to declare its exports which confuses
22+
* rollup's automatic discovery mechanism.
23+
*
24+
* @returns an object reference that can be `...`'d into your cjs() configuration.
25+
*/
26+
export function openTelemetryCommonJs() {
27+
const namedExports = {};
28+
29+
for (const key of [
30+
"@opentelemetry/api",
31+
"@azure/core-tracing/node_modules/@opentelemetry/api"
32+
]) {
33+
namedExports[key] = [
34+
"SpanKind",
35+
"TraceFlags",
36+
"getSpan",
37+
"setSpan",
38+
"SpanStatusCode",
39+
"getSpanContext",
40+
"setSpanContext"
41+
];
42+
}
43+
44+
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
45+
46+
for (const version of releasedOpenTelemetryVersions) {
47+
namedExports[
48+
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
49+
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
50+
] = [
51+
"SpanKind",
52+
"TraceFlags",
53+
"getSpan",
54+
"setSpan",
55+
"StatusCode",
56+
"CanonicalCode",
57+
"getSpanContext",
58+
"setSpanContext"
59+
];
60+
}
61+
62+
return namedExports;
63+
}
64+
1765
// #region Warning Handler
1866

1967
/**
20-
* A function that can determine whether a rollup warning should be ignored. If
68+
* A function that can determine whether a rollupwarning should be ignored. If
2169
* the function returns `true`, then the warning will not be displayed.
2270
*/
2371

24-
function ignoreNiseSinonEval(warning) {
72+
function ignoreNiseSinonEvalWarnings(warning) {
2573
return (
2674
warning.code === "EVAL" &&
2775
warning.id &&
@@ -30,14 +78,17 @@ function ignoreNiseSinonEval(warning) {
3078
);
3179
}
3280

33-
function ignoreChaiCircularDependency(warning) {
81+
function ignoreChaiCircularDependencyWarnings(warning) {
3482
return (
3583
warning.code === "CIRCULAR_DEPENDENCY" &&
3684
warning.importer && warning.importer.includes("node_modules/chai") === true
3785
);
3886
}
3987

40-
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
88+
const warningInhibitors = [
89+
ignoreChaiCircularDependencyWarnings,
90+
ignoreNiseSinonEvalWarnings
91+
];
4192

4293
/**
4394
* Construct a warning handler for the shared rollup configuration
@@ -71,7 +122,22 @@ function makeBrowserTestConfig() {
71122
nodeResolve({
72123
mainFields: ["module", "browser"]
73124
}),
74-
cjs(),
125+
cjs({
126+
namedExports: {
127+
// Chai's strange internal architecture makes it impossible to statically
128+
// analyze its exports.
129+
chai: [
130+
"version",
131+
"use",
132+
"util",
133+
"config",
134+
"expect",
135+
"should",
136+
"assert"
137+
],
138+
...openTelemetryCommonJs()
139+
}
140+
}),
75141
json(),
76142
sourcemaps()
77143
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
@@ -107,7 +173,7 @@ export function makeConfig(pkg, options) {
107173
],
108174
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
109175
preserveSymlinks: false,
110-
plugins: [sourcemaps(), nodeResolve()]
176+
plugins: [sourcemaps(), nodeResolve(), cjs()]
111177
};
112178

113179
const config = [baseConfig];

0 commit comments

Comments
 (0)