From 1963dcd96628b8275894236cbe310ddd865db58a Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:29:54 +0800 Subject: [PATCH] [mgmt] migrate mgmt package to esm 8 (#32364) https://github.com/Azure/azure-sdk-for-js/issues/32184 @azure/arm-cosmosdbforpostgresql @azure/arm-costmanagement @azure/arm-customerinsights @azure/arm-dashboard @azure/arm-databoundaries --- common/config/rush/pnpm-lock.yaml | 180 ++++++++++++------ .../api-extractor.json | 6 +- .../arm-cosmosdbforpostgresql/package.json | 84 +++++--- .../clustersCheckNameAvailabilitySample.ts | 4 +- .../samples-dev/clustersCreateSample.ts | 4 +- .../samples-dev/clustersDeleteSample.ts | 4 +- .../samples-dev/clustersGetSample.ts | 4 +- .../clustersListByResourceGroupSample.ts | 4 +- .../samples-dev/clustersListSample.ts | 4 +- .../clustersPromoteReadReplicaSample.ts | 4 +- .../samples-dev/clustersRestartSample.ts | 4 +- .../samples-dev/clustersStartSample.ts | 4 +- .../samples-dev/clustersStopSample.ts | 4 +- .../samples-dev/clustersUpdateSample.ts | 4 +- .../configurationsGetCoordinatorSample.ts | 4 +- .../configurationsGetNodeSample.ts | 4 +- .../samples-dev/configurationsGetSample.ts | 4 +- .../configurationsListByClusterSample.ts | 4 +- .../configurationsListByServerSample.ts | 4 +- ...configurationsUpdateOnCoordinatorSample.ts | 4 +- .../configurationsUpdateOnNodeSample.ts | 4 +- .../firewallRulesCreateOrUpdateSample.ts | 4 +- .../samples-dev/firewallRulesDeleteSample.ts | 4 +- .../samples-dev/firewallRulesGetSample.ts | 4 +- .../firewallRulesListByClusterSample.ts | 4 +- .../samples-dev/operationsListSample.ts | 4 +- ...EndpointConnectionsCreateOrUpdateSample.ts | 4 +- .../privateEndpointConnectionsDeleteSample.ts | 4 +- .../privateEndpointConnectionsGetSample.ts | 4 +- ...eEndpointConnectionsListByClusterSample.ts | 4 +- .../privateLinkResourcesGetSample.ts | 4 +- ...privateLinkResourcesListByClusterSample.ts | 4 +- .../samples-dev/rolesCreateSample.ts | 4 +- .../samples-dev/rolesDeleteSample.ts | 4 +- .../samples-dev/rolesGetSample.ts | 4 +- .../samples-dev/rolesListByClusterSample.ts | 4 +- .../samples-dev/serversGetSample.ts | 4 +- .../samples-dev/serversListByClusterSample.ts | 4 +- .../clustersCheckNameAvailabilitySample.ts | 4 +- .../typescript/src/clustersCreateSample.ts | 4 +- .../typescript/src/clustersDeleteSample.ts | 4 +- .../typescript/src/clustersGetSample.ts | 4 +- .../src/clustersListByResourceGroupSample.ts | 4 +- .../typescript/src/clustersListSample.ts | 4 +- .../src/clustersPromoteReadReplicaSample.ts | 4 +- .../typescript/src/clustersRestartSample.ts | 4 +- .../typescript/src/clustersStartSample.ts | 4 +- .../typescript/src/clustersStopSample.ts | 4 +- .../typescript/src/clustersUpdateSample.ts | 4 +- .../src/configurationsGetCoordinatorSample.ts | 4 +- .../src/configurationsGetNodeSample.ts | 4 +- .../typescript/src/configurationsGetSample.ts | 4 +- .../src/configurationsListByClusterSample.ts | 4 +- .../src/configurationsListByServerSample.ts | 4 +- ...configurationsUpdateOnCoordinatorSample.ts | 4 +- .../src/configurationsUpdateOnNodeSample.ts | 4 +- .../src/firewallRulesCreateOrUpdateSample.ts | 4 +- .../src/firewallRulesDeleteSample.ts | 4 +- .../typescript/src/firewallRulesGetSample.ts | 4 +- .../src/firewallRulesListByClusterSample.ts | 4 +- .../typescript/src/operationsListSample.ts | 4 +- ...EndpointConnectionsCreateOrUpdateSample.ts | 4 +- .../privateEndpointConnectionsDeleteSample.ts | 4 +- .../privateEndpointConnectionsGetSample.ts | 4 +- ...eEndpointConnectionsListByClusterSample.ts | 4 +- .../src/privateLinkResourcesGetSample.ts | 4 +- ...privateLinkResourcesListByClusterSample.ts | 4 +- .../typescript/src/rolesCreateSample.ts | 4 +- .../typescript/src/rolesDeleteSample.ts | 4 +- .../v1-beta/typescript/src/rolesGetSample.ts | 4 +- .../src/rolesListByClusterSample.ts | 4 +- .../typescript/src/serversGetSample.ts | 4 +- .../src/serversListByClusterSample.ts | 4 +- .../clustersCheckNameAvailabilitySample.ts | 4 +- .../v1/typescript/src/clustersCreateSample.ts | 4 +- .../v1/typescript/src/clustersDeleteSample.ts | 4 +- .../v1/typescript/src/clustersGetSample.ts | 4 +- .../src/clustersListByResourceGroupSample.ts | 4 +- .../v1/typescript/src/clustersListSample.ts | 4 +- .../src/clustersPromoteReadReplicaSample.ts | 4 +- .../typescript/src/clustersRestartSample.ts | 4 +- .../v1/typescript/src/clustersStartSample.ts | 4 +- .../v1/typescript/src/clustersStopSample.ts | 4 +- .../v1/typescript/src/clustersUpdateSample.ts | 4 +- .../src/configurationsGetCoordinatorSample.ts | 4 +- .../src/configurationsGetNodeSample.ts | 4 +- .../typescript/src/configurationsGetSample.ts | 4 +- .../src/configurationsListByClusterSample.ts | 4 +- .../src/configurationsListByServerSample.ts | 4 +- ...configurationsUpdateOnCoordinatorSample.ts | 4 +- .../src/configurationsUpdateOnNodeSample.ts | 4 +- .../src/firewallRulesCreateOrUpdateSample.ts | 4 +- .../src/firewallRulesDeleteSample.ts | 4 +- .../typescript/src/firewallRulesGetSample.ts | 4 +- .../src/firewallRulesListByClusterSample.ts | 4 +- .../v1/typescript/src/operationsListSample.ts | 4 +- ...EndpointConnectionsCreateOrUpdateSample.ts | 4 +- .../privateEndpointConnectionsDeleteSample.ts | 4 +- .../privateEndpointConnectionsGetSample.ts | 4 +- ...eEndpointConnectionsListByClusterSample.ts | 4 +- .../src/privateLinkResourcesGetSample.ts | 4 +- ...privateLinkResourcesListByClusterSample.ts | 4 +- .../v1/typescript/src/rolesCreateSample.ts | 4 +- .../v1/typescript/src/rolesDeleteSample.ts | 4 +- .../v1/typescript/src/rolesGetSample.ts | 4 +- .../src/rolesListByClusterSample.ts | 4 +- .../v1/typescript/src/serversGetSample.ts | 4 +- .../src/serversListByClusterSample.ts | 4 +- .../src/cosmosDBForPostgreSQL.ts | 6 +- .../arm-cosmosdbforpostgresql/src/index.ts | 8 +- .../src/models/parameters.ts | 2 +- .../src/operations/clusters.ts | 14 +- .../src/operations/configurations.ts | 14 +- .../src/operations/firewallRules.ts | 12 +- .../src/operations/index.ts | 16 +- .../src/operations/operations.ts | 10 +- .../operations/privateEndpointConnections.ts | 12 +- .../src/operations/privateLinkResources.ts | 10 +- .../src/operations/roles.ts | 12 +- .../src/operations/servers.ts | 10 +- .../src/operationsInterfaces/clusters.ts | 2 +- .../operationsInterfaces/configurations.ts | 2 +- .../src/operationsInterfaces/firewallRules.ts | 2 +- .../src/operationsInterfaces/index.ts | 16 +- .../src/operationsInterfaces/operations.ts | 2 +- .../privateEndpointConnections.ts | 2 +- .../privateLinkResources.ts | 2 +- .../src/operationsInterfaces/roles.ts | 2 +- .../src/operationsInterfaces/servers.ts | 2 +- ...mosdbforpostgresql_operations_test.spec.ts | 15 +- .../tsconfig.browser.config.json | 17 ++ .../arm-cosmosdbforpostgresql/tsconfig.json | 40 +--- .../tsconfig.samples.json | 10 + .../tsconfig.src.json | 3 + .../tsconfig.test.json | 6 + .../vitest.browser.config.ts | 17 ++ .../vitest.config.ts | 15 ++ .../vitest.esm.config.ts | 12 ++ .../arm-costmanagement/api-extractor.json | 6 +- .../arm-costmanagement/package.json | 84 +++++--- .../samples-dev/alertsDismissSample.ts | 4 +- .../samples-dev/alertsGetSample.ts | 4 +- .../samples-dev/alertsListExternalSample.ts | 4 +- .../samples-dev/alertsListSample.ts | 4 +- .../benefitRecommendationsListSample.ts | 4 +- ...onSummariesListByBillingAccountIdSample.ts | 4 +- ...onSummariesListByBillingProfileIdSample.ts | 4 +- ...ationSummariesListBySavingsPlanIdSample.ts | 4 +- ...onSummariesListBySavingsPlanOrderSample.ts | 4 +- ...nsionsByExternalCloudProviderTypeSample.ts | 4 +- .../samples-dev/dimensionsListSample.ts | 4 +- .../exportsCreateOrUpdateSample.ts | 4 +- .../samples-dev/exportsDeleteSample.ts | 4 +- .../samples-dev/exportsExecuteSample.ts | 4 +- .../exportsGetExecutionHistorySample.ts | 4 +- .../samples-dev/exportsGetSample.ts | 4 +- .../samples-dev/exportsListSample.ts | 4 +- ...orecastExternalCloudProviderUsageSample.ts | 4 +- .../samples-dev/forecastUsageSample.ts | 4 +- ...eCostDetailsReportCreateOperationSample.ts | 4 +- ...tDetailsReportGetOperationResultsSample.ts | 4 +- ...DetailedCostReportCreateOperationSample.ts | 4 +- ...iledCostReportOperationResultsGetSample.ts | 4 +- ...ailedCostReportOperationStatusGetSample.ts | 4 +- ...onDetailsReportByBillingAccountIdSample.ts | 4 +- ...onDetailsReportByBillingProfileIdSample.ts | 4 +- .../samples-dev/operationsListSample.ts | 4 +- ...riceSheetDownloadByBillingProfileSample.ts | 4 +- .../samples-dev/priceSheetDownloadSample.ts | 4 +- ...yUsageByExternalCloudProviderTypeSample.ts | 4 +- .../samples-dev/queryUsageSample.ts | 4 +- ...tionsCheckNameAvailabilityByScopeSample.ts | 4 +- ...duledActionsCheckNameAvailabilitySample.ts | 4 +- ...duledActionsCreateOrUpdateByScopeSample.ts | 4 +- .../scheduledActionsCreateOrUpdateSample.ts | 4 +- .../scheduledActionsDeleteByScopeSample.ts | 4 +- .../scheduledActionsDeleteSample.ts | 4 +- .../scheduledActionsGetByScopeSample.ts | 4 +- .../samples-dev/scheduledActionsGetSample.ts | 4 +- .../scheduledActionsListByScopeSample.ts | 4 +- .../samples-dev/scheduledActionsListSample.ts | 4 +- .../scheduledActionsRunByScopeSample.ts | 4 +- .../samples-dev/scheduledActionsRunSample.ts | 4 +- .../viewsCreateOrUpdateByScopeSample.ts | 4 +- .../samples-dev/viewsCreateOrUpdateSample.ts | 4 +- .../samples-dev/viewsDeleteByScopeSample.ts | 4 +- .../samples-dev/viewsDeleteSample.ts | 4 +- .../samples-dev/viewsGetByScopeSample.ts | 4 +- .../samples-dev/viewsGetSample.ts | 4 +- .../samples-dev/viewsListByScopeSample.ts | 4 +- .../samples-dev/viewsListSample.ts | 4 +- .../typescript/src/alertsDismissSample.ts | 4 +- .../v1-beta/typescript/src/alertsGetSample.ts | 4 +- .../src/alertsListExternalSample.ts | 4 +- .../typescript/src/alertsListSample.ts | 4 +- .../src/benefitRecommendationsListSample.ts | 4 +- ...onSummariesListByBillingAccountIdSample.ts | 4 +- ...onSummariesListByBillingProfileIdSample.ts | 4 +- ...ationSummariesListBySavingsPlanIdSample.ts | 4 +- ...onSummariesListBySavingsPlanOrderSample.ts | 4 +- ...nsionsByExternalCloudProviderTypeSample.ts | 4 +- .../typescript/src/dimensionsListSample.ts | 4 +- .../src/exportsCreateOrUpdateSample.ts | 4 +- .../typescript/src/exportsDeleteSample.ts | 4 +- .../typescript/src/exportsExecuteSample.ts | 4 +- .../src/exportsGetExecutionHistorySample.ts | 4 +- .../typescript/src/exportsGetSample.ts | 4 +- .../typescript/src/exportsListSample.ts | 4 +- ...orecastExternalCloudProviderUsageSample.ts | 4 +- .../typescript/src/forecastUsageSample.ts | 4 +- ...eCostDetailsReportCreateOperationSample.ts | 4 +- ...tDetailsReportGetOperationResultsSample.ts | 4 +- ...DetailedCostReportCreateOperationSample.ts | 4 +- ...iledCostReportOperationResultsGetSample.ts | 4 +- ...ailedCostReportOperationStatusGetSample.ts | 4 +- ...onDetailsReportByBillingAccountIdSample.ts | 4 +- ...onDetailsReportByBillingProfileIdSample.ts | 4 +- .../typescript/src/operationsListSample.ts | 4 +- ...riceSheetDownloadByBillingProfileSample.ts | 4 +- .../src/priceSheetDownloadSample.ts | 4 +- ...yUsageByExternalCloudProviderTypeSample.ts | 4 +- .../typescript/src/queryUsageSample.ts | 4 +- ...tionsCheckNameAvailabilityByScopeSample.ts | 4 +- ...duledActionsCheckNameAvailabilitySample.ts | 4 +- ...duledActionsCreateOrUpdateByScopeSample.ts | 4 +- .../scheduledActionsCreateOrUpdateSample.ts | 4 +- .../scheduledActionsDeleteByScopeSample.ts | 4 +- .../src/scheduledActionsDeleteSample.ts | 4 +- .../src/scheduledActionsGetByScopeSample.ts | 4 +- .../src/scheduledActionsGetSample.ts | 4 +- .../src/scheduledActionsListByScopeSample.ts | 4 +- .../src/scheduledActionsListSample.ts | 4 +- .../src/scheduledActionsRunByScopeSample.ts | 4 +- .../src/scheduledActionsRunSample.ts | 4 +- .../src/viewsCreateOrUpdateByScopeSample.ts | 4 +- .../src/viewsCreateOrUpdateSample.ts | 4 +- .../src/viewsDeleteByScopeSample.ts | 4 +- .../typescript/src/viewsDeleteSample.ts | 4 +- .../typescript/src/viewsGetByScopeSample.ts | 4 +- .../v1-beta/typescript/src/viewsGetSample.ts | 4 +- .../typescript/src/viewsListByScopeSample.ts | 4 +- .../v1-beta/typescript/src/viewsListSample.ts | 4 +- .../src/costManagementClient.ts | 6 +- .../arm-costmanagement/src/index.ts | 8 +- .../src/models/parameters.ts | 2 +- .../src/operations/alerts.ts | 10 +- .../src/operations/benefitRecommendations.ts | 12 +- .../operations/benefitUtilizationSummaries.ts | 12 +- .../src/operations/dimensions.ts | 10 +- .../src/operations/exports.ts | 10 +- .../src/operations/forecast.ts | 10 +- .../operations/generateCostDetailsReport.ts | 12 +- .../operations/generateDetailedCostReport.ts | 12 +- ...erateDetailedCostReportOperationResults.ts | 12 +- ...nerateDetailedCostReportOperationStatus.ts | 10 +- .../generateReservationDetailsReport.ts | 12 +- .../src/operations/index.ts | 32 ++-- .../src/operations/operations.ts | 12 +- .../src/operations/priceSheet.ts | 12 +- .../src/operations/query.ts | 10 +- .../src/operations/scheduledActions.ts | 12 +- .../src/operations/views.ts | 12 +- .../src/operationsInterfaces/alerts.ts | 2 +- .../benefitRecommendations.ts | 2 +- .../benefitUtilizationSummaries.ts | 2 +- .../src/operationsInterfaces/dimensions.ts | 2 +- .../src/operationsInterfaces/exports.ts | 2 +- .../src/operationsInterfaces/forecast.ts | 2 +- .../generateCostDetailsReport.ts | 2 +- .../generateDetailedCostReport.ts | 2 +- ...erateDetailedCostReportOperationResults.ts | 2 +- ...nerateDetailedCostReportOperationStatus.ts | 2 +- .../generateReservationDetailsReport.ts | 2 +- .../src/operationsInterfaces/index.ts | 32 ++-- .../src/operationsInterfaces/operations.ts | 2 +- .../src/operationsInterfaces/priceSheet.ts | 2 +- .../src/operationsInterfaces/query.ts | 2 +- .../operationsInterfaces/scheduledActions.ts | 2 +- .../src/operationsInterfaces/views.ts | 2 +- .../costmanagement_operations_test.spec.ts | 20 +- .../tsconfig.browser.config.json | 17 ++ .../arm-costmanagement/tsconfig.json | 40 +--- .../arm-costmanagement/tsconfig.samples.json | 10 + .../arm-costmanagement/tsconfig.src.json | 3 + .../arm-costmanagement/tsconfig.test.json | 6 + .../vitest.browser.config.ts | 17 ++ .../arm-costmanagement/vitest.config.ts | 15 ++ .../arm-costmanagement/vitest.esm.config.ts | 12 ++ .../arm-customerinsights/api-extractor.json | 6 +- .../arm-customerinsights/package.json | 84 +++++--- .../src/customerInsightsManagementClient.ts | 6 +- .../arm-customerinsights/src/index.ts | 8 +- .../src/models/parameters.ts | 2 +- .../src/operations/authorizationPolicies.ts | 12 +- .../src/operations/connectorMappings.ts | 12 +- .../src/operations/connectors.ts | 14 +- .../src/operations/hubs.ts | 14 +- .../src/operations/images.ts | 10 +- .../src/operations/index.ts | 34 ++-- .../src/operations/interactions.ts | 14 +- .../src/operations/kpi.ts | 14 +- .../src/operations/links.ts | 14 +- .../src/operations/operations.ts | 12 +- .../src/operations/predictions.ts | 14 +- .../src/operations/profiles.ts | 14 +- .../src/operations/relationshipLinks.ts | 14 +- .../src/operations/relationships.ts | 14 +- .../src/operations/roleAssignments.ts | 14 +- .../src/operations/roles.ts | 12 +- .../src/operations/views.ts | 12 +- .../src/operations/widgetTypes.ts | 12 +- .../authorizationPolicies.ts | 2 +- .../operationsInterfaces/connectorMappings.ts | 2 +- .../src/operationsInterfaces/connectors.ts | 2 +- .../src/operationsInterfaces/hubs.ts | 2 +- .../src/operationsInterfaces/images.ts | 2 +- .../src/operationsInterfaces/index.ts | 34 ++-- .../src/operationsInterfaces/interactions.ts | 2 +- .../src/operationsInterfaces/kpi.ts | 2 +- .../src/operationsInterfaces/links.ts | 2 +- .../src/operationsInterfaces/operations.ts | 2 +- .../src/operationsInterfaces/predictions.ts | 2 +- .../src/operationsInterfaces/profiles.ts | 2 +- .../operationsInterfaces/relationshipLinks.ts | 2 +- .../src/operationsInterfaces/relationships.ts | 2 +- .../operationsInterfaces/roleAssignments.ts | 2 +- .../src/operationsInterfaces/roles.ts | 2 +- .../src/operationsInterfaces/views.ts | 2 +- .../src/operationsInterfaces/widgetTypes.ts | 2 +- .../{sampleTest.ts => sampleTest.spec.ts} | 11 +- .../tsconfig.browser.config.json | 17 ++ .../arm-customerinsights/tsconfig.json | 40 +--- .../tsconfig.samples.json | 10 + .../arm-customerinsights/tsconfig.src.json | 3 + .../arm-customerinsights/tsconfig.test.json | 6 + .../vitest.browser.config.ts | 17 ++ .../arm-customerinsights/vitest.config.ts | 15 ++ .../arm-customerinsights/vitest.esm.config.ts | 12 ++ .../arm-dashboard/api-extractor.json | 6 +- sdk/dashboard/arm-dashboard/package.json | 84 +++++--- .../grafanaCheckEnterpriseDetailsSample.ts | 4 +- .../samples-dev/grafanaCreateSample.ts | 4 +- .../samples-dev/grafanaDeleteSample.ts | 4 +- .../grafanaFetchAvailablePluginsSample.ts | 4 +- .../samples-dev/grafanaGetSample.ts | 4 +- .../grafanaListByResourceGroupSample.ts | 4 +- .../samples-dev/grafanaListSample.ts | 4 +- .../samples-dev/grafanaUpdateSample.ts | 4 +- .../managedPrivateEndpointsCreateSample.ts | 4 +- .../managedPrivateEndpointsDeleteSample.ts | 4 +- .../managedPrivateEndpointsGetSample.ts | 4 +- .../managedPrivateEndpointsListSample.ts | 4 +- .../managedPrivateEndpointsRefreshSample.ts | 4 +- .../managedPrivateEndpointsUpdateSample.ts | 4 +- .../samples-dev/operationsListSample.ts | 4 +- ...privateEndpointConnectionsApproveSample.ts | 4 +- .../privateEndpointConnectionsDeleteSample.ts | 4 +- .../privateEndpointConnectionsGetSample.ts | 4 +- .../privateEndpointConnectionsListSample.ts | 4 +- .../privateLinkResourcesGetSample.ts | 4 +- .../privateLinkResourcesListSample.ts | 4 +- .../grafanaCheckEnterpriseDetailsSample.ts | 4 +- .../v1/typescript/src/grafanaCreateSample.ts | 4 +- .../v1/typescript/src/grafanaDeleteSample.ts | 4 +- .../src/grafanaFetchAvailablePluginsSample.ts | 4 +- .../v1/typescript/src/grafanaGetSample.ts | 4 +- .../src/grafanaListByResourceGroupSample.ts | 4 +- .../v1/typescript/src/grafanaListSample.ts | 4 +- .../v1/typescript/src/grafanaUpdateSample.ts | 4 +- .../managedPrivateEndpointsCreateSample.ts | 4 +- .../managedPrivateEndpointsDeleteSample.ts | 4 +- .../src/managedPrivateEndpointsGetSample.ts | 4 +- .../src/managedPrivateEndpointsListSample.ts | 4 +- .../managedPrivateEndpointsRefreshSample.ts | 4 +- .../managedPrivateEndpointsUpdateSample.ts | 4 +- .../v1/typescript/src/operationsListSample.ts | 4 +- ...privateEndpointConnectionsApproveSample.ts | 4 +- .../privateEndpointConnectionsDeleteSample.ts | 4 +- .../privateEndpointConnectionsGetSample.ts | 4 +- .../privateEndpointConnectionsListSample.ts | 4 +- .../src/privateLinkResourcesGetSample.ts | 4 +- .../src/privateLinkResourcesListSample.ts | 4 +- .../src/dashboardManagementClient.ts | 6 +- sdk/dashboard/arm-dashboard/src/index.ts | 8 +- .../arm-dashboard/src/models/parameters.ts | 2 +- .../arm-dashboard/src/operations/grafana.ts | 14 +- .../arm-dashboard/src/operations/index.ts | 10 +- .../src/operations/managedPrivateEndpoints.ts | 14 +- .../src/operations/operations.ts | 12 +- .../operations/privateEndpointConnections.ts | 14 +- .../src/operations/privateLinkResources.ts | 12 +- .../src/operationsInterfaces/grafana.ts | 2 +- .../src/operationsInterfaces/index.ts | 10 +- .../managedPrivateEndpoints.ts | 2 +- .../src/operationsInterfaces/operations.ts | 2 +- .../privateEndpointConnections.ts | 2 +- .../privateLinkResources.ts | 2 +- .../test/dashboard_operations_test.spec.ts | 17 +- .../tsconfig.browser.config.json | 17 ++ sdk/dashboard/arm-dashboard/tsconfig.json | 40 +--- .../arm-dashboard/tsconfig.samples.json | 10 + sdk/dashboard/arm-dashboard/tsconfig.src.json | 3 + .../arm-dashboard/tsconfig.test.json | 6 + .../arm-dashboard/vitest.browser.config.ts | 17 ++ sdk/dashboard/arm-dashboard/vitest.config.ts | 15 ++ .../arm-dashboard/vitest.esm.config.ts | 12 ++ .../arm-databoundaries/api-extractor.json | 6 +- .../arm-databoundaries/package.json | 116 ++++++----- .../dataBoundariesGetScopeSample.ts | 4 +- .../dataBoundariesGetTenantSample.ts | 4 +- .../samples-dev/dataBoundariesPutSample.ts | 4 +- .../src/dataBoundariesGetScopeSample.ts | 4 +- .../src/dataBoundariesGetTenantSample.ts | 4 +- .../typescript/src/dataBoundariesPutSample.ts | 4 +- .../src/databoundariesManegementClient.ts | 6 +- .../arm-databoundaries/src/index.ts | 6 +- .../src/models/parameters.ts | 2 +- .../src/operations/dataBoundaries.ts | 10 +- .../src/operations/index.ts | 2 +- .../operationsInterfaces/dataBoundaries.ts | 2 +- .../src/operationsInterfaces/index.ts | 2 +- .../databoundaries_operations_test.spec.ts | 17 +- .../tsconfig.browser.config.json | 17 ++ .../arm-databoundaries/tsconfig.json | 40 +--- .../arm-databoundaries/tsconfig.samples.json | 10 + .../arm-databoundaries/tsconfig.src.json | 3 + .../arm-databoundaries/tsconfig.test.json | 6 + .../vitest.browser.config.ts | 17 ++ .../arm-databoundaries/vitest.config.ts | 15 ++ .../arm-databoundaries/vitest.esm.config.ts | 12 ++ 430 files changed, 1629 insertions(+), 1665 deletions(-) create mode 100644 sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.browser.config.json create mode 100644 sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.samples.json create mode 100644 sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.src.json create mode 100644 sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.test.json create mode 100644 sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/vitest.browser.config.ts create mode 100644 sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/vitest.config.ts create mode 100644 sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/vitest.esm.config.ts create mode 100644 sdk/cost-management/arm-costmanagement/tsconfig.browser.config.json create mode 100644 sdk/cost-management/arm-costmanagement/tsconfig.samples.json create mode 100644 sdk/cost-management/arm-costmanagement/tsconfig.src.json create mode 100644 sdk/cost-management/arm-costmanagement/tsconfig.test.json create mode 100644 sdk/cost-management/arm-costmanagement/vitest.browser.config.ts create mode 100644 sdk/cost-management/arm-costmanagement/vitest.config.ts create mode 100644 sdk/cost-management/arm-costmanagement/vitest.esm.config.ts rename sdk/customer-insights/arm-customerinsights/test/{sampleTest.ts => sampleTest.spec.ts} (82%) create mode 100644 sdk/customer-insights/arm-customerinsights/tsconfig.browser.config.json create mode 100644 sdk/customer-insights/arm-customerinsights/tsconfig.samples.json create mode 100644 sdk/customer-insights/arm-customerinsights/tsconfig.src.json create mode 100644 sdk/customer-insights/arm-customerinsights/tsconfig.test.json create mode 100644 sdk/customer-insights/arm-customerinsights/vitest.browser.config.ts create mode 100644 sdk/customer-insights/arm-customerinsights/vitest.config.ts create mode 100644 sdk/customer-insights/arm-customerinsights/vitest.esm.config.ts create mode 100644 sdk/dashboard/arm-dashboard/tsconfig.browser.config.json create mode 100644 sdk/dashboard/arm-dashboard/tsconfig.samples.json create mode 100644 sdk/dashboard/arm-dashboard/tsconfig.src.json create mode 100644 sdk/dashboard/arm-dashboard/tsconfig.test.json create mode 100644 sdk/dashboard/arm-dashboard/vitest.browser.config.ts create mode 100644 sdk/dashboard/arm-dashboard/vitest.config.ts create mode 100644 sdk/dashboard/arm-dashboard/vitest.esm.config.ts create mode 100644 sdk/databoundaries/arm-databoundaries/tsconfig.browser.config.json create mode 100644 sdk/databoundaries/arm-databoundaries/tsconfig.samples.json create mode 100644 sdk/databoundaries/arm-databoundaries/tsconfig.src.json create mode 100644 sdk/databoundaries/arm-databoundaries/tsconfig.test.json create mode 100644 sdk/databoundaries/arm-databoundaries/vitest.browser.config.ts create mode 100644 sdk/databoundaries/arm-databoundaries/vitest.config.ts create mode 100644 sdk/databoundaries/arm-databoundaries/vitest.esm.config.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index cd048b4ecf2e..04adc5b4edef 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -237,19 +237,19 @@ importers: version: file:projects/arm-cosmosdb.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-cosmosdbforpostgresql': specifier: file:./projects/arm-cosmosdbforpostgresql.tgz - version: file:projects/arm-cosmosdbforpostgresql.tgz + version: file:projects/arm-cosmosdbforpostgresql.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-costmanagement': specifier: file:./projects/arm-costmanagement.tgz - version: file:projects/arm-costmanagement.tgz + version: file:projects/arm-costmanagement.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-customerinsights': specifier: file:./projects/arm-customerinsights.tgz - version: file:projects/arm-customerinsights.tgz + version: file:projects/arm-customerinsights.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-dashboard': specifier: file:./projects/arm-dashboard.tgz - version: file:projects/arm-dashboard.tgz + version: file:projects/arm-dashboard.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-databoundaries': specifier: file:./projects/arm-databoundaries.tgz - version: file:projects/arm-databoundaries.tgz + version: file:projects/arm-databoundaries.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-databox': specifier: file:./projects/arm-databox.tgz version: file:projects/arm-databox.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) @@ -2763,23 +2763,23 @@ packages: version: 0.0.0 '@rush-temp/arm-cosmosdbforpostgresql@file:projects/arm-cosmosdbforpostgresql.tgz': - resolution: {integrity: sha512-WW8pQ+Mc88D9927pDc2JOu6VvmKjX/CsaHfzVH8FhwPSj0Ij5tp73izIyV5NDzO5EfYgcI8/qCzuUcfnGlso0A==, tarball: file:projects/arm-cosmosdbforpostgresql.tgz} + resolution: {integrity: sha512-o7laq2RBuVKta1Drw7WMtk8OjzvLQZxCYrQ0jhzxfLU9hDmZDCspIPHfByV1dQ+bExxxpjBzLs6QIe1SxQUbyQ==, tarball: file:projects/arm-cosmosdbforpostgresql.tgz} version: 0.0.0 '@rush-temp/arm-costmanagement@file:projects/arm-costmanagement.tgz': - resolution: {integrity: sha512-I2trlTT5J3zl3JZO1gOY2X+aC9soyO31wC8Jc8BeT4hLEYwDC/bSDHkYpSd7r50OxaOlvGsR6c3dMo9c2XXI6g==, tarball: file:projects/arm-costmanagement.tgz} + resolution: {integrity: sha512-UU6wHgCecA7Y2sTZ2OTZGdLGTj0K4fWOpz4Y5y00uwL2TMC2kOr57H0Lc9ZcxmiLs9Bz4lT1siKyAoADMNg+Vw==, tarball: file:projects/arm-costmanagement.tgz} version: 0.0.0 '@rush-temp/arm-customerinsights@file:projects/arm-customerinsights.tgz': - resolution: {integrity: sha512-OZT1zaQyVxUdpVCaV/PTkOIq6AW/45ITE0rmk+x2BQVRY6oNgLzYOaV9oZ3WYW6tDqBAEANg6iRH4WWnshTR2A==, tarball: file:projects/arm-customerinsights.tgz} + resolution: {integrity: sha512-+mn+4zzo/l0diLRkzZbOUP61OCbeicls9SG1t0LuNQXaNj+htwKNohQxuAhuigSkRlPZhV8VvRnok1/SUcPCKg==, tarball: file:projects/arm-customerinsights.tgz} version: 0.0.0 '@rush-temp/arm-dashboard@file:projects/arm-dashboard.tgz': - resolution: {integrity: sha512-9TAn3nKHexcm3CttnFGhcbHuzdH1quZMRnKTX0CRGQW9aBv8cXtnefvySuMNyfPOWtNJdUNIO4S5D7luk1dIHg==, tarball: file:projects/arm-dashboard.tgz} + resolution: {integrity: sha512-y9ECq1U/5kniSBx2bBfb/8msTMUJyBsFl6vBSGeJbadftoiTIRK4AzaeGsSdarD5/k9VYT0vJ5Tl5aM1uta7wA==, tarball: file:projects/arm-dashboard.tgz} version: 0.0.0 '@rush-temp/arm-databoundaries@file:projects/arm-databoundaries.tgz': - resolution: {integrity: sha512-FTpWALpcmz7xC+OBP2z9kvG8k40tXWon1y+lZrkWRtZpv1SH3ZboZUpvDlaS1M5xSU7QQiSuiM2Nevwq3HJ1ZA==, tarball: file:projects/arm-databoundaries.tgz} + resolution: {integrity: sha512-3rP347qSeBcFmz0vf/46yDPD++/KBvzJOZU7bpO+9oviLDM5BwlpL+zj00eC6aih3hidV8j5IS3kDDrhcDD06A==, tarball: file:projects/arm-databoundaries.tgz} version: 0.0.0 '@rush-temp/arm-databox@file:projects/arm-databox.tgz': @@ -12087,106 +12087,166 @@ snapshots: - vite - webdriverio - '@rush-temp/arm-cosmosdbforpostgresql@file:projects/arm-cosmosdbforpostgresql.tgz': + '@rush-temp/arm-cosmosdbforpostgresql@file:projects/arm-cosmosdbforpostgresql.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.70 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.70)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.1.0 - ts-node: 10.9.2(@types/node@18.19.70)(typescript@5.7.2) + playwright: 1.49.1 tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.70)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + - utf-8-validate + - vite + - webdriverio - '@rush-temp/arm-costmanagement@file:projects/arm-costmanagement.tgz': + '@rush-temp/arm-costmanagement@file:projects/arm-costmanagement.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.70 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.70)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.1.0 - ts-node: 10.9.2(@types/node@18.19.70)(typescript@5.7.2) + playwright: 1.49.1 tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.70)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + - utf-8-validate + - vite + - webdriverio - '@rush-temp/arm-customerinsights@file:projects/arm-customerinsights.tgz': + '@rush-temp/arm-customerinsights@file:projects/arm-customerinsights.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.70 - chai: 4.5.0 - mocha: 11.1.0 - ts-node: 10.9.2(@types/node@18.19.70)(typescript@5.7.2) + '@vitest/browser': 2.1.8(@types/node@18.19.70)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) + playwright: 1.49.1 tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.70)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + - utf-8-validate + - vite + - webdriverio - '@rush-temp/arm-dashboard@file:projects/arm-dashboard.tgz': + '@rush-temp/arm-dashboard@file:projects/arm-dashboard.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.70 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.70)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 - mocha: 11.1.0 - ts-node: 10.9.2(@types/node@18.19.70)(typescript@5.7.2) + playwright: 1.49.1 tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.70)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + - utf-8-validate + - vite + - webdriverio - '@rush-temp/arm-databoundaries@file:projects/arm-databoundaries.tgz': + '@rush-temp/arm-databoundaries@file:projects/arm-databoundaries.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 '@microsoft/api-extractor': 7.48.1(@types/node@18.19.70) - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.70 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.70)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) dotenv: 16.4.7 mkdirp: 3.0.1 - mocha: 11.1.0 + playwright: 1.49.1 rimraf: 5.0.10 - ts-node: 10.9.2(@types/node@18.19.70)(typescript@5.7.2) tslib: 2.8.1 tsx: 4.19.2 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.70)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + - utf-8-validate + - vite + - webdriverio '@rush-temp/arm-databox@file:projects/arm-databox.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9))': dependencies: diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/api-extractor.json b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/api-extractor.json index b0d826a642bc..0764726c31b7 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/api-extractor.json +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-cosmosdbforpostgresql.d.ts" + "publicTrimmedFilePath": "dist/arm-cosmosdbforpostgresql.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/package.json b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/package.json index bc6cc0f745af..ed6eb5e85190 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/package.json +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/package.json @@ -24,22 +24,22 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-cosmosdbforpostgresql.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@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.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@vitest/browser": "^2.1.8", + "@vitest/coverage-istanbul": "^2.1.8", "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "playwright": "^1.49.1", + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, "repository": { "type": "git", @@ -49,24 +49,14 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", @@ -78,7 +68,7 @@ "format": "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:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "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", @@ -88,7 +78,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -109,5 +99,45 @@ ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-cosmosdbforpostgresql?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" + } + } } } diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersCheckNameAvailabilitySample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersCheckNameAvailabilitySample.ts index 68944c40fe3d..2a374c3f84d3 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersCheckNameAvailabilitySample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersCheckNameAvailabilitySample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end with a hyphen. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersCreateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersCreateSample.ts index 72ee2c08e4b8..27006152c1ab 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersCreateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersCreateSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new cluster with servers. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersDeleteSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersDeleteSample.ts index 2e0b505b5827..cf15eb195f0e 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersDeleteSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a cluster together with servers in it. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersGetSample.ts index 02e0c14ef565..5c3763ee8e8f 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as cluster creation date and time. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersListByResourceGroupSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersListByResourceGroupSample.ts index dbf66c032c49..b862b3cd1b4c 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersListByResourceGroupSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all clusters in a resource group. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersListSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersListSample.ts index 2468b292fcc2..2cb625f965ed 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersListSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all clusters in a subscription. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersPromoteReadReplicaSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersPromoteReadReplicaSample.ts index 75d4edb67ddb..bd395ed6a4d1 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersPromoteReadReplicaSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersPromoteReadReplicaSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Promotes read replica cluster to an independent read-write cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersRestartSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersRestartSample.ts index 80f47f9c80c1..26f960f236bf 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersRestartSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersRestartSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Restarts all nodes in the cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersStartSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersStartSample.ts index 9bae23791771..96a131e97bc2 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersStartSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersStartSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Starts stopped compute on all cluster nodes. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersStopSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersStopSample.ts index f2560c377a5b..6a785c32c7b8 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersStopSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersStopSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Stops compute on all cluster nodes. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersUpdateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersUpdateSample.ts index e1f11d320047..54e1a95c5c04 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersUpdateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/clustersUpdateSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing cluster. The request body can contain one or several properties from the cluster definition. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsGetCoordinatorSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsGetCoordinatorSample.ts index 69ba35d634e1..ac9c6cc86adc 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsGetCoordinatorSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsGetCoordinatorSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information of a configuration for coordinator. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsGetNodeSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsGetNodeSample.ts index 7b744fbbdf33..bdbf189503fc 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsGetNodeSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsGetNodeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information of a configuration for worker nodes. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsGetSample.ts index 51cd0415fa0b..b157ad421a00 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information of a configuration for coordinator and nodes. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsListByClusterSample.ts index a5a630a09b82..88eebdc6128c 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the configurations of a cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsListByServerSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsListByServerSample.ts index b37d63731656..8de1c7716904 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsListByServerSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsListByServerSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the configurations of a server in cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsUpdateOnCoordinatorSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsUpdateOnCoordinatorSample.ts index 7ee24f674f8c..d0da5198500f 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsUpdateOnCoordinatorSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsUpdateOnCoordinatorSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates configuration of coordinator in a cluster diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsUpdateOnNodeSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsUpdateOnNodeSample.ts index 1b5f55b2bb5e..39c609b383ca 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsUpdateOnNodeSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/configurationsUpdateOnNodeSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates configuration of worker nodes in a cluster diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesCreateOrUpdateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesCreateOrUpdateSample.ts index 4041b6b605e2..c42b26aaacb1 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesCreateOrUpdateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new cluster firewall rule or updates an existing cluster firewall rule. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesDeleteSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesDeleteSample.ts index 55364b49ff02..05faf206197d 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesDeleteSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a cluster firewall rule. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesGetSample.ts index 738783486d45..6313dee3ffe4 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information about a cluster firewall rule. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesListByClusterSample.ts index 48e2e60e2999..4e019fe5b748 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/firewallRulesListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the firewall rules on cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/operationsListSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/operationsListSample.ts index 150e96ffe586..07796b91f14d 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/operationsListSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all of the available REST API operations. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts index 5818c831d2bf..2182d1279955 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Approves or Rejects a private endpoint connection with a given name. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsDeleteSample.ts index 5bd11f70cd02..243b42fb9288 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a private endpoint connection with a given name. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsGetSample.ts index d9276abf4f4f..0632e5162a34 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets private endpoint connection. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsListByClusterSample.ts index 3bbcaf685b33..8073e58c6bba 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateEndpointConnectionsListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets list of private endpoint connections on a cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateLinkResourcesGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateLinkResourcesGetSample.ts index 9d47fd877e06..293746a6166f 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateLinkResourcesGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateLinkResourcesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a private link resource for cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateLinkResourcesListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateLinkResourcesListByClusterSample.ts index 9dc8454cc901..32adfe8ef645 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateLinkResourcesListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/privateLinkResourcesListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources for cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesCreateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesCreateSample.ts index 3f7d18f9e912..d83d1088337a 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesCreateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesCreateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Role, CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new role or updates an existing role. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesDeleteSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesDeleteSample.ts index 0d2a0764d609..2fcb4fd0b059 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesDeleteSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a cluster role. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesGetSample.ts index f7cc5dc29209..4358ba377876 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information about a cluster role. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesListByClusterSample.ts index 1714fb40483a..94832ae3c4bf 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/rolesListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the roles in a given cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/serversGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/serversGetSample.ts index dc2377bfacd5..634c55ddaba0 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/serversGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/serversGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information about a server in cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/serversListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/serversListByClusterSample.ts index d2c524ed2375..44bca00f0c09 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/serversListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples-dev/serversListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists servers of a cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersCheckNameAvailabilitySample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersCheckNameAvailabilitySample.ts index 68944c40fe3d..2a374c3f84d3 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersCheckNameAvailabilitySample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersCheckNameAvailabilitySample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end with a hyphen. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersCreateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersCreateSample.ts index 72ee2c08e4b8..27006152c1ab 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersCreateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersCreateSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new cluster with servers. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersDeleteSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersDeleteSample.ts index 2e0b505b5827..cf15eb195f0e 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersDeleteSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a cluster together with servers in it. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersGetSample.ts index 02e0c14ef565..5c3763ee8e8f 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as cluster creation date and time. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersListByResourceGroupSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersListByResourceGroupSample.ts index dbf66c032c49..b862b3cd1b4c 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersListByResourceGroupSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all clusters in a resource group. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersListSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersListSample.ts index 2468b292fcc2..2cb625f965ed 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersListSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all clusters in a subscription. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersPromoteReadReplicaSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersPromoteReadReplicaSample.ts index 75d4edb67ddb..bd395ed6a4d1 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersPromoteReadReplicaSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersPromoteReadReplicaSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Promotes read replica cluster to an independent read-write cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersRestartSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersRestartSample.ts index 80f47f9c80c1..26f960f236bf 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersRestartSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersRestartSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Restarts all nodes in the cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersStartSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersStartSample.ts index 9bae23791771..96a131e97bc2 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersStartSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersStartSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Starts stopped compute on all cluster nodes. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersStopSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersStopSample.ts index f2560c377a5b..6a785c32c7b8 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersStopSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersStopSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Stops compute on all cluster nodes. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersUpdateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersUpdateSample.ts index e1f11d320047..54e1a95c5c04 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersUpdateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/clustersUpdateSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing cluster. The request body can contain one or several properties from the cluster definition. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsGetCoordinatorSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsGetCoordinatorSample.ts index 69ba35d634e1..ac9c6cc86adc 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsGetCoordinatorSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsGetCoordinatorSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information of a configuration for coordinator. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsGetNodeSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsGetNodeSample.ts index 7b744fbbdf33..bdbf189503fc 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsGetNodeSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsGetNodeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information of a configuration for worker nodes. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsGetSample.ts index 51cd0415fa0b..b157ad421a00 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information of a configuration for coordinator and nodes. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsListByClusterSample.ts index a5a630a09b82..88eebdc6128c 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the configurations of a cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsListByServerSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsListByServerSample.ts index b37d63731656..8de1c7716904 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsListByServerSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsListByServerSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the configurations of a server in cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsUpdateOnCoordinatorSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsUpdateOnCoordinatorSample.ts index 7ee24f674f8c..d0da5198500f 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsUpdateOnCoordinatorSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsUpdateOnCoordinatorSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates configuration of coordinator in a cluster diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsUpdateOnNodeSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsUpdateOnNodeSample.ts index 1b5f55b2bb5e..39c609b383ca 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsUpdateOnNodeSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/configurationsUpdateOnNodeSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates configuration of worker nodes in a cluster diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesCreateOrUpdateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesCreateOrUpdateSample.ts index 4041b6b605e2..c42b26aaacb1 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesCreateOrUpdateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new cluster firewall rule or updates an existing cluster firewall rule. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesDeleteSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesDeleteSample.ts index 55364b49ff02..05faf206197d 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesDeleteSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a cluster firewall rule. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesGetSample.ts index 738783486d45..6313dee3ffe4 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information about a cluster firewall rule. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesListByClusterSample.ts index 48e2e60e2999..4e019fe5b748 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/firewallRulesListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the firewall rules on cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/operationsListSample.ts index 150e96ffe586..07796b91f14d 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/operationsListSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all of the available REST API operations. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts index 5818c831d2bf..2182d1279955 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL, } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Approves or Rejects a private endpoint connection with a given name. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts index 5bd11f70cd02..243b42fb9288 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a private endpoint connection with a given name. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts index d9276abf4f4f..0632e5162a34 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets private endpoint connection. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsListByClusterSample.ts index 3bbcaf685b33..8073e58c6bba 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateEndpointConnectionsListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets list of private endpoint connections on a cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateLinkResourcesGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateLinkResourcesGetSample.ts index 9d47fd877e06..293746a6166f 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateLinkResourcesGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateLinkResourcesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a private link resource for cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateLinkResourcesListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateLinkResourcesListByClusterSample.ts index 9dc8454cc901..32adfe8ef645 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateLinkResourcesListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/privateLinkResourcesListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources for cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesCreateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesCreateSample.ts index 3f7d18f9e912..d83d1088337a 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesCreateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesCreateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Role, CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new role or updates an existing role. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesDeleteSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesDeleteSample.ts index 0d2a0764d609..2fcb4fd0b059 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesDeleteSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a cluster role. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesGetSample.ts index f7cc5dc29209..4358ba377876 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information about a cluster role. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesListByClusterSample.ts index 1714fb40483a..94832ae3c4bf 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/rolesListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the roles in a given cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/serversGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/serversGetSample.ts index dc2377bfacd5..634c55ddaba0 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/serversGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/serversGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information about a server in cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/serversListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/serversListByClusterSample.ts index d2c524ed2375..44bca00f0c09 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/serversListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1-beta/typescript/src/serversListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists servers of a cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersCheckNameAvailabilitySample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersCheckNameAvailabilitySample.ts index b46d771f4ed9..90b2ab6c0f67 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersCheckNameAvailabilitySample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersCheckNameAvailabilitySample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end with a hyphen. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersCreateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersCreateSample.ts index 06926342e54f..7fd069dd1554 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersCreateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersCreateSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new cluster with servers. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersDeleteSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersDeleteSample.ts index 34b1ec47aba5..5f11e7d92817 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersDeleteSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a cluster together with servers in it. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersGetSample.ts index 22edb248a547..64965bf98160 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as cluster creation date and time. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersListByResourceGroupSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersListByResourceGroupSample.ts index c8e62381f330..46d69b503399 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersListByResourceGroupSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all clusters in a resource group. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersListSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersListSample.ts index f4482503bf7e..25e6fb3a0ffc 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersListSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all clusters in a subscription. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersPromoteReadReplicaSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersPromoteReadReplicaSample.ts index f75ea9aa78f1..ee4c2cb246dd 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersPromoteReadReplicaSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersPromoteReadReplicaSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Promotes read replica cluster to an independent read-write cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersRestartSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersRestartSample.ts index f1832bfb0b53..ba06e6b30fc0 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersRestartSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersRestartSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Restarts all nodes in the cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersStartSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersStartSample.ts index 4801cb7a8228..30e809ed9f17 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersStartSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersStartSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Starts stopped compute on all cluster nodes. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersStopSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersStopSample.ts index 954c9ab850aa..86bfec90a625 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersStopSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersStopSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Stops compute on all cluster nodes. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersUpdateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersUpdateSample.ts index c4699e193022..dbae5deef3a8 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersUpdateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/clustersUpdateSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates an existing cluster. The request body can contain one or several properties from the cluster definition. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsGetCoordinatorSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsGetCoordinatorSample.ts index e1322d1bdab0..094221b5b36b 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsGetCoordinatorSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsGetCoordinatorSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information of a configuration for coordinator. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsGetNodeSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsGetNodeSample.ts index 5f5eba13ea43..8c9730bef5f9 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsGetNodeSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsGetNodeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information of a configuration for worker nodes. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsGetSample.ts index e5453dc71562..1cd859bf0775 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information of a configuration for coordinator and nodes. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsListByClusterSample.ts index 586af7a3d50f..5ad610fe5310 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the configurations of a cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsListByServerSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsListByServerSample.ts index d96a6a892cd6..01895550204d 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsListByServerSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsListByServerSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the configurations of a server in cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsUpdateOnCoordinatorSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsUpdateOnCoordinatorSample.ts index 1a3bb178e9d6..c096d9c72326 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsUpdateOnCoordinatorSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsUpdateOnCoordinatorSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates configuration of coordinator in a cluster diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsUpdateOnNodeSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsUpdateOnNodeSample.ts index 46b61f4841cd..c0a3ea742054 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsUpdateOnNodeSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/configurationsUpdateOnNodeSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates configuration of worker nodes in a cluster diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesCreateOrUpdateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesCreateOrUpdateSample.ts index 8f013e675335..cca3fb4add5c 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesCreateOrUpdateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new cluster firewall rule or updates an existing cluster firewall rule. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesDeleteSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesDeleteSample.ts index 666a7de3a117..2eea1498df1c 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesDeleteSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a cluster firewall rule. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesGetSample.ts index 60a9be1c30a3..104768d261c2 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information about a cluster firewall rule. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesListByClusterSample.ts index 38702741d562..fe790279aff5 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/firewallRulesListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the firewall rules on cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/operationsListSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/operationsListSample.ts index 80e760563a43..f303e200fbb5 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/operationsListSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all of the available REST API operations. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts index 22687325c4b6..10be4a895aac 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Approves or Rejects a private endpoint connection with a given name. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsDeleteSample.ts index 33a6171cc3fd..aa790648ed52 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a private endpoint connection with a given name. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsGetSample.ts index 2c88c088da57..745c04fbdea4 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets private endpoint connection. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsListByClusterSample.ts index 45c1de629b3b..cc177a1bde1f 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateEndpointConnectionsListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets list of private endpoint connections on a cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateLinkResourcesGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateLinkResourcesGetSample.ts index 0875dcb02413..54f514e899f5 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateLinkResourcesGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateLinkResourcesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a private link resource for cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateLinkResourcesListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateLinkResourcesListByClusterSample.ts index 1e396bb39a8e..adf846c051e4 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateLinkResourcesListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/privateLinkResourcesListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private link resources for cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesCreateSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesCreateSample.ts index 3642bd9ca61e..e3497b039475 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesCreateSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesCreateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Role, CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new role or updates an existing role. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesDeleteSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesDeleteSample.ts index 0ab5cca0fbb2..ea782803d79b 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesDeleteSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a cluster role. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesGetSample.ts index abc5dea09a80..b240e2775b5f 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information about a cluster role. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesListByClusterSample.ts index 0e69d0a6b9db..b7619bf1f6fd 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/rolesListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the roles in a given cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/serversGetSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/serversGetSample.ts index cdc175cf8a94..49b02a1428f0 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/serversGetSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/serversGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets information about a server in cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/serversListByClusterSample.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/serversListByClusterSample.ts index 45794f036a4d..93e92a9a6798 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/serversListByClusterSample.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/samples/v1/typescript/src/serversListByClusterSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CosmosDBForPostgreSQL } from "@azure/arm-cosmosdbforpostgresql"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists servers of a cluster. diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/cosmosDBForPostgreSQL.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/cosmosDBForPostgreSQL.ts index 5bb95eaa5cd4..d0fc8d8013af 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/cosmosDBForPostgreSQL.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/cosmosDBForPostgreSQL.ts @@ -23,7 +23,7 @@ import { OperationsImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, -} from "./operations"; +} from "./operations/index.js"; import { Clusters, Servers, @@ -33,8 +33,8 @@ import { Operations, PrivateEndpointConnections, PrivateLinkResources, -} from "./operationsInterfaces"; -import { CosmosDBForPostgreSQLOptionalParams } from "./models"; +} from "./operationsInterfaces/index.js"; +import { CosmosDBForPostgreSQLOptionalParams } from "./models/index.js"; export class CosmosDBForPostgreSQL extends coreClient.ServiceClient { $host: string; diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/index.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/index.ts index d8ded7d0db06..2496524a2dfc 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/index.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { CosmosDBForPostgreSQL } from "./cosmosDBForPostgreSQL"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { CosmosDBForPostgreSQL } from "./cosmosDBForPostgreSQL.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/models/parameters.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/models/parameters.ts index 973f652058e5..1fd9addd24a4 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/models/parameters.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/models/parameters.ts @@ -20,7 +20,7 @@ import { FirewallRule as FirewallRuleMapper, Role as RoleMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, -} from "../models/mappers"; +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/clusters.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/clusters.ts index 98f5369412a8..5f938a6f0553 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/clusters.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/clusters.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Clusters } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Clusters } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Cluster, ClustersListNextOptionalParams, @@ -46,7 +46,7 @@ import { ClustersCheckNameAvailabilityResponse, ClustersListNextResponse, ClustersListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Clusters operations. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/configurations.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/configurations.ts index ee5cad823db1..2dc0b3952288 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/configurations.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/configurations.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Configurations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Configurations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { ServerConfiguration, ConfigurationsListByServerNextOptionalParams, @@ -40,7 +40,7 @@ import { ConfigurationsUpdateOnNodeResponse, ConfigurationsListByServerNextResponse, ConfigurationsListByClusterNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Configurations operations. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/firewallRules.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/firewallRules.ts index 5dce7be2bfc2..13a85cae7d9d 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/firewallRules.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/firewallRules.ts @@ -7,17 +7,17 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { FirewallRules } from "../operationsInterfaces"; +import { FirewallRules } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { FirewallRule, FirewallRulesListByClusterOptionalParams, @@ -28,7 +28,7 @@ import { FirewallRulesDeleteResponse, FirewallRulesGetOptionalParams, FirewallRulesGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing FirewallRules operations. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/index.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/index.ts index c3c213c2213b..ba37fe1a85f4 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/index.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/index.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./clusters"; -export * from "./servers"; -export * from "./configurations"; -export * from "./firewallRules"; -export * from "./roles"; -export * from "./operations"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; +export * from "./clusters.js"; +export * from "./servers.js"; +export * from "./configurations.js"; +export * from "./firewallRules.js"; +export * from "./roles.js"; +export * from "./operations.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/operations.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/operations.ts index a2d2f7a34133..a0c3cf6b22ca 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/operations.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/operations.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Operations } from "../operationsInterfaces"; +import { Operations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL.js"; import { Operation, OperationsListOptionalParams, OperationsListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/privateEndpointConnections.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/privateEndpointConnections.ts index 2bf6b1606c6a..5666426626e7 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/privateEndpointConnections.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/privateEndpointConnections.ts @@ -7,17 +7,17 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PrivateEndpointConnections } from "../operationsInterfaces"; +import { PrivateEndpointConnections } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListByClusterOptionalParams, @@ -28,7 +28,7 @@ import { PrivateEndpointConnectionsCreateOrUpdateResponse, PrivateEndpointConnectionsDeleteOptionalParams, PrivateEndpointConnectionsDeleteResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PrivateEndpointConnections operations. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/privateLinkResources.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/privateLinkResources.ts index c5700ee9d673..4eb44b63ec3f 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/privateLinkResources.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/privateLinkResources.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { PrivateLinkResources } from "../operationsInterfaces"; +import { PrivateLinkResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL.js"; import { PrivateLinkResource, PrivateLinkResourcesListByClusterOptionalParams, PrivateLinkResourcesListByClusterResponse, PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PrivateLinkResources operations. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/roles.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/roles.ts index 19b5043fbf2c..76529030039f 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/roles.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/roles.ts @@ -7,17 +7,17 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Roles } from "../operationsInterfaces"; +import { Roles } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Role, RolesListByClusterOptionalParams, @@ -28,7 +28,7 @@ import { RolesCreateResponse, RolesDeleteOptionalParams, RolesDeleteResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Roles operations. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/servers.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/servers.ts index a1b1e711143f..ebe4d1168c48 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/servers.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operations/servers.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Servers } from "../operationsInterfaces"; +import { Servers } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CosmosDBForPostgreSQL } from "../cosmosDBForPostgreSQL.js"; import { ClusterServer, ServersListByClusterOptionalParams, ServersListByClusterResponse, ServersGetOptionalParams, ServersGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Servers operations. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/clusters.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/clusters.ts index 7d52dcc16ba1..6f6829cebfdb 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/clusters.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/clusters.ts @@ -29,7 +29,7 @@ import { NameAvailabilityRequest, ClustersCheckNameAvailabilityOptionalParams, ClustersCheckNameAvailabilityResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Clusters. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/configurations.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/configurations.ts index 2256d5e07b1e..6d64eca253a4 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/configurations.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/configurations.ts @@ -23,7 +23,7 @@ import { ConfigurationsGetNodeResponse, ConfigurationsUpdateOnNodeOptionalParams, ConfigurationsUpdateOnNodeResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Configurations. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/firewallRules.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/firewallRules.ts index ef820d8eaf0d..f3fc1679e204 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/firewallRules.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/firewallRules.ts @@ -17,7 +17,7 @@ import { FirewallRulesDeleteResponse, FirewallRulesGetOptionalParams, FirewallRulesGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a FirewallRules. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/index.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/index.ts index c3c213c2213b..ba37fe1a85f4 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/index.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/index.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./clusters"; -export * from "./servers"; -export * from "./configurations"; -export * from "./firewallRules"; -export * from "./roles"; -export * from "./operations"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; +export * from "./clusters.js"; +export * from "./servers.js"; +export * from "./configurations.js"; +export * from "./firewallRules.js"; +export * from "./roles.js"; +export * from "./operations.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/operations.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/operations.ts index 441bf69b42a5..bc92e518341f 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/operations.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models"; +import { Operation, OperationsListOptionalParams } from "../models/index.js"; /// /** Interface representing a Operations. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/privateEndpointConnections.ts index f86dca0d1c9a..93884fd94f41 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/privateEndpointConnections.ts @@ -17,7 +17,7 @@ import { PrivateEndpointConnectionsCreateOrUpdateResponse, PrivateEndpointConnectionsDeleteOptionalParams, PrivateEndpointConnectionsDeleteResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PrivateEndpointConnections. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/privateLinkResources.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/privateLinkResources.ts index c4a5b5a1cd66..f20a8172bc46 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/privateLinkResources.ts @@ -12,7 +12,7 @@ import { PrivateLinkResourcesListByClusterOptionalParams, PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PrivateLinkResources. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/roles.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/roles.ts index 77ced51a91b8..63fc9e01a7d5 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/roles.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/roles.ts @@ -17,7 +17,7 @@ import { RolesCreateResponse, RolesDeleteOptionalParams, RolesDeleteResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Roles. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/servers.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/servers.ts index 357f9ce54293..5f015ede4a55 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/servers.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/src/operationsInterfaces/servers.ts @@ -12,7 +12,7 @@ import { ServersListByClusterOptionalParams, ServersGetOptionalParams, ServersGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Servers. */ diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/test/cosmosdbforpostgresql_operations_test.spec.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/test/cosmosdbforpostgresql_operations_test.spec.ts index a7ff3ad32f68..ceb2228bf112 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/test/cosmosdbforpostgresql_operations_test.spec.ts +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/test/cosmosdbforpostgresql_operations_test.spec.ts @@ -10,13 +10,11 @@ import { env, Recorder, RecorderStartOptions, - delay, isPlaybackMode, } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { CosmosDBForPostgreSQL } from "../src/cosmosDBForPostgreSQL"; +import { CosmosDBForPostgreSQL } from "../src/cosmosDBForPostgreSQL.js"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", @@ -45,8 +43,8 @@ describe("CosmosDBForPostgreSQL test", () => { let resourceGroup: string; let resourcename: string; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async function (ctx) { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); subscriptionId = env.SUBSCRIPTION_ID || ''; // This is an example of how the environment variables are used @@ -106,11 +104,10 @@ describe("CosmosDBForPostgreSQL test", () => { //need run this case 1h later it("clusters delete test", async function () { const resArray = new Array(); - const res = await client.clusters.beginDeleteAndWait(resourceGroup, resourcename, testPollingOptions - ) + await client.clusters.beginDeleteAndWait(resourceGroup, resourcename, testPollingOptions); for await (let item of client.clusters.listByResourceGroup(resourceGroup)) { resArray.push(item); } assert.equal(resArray.length, 0); - }).timeout(3600000); + }); }) diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.browser.config.json b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.browser.config.json new file mode 100644 index 000000000000..b6586181d006 --- /dev/null +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.browser.config.json @@ -0,0 +1,17 @@ +{ + "extends": "./.tshy/build.json", + "include": [ + "./src/**/*.ts", + "./src/**/*.mts", + "./test/**/*.spec.ts", + "./test/**/*.mts" + ], + "exclude": [ + "./test/**/node/**/*.ts" + ], + "compilerOptions": { + "outDir": "./dist-test/browser", + "rootDir": ".", + "skipLibCheck": true + } +} diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.json b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.json index 3ecbde44b0a9..19ceb382b521 100644 --- a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.json +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.json @@ -1,33 +1,13 @@ { - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-cosmosdbforpostgresql": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.samples.json b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.samples.json new file mode 100644 index 000000000000..5f1b398a7878 --- /dev/null +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-cosmosdbforpostgresql": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.src.json b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.test.json b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/vitest.browser.config.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/vitest.browser.config.ts @@ -0,0 +1,17 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.browser.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + include: [ + "dist-test/browser/test/**/*.spec.js", + ], + }, + }), +); diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/vitest.config.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/vitest.esm.config.ts b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/cosmosforpostgresql/arm-cosmosdbforpostgresql/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/cost-management/arm-costmanagement/api-extractor.json b/sdk/cost-management/arm-costmanagement/api-extractor.json index 398047ab576c..e7845aa694f2 100644 --- a/sdk/cost-management/arm-costmanagement/api-extractor.json +++ b/sdk/cost-management/arm-costmanagement/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-costmanagement.d.ts" + "publicTrimmedFilePath": "dist/arm-costmanagement.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/cost-management/arm-costmanagement/package.json b/sdk/cost-management/arm-costmanagement/package.json index d64971a508cc..06987681d346 100644 --- a/sdk/cost-management/arm-costmanagement/package.json +++ b/sdk/cost-management/arm-costmanagement/package.json @@ -24,22 +24,22 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-costmanagement.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@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.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@vitest/browser": "^2.1.8", + "@vitest/coverage-istanbul": "^2.1.8", "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "playwright": "^1.49.1", + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, "repository": { "type": "git", @@ -49,24 +49,14 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", @@ -78,7 +68,7 @@ "format": "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:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "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", @@ -88,7 +78,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -109,5 +99,45 @@ ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-costmanagement?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" + } + } } } diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/alertsDismissSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/alertsDismissSample.ts index b31d07002bc9..516d7e606017 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/alertsDismissSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/alertsDismissSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Dismisses the specified alert diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/alertsGetSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/alertsGetSample.ts index a638fc6d5fe5..b4d1248a4256 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/alertsGetSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/alertsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the alert for the scope by alert ID. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/alertsListExternalSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/alertsListExternalSample.ts index 905b2e683ed4..e4f563be51a5 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/alertsListExternalSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/alertsListExternalSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Alerts for external cloud provider type defined. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/alertsListSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/alertsListSample.ts index b6d716a8ffcb..79a85c4755ca 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/alertsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/alertsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the alerts for scope defined. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/benefitRecommendationsListSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/benefitRecommendationsListSample.ts index e979ffb77d75..f9a85cc46a56 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/benefitRecommendationsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/benefitRecommendationsListSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List of recommendations for purchasing savings plan. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListByBillingAccountIdSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListByBillingAccountIdSample.ts index c967269af47c..c26ee39b52ad 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListByBillingAccountIdSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListByBillingAccountIdSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListByBillingProfileIdSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListByBillingProfileIdSample.ts index 0023975094c9..310d59871fed 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListByBillingProfileIdSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListByBillingProfileIdSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListBySavingsPlanIdSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListBySavingsPlanIdSample.ts index c8fd08d0e2d3..b737c24dd6b1 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListBySavingsPlanIdSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListBySavingsPlanIdSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the savings plan utilization summaries for daily or monthly grain. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListBySavingsPlanOrderSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListBySavingsPlanOrderSample.ts index d0ac111bf402..bb39cadf10c6 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListBySavingsPlanOrderSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/benefitUtilizationSummariesListBySavingsPlanOrderSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the savings plan utilization summaries for daily or monthly grain. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/dimensionsByExternalCloudProviderTypeSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/dimensionsByExternalCloudProviderTypeSample.ts index f2af049d3367..0c3abdbd1842 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/dimensionsByExternalCloudProviderTypeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/dimensionsByExternalCloudProviderTypeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the dimensions by the external cloud provider type. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/dimensionsListSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/dimensionsListSample.ts index 4856aeed9bb6..37f88c3a9f25 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/dimensionsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/dimensionsListSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the dimensions by the defined scope. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/exportsCreateOrUpdateSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/exportsCreateOrUpdateSample.ts index 588d00f090e5..3469db4fd80d 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/exportsCreateOrUpdateSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/exportsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Export, CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to create or update a export. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/exportsDeleteSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/exportsDeleteSample.ts index 885e5e7f249e..8c20ee7806ab 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/exportsDeleteSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/exportsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to delete a export. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/exportsExecuteSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/exportsExecuteSample.ts index dce6619a9549..55a5b899c669 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/exportsExecuteSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/exportsExecuteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to run an export. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/exportsGetExecutionHistorySample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/exportsGetExecutionHistorySample.ts index 2ca9045f10ab..e077d6a91f44 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/exportsGetExecutionHistorySample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/exportsGetExecutionHistorySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to get the run history of an export for the defined scope and export name. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/exportsGetSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/exportsGetSample.ts index db4edc672e44..3af83854563d 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/exportsGetSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/exportsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to get the export for the defined scope by export name. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/exportsListSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/exportsListSample.ts index 2e2c9e213a6a..2af7df780fdb 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/exportsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/exportsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to list all exports at the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/forecastExternalCloudProviderUsageSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/forecastExternalCloudProviderUsageSample.ts index 07f2664ea491..b56cc364ae7d 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/forecastExternalCloudProviderUsageSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/forecastExternalCloudProviderUsageSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the forecast charges for external cloud provider type defined. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/forecastUsageSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/forecastUsageSample.ts index b2e503401e11..c41bc6956552 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/forecastUsageSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/forecastUsageSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the forecast charges for scope defined. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/generateCostDetailsReportCreateOperationSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/generateCostDetailsReportCreateOperationSample.ts index 189e81706e68..d3501bfd6232 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/generateCostDetailsReportCreateOperationSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/generateCostDetailsReportCreateOperationSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This API is the replacement for all previously release Usage Details APIs. Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a certain scope. The initial call to request a report will return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the endpoint to poll to get the result of the report generation. The 'Retry-After' provides the duration to wait before polling for the generated report. A call to poll the report operation will provide a 202 response with a 'Location' header if the operation is still in progress. Once the report generation operation completes, the polling endpoint will provide a 200 response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body. To Understand cost details (formerly known as usage details) fields found in files ,see https://learn.microsoft.com/azure/cost-management-billing/automate/understand-usage-details-fields diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/generateCostDetailsReportGetOperationResultsSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/generateCostDetailsReportGetOperationResultsSample.ts index 0b80e809e26e..4940aeb8e949 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/generateCostDetailsReportGetOperationResultsSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/generateCostDetailsReportGetOperationResultsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the result of the specified operation. This link is provided in the CostDetails creation request response Location header. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/generateDetailedCostReportCreateOperationSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/generateDetailedCostReportCreateOperationSample.ts index 4d2fe1d0eb0d..eeb6d6e354a0 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/generateDetailedCostReportCreateOperationSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/generateDetailedCostReportCreateOperationSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Generates the detailed cost report for provided date range, billing period(only enterprise customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the operation will provide the status and if the operation is completed the blob file where generated detailed cost report is being stored. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/generateDetailedCostReportOperationResultsGetSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/generateDetailedCostReportOperationResultsGetSample.ts index 38ecf8a41244..8d34dfb13dd0 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/generateDetailedCostReportOperationResultsGetSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/generateDetailedCostReportOperationResultsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the result of the specified operation. The link with this operationId is provided as a response header of the initial request. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/generateDetailedCostReportOperationStatusGetSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/generateDetailedCostReportOperationStatusGetSample.ts index 1c7fd3e445fa..0b3874e9c862 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/generateDetailedCostReportOperationStatusGetSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/generateDetailedCostReportOperationStatusGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the status of the specified operation. This link is provided in the GenerateDetailedCostReport creation request response header. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/generateReservationDetailsReportByBillingAccountIdSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/generateReservationDetailsReportByBillingAccountIdSample.ts index 5503c669aad4..6fb4234579c4 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/generateReservationDetailsReportByBillingAccountIdSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/generateReservationDetailsReportByBillingAccountIdSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://learn.microsoft.com/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/generateReservationDetailsReportByBillingProfileIdSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/generateReservationDetailsReportByBillingProfileIdSample.ts index dc707a214e43..0010336cfd8b 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/generateReservationDetailsReportByBillingProfileIdSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/generateReservationDetailsReportByBillingProfileIdSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://learn.microsoft.com/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/operationsListSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/operationsListSample.ts index 9745ac9d9172..28a02e05e61b 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/operationsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all of the available cost management REST API operations. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/priceSheetDownloadByBillingProfileSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/priceSheetDownloadByBillingProfileSample.ts index a1b65bd6dffa..16f33af33695 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/priceSheetDownloadByBillingProfileSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/priceSheetDownloadByBillingProfileSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv file to a Zip file containing multiple csv files, each with max 200k records. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/priceSheetDownloadSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/priceSheetDownloadSample.ts index 6f262a61db4b..80ffebba0af7 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/priceSheetDownloadSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/priceSheetDownloadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/queryUsageByExternalCloudProviderTypeSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/queryUsageByExternalCloudProviderTypeSample.ts index 73cc01f3110d..2e17af8179a8 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/queryUsageByExternalCloudProviderTypeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/queryUsageByExternalCloudProviderTypeSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Query the usage data for external cloud provider type defined. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/queryUsageSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/queryUsageSample.ts index 2e1ff6594079..d385c4eda1ab 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/queryUsageSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/queryUsageSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Query the usage data for scope defined. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCheckNameAvailabilityByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCheckNameAvailabilityByScopeSample.ts index 8f4c91845ac0..6bb7f65d8fd7 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCheckNameAvailabilityByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCheckNameAvailabilityByScopeSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks availability and correctness of the name for a scheduled action within the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCheckNameAvailabilitySample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCheckNameAvailabilitySample.ts index abba61ba17a2..aa6aad512e27 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCheckNameAvailabilitySample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCheckNameAvailabilitySample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks availability and correctness of the name for a scheduled action. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCreateOrUpdateByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCreateOrUpdateByScopeSample.ts index a3be4804b3e5..b58d7e55ff34 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCreateOrUpdateByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCreateOrUpdateByScopeSample.ts @@ -14,9 +14,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a shared scheduled action within the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCreateOrUpdateSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCreateOrUpdateSample.ts index 2ac9549774d7..bb8046fef59e 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCreateOrUpdateSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsCreateOrUpdateSample.ts @@ -14,9 +14,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a private scheduled action. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsDeleteByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsDeleteByScopeSample.ts index e5ae6bee0425..6c7f908ac717 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsDeleteByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsDeleteByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a scheduled action within the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsDeleteSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsDeleteSample.ts index d748f1a310c2..e9b660bf401a 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsDeleteSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a private scheduled action. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsGetByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsGetByScopeSample.ts index 14dc7c5472c9..fbe9a7cb7b37 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsGetByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsGetByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the shared scheduled action from the given scope by name. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsGetSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsGetSample.ts index 85c47e9e1272..ea927cd2ef61 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsGetSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the private scheduled action by name. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsListByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsListByScopeSample.ts index cbe7a04a52fa..543926d3eb6b 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsListByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsListByScopeSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all shared scheduled actions within the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsListSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsListSample.ts index afc2d863a9e4..443de9a7800e 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsListSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all private scheduled actions. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsRunByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsRunByScopeSample.ts index 7de343f6466b..afacdc86eb56 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsRunByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsRunByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Runs a shared scheduled action within the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsRunSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsRunSample.ts index 43b3df2a40ac..47eddfa5fe43 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsRunSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/scheduledActionsRunSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Processes a private scheduled action. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/viewsCreateOrUpdateByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/viewsCreateOrUpdateByScopeSample.ts index ab7396491145..ce4d44df8333 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/viewsCreateOrUpdateByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/viewsCreateOrUpdateByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { View, CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/viewsCreateOrUpdateSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/viewsCreateOrUpdateSample.ts index 19b186a4337a..0716b938e9f6 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/viewsCreateOrUpdateSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/viewsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { View, CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/viewsDeleteByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/viewsDeleteByScopeSample.ts index 535db750badb..1090fe20ac6b 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/viewsDeleteByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/viewsDeleteByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to delete a view. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/viewsDeleteSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/viewsDeleteSample.ts index b5ff15b0a530..83d35bb315aa 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/viewsDeleteSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/viewsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to delete a view. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/viewsGetByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/viewsGetByScopeSample.ts index 7d489f4d2ed7..770dc2d00bb4 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/viewsGetByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/viewsGetByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the view for the defined scope by view name. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/viewsGetSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/viewsGetSample.ts index 35ff1ad31424..9dca26195fe2 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/viewsGetSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/viewsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the view by view name. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/viewsListByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/viewsListByScopeSample.ts index deb8f17538c9..fdf4632766a1 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/viewsListByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/viewsListByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all views at the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples-dev/viewsListSample.ts b/sdk/cost-management/arm-costmanagement/samples-dev/viewsListSample.ts index e6a2e9363e76..3749a9a1555e 100644 --- a/sdk/cost-management/arm-costmanagement/samples-dev/viewsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples-dev/viewsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all views by tenant and object. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsDismissSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsDismissSample.ts index b31d07002bc9..516d7e606017 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsDismissSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsDismissSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Dismisses the specified alert diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsGetSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsGetSample.ts index a638fc6d5fe5..b4d1248a4256 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsGetSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the alert for the scope by alert ID. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsListExternalSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsListExternalSample.ts index 905b2e683ed4..e4f563be51a5 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsListExternalSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsListExternalSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Alerts for external cloud provider type defined. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsListSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsListSample.ts index b6d716a8ffcb..79a85c4755ca 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/alertsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the alerts for scope defined. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitRecommendationsListSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitRecommendationsListSample.ts index e979ffb77d75..f9a85cc46a56 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitRecommendationsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitRecommendationsListSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List of recommendations for purchasing savings plan. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListByBillingAccountIdSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListByBillingAccountIdSample.ts index c967269af47c..c26ee39b52ad 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListByBillingAccountIdSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListByBillingAccountIdSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily' and 'Monthly'. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListByBillingProfileIdSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListByBillingProfileIdSample.ts index 0023975094c9..310d59871fed 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListByBillingProfileIdSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListByBillingProfileIdSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListBySavingsPlanIdSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListBySavingsPlanIdSample.ts index c8fd08d0e2d3..b737c24dd6b1 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListBySavingsPlanIdSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListBySavingsPlanIdSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the savings plan utilization summaries for daily or monthly grain. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListBySavingsPlanOrderSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListBySavingsPlanOrderSample.ts index d0ac111bf402..bb39cadf10c6 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListBySavingsPlanOrderSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/benefitUtilizationSummariesListBySavingsPlanOrderSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the savings plan utilization summaries for daily or monthly grain. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/dimensionsByExternalCloudProviderTypeSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/dimensionsByExternalCloudProviderTypeSample.ts index f2af049d3367..0c3abdbd1842 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/dimensionsByExternalCloudProviderTypeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/dimensionsByExternalCloudProviderTypeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the dimensions by the external cloud provider type. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/dimensionsListSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/dimensionsListSample.ts index 4856aeed9bb6..37f88c3a9f25 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/dimensionsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/dimensionsListSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the dimensions by the defined scope. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsCreateOrUpdateSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsCreateOrUpdateSample.ts index 588d00f090e5..3469db4fd80d 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsCreateOrUpdateSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Export, CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to create or update a export. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsDeleteSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsDeleteSample.ts index 885e5e7f249e..8c20ee7806ab 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsDeleteSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to delete a export. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsExecuteSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsExecuteSample.ts index dce6619a9549..55a5b899c669 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsExecuteSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsExecuteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to run an export. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsGetExecutionHistorySample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsGetExecutionHistorySample.ts index 2ca9045f10ab..e077d6a91f44 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsGetExecutionHistorySample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsGetExecutionHistorySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to get the run history of an export for the defined scope and export name. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsGetSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsGetSample.ts index db4edc672e44..3af83854563d 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsGetSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to get the export for the defined scope by export name. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsListSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsListSample.ts index 2e2c9e213a6a..2af7df780fdb 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/exportsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to list all exports at the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/forecastExternalCloudProviderUsageSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/forecastExternalCloudProviderUsageSample.ts index 07f2664ea491..b56cc364ae7d 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/forecastExternalCloudProviderUsageSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/forecastExternalCloudProviderUsageSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the forecast charges for external cloud provider type defined. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/forecastUsageSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/forecastUsageSample.ts index b2e503401e11..c41bc6956552 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/forecastUsageSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/forecastUsageSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the forecast charges for scope defined. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateCostDetailsReportCreateOperationSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateCostDetailsReportCreateOperationSample.ts index 189e81706e68..d3501bfd6232 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateCostDetailsReportCreateOperationSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateCostDetailsReportCreateOperationSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to This API is the replacement for all previously release Usage Details APIs. Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a certain scope. The initial call to request a report will return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the endpoint to poll to get the result of the report generation. The 'Retry-After' provides the duration to wait before polling for the generated report. A call to poll the report operation will provide a 202 response with a 'Location' header if the operation is still in progress. Once the report generation operation completes, the polling endpoint will provide a 200 response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body. To Understand cost details (formerly known as usage details) fields found in files ,see https://learn.microsoft.com/azure/cost-management-billing/automate/understand-usage-details-fields diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateCostDetailsReportGetOperationResultsSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateCostDetailsReportGetOperationResultsSample.ts index 0b80e809e26e..4940aeb8e949 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateCostDetailsReportGetOperationResultsSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateCostDetailsReportGetOperationResultsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the result of the specified operation. This link is provided in the CostDetails creation request response Location header. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateDetailedCostReportCreateOperationSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateDetailedCostReportCreateOperationSample.ts index 4d2fe1d0eb0d..eeb6d6e354a0 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateDetailedCostReportCreateOperationSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateDetailedCostReportCreateOperationSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Generates the detailed cost report for provided date range, billing period(only enterprise customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the operation will provide the status and if the operation is completed the blob file where generated detailed cost report is being stored. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateDetailedCostReportOperationResultsGetSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateDetailedCostReportOperationResultsGetSample.ts index 38ecf8a41244..8d34dfb13dd0 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateDetailedCostReportOperationResultsGetSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateDetailedCostReportOperationResultsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the result of the specified operation. The link with this operationId is provided as a response header of the initial request. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateDetailedCostReportOperationStatusGetSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateDetailedCostReportOperationStatusGetSample.ts index 1c7fd3e445fa..0b3874e9c862 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateDetailedCostReportOperationStatusGetSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateDetailedCostReportOperationStatusGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the status of the specified operation. This link is provided in the GenerateDetailedCostReport creation request response header. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateReservationDetailsReportByBillingAccountIdSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateReservationDetailsReportByBillingAccountIdSample.ts index 5503c669aad4..6fb4234579c4 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateReservationDetailsReportByBillingAccountIdSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateReservationDetailsReportByBillingAccountIdSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://learn.microsoft.com/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateReservationDetailsReportByBillingProfileIdSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateReservationDetailsReportByBillingProfileIdSample.ts index dc707a214e43..0010336cfd8b 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateReservationDetailsReportByBillingProfileIdSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/generateReservationDetailsReportByBillingProfileIdSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://learn.microsoft.com/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/operationsListSample.ts index 9745ac9d9172..28a02e05e61b 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/operationsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all of the available cost management REST API operations. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/priceSheetDownloadByBillingProfileSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/priceSheetDownloadByBillingProfileSample.ts index a1b65bd6dffa..16f33af33695 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/priceSheetDownloadByBillingProfileSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/priceSheetDownloadByBillingProfileSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv file to a Zip file containing multiple csv files, each with max 200k records. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/priceSheetDownloadSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/priceSheetDownloadSample.ts index 6f262a61db4b..80ffebba0af7 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/priceSheetDownloadSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/priceSheetDownloadSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/queryUsageByExternalCloudProviderTypeSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/queryUsageByExternalCloudProviderTypeSample.ts index 73cc01f3110d..2e17af8179a8 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/queryUsageByExternalCloudProviderTypeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/queryUsageByExternalCloudProviderTypeSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Query the usage data for external cloud provider type defined. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/queryUsageSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/queryUsageSample.ts index 2e1ff6594079..d385c4eda1ab 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/queryUsageSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/queryUsageSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Query the usage data for scope defined. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCheckNameAvailabilityByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCheckNameAvailabilityByScopeSample.ts index 8f4c91845ac0..6bb7f65d8fd7 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCheckNameAvailabilityByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCheckNameAvailabilityByScopeSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks availability and correctness of the name for a scheduled action within the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCheckNameAvailabilitySample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCheckNameAvailabilitySample.ts index abba61ba17a2..aa6aad512e27 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCheckNameAvailabilitySample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCheckNameAvailabilitySample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks availability and correctness of the name for a scheduled action. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCreateOrUpdateByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCreateOrUpdateByScopeSample.ts index a3be4804b3e5..b58d7e55ff34 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCreateOrUpdateByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCreateOrUpdateByScopeSample.ts @@ -14,9 +14,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a shared scheduled action within the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCreateOrUpdateSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCreateOrUpdateSample.ts index 2ac9549774d7..bb8046fef59e 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCreateOrUpdateSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsCreateOrUpdateSample.ts @@ -14,9 +14,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a private scheduled action. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsDeleteByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsDeleteByScopeSample.ts index e5ae6bee0425..6c7f908ac717 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsDeleteByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsDeleteByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a scheduled action within the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsDeleteSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsDeleteSample.ts index d748f1a310c2..e9b660bf401a 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsDeleteSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a private scheduled action. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsGetByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsGetByScopeSample.ts index 14dc7c5472c9..fbe9a7cb7b37 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsGetByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsGetByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the shared scheduled action from the given scope by name. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsGetSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsGetSample.ts index 85c47e9e1272..ea927cd2ef61 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsGetSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the private scheduled action by name. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsListByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsListByScopeSample.ts index cbe7a04a52fa..543926d3eb6b 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsListByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsListByScopeSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all shared scheduled actions within the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsListSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsListSample.ts index afc2d863a9e4..443de9a7800e 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsListSample.ts @@ -13,9 +13,7 @@ import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all private scheduled actions. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsRunByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsRunByScopeSample.ts index 7de343f6466b..afacdc86eb56 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsRunByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsRunByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Runs a shared scheduled action within the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsRunSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsRunSample.ts index 43b3df2a40ac..47eddfa5fe43 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsRunSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/scheduledActionsRunSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Processes a private scheduled action. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsCreateOrUpdateByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsCreateOrUpdateByScopeSample.ts index ab7396491145..ce4d44df8333 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsCreateOrUpdateByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsCreateOrUpdateByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { View, CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsCreateOrUpdateSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsCreateOrUpdateSample.ts index 19b186a4337a..0716b938e9f6 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsCreateOrUpdateSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { View, CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsDeleteByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsDeleteByScopeSample.ts index 535db750badb..1090fe20ac6b 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsDeleteByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsDeleteByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to delete a view. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsDeleteSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsDeleteSample.ts index b5ff15b0a530..83d35bb315aa 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsDeleteSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to delete a view. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsGetByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsGetByScopeSample.ts index 7d489f4d2ed7..770dc2d00bb4 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsGetByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsGetByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the view for the defined scope by view name. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsGetSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsGetSample.ts index 35ff1ad31424..9dca26195fe2 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsGetSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the view by view name. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsListByScopeSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsListByScopeSample.ts index deb8f17538c9..fdf4632766a1 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsListByScopeSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsListByScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all views at the given scope. diff --git a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsListSample.ts b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsListSample.ts index e6a2e9363e76..3749a9a1555e 100644 --- a/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsListSample.ts +++ b/sdk/cost-management/arm-costmanagement/samples/v1-beta/typescript/src/viewsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CostManagementClient } from "@azure/arm-costmanagement"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all views by tenant and object. diff --git a/sdk/cost-management/arm-costmanagement/src/costManagementClient.ts b/sdk/cost-management/arm-costmanagement/src/costManagementClient.ts index 94ac88f830d3..6e9d4c8ab453 100644 --- a/sdk/cost-management/arm-costmanagement/src/costManagementClient.ts +++ b/sdk/cost-management/arm-costmanagement/src/costManagementClient.ts @@ -31,7 +31,7 @@ import { ScheduledActionsImpl, BenefitRecommendationsImpl, BenefitUtilizationSummariesImpl -} from "./operations"; +} from "./operations/index.js"; import { Operations, Views, @@ -49,8 +49,8 @@ import { ScheduledActions, BenefitRecommendations, BenefitUtilizationSummaries -} from "./operationsInterfaces"; -import { CostManagementClientOptionalParams } from "./models"; +} from "./operationsInterfaces/index.js"; +import { CostManagementClientOptionalParams } from "./models/index.js"; export class CostManagementClient extends coreClient.ServiceClient { $host: string; diff --git a/sdk/cost-management/arm-costmanagement/src/index.ts b/sdk/cost-management/arm-costmanagement/src/index.ts index 2cbbec4608ce..ebc48ce3cc91 100644 --- a/sdk/cost-management/arm-costmanagement/src/index.ts +++ b/sdk/cost-management/arm-costmanagement/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { CostManagementClient } from "./costManagementClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { CostManagementClient } from "./costManagementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/cost-management/arm-costmanagement/src/models/parameters.ts b/sdk/cost-management/arm-costmanagement/src/models/parameters.ts index 9f3990f645e7..5e55343632f2 100644 --- a/sdk/cost-management/arm-costmanagement/src/models/parameters.ts +++ b/sdk/cost-management/arm-costmanagement/src/models/parameters.ts @@ -21,7 +21,7 @@ import { GenerateDetailedCostReportDefinition as GenerateDetailedCostReportDefinitionMapper, ScheduledAction as ScheduledActionMapper, CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper -} from "../models/mappers"; +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", diff --git a/sdk/cost-management/arm-costmanagement/src/operations/alerts.ts b/sdk/cost-management/arm-costmanagement/src/operations/alerts.ts index 5cba6c9de3d5..ccfef807d91d 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/alerts.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/alerts.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { Alerts } from "../operationsInterfaces"; +import { Alerts } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { AlertsListOptionalParams, AlertsListResponse, @@ -22,7 +22,7 @@ import { ExternalCloudProviderType, AlertsListExternalOptionalParams, AlertsListExternalResponse -} from "../models"; +} from "../models/index.js"; /** Class containing Alerts operations. */ export class AlertsImpl implements Alerts { diff --git a/sdk/cost-management/arm-costmanagement/src/operations/benefitRecommendations.ts b/sdk/cost-management/arm-costmanagement/src/operations/benefitRecommendations.ts index 18c36aff89bd..b4c08bf06bf7 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/benefitRecommendations.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/benefitRecommendations.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { BenefitRecommendations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { BenefitRecommendations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { BenefitRecommendationModel, BenefitRecommendationsListNextOptionalParams, BenefitRecommendationsListOptionalParams, BenefitRecommendationsListResponse, BenefitRecommendationsListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing BenefitRecommendations operations. */ diff --git a/sdk/cost-management/arm-costmanagement/src/operations/benefitUtilizationSummaries.ts b/sdk/cost-management/arm-costmanagement/src/operations/benefitUtilizationSummaries.ts index 3c905edb3e78..3155fe58a0db 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/benefitUtilizationSummaries.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/benefitUtilizationSummaries.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { BenefitUtilizationSummaries } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { BenefitUtilizationSummaries } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { BenefitUtilizationSummaryUnion, BenefitUtilizationSummariesListByBillingAccountIdNextOptionalParams, @@ -31,7 +31,7 @@ import { BenefitUtilizationSummariesListByBillingProfileIdNextResponse, BenefitUtilizationSummariesListBySavingsPlanOrderNextResponse, BenefitUtilizationSummariesListBySavingsPlanIdNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing BenefitUtilizationSummaries operations. */ diff --git a/sdk/cost-management/arm-costmanagement/src/operations/dimensions.ts b/sdk/cost-management/arm-costmanagement/src/operations/dimensions.ts index efce09bdd962..b34d0f219ff6 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/dimensions.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/dimensions.ts @@ -7,11 +7,11 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Dimensions } from "../operationsInterfaces"; +import { Dimensions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { Dimension, DimensionsListOptionalParams, @@ -19,7 +19,7 @@ import { ExternalCloudProviderType, DimensionsByExternalCloudProviderTypeOptionalParams, DimensionsByExternalCloudProviderTypeResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Dimensions operations. */ diff --git a/sdk/cost-management/arm-costmanagement/src/operations/exports.ts b/sdk/cost-management/arm-costmanagement/src/operations/exports.ts index ca7e0dc3df3b..c1416ad56603 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/exports.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/exports.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { Exports } from "../operationsInterfaces"; +import { Exports } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { ExportsListOptionalParams, ExportsListResponse, @@ -23,7 +23,7 @@ import { ExportsExecuteOptionalParams, ExportsGetExecutionHistoryOptionalParams, ExportsGetExecutionHistoryResponse -} from "../models"; +} from "../models/index.js"; /** Class containing Exports operations. */ export class ExportsImpl implements Exports { diff --git a/sdk/cost-management/arm-costmanagement/src/operations/forecast.ts b/sdk/cost-management/arm-costmanagement/src/operations/forecast.ts index ecdb12578f5c..a98bb8e4d909 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/forecast.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/forecast.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { Forecast } from "../operationsInterfaces"; +import { Forecast } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { ForecastDefinition, ForecastUsageOptionalParams, @@ -18,7 +18,7 @@ import { ExternalCloudProviderType, ForecastExternalCloudProviderUsageOptionalParams, ForecastExternalCloudProviderUsageResponse -} from "../models"; +} from "../models/index.js"; /** Class containing Forecast operations. */ export class ForecastImpl implements Forecast { diff --git a/sdk/cost-management/arm-costmanagement/src/operations/generateCostDetailsReport.ts b/sdk/cost-management/arm-costmanagement/src/operations/generateCostDetailsReport.ts index ac6dff7d6604..c7771550c583 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/generateCostDetailsReport.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/generateCostDetailsReport.ts @@ -6,24 +6,24 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { GenerateCostDetailsReport } from "../operationsInterfaces"; +import { GenerateCostDetailsReport } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { GenerateCostDetailsReportRequestDefinition, GenerateCostDetailsReportCreateOperationOptionalParams, GenerateCostDetailsReportCreateOperationResponse, GenerateCostDetailsReportGetOperationResultsOptionalParams, GenerateCostDetailsReportGetOperationResultsResponse -} from "../models"; +} from "../models/index.js"; /** Class containing GenerateCostDetailsReport operations. */ export class GenerateCostDetailsReportImpl diff --git a/sdk/cost-management/arm-costmanagement/src/operations/generateDetailedCostReport.ts b/sdk/cost-management/arm-costmanagement/src/operations/generateDetailedCostReport.ts index a032c090c16a..a3661356cf35 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/generateDetailedCostReport.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/generateDetailedCostReport.ts @@ -6,22 +6,22 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { GenerateDetailedCostReport } from "../operationsInterfaces"; +import { GenerateDetailedCostReport } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { GenerateDetailedCostReportDefinition, GenerateDetailedCostReportCreateOperationOptionalParams, GenerateDetailedCostReportCreateOperationResponse -} from "../models"; +} from "../models/index.js"; /** Class containing GenerateDetailedCostReport operations. */ export class GenerateDetailedCostReportImpl diff --git a/sdk/cost-management/arm-costmanagement/src/operations/generateDetailedCostReportOperationResults.ts b/sdk/cost-management/arm-costmanagement/src/operations/generateDetailedCostReportOperationResults.ts index 202a9d7f9c77..35f808db70e9 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/generateDetailedCostReportOperationResults.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/generateDetailedCostReportOperationResults.ts @@ -6,21 +6,21 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { GenerateDetailedCostReportOperationResults } from "../operationsInterfaces"; +import { GenerateDetailedCostReportOperationResults } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { GenerateDetailedCostReportOperationResultsGetOptionalParams, GenerateDetailedCostReportOperationResultsGetResponse -} from "../models"; +} from "../models/index.js"; /** Class containing GenerateDetailedCostReportOperationResults operations. */ export class GenerateDetailedCostReportOperationResultsImpl diff --git a/sdk/cost-management/arm-costmanagement/src/operations/generateDetailedCostReportOperationStatus.ts b/sdk/cost-management/arm-costmanagement/src/operations/generateDetailedCostReportOperationStatus.ts index 21f6bd32c751..8a5bb42ba145 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/generateDetailedCostReportOperationStatus.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/generateDetailedCostReportOperationStatus.ts @@ -6,15 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { GenerateDetailedCostReportOperationStatus } from "../operationsInterfaces"; +import { GenerateDetailedCostReportOperationStatus } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { GenerateDetailedCostReportOperationStatusGetOptionalParams, GenerateDetailedCostReportOperationStatusGetResponse -} from "../models"; +} from "../models/index.js"; /** Class containing GenerateDetailedCostReportOperationStatus operations. */ export class GenerateDetailedCostReportOperationStatusImpl diff --git a/sdk/cost-management/arm-costmanagement/src/operations/generateReservationDetailsReport.ts b/sdk/cost-management/arm-costmanagement/src/operations/generateReservationDetailsReport.ts index 69a358602d4e..c3c70f36710a 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/generateReservationDetailsReport.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/generateReservationDetailsReport.ts @@ -6,23 +6,23 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { GenerateReservationDetailsReport } from "../operationsInterfaces"; +import { GenerateReservationDetailsReport } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { GenerateReservationDetailsReportByBillingAccountIdOptionalParams, GenerateReservationDetailsReportByBillingAccountIdResponse, GenerateReservationDetailsReportByBillingProfileIdOptionalParams, GenerateReservationDetailsReportByBillingProfileIdResponse -} from "../models"; +} from "../models/index.js"; /** Class containing GenerateReservationDetailsReport operations. */ export class GenerateReservationDetailsReportImpl diff --git a/sdk/cost-management/arm-costmanagement/src/operations/index.ts b/sdk/cost-management/arm-costmanagement/src/operations/index.ts index a5230b5b2219..c448e99f0693 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/index.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/index.ts @@ -6,19 +6,19 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./operations"; -export * from "./views"; -export * from "./alerts"; -export * from "./forecast"; -export * from "./dimensions"; -export * from "./query"; -export * from "./generateReservationDetailsReport"; -export * from "./exports"; -export * from "./generateCostDetailsReport"; -export * from "./generateDetailedCostReport"; -export * from "./generateDetailedCostReportOperationResults"; -export * from "./generateDetailedCostReportOperationStatus"; -export * from "./priceSheet"; -export * from "./scheduledActions"; -export * from "./benefitRecommendations"; -export * from "./benefitUtilizationSummaries"; +export * from "./operations.js"; +export * from "./views.js"; +export * from "./alerts.js"; +export * from "./forecast.js"; +export * from "./dimensions.js"; +export * from "./query.js"; +export * from "./generateReservationDetailsReport.js"; +export * from "./exports.js"; +export * from "./generateCostDetailsReport.js"; +export * from "./generateDetailedCostReport.js"; +export * from "./generateDetailedCostReportOperationResults.js"; +export * from "./generateDetailedCostReportOperationStatus.js"; +export * from "./priceSheet.js"; +export * from "./scheduledActions.js"; +export * from "./benefitRecommendations.js"; +export * from "./benefitUtilizationSummaries.js"; diff --git a/sdk/cost-management/arm-costmanagement/src/operations/operations.ts b/sdk/cost-management/arm-costmanagement/src/operations/operations.ts index cac47417f041..eb39a05a435e 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/operations.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/operations.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Operations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { CostManagementOperation, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, OperationsListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/cost-management/arm-costmanagement/src/operations/priceSheet.ts b/sdk/cost-management/arm-costmanagement/src/operations/priceSheet.ts index 27d1ff9d6ee4..53def3f22b65 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/priceSheet.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/priceSheet.ts @@ -6,23 +6,23 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PriceSheet } from "../operationsInterfaces"; +import { PriceSheet } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { PriceSheetDownloadOptionalParams, PriceSheetDownloadResponse, PriceSheetDownloadByBillingProfileOptionalParams, PriceSheetDownloadByBillingProfileResponse -} from "../models"; +} from "../models/index.js"; /** Class containing PriceSheet operations. */ export class PriceSheetImpl implements PriceSheet { diff --git a/sdk/cost-management/arm-costmanagement/src/operations/query.ts b/sdk/cost-management/arm-costmanagement/src/operations/query.ts index 01937a0ead0a..d67b7c2dae0f 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/query.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/query.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { Query } from "../operationsInterfaces"; +import { Query } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { QueryDefinition, QueryUsageOptionalParams, @@ -18,7 +18,7 @@ import { ExternalCloudProviderType, QueryUsageByExternalCloudProviderTypeOptionalParams, QueryUsageByExternalCloudProviderTypeResponse -} from "../models"; +} from "../models/index.js"; /** Class containing Query operations. */ export class QueryImpl implements Query { diff --git a/sdk/cost-management/arm-costmanagement/src/operations/scheduledActions.ts b/sdk/cost-management/arm-costmanagement/src/operations/scheduledActions.ts index c70950d48dfe..bba2e055e02f 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/scheduledActions.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/scheduledActions.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ScheduledActions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ScheduledActions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { ScheduledAction, ScheduledActionsListNextOptionalParams, @@ -40,7 +40,7 @@ import { ScheduledActionsCheckNameAvailabilityByScopeResponse, ScheduledActionsListNextResponse, ScheduledActionsListByScopeNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing ScheduledActions operations. */ diff --git a/sdk/cost-management/arm-costmanagement/src/operations/views.ts b/sdk/cost-management/arm-costmanagement/src/operations/views.ts index 27f4ef9918b8..5b40950560a9 100644 --- a/sdk/cost-management/arm-costmanagement/src/operations/views.ts +++ b/sdk/cost-management/arm-costmanagement/src/operations/views.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Views } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Views } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CostManagementClient } from "../costManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CostManagementClient } from "../costManagementClient.js"; import { View, ViewsListNextOptionalParams, @@ -33,7 +33,7 @@ import { ViewsDeleteByScopeOptionalParams, ViewsListNextResponse, ViewsListByScopeNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Views operations. */ diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/alerts.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/alerts.ts index 586fe9f7ae47..850cf7dba43f 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/alerts.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/alerts.ts @@ -17,7 +17,7 @@ import { ExternalCloudProviderType, AlertsListExternalOptionalParams, AlertsListExternalResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a Alerts. */ export interface Alerts { diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/benefitRecommendations.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/benefitRecommendations.ts index 1b87f1202d3c..b8e6b915cdc3 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/benefitRecommendations.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/benefitRecommendations.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { BenefitRecommendationModel, BenefitRecommendationsListOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a BenefitRecommendations. */ diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/benefitUtilizationSummaries.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/benefitUtilizationSummaries.ts index 9a11aef4d0a6..588a1d8cd1f6 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/benefitUtilizationSummaries.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/benefitUtilizationSummaries.ts @@ -13,7 +13,7 @@ import { BenefitUtilizationSummariesListByBillingProfileIdOptionalParams, BenefitUtilizationSummariesListBySavingsPlanOrderOptionalParams, BenefitUtilizationSummariesListBySavingsPlanIdOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a BenefitUtilizationSummaries. */ diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/dimensions.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/dimensions.ts index 31cb49fe0a83..6ef04456b09a 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/dimensions.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/dimensions.ts @@ -12,7 +12,7 @@ import { DimensionsListOptionalParams, ExternalCloudProviderType, DimensionsByExternalCloudProviderTypeOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Dimensions. */ diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/exports.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/exports.ts index f02d978d0a6e..085ca31616b8 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/exports.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/exports.ts @@ -18,7 +18,7 @@ import { ExportsExecuteOptionalParams, ExportsGetExecutionHistoryOptionalParams, ExportsGetExecutionHistoryResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a Exports. */ export interface Exports { diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/forecast.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/forecast.ts index c8d9bff7cbb8..3fb49b86d262 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/forecast.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/forecast.ts @@ -13,7 +13,7 @@ import { ExternalCloudProviderType, ForecastExternalCloudProviderUsageOptionalParams, ForecastExternalCloudProviderUsageResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a Forecast. */ export interface Forecast { diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateCostDetailsReport.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateCostDetailsReport.ts index 7e48f33a725e..dc108befee13 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateCostDetailsReport.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateCostDetailsReport.ts @@ -13,7 +13,7 @@ import { GenerateCostDetailsReportCreateOperationResponse, GenerateCostDetailsReportGetOperationResultsOptionalParams, GenerateCostDetailsReportGetOperationResultsResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a GenerateCostDetailsReport. */ export interface GenerateCostDetailsReport { diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateDetailedCostReport.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateDetailedCostReport.ts index b23df2363971..cfc3973de2ef 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateDetailedCostReport.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateDetailedCostReport.ts @@ -11,7 +11,7 @@ import { GenerateDetailedCostReportDefinition, GenerateDetailedCostReportCreateOperationOptionalParams, GenerateDetailedCostReportCreateOperationResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a GenerateDetailedCostReport. */ export interface GenerateDetailedCostReport { diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateDetailedCostReportOperationResults.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateDetailedCostReportOperationResults.ts index c38e032b13a3..5d95b86042f3 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateDetailedCostReportOperationResults.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateDetailedCostReportOperationResults.ts @@ -10,7 +10,7 @@ import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { GenerateDetailedCostReportOperationResultsGetOptionalParams, GenerateDetailedCostReportOperationResultsGetResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a GenerateDetailedCostReportOperationResults. */ export interface GenerateDetailedCostReportOperationResults { diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateDetailedCostReportOperationStatus.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateDetailedCostReportOperationStatus.ts index c899df29eaf5..28d74057b885 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateDetailedCostReportOperationStatus.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateDetailedCostReportOperationStatus.ts @@ -9,7 +9,7 @@ import { GenerateDetailedCostReportOperationStatusGetOptionalParams, GenerateDetailedCostReportOperationStatusGetResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a GenerateDetailedCostReportOperationStatus. */ export interface GenerateDetailedCostReportOperationStatus { diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateReservationDetailsReport.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateReservationDetailsReport.ts index dc2fc0563b51..7423fe054f46 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateReservationDetailsReport.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/generateReservationDetailsReport.ts @@ -12,7 +12,7 @@ import { GenerateReservationDetailsReportByBillingAccountIdResponse, GenerateReservationDetailsReportByBillingProfileIdOptionalParams, GenerateReservationDetailsReportByBillingProfileIdResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a GenerateReservationDetailsReport. */ export interface GenerateReservationDetailsReport { diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/index.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/index.ts index a5230b5b2219..c448e99f0693 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/index.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/index.ts @@ -6,19 +6,19 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./operations"; -export * from "./views"; -export * from "./alerts"; -export * from "./forecast"; -export * from "./dimensions"; -export * from "./query"; -export * from "./generateReservationDetailsReport"; -export * from "./exports"; -export * from "./generateCostDetailsReport"; -export * from "./generateDetailedCostReport"; -export * from "./generateDetailedCostReportOperationResults"; -export * from "./generateDetailedCostReportOperationStatus"; -export * from "./priceSheet"; -export * from "./scheduledActions"; -export * from "./benefitRecommendations"; -export * from "./benefitUtilizationSummaries"; +export * from "./operations.js"; +export * from "./views.js"; +export * from "./alerts.js"; +export * from "./forecast.js"; +export * from "./dimensions.js"; +export * from "./query.js"; +export * from "./generateReservationDetailsReport.js"; +export * from "./exports.js"; +export * from "./generateCostDetailsReport.js"; +export * from "./generateDetailedCostReport.js"; +export * from "./generateDetailedCostReportOperationResults.js"; +export * from "./generateDetailedCostReportOperationStatus.js"; +export * from "./priceSheet.js"; +export * from "./scheduledActions.js"; +export * from "./benefitRecommendations.js"; +export * from "./benefitUtilizationSummaries.js"; diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/operations.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/operations.ts index d71084b96e8c..7808104a71fe 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/operations.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/operations.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { CostManagementOperation, OperationsListOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Operations. */ diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/priceSheet.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/priceSheet.ts index 119e5a2a9719..0eb5d616612a 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/priceSheet.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/priceSheet.ts @@ -12,7 +12,7 @@ import { PriceSheetDownloadResponse, PriceSheetDownloadByBillingProfileOptionalParams, PriceSheetDownloadByBillingProfileResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a PriceSheet. */ export interface PriceSheet { diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/query.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/query.ts index 0aec157cdadf..6b163e9b7627 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/query.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/query.ts @@ -13,7 +13,7 @@ import { ExternalCloudProviderType, QueryUsageByExternalCloudProviderTypeOptionalParams, QueryUsageByExternalCloudProviderTypeResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a Query. */ export interface Query { diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/scheduledActions.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/scheduledActions.ts index b43c92384145..2680a72fd9d6 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/scheduledActions.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/scheduledActions.ts @@ -28,7 +28,7 @@ import { ScheduledActionsCheckNameAvailabilityResponse, ScheduledActionsCheckNameAvailabilityByScopeOptionalParams, ScheduledActionsCheckNameAvailabilityByScopeResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a ScheduledActions. */ diff --git a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/views.ts b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/views.ts index cc695c788607..db6f7f0fa28f 100644 --- a/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/views.ts +++ b/sdk/cost-management/arm-costmanagement/src/operationsInterfaces/views.ts @@ -21,7 +21,7 @@ import { ViewsCreateOrUpdateByScopeOptionalParams, ViewsCreateOrUpdateByScopeResponse, ViewsDeleteByScopeOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Views. */ diff --git a/sdk/cost-management/arm-costmanagement/test/costmanagement_operations_test.spec.ts b/sdk/cost-management/arm-costmanagement/test/costmanagement_operations_test.spec.ts index d19ef7f4fd90..cecdb73a8573 100644 --- a/sdk/cost-management/arm-costmanagement/test/costmanagement_operations_test.spec.ts +++ b/sdk/cost-management/arm-costmanagement/test/costmanagement_operations_test.spec.ts @@ -7,16 +7,13 @@ */ import { - env, Recorder, RecorderStartOptions, - delay, isPlaybackMode, } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { CostManagementClient } from "../src/costManagementClient"; +import { CostManagementClient } from "../src/costManagementClient.js"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", @@ -39,23 +36,14 @@ export const testPollingOptions = { describe("CostManagement test", () => { let recorder: Recorder; - let subscriptionId: string; let client: CostManagementClient; - let location: string; - let resourceGroup: string; - let resourcename: string; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async function (ctx) { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; // This is an example of how the environment variables are used const credential = createTestCredential(); client = new CostManagementClient(credential, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - resourcename = "resourcetest"; - }); afterEach(async function () { diff --git a/sdk/cost-management/arm-costmanagement/tsconfig.browser.config.json b/sdk/cost-management/arm-costmanagement/tsconfig.browser.config.json new file mode 100644 index 000000000000..b6586181d006 --- /dev/null +++ b/sdk/cost-management/arm-costmanagement/tsconfig.browser.config.json @@ -0,0 +1,17 @@ +{ + "extends": "./.tshy/build.json", + "include": [ + "./src/**/*.ts", + "./src/**/*.mts", + "./test/**/*.spec.ts", + "./test/**/*.mts" + ], + "exclude": [ + "./test/**/node/**/*.ts" + ], + "compilerOptions": { + "outDir": "./dist-test/browser", + "rootDir": ".", + "skipLibCheck": true + } +} diff --git a/sdk/cost-management/arm-costmanagement/tsconfig.json b/sdk/cost-management/arm-costmanagement/tsconfig.json index 4f4f1b7e3ff7..19ceb382b521 100644 --- a/sdk/cost-management/arm-costmanagement/tsconfig.json +++ b/sdk/cost-management/arm-costmanagement/tsconfig.json @@ -1,33 +1,13 @@ { - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-costmanagement": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/cost-management/arm-costmanagement/tsconfig.samples.json b/sdk/cost-management/arm-costmanagement/tsconfig.samples.json new file mode 100644 index 000000000000..573f5d81a8bb --- /dev/null +++ b/sdk/cost-management/arm-costmanagement/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-costmanagement": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/cost-management/arm-costmanagement/tsconfig.src.json b/sdk/cost-management/arm-costmanagement/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/cost-management/arm-costmanagement/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/cost-management/arm-costmanagement/tsconfig.test.json b/sdk/cost-management/arm-costmanagement/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/cost-management/arm-costmanagement/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/cost-management/arm-costmanagement/vitest.browser.config.ts b/sdk/cost-management/arm-costmanagement/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/cost-management/arm-costmanagement/vitest.browser.config.ts @@ -0,0 +1,17 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.browser.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + include: [ + "dist-test/browser/test/**/*.spec.js", + ], + }, + }), +); diff --git a/sdk/cost-management/arm-costmanagement/vitest.config.ts b/sdk/cost-management/arm-costmanagement/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/cost-management/arm-costmanagement/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/cost-management/arm-costmanagement/vitest.esm.config.ts b/sdk/cost-management/arm-costmanagement/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/cost-management/arm-costmanagement/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/customer-insights/arm-customerinsights/api-extractor.json b/sdk/customer-insights/arm-customerinsights/api-extractor.json index c88399b213ba..38cb11af083b 100644 --- a/sdk/customer-insights/arm-customerinsights/api-extractor.json +++ b/sdk/customer-insights/arm-customerinsights/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-customerinsights.d.ts" + "publicTrimmedFilePath": "dist/arm-customerinsights.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/customer-insights/arm-customerinsights/package.json b/sdk/customer-insights/arm-customerinsights/package.json index 87de2170d8b7..984796c1a709 100644 --- a/sdk/customer-insights/arm-customerinsights/package.json +++ b/sdk/customer-insights/arm-customerinsights/package.json @@ -24,21 +24,21 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-customerinsights.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@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.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "@vitest/browser": "^2.1.8", + "@vitest/coverage-istanbul": "^2.1.8", + "playwright": "^1.49.1", + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/customer-insights/arm-customerinsights", "repository": { @@ -49,24 +49,14 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", @@ -78,7 +68,7 @@ "format": "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:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "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", @@ -88,7 +78,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -108,5 +98,45 @@ ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-customerinsights?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" + } + } } } diff --git a/sdk/customer-insights/arm-customerinsights/src/customerInsightsManagementClient.ts b/sdk/customer-insights/arm-customerinsights/src/customerInsightsManagementClient.ts index b8a0ca8609ce..213112ed15ac 100644 --- a/sdk/customer-insights/arm-customerinsights/src/customerInsightsManagementClient.ts +++ b/sdk/customer-insights/arm-customerinsights/src/customerInsightsManagementClient.ts @@ -32,7 +32,7 @@ import { RoleAssignmentsImpl, ImagesImpl, PredictionsImpl -} from "./operations"; +} from "./operations/index.js"; import { Operations, Hubs, @@ -51,8 +51,8 @@ import { RoleAssignments, Images, Predictions -} from "./operationsInterfaces"; -import { CustomerInsightsManagementClientOptionalParams } from "./models"; +} from "./operationsInterfaces/index.js"; +import { CustomerInsightsManagementClientOptionalParams } from "./models/index.js"; export class CustomerInsightsManagementClient extends coreClient.ServiceClient { $host: string; diff --git a/sdk/customer-insights/arm-customerinsights/src/index.ts b/sdk/customer-insights/arm-customerinsights/src/index.ts index 828b37514032..4d58c6824bbc 100644 --- a/sdk/customer-insights/arm-customerinsights/src/index.ts +++ b/sdk/customer-insights/arm-customerinsights/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { CustomerInsightsManagementClient } from "./customerInsightsManagementClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { CustomerInsightsManagementClient } from "./customerInsightsManagementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/customer-insights/arm-customerinsights/src/models/parameters.ts b/sdk/customer-insights/arm-customerinsights/src/models/parameters.ts index 02bebf24f37b..86247d99c972 100644 --- a/sdk/customer-insights/arm-customerinsights/src/models/parameters.ts +++ b/sdk/customer-insights/arm-customerinsights/src/models/parameters.ts @@ -27,7 +27,7 @@ import { GetImageUploadUrlInput as GetImageUploadUrlInputMapper, PredictionResourceFormat as PredictionResourceFormatMapper, PredictionModelStatus as PredictionModelStatusMapper -} from "../models/mappers"; +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/authorizationPolicies.ts b/sdk/customer-insights/arm-customerinsights/src/operations/authorizationPolicies.ts index b78a7fe171c0..4b5120419a1e 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/authorizationPolicies.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/authorizationPolicies.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { AuthorizationPolicies } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { AuthorizationPolicies } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { AuthorizationPolicyResourceFormat, AuthorizationPoliciesListByHubNextOptionalParams, @@ -27,7 +27,7 @@ import { AuthorizationPoliciesRegenerateSecondaryKeyOptionalParams, AuthorizationPoliciesRegenerateSecondaryKeyResponse, AuthorizationPoliciesListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing AuthorizationPolicies operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/connectorMappings.ts b/sdk/customer-insights/arm-customerinsights/src/operations/connectorMappings.ts index 48049e38de07..0d436451b2fe 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/connectorMappings.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/connectorMappings.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ConnectorMappings } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ConnectorMappings } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { ConnectorMappingResourceFormat, ConnectorMappingsListByConnectorNextOptionalParams, @@ -24,7 +24,7 @@ import { ConnectorMappingsGetResponse, ConnectorMappingsDeleteOptionalParams, ConnectorMappingsListByConnectorNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing ConnectorMappings operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/connectors.ts b/sdk/customer-insights/arm-customerinsights/src/operations/connectors.ts index d9930eb8ceb4..f3324311d557 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/connectors.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/connectors.ts @@ -7,14 +7,14 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Connectors } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Connectors } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { ConnectorResourceFormat, ConnectorsListByHubNextOptionalParams, @@ -26,7 +26,7 @@ import { ConnectorsGetResponse, ConnectorsDeleteOptionalParams, ConnectorsListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Connectors operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/hubs.ts b/sdk/customer-insights/arm-customerinsights/src/operations/hubs.ts index 7fa66e5d6a07..51b8038bba09 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/hubs.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/hubs.ts @@ -7,14 +7,14 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Hubs } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Hubs } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { Hub, HubsListByResourceGroupNextOptionalParams, @@ -32,7 +32,7 @@ import { HubsGetResponse, HubsListByResourceGroupNextResponse, HubsListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Hubs operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/images.ts b/sdk/customer-insights/arm-customerinsights/src/operations/images.ts index 93a8e1a71eec..62535731149c 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/images.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/images.ts @@ -6,18 +6,18 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { Images } from "../operationsInterfaces"; +import { Images } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { GetImageUploadUrlInput, ImagesGetUploadUrlForEntityTypeOptionalParams, ImagesGetUploadUrlForEntityTypeResponse, ImagesGetUploadUrlForDataOptionalParams, ImagesGetUploadUrlForDataResponse -} from "../models"; +} from "../models/index.js"; /** Class containing Images operations. */ export class ImagesImpl implements Images { diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/index.ts b/sdk/customer-insights/arm-customerinsights/src/operations/index.ts index d7c6279d0f21..7272de55e482 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/index.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/index.ts @@ -6,20 +6,20 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./operations"; -export * from "./hubs"; -export * from "./profiles"; -export * from "./interactions"; -export * from "./relationships"; -export * from "./relationshipLinks"; -export * from "./authorizationPolicies"; -export * from "./connectors"; -export * from "./connectorMappings"; -export * from "./kpi"; -export * from "./widgetTypes"; -export * from "./views"; -export * from "./links"; -export * from "./roles"; -export * from "./roleAssignments"; -export * from "./images"; -export * from "./predictions"; +export * from "./operations.js"; +export * from "./hubs.js"; +export * from "./profiles.js"; +export * from "./interactions.js"; +export * from "./relationships.js"; +export * from "./relationshipLinks.js"; +export * from "./authorizationPolicies.js"; +export * from "./connectors.js"; +export * from "./connectorMappings.js"; +export * from "./kpi.js"; +export * from "./widgetTypes.js"; +export * from "./views.js"; +export * from "./links.js"; +export * from "./roles.js"; +export * from "./roleAssignments.js"; +export * from "./images.js"; +export * from "./predictions.js"; diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/interactions.ts b/sdk/customer-insights/arm-customerinsights/src/operations/interactions.ts index 54beb9e87972..6ed20ddd376d 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/interactions.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/interactions.ts @@ -7,14 +7,14 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Interactions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Interactions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { InteractionResourceFormat, InteractionsListByHubNextOptionalParams, @@ -27,7 +27,7 @@ import { InteractionsSuggestRelationshipLinksOptionalParams, InteractionsSuggestRelationshipLinksResponse, InteractionsListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Interactions operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/kpi.ts b/sdk/customer-insights/arm-customerinsights/src/operations/kpi.ts index dbfe766b38df..a90fa203e530 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/kpi.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/kpi.ts @@ -7,14 +7,14 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Kpi } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Kpi } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { KpiResourceFormat, KpiListByHubNextOptionalParams, @@ -27,7 +27,7 @@ import { KpiDeleteOptionalParams, KpiReprocessOptionalParams, KpiListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Kpi operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/links.ts b/sdk/customer-insights/arm-customerinsights/src/operations/links.ts index 3a9934d39842..4bca41b68eed 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/links.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/links.ts @@ -7,14 +7,14 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Links } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Links } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { LinkResourceFormat, LinksListByHubNextOptionalParams, @@ -26,7 +26,7 @@ import { LinksGetResponse, LinksDeleteOptionalParams, LinksListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Links operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/operations.ts b/sdk/customer-insights/arm-customerinsights/src/operations/operations.ts index e6d951017639..7e7b2c0c4736 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/operations.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/operations.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Operations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { Operation, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, OperationsListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/predictions.ts b/sdk/customer-insights/arm-customerinsights/src/operations/predictions.ts index 697826870992..8d2c242b0172 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/predictions.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/predictions.ts @@ -7,14 +7,14 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Predictions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Predictions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { PredictionResourceFormat, PredictionsListByHubNextOptionalParams, @@ -32,7 +32,7 @@ import { PredictionModelStatus, PredictionsModelStatusOptionalParams, PredictionsListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Predictions operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/profiles.ts b/sdk/customer-insights/arm-customerinsights/src/operations/profiles.ts index a8b396638378..b52cc00c27fd 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/profiles.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/profiles.ts @@ -7,14 +7,14 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Profiles } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Profiles } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { ProfileResourceFormat, ProfilesListByHubNextOptionalParams, @@ -28,7 +28,7 @@ import { ProfilesGetEnrichingKpisOptionalParams, ProfilesGetEnrichingKpisResponse, ProfilesListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Profiles operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/relationshipLinks.ts b/sdk/customer-insights/arm-customerinsights/src/operations/relationshipLinks.ts index d4413b34cc2f..92ac857d750d 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/relationshipLinks.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/relationshipLinks.ts @@ -7,14 +7,14 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { RelationshipLinks } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { RelationshipLinks } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { RelationshipLinkResourceFormat, RelationshipLinksListByHubNextOptionalParams, @@ -26,7 +26,7 @@ import { RelationshipLinksGetResponse, RelationshipLinksDeleteOptionalParams, RelationshipLinksListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing RelationshipLinks operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/relationships.ts b/sdk/customer-insights/arm-customerinsights/src/operations/relationships.ts index 598d5b6f8d7c..44691867425a 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/relationships.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/relationships.ts @@ -7,14 +7,14 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Relationships } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Relationships } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { RelationshipResourceFormat, RelationshipsListByHubNextOptionalParams, @@ -26,7 +26,7 @@ import { RelationshipsGetResponse, RelationshipsDeleteOptionalParams, RelationshipsListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Relationships operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/roleAssignments.ts b/sdk/customer-insights/arm-customerinsights/src/operations/roleAssignments.ts index 586d6aaa2dc7..5f533aa54ed3 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/roleAssignments.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/roleAssignments.ts @@ -7,14 +7,14 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { RoleAssignments } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { RoleAssignments } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { LroImpl } from "../lroImpl.js"; import { RoleAssignmentResourceFormat, RoleAssignmentsListByHubNextOptionalParams, @@ -26,7 +26,7 @@ import { RoleAssignmentsGetResponse, RoleAssignmentsDeleteOptionalParams, RoleAssignmentsListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing RoleAssignments operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/roles.ts b/sdk/customer-insights/arm-customerinsights/src/operations/roles.ts index afaac569b91b..e00a51f2f01a 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/roles.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/roles.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Roles } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Roles } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { RoleResourceFormat, RolesListByHubNextOptionalParams, RolesListByHubOptionalParams, RolesListByHubResponse, RolesListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Roles operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/views.ts b/sdk/customer-insights/arm-customerinsights/src/operations/views.ts index 6d456a1eb9ca..de264a59a842 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/views.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/views.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Views } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Views } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { ViewResourceFormat, ViewsListByHubNextOptionalParams, @@ -24,7 +24,7 @@ import { ViewsGetResponse, ViewsDeleteOptionalParams, ViewsListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Views operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operations/widgetTypes.ts b/sdk/customer-insights/arm-customerinsights/src/operations/widgetTypes.ts index e42824976c04..5e139412a465 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operations/widgetTypes.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operations/widgetTypes.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { WidgetTypes } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { WidgetTypes } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CustomerInsightsManagementClient } from "../customerInsightsManagementClient.js"; import { WidgetTypeResourceFormat, WidgetTypesListByHubNextOptionalParams, @@ -21,7 +21,7 @@ import { WidgetTypesGetOptionalParams, WidgetTypesGetResponse, WidgetTypesListByHubNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing WidgetTypes operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/authorizationPolicies.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/authorizationPolicies.ts index 289d2cb6b269..1b5e749d0445 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/authorizationPolicies.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/authorizationPolicies.ts @@ -18,7 +18,7 @@ import { AuthorizationPoliciesRegeneratePrimaryKeyResponse, AuthorizationPoliciesRegenerateSecondaryKeyOptionalParams, AuthorizationPoliciesRegenerateSecondaryKeyResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a AuthorizationPolicies. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/connectorMappings.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/connectorMappings.ts index 3bea99628005..fe102815db92 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/connectorMappings.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/connectorMappings.ts @@ -15,7 +15,7 @@ import { ConnectorMappingsGetOptionalParams, ConnectorMappingsGetResponse, ConnectorMappingsDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a ConnectorMappings. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/connectors.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/connectors.ts index 7cc1717ce798..20607faa2de0 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/connectors.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/connectors.ts @@ -16,7 +16,7 @@ import { ConnectorsGetOptionalParams, ConnectorsGetResponse, ConnectorsDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Connectors. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/hubs.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/hubs.ts index babcc8c29040..0d513c4abef1 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/hubs.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/hubs.ts @@ -19,7 +19,7 @@ import { HubsDeleteOptionalParams, HubsGetOptionalParams, HubsGetResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Hubs. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/images.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/images.ts index c7ac848c0385..58f966187760 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/images.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/images.ts @@ -12,7 +12,7 @@ import { ImagesGetUploadUrlForEntityTypeResponse, ImagesGetUploadUrlForDataOptionalParams, ImagesGetUploadUrlForDataResponse -} from "../models"; +} from "../models/index.js"; /** Interface representing a Images. */ export interface Images { diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/index.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/index.ts index d7c6279d0f21..7272de55e482 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/index.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/index.ts @@ -6,20 +6,20 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./operations"; -export * from "./hubs"; -export * from "./profiles"; -export * from "./interactions"; -export * from "./relationships"; -export * from "./relationshipLinks"; -export * from "./authorizationPolicies"; -export * from "./connectors"; -export * from "./connectorMappings"; -export * from "./kpi"; -export * from "./widgetTypes"; -export * from "./views"; -export * from "./links"; -export * from "./roles"; -export * from "./roleAssignments"; -export * from "./images"; -export * from "./predictions"; +export * from "./operations.js"; +export * from "./hubs.js"; +export * from "./profiles.js"; +export * from "./interactions.js"; +export * from "./relationships.js"; +export * from "./relationshipLinks.js"; +export * from "./authorizationPolicies.js"; +export * from "./connectors.js"; +export * from "./connectorMappings.js"; +export * from "./kpi.js"; +export * from "./widgetTypes.js"; +export * from "./views.js"; +export * from "./links.js"; +export * from "./roles.js"; +export * from "./roleAssignments.js"; +export * from "./images.js"; +export * from "./predictions.js"; diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/interactions.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/interactions.ts index 392fed4f98b7..0adfa0b41383 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/interactions.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/interactions.ts @@ -17,7 +17,7 @@ import { InteractionsGetResponse, InteractionsSuggestRelationshipLinksOptionalParams, InteractionsSuggestRelationshipLinksResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Interactions. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/kpi.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/kpi.ts index f5e31bf10df1..ea3879f3ffad 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/kpi.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/kpi.ts @@ -17,7 +17,7 @@ import { KpiGetResponse, KpiDeleteOptionalParams, KpiReprocessOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Kpi. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/links.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/links.ts index e49a0a997214..24ba36862357 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/links.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/links.ts @@ -16,7 +16,7 @@ import { LinksGetOptionalParams, LinksGetResponse, LinksDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Links. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/operations.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/operations.ts index 9309bfca6068..2f6546959844 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/operations.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models"; +import { Operation, OperationsListOptionalParams } from "../models/index.js"; /// /** Interface representing a Operations. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/predictions.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/predictions.ts index 6c02f052d0c5..093bc88a8a81 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/predictions.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/predictions.ts @@ -22,7 +22,7 @@ import { PredictionsGetModelStatusResponse, PredictionModelStatus, PredictionsModelStatusOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Predictions. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/profiles.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/profiles.ts index e55cc03ef2e3..4b3c1b2476f2 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/profiles.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/profiles.ts @@ -18,7 +18,7 @@ import { ProfilesDeleteOptionalParams, ProfilesGetEnrichingKpisOptionalParams, ProfilesGetEnrichingKpisResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Profiles. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/relationshipLinks.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/relationshipLinks.ts index ba7649a86ced..50252c5130f2 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/relationshipLinks.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/relationshipLinks.ts @@ -16,7 +16,7 @@ import { RelationshipLinksGetOptionalParams, RelationshipLinksGetResponse, RelationshipLinksDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RelationshipLinks. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/relationships.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/relationships.ts index 5ea47bd0b4e6..00f93de07c03 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/relationships.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/relationships.ts @@ -16,7 +16,7 @@ import { RelationshipsGetOptionalParams, RelationshipsGetResponse, RelationshipsDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Relationships. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/roleAssignments.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/roleAssignments.ts index cdd24c97ef11..89d4fd928cb2 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/roleAssignments.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/roleAssignments.ts @@ -16,7 +16,7 @@ import { RoleAssignmentsGetOptionalParams, RoleAssignmentsGetResponse, RoleAssignmentsDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RoleAssignments. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/roles.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/roles.ts index b1917db04433..ca433915c092 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/roles.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/roles.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { RoleResourceFormat, RolesListByHubOptionalParams } from "../models"; +import { RoleResourceFormat, RolesListByHubOptionalParams } from "../models/index.js"; /// /** Interface representing a Roles. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/views.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/views.ts index 2ef068f58934..a7131da5dd36 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/views.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/views.ts @@ -15,7 +15,7 @@ import { ViewsGetOptionalParams, ViewsGetResponse, ViewsDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Views. */ diff --git a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/widgetTypes.ts b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/widgetTypes.ts index 25c664fe4e89..6e2eb2231c5b 100644 --- a/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/widgetTypes.ts +++ b/sdk/customer-insights/arm-customerinsights/src/operationsInterfaces/widgetTypes.ts @@ -12,7 +12,7 @@ import { WidgetTypesListByHubOptionalParams, WidgetTypesGetOptionalParams, WidgetTypesGetResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a WidgetTypes. */ diff --git a/sdk/customer-insights/arm-customerinsights/test/sampleTest.ts b/sdk/customer-insights/arm-customerinsights/test/sampleTest.spec.ts similarity index 82% rename from sdk/customer-insights/arm-customerinsights/test/sampleTest.ts rename to sdk/customer-insights/arm-customerinsights/test/sampleTest.spec.ts index 8ff7deb0acbe..2a396bab6996 100644 --- a/sdk/customer-insights/arm-customerinsights/test/sampleTest.ts +++ b/sdk/customer-insights/arm-customerinsights/test/sampleTest.spec.ts @@ -8,11 +8,8 @@ import { Recorder, - RecorderStartOptions, - env -} from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { Context } from "mocha"; + RecorderStartOptions} from "@azure-tools/test-recorder"; +import { describe, it, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", @@ -32,8 +29,8 @@ const recorderOptions: RecorderStartOptions = { describe("My test", () => { let recorder: Recorder; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async function (ctx) { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); }); diff --git a/sdk/customer-insights/arm-customerinsights/tsconfig.browser.config.json b/sdk/customer-insights/arm-customerinsights/tsconfig.browser.config.json new file mode 100644 index 000000000000..b6586181d006 --- /dev/null +++ b/sdk/customer-insights/arm-customerinsights/tsconfig.browser.config.json @@ -0,0 +1,17 @@ +{ + "extends": "./.tshy/build.json", + "include": [ + "./src/**/*.ts", + "./src/**/*.mts", + "./test/**/*.spec.ts", + "./test/**/*.mts" + ], + "exclude": [ + "./test/**/node/**/*.ts" + ], + "compilerOptions": { + "outDir": "./dist-test/browser", + "rootDir": ".", + "skipLibCheck": true + } +} diff --git a/sdk/customer-insights/arm-customerinsights/tsconfig.json b/sdk/customer-insights/arm-customerinsights/tsconfig.json index 8f2622ada521..19ceb382b521 100644 --- a/sdk/customer-insights/arm-customerinsights/tsconfig.json +++ b/sdk/customer-insights/arm-customerinsights/tsconfig.json @@ -1,33 +1,13 @@ { - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-customerinsights": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/customer-insights/arm-customerinsights/tsconfig.samples.json b/sdk/customer-insights/arm-customerinsights/tsconfig.samples.json new file mode 100644 index 000000000000..18e7483ee922 --- /dev/null +++ b/sdk/customer-insights/arm-customerinsights/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-customerinsights": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/customer-insights/arm-customerinsights/tsconfig.src.json b/sdk/customer-insights/arm-customerinsights/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/customer-insights/arm-customerinsights/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/customer-insights/arm-customerinsights/tsconfig.test.json b/sdk/customer-insights/arm-customerinsights/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/customer-insights/arm-customerinsights/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/customer-insights/arm-customerinsights/vitest.browser.config.ts b/sdk/customer-insights/arm-customerinsights/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/customer-insights/arm-customerinsights/vitest.browser.config.ts @@ -0,0 +1,17 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.browser.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + include: [ + "dist-test/browser/test/**/*.spec.js", + ], + }, + }), +); diff --git a/sdk/customer-insights/arm-customerinsights/vitest.config.ts b/sdk/customer-insights/arm-customerinsights/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/customer-insights/arm-customerinsights/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/customer-insights/arm-customerinsights/vitest.esm.config.ts b/sdk/customer-insights/arm-customerinsights/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/customer-insights/arm-customerinsights/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/dashboard/arm-dashboard/api-extractor.json b/sdk/dashboard/arm-dashboard/api-extractor.json index a6579dedac02..23fdbc2e187f 100644 --- a/sdk/dashboard/arm-dashboard/api-extractor.json +++ b/sdk/dashboard/arm-dashboard/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-dashboard.d.ts" + "publicTrimmedFilePath": "dist/arm-dashboard.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/dashboard/arm-dashboard/package.json b/sdk/dashboard/arm-dashboard/package.json index fbc905f8d3be..0ab10eb6963e 100644 --- a/sdk/dashboard/arm-dashboard/package.json +++ b/sdk/dashboard/arm-dashboard/package.json @@ -24,22 +24,22 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-dashboard.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@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.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@vitest/browser": "^2.1.8", + "@vitest/coverage-istanbul": "^2.1.8", "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "playwright": "^1.49.1", + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, "repository": { "type": "git", @@ -49,24 +49,14 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", @@ -78,7 +68,7 @@ "format": "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:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "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", @@ -88,7 +78,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -109,5 +99,45 @@ ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-dashboard?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" + } + } } } diff --git a/sdk/dashboard/arm-dashboard/samples-dev/grafanaCheckEnterpriseDetailsSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/grafanaCheckEnterpriseDetailsSample.ts index 8d008de92f14..52444dadc0e6 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/grafanaCheckEnterpriseDetailsSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/grafanaCheckEnterpriseDetailsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieve enterprise add-on details information diff --git a/sdk/dashboard/arm-dashboard/samples-dev/grafanaCreateSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/grafanaCreateSample.ts index a6d52a4de0f2..88f413f3f7bc 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/grafanaCreateSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/grafanaCreateSample.ts @@ -13,9 +13,7 @@ import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or update an existing grafana. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/grafanaDeleteSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/grafanaDeleteSample.ts index ddb27247631c..048f0d0fb280 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/grafanaDeleteSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/grafanaDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a workspace for Grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/grafanaFetchAvailablePluginsSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/grafanaFetchAvailablePluginsSample.ts index 01799d3e9844..474beeba2284 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/grafanaFetchAvailablePluginsSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/grafanaFetchAvailablePluginsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to diff --git a/sdk/dashboard/arm-dashboard/samples-dev/grafanaGetSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/grafanaGetSample.ts index 72bbbd7173cb..30771a961a5d 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/grafanaGetSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/grafanaGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the properties of a specific workspace for Grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/grafanaListByResourceGroupSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/grafanaListByResourceGroupSample.ts index d6f15a559e17..19135c1d2289 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/grafanaListByResourceGroupSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/grafanaListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all resources of workspaces for Grafana under the specified resource group. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/grafanaListSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/grafanaListSample.ts index a1c74cf84c27..4186af67b0aa 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/grafanaListSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/grafanaListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all resources of workspaces for Grafana under the specified subscription. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/grafanaUpdateSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/grafanaUpdateSample.ts index 6baf88fe47af..bd3bdfe9780b 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/grafanaUpdateSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/grafanaUpdateSample.ts @@ -13,9 +13,7 @@ import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update a workspace for Grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsCreateSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsCreateSample.ts index 954be46b7c2e..62f8ed486603 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsCreateSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsCreateSample.ts @@ -13,9 +13,7 @@ import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a managed private endpoint for a grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsDeleteSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsDeleteSample.ts index 9536bc23b7be..969c7a2747a4 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsDeleteSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a managed private endpoint for a grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsGetSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsGetSample.ts index 792860d81a4f..3d1e1e80a39c 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsGetSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a specific managed private endpoint of a grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsListSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsListSample.ts index 4307e8e64022..dcc0d00f2318 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsListSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all managed private endpoints of a grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsRefreshSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsRefreshSample.ts index 43f727132072..61e0ed78e781 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsRefreshSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsRefreshSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Refresh and sync managed private endpoints of a grafana resource to latest state. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsUpdateSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsUpdateSample.ts index f1d754221e97..652a6e24d54d 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsUpdateSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/managedPrivateEndpointsUpdateSample.ts @@ -13,9 +13,7 @@ import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update a managed private endpoint for an existing grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/operationsListSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/operationsListSample.ts index 80defc5661dd..331be29afaa0 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/operationsListSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all available API operations provided by Microsoft.Dashboard. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsApproveSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsApproveSample.ts index 1c8d8a2d8132..cfdfbce49b16 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsApproveSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsApproveSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Manual approve private endpoint connection diff --git a/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsDeleteSample.ts index ec6d66fbedb2..37e2c20dbe23 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete private endpoint connection diff --git a/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsGetSample.ts index 9fa94bd2e977..f6862de2896c 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get private endpoint connections. diff --git a/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsListSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsListSample.ts index 691f70007cd7..0e0f3774b51f 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsListSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/privateEndpointConnectionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get private endpoint connection diff --git a/sdk/dashboard/arm-dashboard/samples-dev/privateLinkResourcesGetSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/privateLinkResourcesGetSample.ts index c17cc476b080..9785009be08b 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/privateLinkResourcesGetSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/privateLinkResourcesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get specific private link resource information for this grafana resource diff --git a/sdk/dashboard/arm-dashboard/samples-dev/privateLinkResourcesListSample.ts b/sdk/dashboard/arm-dashboard/samples-dev/privateLinkResourcesListSample.ts index 180c6841a281..11ad2c2ff5ac 100644 --- a/sdk/dashboard/arm-dashboard/samples-dev/privateLinkResourcesListSample.ts +++ b/sdk/dashboard/arm-dashboard/samples-dev/privateLinkResourcesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all private link resources information for this grafana resource diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaCheckEnterpriseDetailsSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaCheckEnterpriseDetailsSample.ts index 8d008de92f14..52444dadc0e6 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaCheckEnterpriseDetailsSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaCheckEnterpriseDetailsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Retrieve enterprise add-on details information diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaCreateSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaCreateSample.ts index a6d52a4de0f2..88f413f3f7bc 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaCreateSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaCreateSample.ts @@ -13,9 +13,7 @@ import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or update an existing grafana. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaDeleteSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaDeleteSample.ts index ddb27247631c..048f0d0fb280 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaDeleteSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a workspace for Grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaFetchAvailablePluginsSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaFetchAvailablePluginsSample.ts index 01799d3e9844..474beeba2284 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaFetchAvailablePluginsSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaFetchAvailablePluginsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaGetSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaGetSample.ts index 72bbbd7173cb..30771a961a5d 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaGetSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the properties of a specific workspace for Grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaListByResourceGroupSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaListByResourceGroupSample.ts index d6f15a559e17..19135c1d2289 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaListByResourceGroupSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all resources of workspaces for Grafana under the specified resource group. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaListSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaListSample.ts index a1c74cf84c27..4186af67b0aa 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaListSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all resources of workspaces for Grafana under the specified subscription. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaUpdateSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaUpdateSample.ts index 6baf88fe47af..bd3bdfe9780b 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaUpdateSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/grafanaUpdateSample.ts @@ -13,9 +13,7 @@ import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update a workspace for Grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsCreateSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsCreateSample.ts index 954be46b7c2e..62f8ed486603 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsCreateSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsCreateSample.ts @@ -13,9 +13,7 @@ import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a managed private endpoint for a grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsDeleteSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsDeleteSample.ts index 9536bc23b7be..969c7a2747a4 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsDeleteSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a managed private endpoint for a grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsGetSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsGetSample.ts index 792860d81a4f..3d1e1e80a39c 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsGetSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a specific managed private endpoint of a grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsListSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsListSample.ts index 4307e8e64022..dcc0d00f2318 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsListSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all managed private endpoints of a grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsRefreshSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsRefreshSample.ts index 43f727132072..61e0ed78e781 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsRefreshSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsRefreshSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Refresh and sync managed private endpoints of a grafana resource to latest state. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsUpdateSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsUpdateSample.ts index f1d754221e97..652a6e24d54d 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsUpdateSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/managedPrivateEndpointsUpdateSample.ts @@ -13,9 +13,7 @@ import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update a managed private endpoint for an existing grafana resource. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/operationsListSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/operationsListSample.ts index 80defc5661dd..331be29afaa0 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/operationsListSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all available API operations provided by Microsoft.Dashboard. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsApproveSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsApproveSample.ts index 1c8d8a2d8132..cfdfbce49b16 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsApproveSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsApproveSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Manual approve private endpoint connection diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsDeleteSample.ts index ec6d66fbedb2..37e2c20dbe23 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete private endpoint connection diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsGetSample.ts index 9fa94bd2e977..f6862de2896c 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get private endpoint connections. diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsListSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsListSample.ts index 691f70007cd7..0e0f3774b51f 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsListSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateEndpointConnectionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get private endpoint connection diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateLinkResourcesGetSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateLinkResourcesGetSample.ts index c17cc476b080..9785009be08b 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateLinkResourcesGetSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateLinkResourcesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get specific private link resource information for this grafana resource diff --git a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateLinkResourcesListSample.ts b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateLinkResourcesListSample.ts index 180c6841a281..11ad2c2ff5ac 100644 --- a/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateLinkResourcesListSample.ts +++ b/sdk/dashboard/arm-dashboard/samples/v1/typescript/src/privateLinkResourcesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DashboardManagementClient } from "@azure/arm-dashboard"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all private link resources information for this grafana resource diff --git a/sdk/dashboard/arm-dashboard/src/dashboardManagementClient.ts b/sdk/dashboard/arm-dashboard/src/dashboardManagementClient.ts index 18807b3c8bfe..3e1da0e4c832 100644 --- a/sdk/dashboard/arm-dashboard/src/dashboardManagementClient.ts +++ b/sdk/dashboard/arm-dashboard/src/dashboardManagementClient.ts @@ -20,15 +20,15 @@ import { PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, ManagedPrivateEndpointsImpl -} from "./operations"; +} from "./operations/index.js"; import { Operations, Grafana, PrivateEndpointConnections, PrivateLinkResources, ManagedPrivateEndpoints -} from "./operationsInterfaces"; -import { DashboardManagementClientOptionalParams } from "./models"; +} from "./operationsInterfaces/index.js"; +import { DashboardManagementClientOptionalParams } from "./models/index.js"; export class DashboardManagementClient extends coreClient.ServiceClient { $host: string; diff --git a/sdk/dashboard/arm-dashboard/src/index.ts b/sdk/dashboard/arm-dashboard/src/index.ts index 49847113843d..63cf74144e66 100644 --- a/sdk/dashboard/arm-dashboard/src/index.ts +++ b/sdk/dashboard/arm-dashboard/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { DashboardManagementClient } from "./dashboardManagementClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { DashboardManagementClient } from "./dashboardManagementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/dashboard/arm-dashboard/src/models/parameters.ts b/sdk/dashboard/arm-dashboard/src/models/parameters.ts index 963043edd42a..78edd1644897 100644 --- a/sdk/dashboard/arm-dashboard/src/models/parameters.ts +++ b/sdk/dashboard/arm-dashboard/src/models/parameters.ts @@ -17,7 +17,7 @@ import { PrivateEndpointConnection as PrivateEndpointConnectionMapper, ManagedPrivateEndpointModel as ManagedPrivateEndpointModelMapper, ManagedPrivateEndpointUpdateParameters as ManagedPrivateEndpointUpdateParametersMapper -} from "../models/mappers"; +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", diff --git a/sdk/dashboard/arm-dashboard/src/operations/grafana.ts b/sdk/dashboard/arm-dashboard/src/operations/grafana.ts index 5ed3d67c66f3..d5dc45877530 100644 --- a/sdk/dashboard/arm-dashboard/src/operations/grafana.ts +++ b/sdk/dashboard/arm-dashboard/src/operations/grafana.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Grafana } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Grafana } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { DashboardManagementClient } from "../dashboardManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { DashboardManagementClient } from "../dashboardManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { ManagedGrafana, GrafanaListNextOptionalParams, @@ -41,7 +41,7 @@ import { GrafanaFetchAvailablePluginsResponse, GrafanaListNextResponse, GrafanaListByResourceGroupNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Grafana operations. */ diff --git a/sdk/dashboard/arm-dashboard/src/operations/index.ts b/sdk/dashboard/arm-dashboard/src/operations/index.ts index bf770e679d2b..eeb8a61d4c71 100644 --- a/sdk/dashboard/arm-dashboard/src/operations/index.ts +++ b/sdk/dashboard/arm-dashboard/src/operations/index.ts @@ -6,8 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./operations"; -export * from "./grafana"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; -export * from "./managedPrivateEndpoints"; +export * from "./operations.js"; +export * from "./grafana.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; +export * from "./managedPrivateEndpoints.js"; diff --git a/sdk/dashboard/arm-dashboard/src/operations/managedPrivateEndpoints.ts b/sdk/dashboard/arm-dashboard/src/operations/managedPrivateEndpoints.ts index 4be38666b450..f97074511ae0 100644 --- a/sdk/dashboard/arm-dashboard/src/operations/managedPrivateEndpoints.ts +++ b/sdk/dashboard/arm-dashboard/src/operations/managedPrivateEndpoints.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ManagedPrivateEndpoints } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ManagedPrivateEndpoints } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { DashboardManagementClient } from "../dashboardManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { DashboardManagementClient } from "../dashboardManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { ManagedPrivateEndpointModel, ManagedPrivateEndpointsListNextOptionalParams, @@ -34,7 +34,7 @@ import { ManagedPrivateEndpointsUpdateResponse, ManagedPrivateEndpointsDeleteOptionalParams, ManagedPrivateEndpointsListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing ManagedPrivateEndpoints operations. */ diff --git a/sdk/dashboard/arm-dashboard/src/operations/operations.ts b/sdk/dashboard/arm-dashboard/src/operations/operations.ts index 34208d4f510e..930ce2fcf7b9 100644 --- a/sdk/dashboard/arm-dashboard/src/operations/operations.ts +++ b/sdk/dashboard/arm-dashboard/src/operations/operations.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Operations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Operations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { DashboardManagementClient } from "../dashboardManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { DashboardManagementClient } from "../dashboardManagementClient.js"; import { Operation, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, OperationsListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/dashboard/arm-dashboard/src/operations/privateEndpointConnections.ts b/sdk/dashboard/arm-dashboard/src/operations/privateEndpointConnections.ts index 76200fe9178c..003e953341d1 100644 --- a/sdk/dashboard/arm-dashboard/src/operations/privateEndpointConnections.ts +++ b/sdk/dashboard/arm-dashboard/src/operations/privateEndpointConnections.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PrivateEndpointConnections } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { PrivateEndpointConnections } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { DashboardManagementClient } from "../dashboardManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { DashboardManagementClient } from "../dashboardManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListNextOptionalParams, @@ -31,7 +31,7 @@ import { PrivateEndpointConnectionsDeleteOptionalParams, PrivateEndpointConnectionsDeleteResponse, PrivateEndpointConnectionsListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing PrivateEndpointConnections operations. */ diff --git a/sdk/dashboard/arm-dashboard/src/operations/privateLinkResources.ts b/sdk/dashboard/arm-dashboard/src/operations/privateLinkResources.ts index 6604fba5a5c7..e25f88f93366 100644 --- a/sdk/dashboard/arm-dashboard/src/operations/privateLinkResources.ts +++ b/sdk/dashboard/arm-dashboard/src/operations/privateLinkResources.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PrivateLinkResources } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { PrivateLinkResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { DashboardManagementClient } from "../dashboardManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { DashboardManagementClient } from "../dashboardManagementClient.js"; import { PrivateLinkResource, PrivateLinkResourcesListNextOptionalParams, @@ -21,7 +21,7 @@ import { PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse, PrivateLinkResourcesListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing PrivateLinkResources operations. */ diff --git a/sdk/dashboard/arm-dashboard/src/operationsInterfaces/grafana.ts b/sdk/dashboard/arm-dashboard/src/operationsInterfaces/grafana.ts index 593c8131e119..4ee57960b9da 100644 --- a/sdk/dashboard/arm-dashboard/src/operationsInterfaces/grafana.ts +++ b/sdk/dashboard/arm-dashboard/src/operationsInterfaces/grafana.ts @@ -24,7 +24,7 @@ import { GrafanaCheckEnterpriseDetailsResponse, GrafanaFetchAvailablePluginsOptionalParams, GrafanaFetchAvailablePluginsResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Grafana. */ diff --git a/sdk/dashboard/arm-dashboard/src/operationsInterfaces/index.ts b/sdk/dashboard/arm-dashboard/src/operationsInterfaces/index.ts index bf770e679d2b..eeb8a61d4c71 100644 --- a/sdk/dashboard/arm-dashboard/src/operationsInterfaces/index.ts +++ b/sdk/dashboard/arm-dashboard/src/operationsInterfaces/index.ts @@ -6,8 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./operations"; -export * from "./grafana"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; -export * from "./managedPrivateEndpoints"; +export * from "./operations.js"; +export * from "./grafana.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; +export * from "./managedPrivateEndpoints.js"; diff --git a/sdk/dashboard/arm-dashboard/src/operationsInterfaces/managedPrivateEndpoints.ts b/sdk/dashboard/arm-dashboard/src/operationsInterfaces/managedPrivateEndpoints.ts index 596e25a56fa3..1e536dba4d1e 100644 --- a/sdk/dashboard/arm-dashboard/src/operationsInterfaces/managedPrivateEndpoints.ts +++ b/sdk/dashboard/arm-dashboard/src/operationsInterfaces/managedPrivateEndpoints.ts @@ -20,7 +20,7 @@ import { ManagedPrivateEndpointsUpdateOptionalParams, ManagedPrivateEndpointsUpdateResponse, ManagedPrivateEndpointsDeleteOptionalParams -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a ManagedPrivateEndpoints. */ diff --git a/sdk/dashboard/arm-dashboard/src/operationsInterfaces/operations.ts b/sdk/dashboard/arm-dashboard/src/operationsInterfaces/operations.ts index 28f57ff829d0..8b35c799a973 100644 --- a/sdk/dashboard/arm-dashboard/src/operationsInterfaces/operations.ts +++ b/sdk/dashboard/arm-dashboard/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models"; +import { Operation, OperationsListOptionalParams } from "../models/index.js"; /// /** Interface representing a Operations. */ diff --git a/sdk/dashboard/arm-dashboard/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/dashboard/arm-dashboard/src/operationsInterfaces/privateEndpointConnections.ts index e28ef9b34592..da10d0e83063 100644 --- a/sdk/dashboard/arm-dashboard/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/dashboard/arm-dashboard/src/operationsInterfaces/privateEndpointConnections.ts @@ -17,7 +17,7 @@ import { PrivateEndpointConnectionsApproveResponse, PrivateEndpointConnectionsDeleteOptionalParams, PrivateEndpointConnectionsDeleteResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PrivateEndpointConnections. */ diff --git a/sdk/dashboard/arm-dashboard/src/operationsInterfaces/privateLinkResources.ts b/sdk/dashboard/arm-dashboard/src/operationsInterfaces/privateLinkResources.ts index 699aac04f5b9..6176d6eb34da 100644 --- a/sdk/dashboard/arm-dashboard/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/dashboard/arm-dashboard/src/operationsInterfaces/privateLinkResources.ts @@ -12,7 +12,7 @@ import { PrivateLinkResourcesListOptionalParams, PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PrivateLinkResources. */ diff --git a/sdk/dashboard/arm-dashboard/test/dashboard_operations_test.spec.ts b/sdk/dashboard/arm-dashboard/test/dashboard_operations_test.spec.ts index af8ec28a334d..0c1c487dca14 100644 --- a/sdk/dashboard/arm-dashboard/test/dashboard_operations_test.spec.ts +++ b/sdk/dashboard/arm-dashboard/test/dashboard_operations_test.spec.ts @@ -10,13 +10,11 @@ import { env, Recorder, RecorderStartOptions, - delay, isPlaybackMode, } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { DashboardManagementClient } from "../src/dashboardManagementClient"; +import { DashboardManagementClient } from "../src/dashboardManagementClient.js"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", @@ -41,21 +39,14 @@ describe("Dashboard test", () => { let recorder: Recorder; let subscriptionId: string; let client: DashboardManagementClient; - let location: string; - let resourceGroup: string; - let resourcename: string; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async function (ctx) { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); subscriptionId = env.SUBSCRIPTION_ID || ''; // This is an example of how the environment variables are used const credential = createTestCredential(); client = new DashboardManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - resourcename = "resourcetest"; - }); afterEach(async function () { diff --git a/sdk/dashboard/arm-dashboard/tsconfig.browser.config.json b/sdk/dashboard/arm-dashboard/tsconfig.browser.config.json new file mode 100644 index 000000000000..b6586181d006 --- /dev/null +++ b/sdk/dashboard/arm-dashboard/tsconfig.browser.config.json @@ -0,0 +1,17 @@ +{ + "extends": "./.tshy/build.json", + "include": [ + "./src/**/*.ts", + "./src/**/*.mts", + "./test/**/*.spec.ts", + "./test/**/*.mts" + ], + "exclude": [ + "./test/**/node/**/*.ts" + ], + "compilerOptions": { + "outDir": "./dist-test/browser", + "rootDir": ".", + "skipLibCheck": true + } +} diff --git a/sdk/dashboard/arm-dashboard/tsconfig.json b/sdk/dashboard/arm-dashboard/tsconfig.json index d6251f79964f..19ceb382b521 100644 --- a/sdk/dashboard/arm-dashboard/tsconfig.json +++ b/sdk/dashboard/arm-dashboard/tsconfig.json @@ -1,33 +1,13 @@ { - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-dashboard": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/dashboard/arm-dashboard/tsconfig.samples.json b/sdk/dashboard/arm-dashboard/tsconfig.samples.json new file mode 100644 index 000000000000..84fc9d897c04 --- /dev/null +++ b/sdk/dashboard/arm-dashboard/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-dashboard": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/dashboard/arm-dashboard/tsconfig.src.json b/sdk/dashboard/arm-dashboard/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/dashboard/arm-dashboard/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/dashboard/arm-dashboard/tsconfig.test.json b/sdk/dashboard/arm-dashboard/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/dashboard/arm-dashboard/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/dashboard/arm-dashboard/vitest.browser.config.ts b/sdk/dashboard/arm-dashboard/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/dashboard/arm-dashboard/vitest.browser.config.ts @@ -0,0 +1,17 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.browser.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + include: [ + "dist-test/browser/test/**/*.spec.js", + ], + }, + }), +); diff --git a/sdk/dashboard/arm-dashboard/vitest.config.ts b/sdk/dashboard/arm-dashboard/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/dashboard/arm-dashboard/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/dashboard/arm-dashboard/vitest.esm.config.ts b/sdk/dashboard/arm-dashboard/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/dashboard/arm-dashboard/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +); diff --git a/sdk/databoundaries/arm-databoundaries/api-extractor.json b/sdk/databoundaries/arm-databoundaries/api-extractor.json index f7fb1be741b9..25f21ad8c7a8 100644 --- a/sdk/databoundaries/arm-databoundaries/api-extractor.json +++ b/sdk/databoundaries/arm-databoundaries/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "mainEntryPointFilePath": "dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "./types/arm-databoundaries.d.ts" + "publicTrimmedFilePath": "dist/arm-databoundaries.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/databoundaries/arm-databoundaries/package.json b/sdk/databoundaries/arm-databoundaries/package.json index 5281f19d8859..9e283378af24 100644 --- a/sdk/databoundaries/arm-databoundaries/package.json +++ b/sdk/databoundaries/arm-databoundaries/package.json @@ -8,8 +8,8 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.6.0", + "@azure/core-client": "^1.7.0", "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, @@ -21,26 +21,26 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-databoundaries.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "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.2.1", "@microsoft/api-extractor": "^7.31.1", + "@types/node": "^18.0.0", + "@vitest/browser": "^2.1.8", + "@vitest/coverage-istanbul": "^2.1.8", + "dotenv": "^16.0.0", "mkdirp": "^3.0.1", - "typescript": "~5.7.2", + "playwright": "^1.49.1", "rimraf": "^5.0.0", - "dotenv": "^16.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.2.1", - "@azure-tools/test-recorder": "^3.0.0", - "@azure-tools/test-credential": "^1.1.0", - "mocha": "^11.0.2", - "@types/mocha": "^10.0.0", "tsx": "^4.7.1", - "@types/chai": "^4.2.8", - "chai": "^4.2.0", - "@types/node": "^18.0.0", - "ts-node": "^10.0.0" + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, "repository": { "type": "git", @@ -50,46 +50,36 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && mkdirp ./review && npm run extract-api", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "prepack": "npm run build", - "pack": "npm pack 2>&1", - "extract-api": "dev-tool run extract-api", - "lint": "echo skipped", - "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "build:node": "echo skipped", + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", "build:browser": "echo skipped", - "build:test": "echo skipped", + "build:node": "echo skipped", "build:samples": "echo skipped.", + "build:test": "echo skipped", "check-format": "echo skipped", + "clean": "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", + "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", + "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:node": "echo skipped", "test:browser": "echo skipped", + "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "integration-test:browser": "echo skipped" + "unit-test:node": "dev-tool run test:vitest" }, "sideEffects": false, "//metadata": { @@ -109,5 +99,45 @@ ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-databoundaries?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" + } + } } } diff --git a/sdk/databoundaries/arm-databoundaries/samples-dev/dataBoundariesGetScopeSample.ts b/sdk/databoundaries/arm-databoundaries/samples-dev/dataBoundariesGetScopeSample.ts index f78663f02e85..e2927d95f801 100644 --- a/sdk/databoundaries/arm-databoundaries/samples-dev/dataBoundariesGetScopeSample.ts +++ b/sdk/databoundaries/arm-databoundaries/samples-dev/dataBoundariesGetScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DataboundariesManegementClient } from "@azure/arm-databoundaries"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get data boundary at specified scope diff --git a/sdk/databoundaries/arm-databoundaries/samples-dev/dataBoundariesGetTenantSample.ts b/sdk/databoundaries/arm-databoundaries/samples-dev/dataBoundariesGetTenantSample.ts index 6d9df9928ff5..9f2cfba884da 100644 --- a/sdk/databoundaries/arm-databoundaries/samples-dev/dataBoundariesGetTenantSample.ts +++ b/sdk/databoundaries/arm-databoundaries/samples-dev/dataBoundariesGetTenantSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DataboundariesManegementClient } from "@azure/arm-databoundaries"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get data boundary of tenant. diff --git a/sdk/databoundaries/arm-databoundaries/samples-dev/dataBoundariesPutSample.ts b/sdk/databoundaries/arm-databoundaries/samples-dev/dataBoundariesPutSample.ts index 746c20639240..f9bf4068a8fc 100644 --- a/sdk/databoundaries/arm-databoundaries/samples-dev/dataBoundariesPutSample.ts +++ b/sdk/databoundaries/arm-databoundaries/samples-dev/dataBoundariesPutSample.ts @@ -13,9 +13,7 @@ import { DataboundariesManegementClient, } from "@azure/arm-databoundaries"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Opt-in tenant to data boundary. diff --git a/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/src/dataBoundariesGetScopeSample.ts b/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/src/dataBoundariesGetScopeSample.ts index f78663f02e85..e2927d95f801 100644 --- a/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/src/dataBoundariesGetScopeSample.ts +++ b/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/src/dataBoundariesGetScopeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DataboundariesManegementClient } from "@azure/arm-databoundaries"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get data boundary at specified scope diff --git a/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/src/dataBoundariesGetTenantSample.ts b/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/src/dataBoundariesGetTenantSample.ts index 6d9df9928ff5..9f2cfba884da 100644 --- a/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/src/dataBoundariesGetTenantSample.ts +++ b/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/src/dataBoundariesGetTenantSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { DataboundariesManegementClient } from "@azure/arm-databoundaries"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get data boundary of tenant. diff --git a/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/src/dataBoundariesPutSample.ts b/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/src/dataBoundariesPutSample.ts index 746c20639240..f9bf4068a8fc 100644 --- a/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/src/dataBoundariesPutSample.ts +++ b/sdk/databoundaries/arm-databoundaries/samples/v1-beta/typescript/src/dataBoundariesPutSample.ts @@ -13,9 +13,7 @@ import { DataboundariesManegementClient, } from "@azure/arm-databoundaries"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Opt-in tenant to data boundary. diff --git a/sdk/databoundaries/arm-databoundaries/src/databoundariesManegementClient.ts b/sdk/databoundaries/arm-databoundaries/src/databoundariesManegementClient.ts index 2a052d25d938..dd3b2f4c79cd 100644 --- a/sdk/databoundaries/arm-databoundaries/src/databoundariesManegementClient.ts +++ b/sdk/databoundaries/arm-databoundaries/src/databoundariesManegementClient.ts @@ -14,9 +14,9 @@ import { SendRequest, } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; -import { DataBoundariesImpl } from "./operations"; -import { DataBoundaries } from "./operationsInterfaces"; -import { DataboundariesManegementClientOptionalParams } from "./models"; +import { DataBoundariesImpl } from "./operations/index.js"; +import { DataBoundaries } from "./operationsInterfaces/index.js"; +import { DataboundariesManegementClientOptionalParams } from "./models/index.js"; export class DataboundariesManegementClient extends coreClient.ServiceClient { $host: string; diff --git a/sdk/databoundaries/arm-databoundaries/src/index.ts b/sdk/databoundaries/arm-databoundaries/src/index.ts index 024565c271d8..bf041645a17c 100644 --- a/sdk/databoundaries/arm-databoundaries/src/index.ts +++ b/sdk/databoundaries/arm-databoundaries/src/index.ts @@ -6,6 +6,6 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./models"; -export { DataboundariesManegementClient } from "./databoundariesManegementClient"; -export * from "./operationsInterfaces"; +export * from "./models/index.js"; +export { DataboundariesManegementClient } from "./databoundariesManegementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/databoundaries/arm-databoundaries/src/models/parameters.ts b/sdk/databoundaries/arm-databoundaries/src/models/parameters.ts index 5eb93554b395..2db1a66c3a60 100644 --- a/sdk/databoundaries/arm-databoundaries/src/models/parameters.ts +++ b/sdk/databoundaries/arm-databoundaries/src/models/parameters.ts @@ -11,7 +11,7 @@ import { OperationURLParameter, OperationQueryParameter, } from "@azure/core-client"; -import { DataBoundaryDefinition as DataBoundaryDefinitionMapper } from "../models/mappers"; +import { DataBoundaryDefinition as DataBoundaryDefinitionMapper } from "../models/mappers.js"; export const contentType: OperationParameter = { parameterPath: ["options", "contentType"], diff --git a/sdk/databoundaries/arm-databoundaries/src/operations/dataBoundaries.ts b/sdk/databoundaries/arm-databoundaries/src/operations/dataBoundaries.ts index a47a8729cdd3..ae770e3fe9bc 100644 --- a/sdk/databoundaries/arm-databoundaries/src/operations/dataBoundaries.ts +++ b/sdk/databoundaries/arm-databoundaries/src/operations/dataBoundaries.ts @@ -6,11 +6,11 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { DataBoundaries } from "../operationsInterfaces"; +import { DataBoundaries } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { DataboundariesManegementClient } from "../databoundariesManegementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { DataboundariesManegementClient } from "../databoundariesManegementClient.js"; import { DataBoundaryDefinition, DefaultName, @@ -20,7 +20,7 @@ import { DataBoundariesGetTenantResponse, DataBoundariesGetScopeOptionalParams, DataBoundariesGetScopeResponse, -} from "../models"; +} from "../models/index.js"; /** Class containing DataBoundaries operations. */ export class DataBoundariesImpl implements DataBoundaries { diff --git a/sdk/databoundaries/arm-databoundaries/src/operations/index.ts b/sdk/databoundaries/arm-databoundaries/src/operations/index.ts index 70eb1ee0f14f..35498d6399ac 100644 --- a/sdk/databoundaries/arm-databoundaries/src/operations/index.ts +++ b/sdk/databoundaries/arm-databoundaries/src/operations/index.ts @@ -6,4 +6,4 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./dataBoundaries"; +export * from "./dataBoundaries.js"; diff --git a/sdk/databoundaries/arm-databoundaries/src/operationsInterfaces/dataBoundaries.ts b/sdk/databoundaries/arm-databoundaries/src/operationsInterfaces/dataBoundaries.ts index b344b52350df..fd8f6a893eae 100644 --- a/sdk/databoundaries/arm-databoundaries/src/operationsInterfaces/dataBoundaries.ts +++ b/sdk/databoundaries/arm-databoundaries/src/operationsInterfaces/dataBoundaries.ts @@ -15,7 +15,7 @@ import { DataBoundariesGetTenantResponse, DataBoundariesGetScopeOptionalParams, DataBoundariesGetScopeResponse, -} from "../models"; +} from "../models/index.js"; /** Interface representing a DataBoundaries. */ export interface DataBoundaries { diff --git a/sdk/databoundaries/arm-databoundaries/src/operationsInterfaces/index.ts b/sdk/databoundaries/arm-databoundaries/src/operationsInterfaces/index.ts index 70eb1ee0f14f..35498d6399ac 100644 --- a/sdk/databoundaries/arm-databoundaries/src/operationsInterfaces/index.ts +++ b/sdk/databoundaries/arm-databoundaries/src/operationsInterfaces/index.ts @@ -6,4 +6,4 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./dataBoundaries"; +export * from "./dataBoundaries.js"; diff --git a/sdk/databoundaries/arm-databoundaries/test/databoundaries_operations_test.spec.ts b/sdk/databoundaries/arm-databoundaries/test/databoundaries_operations_test.spec.ts index d40e9ebc51e5..662a0e5288a8 100644 --- a/sdk/databoundaries/arm-databoundaries/test/databoundaries_operations_test.spec.ts +++ b/sdk/databoundaries/arm-databoundaries/test/databoundaries_operations_test.spec.ts @@ -10,13 +10,11 @@ import { env, Recorder, RecorderStartOptions, - delay, isPlaybackMode, } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { DataboundariesManegementClient } from "../src/databoundariesManegementClient"; +import { DataboundariesManegementClient } from "../src/databoundariesManegementClient.js"; +import { describe, it, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888" @@ -38,21 +36,14 @@ describe("DataBoundary test", () => { let recorder: Recorder; let subscriptionId: string; let client: DataboundariesManegementClient; - let location: string; - let resourceGroup: string; - let resourcename: string; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); + beforeEach(async function (ctx) { + recorder = new Recorder(ctx); await recorder.start(recorderOptions); subscriptionId = env.SUBSCRIPTION_ID || ''; // This is an example of how the environment variables are used const credential = createTestCredential(); client = new DataboundariesManegementClient(credential, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - resourcename = "resourcetest"; - }); afterEach(async function () { diff --git a/sdk/databoundaries/arm-databoundaries/tsconfig.browser.config.json b/sdk/databoundaries/arm-databoundaries/tsconfig.browser.config.json new file mode 100644 index 000000000000..b6586181d006 --- /dev/null +++ b/sdk/databoundaries/arm-databoundaries/tsconfig.browser.config.json @@ -0,0 +1,17 @@ +{ + "extends": "./.tshy/build.json", + "include": [ + "./src/**/*.ts", + "./src/**/*.mts", + "./test/**/*.spec.ts", + "./test/**/*.mts" + ], + "exclude": [ + "./test/**/node/**/*.ts" + ], + "compilerOptions": { + "outDir": "./dist-test/browser", + "rootDir": ".", + "skipLibCheck": true + } +} diff --git a/sdk/databoundaries/arm-databoundaries/tsconfig.json b/sdk/databoundaries/arm-databoundaries/tsconfig.json index 701c0e733749..19ceb382b521 100644 --- a/sdk/databoundaries/arm-databoundaries/tsconfig.json +++ b/sdk/databoundaries/arm-databoundaries/tsconfig.json @@ -1,33 +1,13 @@ { - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es6", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-databoundaries": [ - "./src/index" - ] + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.samples.json" + }, + { + "path": "./tsconfig.test.json" } - }, - "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" - ], - "exclude": [ - "node_modules" ] -} \ No newline at end of file +} diff --git a/sdk/databoundaries/arm-databoundaries/tsconfig.samples.json b/sdk/databoundaries/arm-databoundaries/tsconfig.samples.json new file mode 100644 index 000000000000..e8b99452c64b --- /dev/null +++ b/sdk/databoundaries/arm-databoundaries/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-databoundaries": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/databoundaries/arm-databoundaries/tsconfig.src.json b/sdk/databoundaries/arm-databoundaries/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/databoundaries/arm-databoundaries/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/databoundaries/arm-databoundaries/tsconfig.test.json b/sdk/databoundaries/arm-databoundaries/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/databoundaries/arm-databoundaries/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/databoundaries/arm-databoundaries/vitest.browser.config.ts b/sdk/databoundaries/arm-databoundaries/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/databoundaries/arm-databoundaries/vitest.browser.config.ts @@ -0,0 +1,17 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.browser.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + include: [ + "dist-test/browser/test/**/*.spec.js", + ], + }, + }), +); diff --git a/sdk/databoundaries/arm-databoundaries/vitest.config.ts b/sdk/databoundaries/arm-databoundaries/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/databoundaries/arm-databoundaries/vitest.config.ts @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/databoundaries/arm-databoundaries/vitest.esm.config.ts b/sdk/databoundaries/arm-databoundaries/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/databoundaries/arm-databoundaries/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +);