Skip to content

Commit 7c489ca

Browse files
authored
applicationinsight-release (Azure#20850)
1 parent 26d973d commit 7c489ca

File tree

12 files changed

+56
-116
lines changed

12 files changed

+56
-116
lines changed

common/config/rush/pnpm-lock.yaml

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

sdk/applicationinsights/arm-appinsights/CHANGELOG.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
# Release History
2+
3+
## 5.0.0-beta.3 (2022-03-15)
24

3-
## 5.0.0-beta.3 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
12-
13-
## 5.0.0-beta.2 (2022-01-24)
14-
15-
The package of @azure/arm-appinsights is using our next generation design principles since version 5.0.0-beta.2, which contains breaking changes.
5+
The package of @azure/arm-appinsights is using our next generation design principles since version 5.0.0-beta.3, which contains breaking changes.
166

177
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
188

sdk/applicationinsights/arm-appinsights/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Composite Swagger for Application Insights Management Client
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+
1921
### Prerequisites
2022

2123
- An [Azure subscription][azure_sub].
@@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
4951
```javascript
5052
const { ApplicationInsightsManagementClient } = require("@azure/arm-appinsights");
5153
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+
5256
const subscriptionId = "00000000-0000-0000-0000-000000000000";
5357
const client = new ApplicationInsightsManagementClient(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 ApplicationInsightsManagementClient(credential, subscriptionId);
5465
```
5566

5667

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"commit": "2a2aa10bc5e772934d22628faf45a53055ee96c6",
2+
"commit": "e432d9cc87bfed320d8feead4b448be9481c9181",
33
"readme": "specification/applicationinsights/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:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/applicationinsights/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1",
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:\\mydev\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\applicationinsights\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.16",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.1.1",
7+
"use": "@autorest/typescript@6.0.0-beta.16"
78
}

sdk/applicationinsights/arm-appinsights/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
"types": "./types/arm-appinsights.d.ts",
2828
"devDependencies": {
2929
"@microsoft/api-extractor": "^7.18.11",
30-
"@rollup/plugin-commonjs": "11.0.2",
31-
"@rollup/plugin-json": "^4.0.0",
32-
"@rollup/plugin-multi-entry": "^3.0.0",
33-
"@rollup/plugin-node-resolve": "^8.0.0",
30+
"@rollup/plugin-commonjs": "^21.0.1",
31+
"@rollup/plugin-json": "^4.1.0",
32+
"@rollup/plugin-multi-entry": "^4.1.0",
33+
"@rollup/plugin-node-resolve": "^13.1.3",
3434
"mkdirp": "^1.0.4",
35-
"rollup": "^1.16.3",
36-
"rollup-plugin-sourcemaps": "^0.4.2",
35+
"rollup": "^2.66.1",
36+
"rollup-plugin-sourcemaps": "^0.6.3",
3737
"typescript": "~4.2.0",
3838
"uglify-js": "^3.4.9",
3939
"rimraf": "^3.0.0",
@@ -99,10 +99,10 @@
9999
"//metadata": {
100100
"constantPaths": [
101101
{
102-
"path": "src/ApplicationInsightsManagementClient.ts",
102+
"path": "src/applicationInsightsManagementClient.ts",
103103
"prefix": "packageDetails"
104104
}
105105
]
106106
},
107107
"autoPublish": true
108-
}
108+
}

sdk/applicationinsights/arm-appinsights/review/arm-appinsights.api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,6 +1480,7 @@ export interface WorkbooksDeleteOptionalParams extends coreClient.OperationOptio
14801480

14811481
// @public
14821482
export interface WorkbooksGetOptionalParams extends coreClient.OperationOptions {
1483+
canFetchContent?: boolean;
14831484
}
14841485

14851486
// @public

sdk/applicationinsights/arm-appinsights/rollup.config.js

Lines changed: 6 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -14,62 +14,14 @@ 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-
6517
// #region Warning Handler
6618

6719
/**
68-
* A function that can determine whether a rollupwarning should be ignored. If
20+
* A function that can determine whether a rollup warning should be ignored. If
6921
* the function returns `true`, then the warning will not be displayed.
7022
*/
7123

