Upgrade arm-cosmosdb and arm-monitor libraries (#66)

* Upgrade arm-cosmosdb library to latest and update code with new API

* Upgrade arm-monitor library

* Update notices
This commit is contained in:
Laurent Nguyen 2023-03-31 15:02:00 +02:00 коммит произвёл GitHub
Родитель 80281115f6
Коммит 6b3147216d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 359 добавлений и 179 удалений

124
NOTICES
Просмотреть файл

@ -1453,14 +1453,14 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---------------------------------------------------------
minipass 3.3.6 - ISC
https://github.com/isaacs/minipass#readme
lru-cache 6.0.0 - ISC
https://github.com/isaacs/node-lru-cache#readme
Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors
Copyright (c) Isaac Z. Schlueter and Contributors
The ISC License
Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@ -1479,14 +1479,14 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---------------------------------------------------------
minipass 4.2.1 - ISC
minipass 3.3.6 - ISC
https://github.com/isaacs/minipass#readme
Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors
Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors
The ISC License
Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors
Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@ -1554,6 +1554,33 @@ License, as follows:
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
semver 7.3.8 - ISC
https://github.com/npm/node-semver#readme
Copyright Isaac Z. Schlueter
Copyright (c) Isaac Z. Schlueter and Contributors
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
@ -1654,9 +1681,10 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---------------------------------------------------------
@azure/arm-cosmosdb 13.0.0 - MIT
https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/cosmosdb/arm-cosmosdb
@azure/arm-cosmosdb 15.0.0 - MIT
https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb
Copyright (c) Microsoft Corporation.
The MIT License (MIT)
@ -1680,20 +1708,18 @@ 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.
---------------------------------------------------------
---------------------------------------------------------
@azure/arm-monitor 6.1.1 - MIT
https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/monitor/arm-monitor
@azure/arm-monitor 7.0.0 - MIT
https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/arm-monitor
Copyright (c) 2019 Microsoft
Copyright (c) Microsoft Corporation.
The MIT License (MIT)
Copyright (c) 2019 Microsoft
Copyright (c) 2021 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -1713,7 +1739,6 @@ 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.
---------------------------------------------------------
---------------------------------------------------------
@ -1778,6 +1803,73 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
@azure/core-client 1.7.2 - MIT
https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client/
Copyright (c) 2020 Microsoft
Copyright (c) Microsoft Corporation
Copyright (c) Microsoft Corporation. const CollectionFormatToDelimiterMap CSV
The MIT License (MIT)
Copyright (c) 2020 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
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.
---------------------------------------------------------
---------------------------------------------------------
@azure/core-util 1.2.0 - MIT
https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-util/
Copyright (c) 2020 Microsoft
Copyright (c) Microsoft Corporation
The MIT License (MIT)
Copyright (c) 2020 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
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.
---------------------------------------------------------
---------------------------------------------------------
@ -2150,7 +2242,7 @@ SOFTWARE.
---------------------------------------------------------
@types/node 18.14.1 - MIT
@types/node 18.15.7 - MIT
https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
Copyright (c) Microsoft Corporation

Просмотреть файл

@ -465,8 +465,8 @@
"clean": "rimraf --glob ./out ./azure-cosmosdb-ads-extension-*.vsix ./query-editor/{out,build}"
},
"dependencies": {
"@azure/arm-cosmosdb": "13.0.0",
"@azure/arm-monitor": "6.1.1",
"@azure/arm-cosmosdb": "15.0.0",
"@azure/arm-monitor": "7.0.0",
"@azure/arm-resourcegraph": "4.2.1",
"@azure/cosmos": "3.17.3",
"@microsoft/ads-service-downloader": "1.1.0",

Просмотреть файл

@ -3,11 +3,10 @@
* https://github.com/Azure/cosmos-explorer/blob/f968f57543985031ca8b623973c16ebe358a1947/src/Common/dataAccess/getCollectionDataUsageSize.ts
*/
import { MonitorManagementClient } from "@azure/arm-monitor";
import { Metric } from "@azure/arm-monitor/esm/models";
import { Metric, MonitorClient } from "@azure/arm-monitor";
export const getUsageSizeInKB = async (
monitorARmClient: MonitorManagementClient,
monitorARmClient: MonitorClient,
resourceUri: string,
databaseName: string,
containerName?: string

Просмотреть файл

@ -1,10 +1,9 @@
import * as nls from "vscode-nls";
import * as azdata from "azdata";
import { CosmosDBManagementClient } from "@azure/arm-cosmosdb";
import { MonitorManagementClient } from "@azure/arm-monitor";
import { CosmosDBManagementClient, ThroughputSettingsGetPropertiesResource } from "@azure/arm-cosmosdb";
import { TokenCredential } from "@azure/core-auth";
import { MonitorClient } from "@azure/arm-monitor";
import { ResourceGraphClient } from "@azure/arm-resourcegraph";
import { TokenCredentials } from "@azure/ms-rest-js";
import { ThroughputSettingsGetPropertiesResource } from "@azure/arm-cosmosdb/esm/models";
import { getServerState } from "../Dashboards/ServerUXStates";
import {
IConnectionOptions,
@ -17,6 +16,18 @@ import { hideStatusBarItem, showStatusBarItem } from "../appContext";
const localize = nls.loadMessageBundle();
const TOKEN_EXPIRATION_TIMESTAMP = Date.now() + 10_000; // ms since epoch. 10 seconds from now
export const azDataTokenToCoreAuthCredential = (azureToken: azdata.accounts.AccountSecurityToken) => ({
getToken: () =>
new Promise<{ token: string; expiresOnTimestamp: number }>((resolve) =>
resolve({
token: azureToken.token,
expiresOnTimestamp: TOKEN_EXPIRATION_TIMESTAMP,
})
),
});
export abstract class AbstractArmService {
public retrievePortalEndpoint = async (accountId: string): Promise<string> =>
(await this.retrieveAzureAccount(accountId)).properties?.providerSettings?.settings?.portalEndpoint;
@ -35,7 +46,7 @@ export abstract class AbstractArmService {
protected retrieveAzureToken = async (
tenantId: string,
azureAccountId: string
): Promise<{ token: string; tokenType?: string | undefined }> => {
): Promise<azdata.accounts.AccountSecurityToken> => {
const azureAccount = await this.retrieveAzureAccount(azureAccountId);
showStatusBarItem(localize("retrievingAzureToken", "Retrieving Azure Token..."));
@ -81,7 +92,8 @@ export abstract class AbstractArmService {
): Promise<string> => {
if (!azureResourceId) {
const azureToken = await this.retrieveAzureToken(azureTenantId, azureAccountId);
const credentials = new TokenCredentials(azureToken.token, azureToken.tokenType /* , 'Bearer' */);
const credentials = azDataTokenToCoreAuthCredential(azureToken);
// const credentials = new TokenCredential(azureToken.token, azureToken.tokenType /* , 'Bearer' */);
const azureResource = await this.retrieveResourceInfofromArm(cosmosDbAccountName, credentials);
if (!azureResource) {
@ -108,7 +120,7 @@ export abstract class AbstractArmService {
}
const azureToken = await this.retrieveAzureToken(azureTenantId, azureAccountId);
const credentials = new TokenCredentials(azureToken.token, azureToken.tokenType /* , 'Bearer' */);
const credentials = azDataTokenToCoreAuthCredential(azureToken);
if (!azureResourceId) {
const azureResource = await this.retrieveResourceInfofromArm(cosmosDbAccountName, credentials);
@ -129,7 +141,7 @@ export abstract class AbstractArmService {
azureTenantId: string,
azureResourceId: string,
cosmosDbAccountName: string
): Promise<MonitorManagementClient> => {
): Promise<MonitorClient> => {
const azureAccount = await this.retrieveAzureAccount(azureAccountId);
const armEndpoint = azureAccount.properties?.providerSettings?.settings?.armResource?.endpoint; // TODO Get the endpoint from the resource, not the aad account
@ -138,7 +150,7 @@ export abstract class AbstractArmService {
}
const azureToken = await this.retrieveAzureToken(azureTenantId, azureAccountId);
const credentials = new TokenCredentials(azureToken.token, azureToken.tokenType /* , 'Bearer' */);
const credentials = azDataTokenToCoreAuthCredential(azureToken);
if (!azureResourceId) {
const azureResource = await this.retrieveResourceInfofromArm(cosmosDbAccountName, credentials);
@ -151,7 +163,7 @@ export abstract class AbstractArmService {
const { subscriptionId } = this.parsedAzureResourceId(azureResourceId);
return new MonitorManagementClient(credentials, subscriptionId, { baseUri: armEndpoint });
return new MonitorClient(credentials, subscriptionId, { baseUri: armEndpoint });
};
/**
@ -205,7 +217,7 @@ export abstract class AbstractArmService {
if (!azureResourceId) {
const azureToken = await this.retrieveAzureToken(azureTenantId, azureAccountId);
const credentials = new TokenCredentials(azureToken.token, azureToken.tokenType /* , 'Bearer' */);
const credentials = azDataTokenToCoreAuthCredential(azureToken);
const azureResource = await this.retrieveResourceInfofromArm(cosmosDbAccountName, credentials);
if (!azureResource) {
@ -247,7 +259,7 @@ export abstract class AbstractArmService {
protected retrieveResourceInfofromArm = async (
cosmosDbAccountName: string,
credentials: TokenCredentials
credentials: TokenCredential
): Promise<{ subscriptionId: string; id: string } | undefined> => {
const client = new ResourceGraphClient(credentials);
const result = await client.resources(

Просмотреть файл

@ -1,13 +1,12 @@
import * as vscode from "vscode";
import * as nls from "vscode-nls";
import * as azdata from "azdata";
import { CosmosDBManagementClient } from "@azure/arm-cosmosdb";
import { MonitorManagementClient } from "@azure/arm-monitor";
import { TokenCredentials } from "@azure/ms-rest-js";
import {
CosmosDBManagementClient,
MongoDBCollectionCreateUpdateParameters,
MongoDBDatabaseCreateUpdateParameters,
} from "@azure/arm-cosmosdb/esm/models";
} from "@azure/arm-cosmosdb";
import { MonitorClient } from "@azure/arm-monitor";
import { getUsageSizeInKB } from "../Dashboards/getCollectionDataUsageSize";
import { ICosmosDbCollectionInfo, ICosmosDbDatabaseInfo } from "../models";
import {
@ -18,7 +17,7 @@ import {
} from "../dialogUtil";
import { CdbCollectionCreateInfo } from "../sampleData/DataSamplesUtil";
import { hideStatusBarItem, showStatusBarItem } from "../appContext";
import { AbstractArmService } from "./AbstractArmService";
import { AbstractArmService, azDataTokenToCoreAuthCredential } from "./AbstractArmService";
const localize = nls.loadMessageBundle();
@ -39,7 +38,7 @@ export class ArmServiceMongo extends AbstractArmService {
resourceGroupName: string,
accountName: string,
databaseName: string,
monitorARmClient: MonitorManagementClient,
monitorARmClient: MonitorClient,
resourceUri: string,
fetchThroughputOnly?: boolean
): Promise<ICosmosDbDatabaseInfo> => {
@ -76,18 +75,21 @@ export class ArmServiceMongo extends AbstractArmService {
}
showStatusBarItem(localize("retrievingMongoDbCollection", "Retrieving mongodb collections..."));
const collections = await client.mongoDBResources.listMongoDBCollections(
resourceGroupName,
accountName,
databaseName
);
let nbCollections = 0;
for await (let page of client.mongoDBResources
.listMongoDBCollections(resourceGroupName, accountName, databaseName)
.byPage({ maxPageSize: 20 })) {
for (const resource of page) {
nbCollections++;
}
}
showStatusBarItem(localize("retrievingMongoDbDatabaseThroughput", "Retrieving mongodb database usage..."));
const usageSizeKB = await getUsageSizeInKB(monitorARmClient, resourceUri, databaseName);
return {
name: databaseName,
nbCollections: collections.length,
nbCollections,
throughputSetting,
usageSizeKB,
isAutoscale,
@ -123,7 +125,15 @@ export class ArmServiceMongo extends AbstractArmService {
const { resourceGroup } = this.parsedAzureResourceId(azureResourceId);
showStatusBarItem(localize("retrievingMongoDbDatabases", "Retrieving mongodb databases..."));
const mongoDBResources = await client.mongoDBResources.listMongoDBDatabases(resourceGroup, cosmosDbAccountName);
const mongoDBResources = [];
for await (let page of client.mongoDBResources
.listMongoDBDatabases(resourceGroup, cosmosDbAccountName)
.byPage({ maxPageSize: 20 })) {
for (const sqlDatabaseGetResult of page) {
mongoDBResources.push(sqlDatabaseGetResult);
}
}
hideStatusBarItem();
const monitorArmClient = await this.createArmMonitorClient(
azureAccountId,
@ -156,7 +166,7 @@ export class ArmServiceMongo extends AbstractArmService {
accountName: string,
databaseName: string,
collectionName: string,
monitorARmClient: MonitorManagementClient,
monitorARmClient: MonitorClient,
resourceUri: string
): Promise<ICosmosDbCollectionInfo> => {
let throughputSetting = "";
@ -236,7 +246,7 @@ export class ArmServiceMongo extends AbstractArmService {
if (!azureResourceId) {
const azureToken = await this.retrieveAzureToken(azureTenantId, azureAccountId);
const credentials = new TokenCredentials(azureToken.token, azureToken.tokenType /* , 'Bearer' */);
const credentials = azDataTokenToCoreAuthCredential(azureToken);
const azureResource = await this.retrieveResourceInfofromArm(cosmosDbAccountName, credentials);
if (!azureResource) {
@ -248,11 +258,15 @@ export class ArmServiceMongo extends AbstractArmService {
const { resourceGroup } = this.parsedAzureResourceId(azureResourceId);
showStatusBarItem(localize("retrievingMongoDbUsage", "Retrieving mongodb usage..."));
const mongoDBResources = await client.mongoDBResources.listMongoDBCollections(
resourceGroup,
cosmosDbAccountName,
databaseName
);
const mongoDBResources = [];
for await (let page of client.mongoDBResources
.listMongoDBCollections(resourceGroup, cosmosDbAccountName, databaseName)
.byPage({ maxPageSize: 20 })) {
for (const sqlDatabaseGetResult of page) {
mongoDBResources.push(sqlDatabaseGetResult);
}
}
hideStatusBarItem();
const monitorArmClient = await this.createArmMonitorClient(
@ -384,7 +398,7 @@ export class ArmServiceMongo extends AbstractArmService {
const { resourceGroup } = this.parsedAzureResourceId(azureResourceId);
try {
showStatusBarItem(localize("migratingCollectionToAutoscale", "Migrating collection to autoscale..."));
const rpResponse = await client.mongoDBResources.migrateMongoDBCollectionToAutoscale(
const rpResponse = await client.mongoDBResources.beginMigrateMongoDBCollectionToAutoscaleAndWait(
resourceGroup,
cosmosDbAccountName,
databaseName,
@ -451,23 +465,18 @@ export class ArmServiceMongo extends AbstractArmService {
showStatusBarItem(
localize("migratingCollectionToManualThroughput", "Migrating collection to manual throughput...")
);
rpResponse = await client.mongoDBResources.migrateMongoDBCollectionToManualThroughput(
rpResponse = await client.mongoDBResources.beginMigrateMongoDBCollectionToManualThroughput(
resourceGroup,
cosmosDbAccountName,
databaseName,
collectionName,
{
resource: {
throughput: requestedThroughput,
},
}
collectionName
);
}
showStatusBarItem(
localize("updatingCollectionThroughput", "Updating collection throughput to {0} RUs...", requestedThroughput)
);
rpResponse = await client.mongoDBResources.updateMongoDBCollectionThroughput(
rpResponse = await client.mongoDBResources.beginUpdateMongoDBCollectionThroughputAndWait(
resourceGroup,
cosmosDbAccountName,
databaseName,
@ -587,7 +596,7 @@ export class ArmServiceMongo extends AbstractArmService {
const { resourceGroup } = this.parsedAzureResourceId(azureResourceId);
try {
showStatusBarItem(localize("migratingDatabaseToAutoscale", "Migrating database to autoscale..."));
const rpResponse = await client.mongoDBResources.migrateMongoDBDatabaseToAutoscale(
const rpResponse = await client.mongoDBResources.beginMigrateMongoDBDatabaseToAutoscaleAndWait(
resourceGroup,
cosmosDbAccountName,
databaseName
@ -652,22 +661,17 @@ export class ArmServiceMongo extends AbstractArmService {
showStatusBarItem(
localize("migratingDatabaseToManualThroughput", "Migrating database to manual throughput...")
);
rpResponse = await client.mongoDBResources.migrateMongoDBDatabaseToManualThroughput(
rpResponse = await client.mongoDBResources.beginMigrateMongoDBDatabaseToManualThroughputAndWait(
resourceGroup,
cosmosDbAccountName,
databaseName,
{
resource: {
throughput: requestedThroughput,
},
}
databaseName
);
}
showStatusBarItem(
localize("updatingDatabaseThroughput", "Updating database throughput to {0} RUs...", requestedThroughput)
);
rpResponse = await client.mongoDBResources.updateMongoDBDatabaseThroughput(
rpResponse = await client.mongoDBResources.beginUpdateMongoDBDatabaseThroughputAndWait(
resourceGroup,
cosmosDbAccountName,
databaseName,
@ -728,7 +732,12 @@ export class ArmServiceMongo extends AbstractArmService {
try {
showStatusBarItem(localize("creatingMongoDatabase", "Creating CosmosDB database"));
const dbresult = await client.mongoDBResources
.createUpdateMongoDBDatabase(resourceGroup, cosmosDbAccountName, inputData.newDatabaseName, createDbParams)
.beginCreateUpdateMongoDBDatabaseAndWait(
resourceGroup,
cosmosDbAccountName,
inputData.newDatabaseName,
createDbParams
)
.catch((e) => reject(e));
if (!dbresult || !dbresult.resource?.id) {
@ -815,7 +824,7 @@ export class ArmServiceMongo extends AbstractArmService {
}
const dbresult = await client.mongoDBResources
.createUpdateMongoDBDatabase(
.beginCreateUpdateMongoDBDatabaseAndWait(
resourceGroup,
cosmosDbAccountName,
inputData.newDatabaseInfo.newDatabaseName,
@ -865,7 +874,7 @@ export class ArmServiceMongo extends AbstractArmService {
showStatusBarItem(localize("creatingMongoCollection", "Creating CosmosDB Mongo collection"));
const collResult = await client.mongoDBResources
.createUpdateMongoDBCollection(
.beginCreateUpdateMongoDBCollectionAndWait(
resourceGroup,
cosmosDbAccountName,
newDatabaseName,

Просмотреть файл

@ -1,10 +1,12 @@
import * as vscode from "vscode";
import * as nls from "vscode-nls";
import * as azdata from "azdata";
import { CosmosDBManagementClient } from "@azure/arm-cosmosdb";
import { MonitorManagementClient } from "@azure/arm-monitor";
import { TokenCredentials } from "@azure/ms-rest-js";
import { SqlContainerCreateUpdateParameters, SqlDatabaseCreateUpdateParameters } from "@azure/arm-cosmosdb/esm/models";
import {
CosmosDBManagementClient,
SqlContainerCreateUpdateParameters,
SqlDatabaseCreateUpdateParameters,
} from "@azure/arm-cosmosdb";
import { MonitorClient } from "@azure/arm-monitor";
import { getUsageSizeInKB } from "../Dashboards/getCollectionDataUsageSize";
import { ICosmosDbCollectionInfo, ICosmosDbDatabaseInfo } from "../models";
import {
@ -15,7 +17,7 @@ import {
} from "../dialogUtil";
import { CdbCollectionCreateInfo } from "../sampleData/DataSamplesUtil";
import { hideStatusBarItem, showStatusBarItem } from "../appContext";
import { AbstractArmService } from "./AbstractArmService";
import { AbstractArmService, azDataTokenToCoreAuthCredential } from "./AbstractArmService";
const localize = nls.loadMessageBundle();
@ -36,7 +38,7 @@ export class ArmServiceNoSql extends AbstractArmService {
resourceGroupName: string,
accountName: string,
databaseName: string,
monitorARmClient: MonitorManagementClient,
monitorARmClient: MonitorClient,
resourceUri: string,
fetchThroughputOnly?: boolean
): Promise<ICosmosDbDatabaseInfo> => {
@ -73,14 +75,21 @@ export class ArmServiceNoSql extends AbstractArmService {
}
showStatusBarItem(localize("retrievingSqlContainer", "Retrieving sql containers..."));
const collections = await client.sqlResources.listSqlContainers(resourceGroupName, accountName, databaseName);
let nbCollections = 0;
for await (let page of client.sqlResources
.listSqlContainers(resourceGroupName, accountName, databaseName)
.byPage({ maxPageSize: 20 })) {
for (const resource of page) {
nbCollections++;
}
}
showStatusBarItem(localize("retrievingSqlDatabaseThroughput", "Retrieving sql database usage..."));
const usageSizeKB = await getUsageSizeInKB(monitorARmClient, resourceUri, databaseName);
return {
name: databaseName,
nbCollections: collections.length,
nbCollections,
throughputSetting,
usageSizeKB,
isAutoscale,
@ -116,7 +125,15 @@ export class ArmServiceNoSql extends AbstractArmService {
const { resourceGroup } = this.parsedAzureResourceId(azureResourceId);
showStatusBarItem(localize("retrievingSqlDatabases", "Retrieving sql databases..."));
const sqlResources = await client.sqlResources.listSqlDatabases(resourceGroup, cosmosDbAccountName);
const sqlResources = [];
for await (let page of client.sqlResources
.listSqlDatabases(resourceGroup, cosmosDbAccountName)
.byPage({ maxPageSize: 20 })) {
for (const sqlDatabaseGetResult of page) {
sqlResources.push(sqlDatabaseGetResult);
}
}
hideStatusBarItem();
const monitorArmClient = await this.createArmMonitorClient(
azureAccountId,
@ -149,7 +166,7 @@ export class ArmServiceNoSql extends AbstractArmService {
accountName: string,
databaseName: string,
collectionName: string,
monitorARmClient: MonitorManagementClient,
monitorARmClient: MonitorClient,
resourceUri: string
): Promise<ICosmosDbCollectionInfo> => {
let throughputSetting = "";
@ -230,7 +247,7 @@ export class ArmServiceNoSql extends AbstractArmService {
if (!azureResourceId) {
const azureToken = await this.retrieveAzureToken(azureTenantId, azureAccountId);
const credentials = new TokenCredentials(azureToken.token, azureToken.tokenType /* , 'Bearer' */);
const credentials = azDataTokenToCoreAuthCredential(azureToken);
const azureResource = await this.retrieveResourceInfofromArm(cosmosDbAccountName, credentials);
if (!azureResource) {
@ -242,7 +259,14 @@ export class ArmServiceNoSql extends AbstractArmService {
const { resourceGroup } = this.parsedAzureResourceId(azureResourceId);
showStatusBarItem(localize("retrievingSqlUsage", "Retrieving sql usage..."));
const sqlResources = await client.sqlResources.listSqlContainers(resourceGroup, cosmosDbAccountName, databaseName);
const sqlResources = [];
for await (let page of client.sqlResources
.listSqlContainers(resourceGroup, cosmosDbAccountName, databaseName)
.byPage({ maxPageSize: 20 })) {
for (const sqlDatabaseGetResult of page) {
sqlResources.push(sqlDatabaseGetResult);
}
}
hideStatusBarItem();
const monitorArmClient = await this.createArmMonitorClient(
@ -374,7 +398,7 @@ export class ArmServiceNoSql extends AbstractArmService {
const { resourceGroup } = this.parsedAzureResourceId(azureResourceId);
try {
showStatusBarItem(localize("migratingCollectionToAutoscale", "Migrating collection to autoscale..."));
const rpResponse = await client.sqlResources.migrateSqlContainerToAutoscale(
const rpResponse = await client.sqlResources.beginMigrateSqlContainerToAutoscaleAndWait(
resourceGroup,
cosmosDbAccountName,
databaseName,
@ -441,23 +465,18 @@ export class ArmServiceNoSql extends AbstractArmService {
showStatusBarItem(
localize("migratingCollectionToManualThroughput", "Migrating collection to manual throughput...")
);
rpResponse = await client.sqlResources.migrateSqlContainerToManualThroughput(
rpResponse = await client.sqlResources.beginMigrateSqlContainerToManualThroughputAndWait(
resourceGroup,
cosmosDbAccountName,
databaseName,
collectionName,
{
resource: {
throughput: requestedThroughput,
},
}
collectionName
);
}
showStatusBarItem(
localize("updatingCollectionThroughput", "Updating collection throughput to {0} RUs...", requestedThroughput)
);
rpResponse = await client.sqlResources.updateSqlContainerThroughput(
rpResponse = await client.sqlResources.beginUpdateSqlContainerThroughputAndWait(
resourceGroup,
cosmosDbAccountName,
databaseName,
@ -577,7 +596,7 @@ export class ArmServiceNoSql extends AbstractArmService {
const { resourceGroup } = this.parsedAzureResourceId(azureResourceId);
try {
showStatusBarItem(localize("migratingDatabaseToAutoscale", "Migrating database to autoscale..."));
const rpResponse = await client.sqlResources.migrateSqlDatabaseToAutoscale(
const rpResponse = await client.sqlResources.beginMigrateSqlDatabaseToAutoscaleAndWait(
resourceGroup,
cosmosDbAccountName,
databaseName
@ -642,22 +661,17 @@ export class ArmServiceNoSql extends AbstractArmService {
showStatusBarItem(
localize("migratingDatabaseToManualThroughput", "Migrating database to manual throughput...")
);
rpResponse = await client.sqlResources.migrateSqlDatabaseToManualThroughput(
rpResponse = await client.sqlResources.beginMigrateSqlDatabaseToManualThroughputAndWait(
resourceGroup,
cosmosDbAccountName,
databaseName,
{
resource: {
throughput: requestedThroughput,
},
}
databaseName
);
}
showStatusBarItem(
localize("updatingDatabaseThroughput", "Updating database throughput to {0} RUs...", requestedThroughput)
);
rpResponse = await client.sqlResources.updateSqlDatabaseThroughput(
rpResponse = await client.sqlResources.beginUpdateSqlDatabaseThroughputAndWait(
resourceGroup,
cosmosDbAccountName,
databaseName,
@ -718,8 +732,13 @@ export class ArmServiceNoSql extends AbstractArmService {
try {
showStatusBarItem(localize("creatingSqlDatabase", "Creating CosmosDB database"));
const dbresult = await client.sqlResources
.createUpdateSqlDatabase(resourceGroup, cosmosDbAccountName, inputData.newDatabaseName, createDbParams)
.catch((e) => reject(e));
.beginCreateUpdateSqlDatabaseAndWait(
resourceGroup,
cosmosDbAccountName,
inputData.newDatabaseName,
createDbParams
)
.catch((e: any) => reject(e));
if (!dbresult || !dbresult.resource?.id) {
reject("Could not create database");
@ -805,13 +824,13 @@ export class ArmServiceNoSql extends AbstractArmService {
}
const dbresult = await client.sqlResources
.createUpdateSqlDatabase(
.beginCreateUpdateSqlDatabaseAndWait(
resourceGroup,
cosmosDbAccountName,
inputData.newDatabaseInfo.newDatabaseName,
createDbParams
)
.catch((e) => reject(e));
.catch((e: any) => reject(e));
if (!dbresult || !dbresult.resource?.id) {
reject(localize("failedCreatingDatabase", "Failed creating database"));
@ -855,14 +874,14 @@ export class ArmServiceNoSql extends AbstractArmService {
showStatusBarItem(localize("creatingSqlContainer", "Creating CosmosDB NoSql container"));
const collResult = await client.sqlResources
.createUpdateSqlContainer(
.beginCreateUpdateSqlContainerAndWait(
resourceGroup,
cosmosDbAccountName,
newDatabaseName,
inputData.newCollectionName,
createContainerParams
)
.catch((e) => reject(e));
.catch((e: any) => reject(e));
if (!collResult || !collResult.resource?.id) {
reject(localize("failedCreatingCollection", "Failed creating collection"));

187
yarn.lock
Просмотреть файл

@ -9,24 +9,31 @@
dependencies:
tslib "^2.2.0"
"@azure/arm-cosmosdb@13.0.0":
version "13.0.0"
resolved "https://registry.yarnpkg.com/@azure/arm-cosmosdb/-/arm-cosmosdb-13.0.0.tgz#2f3a9e83e27a8654cdac1348fbd91c9c27c709bc"
integrity sha512-P9StSg0XVZ6doXaSaonkZFpSwRNUr+9OGwxIErp3/Su8Nm6nlqlCVW+rQ5tvkCf/tWWw0pN2AFgKvaeTtgac7A==
"@azure/arm-cosmosdb@15.0.0":
version "15.0.0"
resolved "https://registry.yarnpkg.com/@azure/arm-cosmosdb/-/arm-cosmosdb-15.0.0.tgz#5195b1b301d8c489df35805cc24934fd2ea77f79"
integrity sha512-F0lrY+11XRBwMZgXUkGMh8EaSmeHCWjRgblRp+PKlce3UUmC4lgbrZYrJdhE2rxDkOS4sz+zL1lnN2qMuejSNg==
dependencies:
"@azure/ms-rest-azure-js" "^2.0.1"
"@azure/ms-rest-js" "^2.0.4"
tslib "^1.10.0"
"@azure/abort-controller" "^1.0.0"
"@azure/core-auth" "^1.3.0"
"@azure/core-client" "^1.0.0"
"@azure/core-lro" "^2.2.0"
"@azure/core-paging" "^1.2.0"
"@azure/core-rest-pipeline" "^1.1.0"
tslib "^2.2.0"
"@azure/arm-monitor@6.1.1":
version "6.1.1"
resolved "https://registry.yarnpkg.com/@azure/arm-monitor/-/arm-monitor-6.1.1.tgz#10ed7183194550833fef98c05c58d365aff671cd"
integrity sha512-CyCNEh0Y3pzjX3Bo4GN74YNN5dXSJfnGS0bqKNaQkBwIyUOIhjo3bUSu+H94aiJh2ux25GWSqh4kp6DK6p/K5g==
"@azure/arm-monitor@7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@azure/arm-monitor/-/arm-monitor-7.0.0.tgz#f649fda2c65468c12a057dc2819d37053d94a7b9"
integrity sha512-RtCLRc/29bqaaf5iuUOmJvc5XDolN/icFhlKC/rXXKTtmwB3sKymaOZbNHnOM4P0nJYpS5QIo7Nzvh4M3Wj+FA==
dependencies:
"@azure/core-auth" "^1.1.4"
"@azure/ms-rest-azure-js" "^2.1.0"
"@azure/ms-rest-js" "^2.2.0"
tslib "^1.10.0"
"@azure/abort-controller" "^1.0.0"
"@azure/core-auth" "^1.3.0"
"@azure/core-client" "^1.0.0"
"@azure/core-lro" "^2.2.0"
"@azure/core-paging" "^1.2.0"
"@azure/core-rest-pipeline" "^1.1.0"
tslib "^2.2.0"
"@azure/arm-resourcegraph@4.2.1":
version "4.2.1"
@ -46,7 +53,36 @@
"@azure/abort-controller" "^1.0.0"
tslib "^2.2.0"
"@azure/core-rest-pipeline@^1.2.0":
"@azure/core-client@^1.0.0":
version "1.7.2"
resolved "https://registry.yarnpkg.com/@azure/core-client/-/core-client-1.7.2.tgz#e1e0670c9a5086dd62fd0080d2fd8b426babad9e"
integrity sha512-ye5554gnVnXdfZ64hptUtETgacXoRWxYv1JF5MctoAzTSH5dXhDPZd9gOjDPyWMcLIk58pnP5+p5vGX6PYn1ag==
dependencies:
"@azure/abort-controller" "^1.0.0"
"@azure/core-auth" "^1.4.0"
"@azure/core-rest-pipeline" "^1.9.1"
"@azure/core-tracing" "^1.0.0"
"@azure/core-util" "^1.0.0"
"@azure/logger" "^1.0.0"
tslib "^2.2.0"
"@azure/core-lro@^2.2.0":
version "2.5.1"
resolved "https://registry.yarnpkg.com/@azure/core-lro/-/core-lro-2.5.1.tgz#9c6be24b84f8a8c8e8ac376c5018460c5a585d0b"
integrity sha512-JHQy/bA3NOz2WuzOi5zEk6n/TJdAropupxUT521JIJvW7EXV2YN2SFYZrf/2RHeD28QAClGdynYadZsbmP+nyQ==
dependencies:
"@azure/abort-controller" "^1.0.0"
"@azure/logger" "^1.0.0"
tslib "^2.2.0"
"@azure/core-paging@^1.2.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@azure/core-paging/-/core-paging-1.5.0.tgz#5a5b09353e636072e6a7fc38f7879e11d0afb15f"
integrity sha512-zqWdVIt+2Z+3wqxEOGzR5hXFZ8MGKK52x4vFLw8n58pR6ZfKRx3EXYTxTaYxYHc/PexPUTyimcTWFJbji9Z6Iw==
dependencies:
tslib "^2.2.0"
"@azure/core-rest-pipeline@^1.1.0", "@azure/core-rest-pipeline@^1.2.0", "@azure/core-rest-pipeline@^1.9.1":
version "1.10.2"
resolved "https://registry.yarnpkg.com/@azure/core-rest-pipeline/-/core-rest-pipeline-1.10.2.tgz#eacd4ed9308f1f5cdac37332f36d4f3a4f3c01e4"
integrity sha512-e3WzAsRKLor5EgK2bQqR1OY5D7VBqzORHtlqtygZZQGCYOIBsynqrZBa8MFD1Ue9r8TPtofOLditalnlQHS45Q==
@ -103,7 +139,7 @@
dependencies:
tslib "^2.2.0"
"@azure/ms-rest-azure-js@^2.0.1", "@azure/ms-rest-azure-js@^2.1.0":
"@azure/ms-rest-azure-js@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@azure/ms-rest-azure-js/-/ms-rest-azure-js-2.1.0.tgz#8c90b31468aeca3146b06c7144b386fd4827f64c"
integrity sha512-CjZjB8apvXl5h97Ck6SbeeCmU0sk56YPozPtTyGudPp1RGoHXNjFNtoOvwOG76EdpmMpxbK10DqcygI16Lu60Q==
@ -112,7 +148,7 @@
"@azure/ms-rest-js" "^2.2.0"
tslib "^1.10.0"
"@azure/ms-rest-js@^2.0.4", "@azure/ms-rest-js@^2.2.0":
"@azure/ms-rest-js@^2.2.0":
version "2.6.4"
resolved "https://registry.yarnpkg.com/@azure/ms-rest-js/-/ms-rest-js-2.6.4.tgz#b0a0f89841434471adf757d09e7e39e8ecfcd650"
integrity sha512-2sbOpGhlBfv9itWdF7Qlk0CmoQCARxe5unwjNOprU7OdgEgabQncZ35L5u1A+zgdkVtNYF9Eo6XAhXzTweIhag==
@ -225,9 +261,9 @@
form-data "^3.0.0"
"@types/node@*":
version "18.14.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.14.1.tgz#90dad8476f1e42797c49d6f8b69aaf9f876fc69f"
integrity sha512-QH+37Qds3E0eDlReeboBxfHbX9omAcBCXEzswCu6jySP642jiM3cYSIkU/REqwhCUqXdonHFuBfJDiAJxMNhaQ==
version "18.15.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.7.tgz#33514fca9bdf136f77027358850c0fb9cd93c669"
integrity sha512-LFmUbFunqmBn26wJZgZPYZPrDR1RwGOu2v79Mgcka1ndO6V0/cwjivPTc4yoK6n9kmw4/ls1r8cLrvh2iMibFA==
"@types/node@13.13.52":
version "13.13.52"
@ -253,9 +289,9 @@
integrity sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg==
"@types/vscode@*":
version "1.75.1"
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.75.1.tgz#21d16480c04a50a1ceb693ea7577c58f88301579"
integrity sha512-emg7wdsTFzdi+elvoyoA+Q8keEautdQHyY5LNmHVM4PTpY8JgOTVADrGVyXGepJ6dVW2OS5/xnLUWh+nZxvdiA==
version "1.76.0"
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.76.0.tgz#967c0fbe09921818bbf201f1cbcb81b981c6249c"
integrity sha512-CQcY3+Fe5hNewHnOEAVYj4dd1do/QHliXaknAEYSXx2KEHUzFibDZSKptCon+HPgK55xx20pR+PBJjf0MomnBA==
"@types/webidl-conversions@*":
version "7.0.0"
@ -427,6 +463,14 @@ argparse@^2.0.1:
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
array-buffer-byte-length@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead"
integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==
dependencies:
call-bind "^1.0.2"
is-array-buffer "^3.0.1"
array.prototype.reduce@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz#6b20b0daa9d9734dd6bc7ea66b5bbce395471eac"
@ -870,7 +914,7 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1:
dependencies:
once "^1.4.0"
entities@^4.2.0, entities@^4.3.0, entities@^4.4.0:
entities@^4.2.0, entities@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174"
integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==
@ -881,17 +925,17 @@ entities@~2.1.0:
integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==
es-abstract@^1.19.0, es-abstract@^1.20.4:
version "1.21.1"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.1.tgz#e6105a099967c08377830a0c9cb589d570dd86c6"
integrity sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==
version "1.21.2"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff"
integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==
dependencies:
array-buffer-byte-length "^1.0.0"
available-typed-arrays "^1.0.5"
call-bind "^1.0.2"
es-set-tostringtag "^2.0.1"
es-to-primitive "^1.2.1"
function-bind "^1.1.1"
function.prototype.name "^1.1.5"
get-intrinsic "^1.1.3"
get-intrinsic "^1.2.0"
get-symbol-description "^1.0.0"
globalthis "^1.0.3"
gopd "^1.0.1"
@ -899,8 +943,8 @@ es-abstract@^1.19.0, es-abstract@^1.20.4:
has-property-descriptors "^1.0.0"
has-proto "^1.0.1"
has-symbols "^1.0.3"
internal-slot "^1.0.4"
is-array-buffer "^3.0.1"
internal-slot "^1.0.5"
is-array-buffer "^3.0.2"
is-callable "^1.2.7"
is-negative-zero "^2.0.2"
is-regex "^1.1.4"
@ -908,11 +952,12 @@ es-abstract@^1.19.0, es-abstract@^1.20.4:
is-string "^1.0.7"
is-typed-array "^1.1.10"
is-weakref "^1.0.2"
object-inspect "^1.12.2"
object-inspect "^1.12.3"
object-keys "^1.1.1"
object.assign "^4.1.4"
regexp.prototype.flags "^1.4.3"
safe-regex-test "^1.0.0"
string.prototype.trim "^1.2.7"
string.prototype.trimend "^1.0.6"
string.prototype.trimstart "^1.0.6"
typed-array-length "^1.0.4"
@ -1044,9 +1089,9 @@ esprima@^4.0.0:
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
esquery@^1.0.1:
version "1.4.2"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.2.tgz#c6d3fee05dd665808e2ad870631f221f5617b1d1"
integrity sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==
version "1.5.0"
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b"
integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==
dependencies:
estraverse "^5.1.0"
@ -1319,9 +1364,9 @@ glob@^7.0.6, glob@^7.1.3, glob@^7.1.6:
path-is-absolute "^1.0.0"
glob@^9.2.0:
version "9.3.0"
resolved "https://registry.yarnpkg.com/glob/-/glob-9.3.0.tgz#be6e50d172d025c3fcf87903ae25b36b787c0bb0"
integrity sha512-EAZejC7JvnQINayvB/7BJbpZpNOJ8Lrw2OZNEvQxe0vaLn1SuwMcfV7/MNaX8L/T0wmptBFI4YMtDvSBxYDc7w==
version "9.3.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-9.3.2.tgz#8528522e003819e63d11c979b30896e0eaf52eda"
integrity sha512-BTv/JhKXFEHsErMte/AnfiSv8yYOLLiyH2lTg8vn02O21zWFgHPTfxtgn1QRe7NRgggUhC8hacR2Re94svHqeA==
dependencies:
fs.realpath "^1.0.0"
minimatch "^7.4.1"
@ -1413,14 +1458,14 @@ hosted-git-info@^4.0.2:
lru-cache "^6.0.0"
htmlparser2@^8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.1.tgz#abaa985474fcefe269bc761a779b544d7196d010"
integrity sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==
version "8.0.2"
resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21"
integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==
dependencies:
domelementtype "^2.3.0"
domhandler "^5.0.2"
domhandler "^5.0.3"
domutils "^3.0.1"
entities "^4.3.0"
entities "^4.4.0"
http-proxy-agent@^2.1.0:
version "2.1.0"
@ -1522,7 +1567,7 @@ inquirer@^7.0.0:
strip-ansi "^6.0.0"
through "^2.3.6"
internal-slot@^1.0.4:
internal-slot@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986"
integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==
@ -1541,13 +1586,13 @@ ip@^2.0.0:
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
is-array-buffer@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.1.tgz#deb1db4fcae48308d54ef2442706c0393997052a"
integrity sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==
is-array-buffer@^3.0.1, is-array-buffer@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe"
integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==
dependencies:
call-bind "^1.0.2"
get-intrinsic "^1.1.3"
get-intrinsic "^1.2.0"
is-typed-array "^1.1.10"
is-bigint@^1.0.1:
@ -1839,9 +1884,9 @@ minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.1.1:
brace-expansion "^1.1.7"
minimatch@^7.4.1:
version "7.4.2"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.2.tgz#157e847d79ca671054253b840656720cb733f10f"
integrity sha512-xy4q7wou3vUoC9k1xGTXc+awNdGaGVHtFUaey8tiX4H1QRc04DZ/rmDFwNm2EBsuYEhAZ6SgMmYf3InGY6OauA==
version "7.4.3"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.3.tgz#012cbf110a65134bb354ae9773b55256cdb045a2"
integrity sha512-5UB4yYusDtkRPbRiy1cqZ1IpGNcJCGlEMG17RKzPddpyiPKoCdwohbED8g4QXT0ewCt8LTkQXuljsUfQ3FKM4A==
dependencies:
brace-expansion "^2.0.1"
@ -1857,12 +1902,7 @@ minipass@^3.0.0, minipass@^3.3.5:
dependencies:
yallist "^4.0.0"
minipass@^4.0.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.1.tgz#084031141113657662d40f66f9c2329036892128"
integrity sha512-KS4CHIsDfOZetnT+u6fwxyFADXLamtkPxkGScmmtTW//MlRrImV+LtbmbJpLQ86Hw7km/utbfEfndhGBrfwvlA==
minipass@^4.0.2, minipass@^4.2.4:
minipass@^4.0.0, minipass@^4.0.2, minipass@^4.2.4:
version "4.2.5"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.5.tgz#9e0e5256f1e3513f8c34691dd68549e85b2c8ceb"
integrity sha512-+yQl7SX3bIT83Lhb4BVorMAHVuqsskxRdlmO9kTpyukp8vsm2Sn/fUOV9xlnG8/a5JsypJzap21lz/y3FBMJ8Q==
@ -2041,7 +2081,7 @@ nth-check@^2.0.1:
dependencies:
boolbase "^1.0.0"
object-inspect@^1.12.2, object-inspect@^1.9.0:
object-inspect@^1.12.3, object-inspect@^1.9.0:
version "1.12.3"
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9"
integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==
@ -2176,9 +2216,9 @@ path-key@^2.0.1:
integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==
path-scurry@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.6.1.tgz#dab45f7bb1d3f45a0e271ab258999f4ab7e23132"
integrity sha512-OW+5s+7cw6253Q4E+8qQ/u1fVvcJQCJo/VFD8pje+dbJCF1n5ZRMV2AEHbGp+5Q7jxQIYJxkHopnj6nzdGeZLA==
version "1.6.3"
resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.6.3.tgz#4eba7183d64ef88b63c7d330bddc3ba279dc6c40"
integrity sha512-RAmB+n30SlN+HnNx6EbcpoDy9nwdpcGPnEKrJnu6GZoDWBdIjo1UQMVtW2ybtC7LC2oKLcMq8y5g8WnKLiod9g==
dependencies:
lru-cache "^7.14.1"
minipass "^4.0.2"
@ -2255,9 +2295,9 @@ punycode@^2.1.0, punycode@^2.1.1:
integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==
qs@^6.9.1:
version "6.11.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==
version "6.11.1"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.1.tgz#6c29dff97f0c0060765911ba65cbc9764186109f"
integrity sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==
dependencies:
side-channel "^1.0.4"
@ -2279,9 +2319,9 @@ read@^1.0.7:
mute-stream "~0.0.4"
readable-stream@^3.1.1, readable-stream@^3.4.0:
version "3.6.1"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.1.tgz#f9f9b5f536920253b3d26e7660e7da4ccff9bb62"
integrity sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==
version "3.6.2"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
dependencies:
inherits "^2.0.3"
string_decoder "^1.1.1"
@ -2539,6 +2579,15 @@ string-width@^4.1.0:
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"
string.prototype.trim@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533"
integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==
dependencies:
call-bind "^1.0.2"
define-properties "^1.1.4"
es-abstract "^1.20.4"
string.prototype.trimend@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533"