72-
function ignoreNiseSinonEvalWarnings(warning) {
24+
function ignoreNiseSinonEval(warning) {
7325
return (
7426
warning.code === "EVAL" &&
7527
warning.id &&
@@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
7830
);
7931
}
8032

81-
function ignoreChaiCircularDependencyWarnings(warning) {
33+
function ignoreChaiCircularDependency(warning) {
8234
return (
8335
warning.code === "CIRCULAR_DEPENDENCY" &&
8436
warning.importer && warning.importer.includes("node_modules/chai") === true
8537
);
8638
}
8739

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

9342
/**
9443
* Construct a warning handler for the shared rollup configuration
@@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
12271
nodeResolve({
12372
mainFields: ["module", "browser"]
12473
}),
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-
}),
74+
cjs(),
14175
json(),
14276
sourcemaps()
14377
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
@@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
173107
],
174108
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
175109
preserveSymlinks: false,
176-
plugins: [sourcemaps(), nodeResolve(), cjs()]
110+
plugins: [sourcemaps(), nodeResolve()]
177111
};
178112

179113
const config = [baseConfig];

sdk/applicationinsights/arm-appinsights/src/applicationInsightsManagementClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class ApplicationInsightsManagementClient extends coreClient.ServiceClien
8383
credential: credentials
8484
};
8585

86-
const packageDetails = `azsdk-js-arm-appinsights/5.0.0-beta.2`;
86+
const packageDetails = `azsdk-js-arm-appinsights/5.0.0-beta.3`;
8787
const userAgentPrefix =
8888
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
8989
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`

sdk/applicationinsights/arm-appinsights/src/models/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ export interface WorkbookErrorDefinition {
923923

924924
/** The parameters that can be provided when updating workbook properties properties. */
925925
export interface WorkbookUpdateParameters {
926-
/** The kind of workbook. Choices are user and shared. */
926+
/** The kind of workbook. Only valid value is shared. */
927927
kind?: SharedTypeKind;
928928
/** Resource tags. */
929929
tags?: { [propertyName: string]: string };
@@ -1340,7 +1340,7 @@ export type ApplicationInsightsComponent = ComponentsResource & {
13401340
export type WorkbookResource = TrackedResource & {
13411341
/** Identity used for BYOS */
13421342
identity?: WorkbookResourceIdentity;
1343-
/** The kind of workbook. Choices are user and shared. */
1343+
/** The kind of workbook. Only valid value is shared. */
13441344
kind?: Kind;
13451345
/** Resource etag */
13461346
etag?: string;
@@ -2204,7 +2204,10 @@ export type WorkbooksListByResourceGroupResponse = WorkbooksListResult;
22042204

22052205
/** Optional parameters. */
22062206
export interface WorkbooksGetOptionalParams
2207-
extends coreClient.OperationOptions {}
2207+
extends coreClient.OperationOptions {
2208+
/** Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. */
2209+
canFetchContent?: boolean;
2210+
}
22082211

22092212
/** Contains response data for the get operation. */
22102213
export type WorkbooksGetResponse = Workbook;

sdk/applicationinsights/arm-appinsights/src/operations/workbooks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class WorkbooksImpl implements Workbooks {
5252
}
5353

5454
/**
55-
* Get all private workbooks defined within a specified subscription and category.
55+
* Get all Workbooks defined within a specified subscription and category.
5656
* @param category Category of workbook to return.
5757
* @param options The options parameters.
5858
*/
@@ -247,7 +247,7 @@ export class WorkbooksImpl implements Workbooks {
247247
}
248248

249249
/**
250-
* Get all private workbooks defined within a specified subscription and category.
250+
* Get all Workbooks defined within a specified subscription and category.
251251
* @param category Category of workbook to return.
252252
* @param options The options parameters.
253253
*/
@@ -503,7 +503,7 @@ const getOperationSpec: coreClient.OperationSpec = {
503503
bodyMapper: Mappers.WorkbookError
504504
}
505505
},
506-
queryParameters: [Parameters.apiVersion3],
506+
queryParameters: [Parameters.canFetchContent, Parameters.apiVersion3],
507507
urlParameters: [
508508
Parameters.$host,
509509
Parameters.resourceGroupName,

0 commit comments

Comments
 (0)