diff --git a/sdk/tables/data-tables/src/TableClient.ts b/sdk/tables/data-tables/src/TableClient.ts index 99d783acf6d0..2aa32ab470d5 100644 --- a/sdk/tables/data-tables/src/TableClient.ts +++ b/sdk/tables/data-tables/src/TableClient.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import "@azure/core-paging"; import { CreateTableEntityResponse, DeleteTableEntityOptions, @@ -25,8 +26,12 @@ import { UpdateEntityResponse, UpsertEntityResponse } from "./generatedModels"; -import { TableQueryEntitiesOptionalParams } from "./generated/models"; -import { getClientParamsFromConnectionString } from "./utils/connectionString"; +import { + FullOperationResponse, + InternalClientPipelineOptions, + OperationOptions +} from "@azure/core-client"; +import { GeneratedClient, TableDeleteEntityOptionalParams } from "./generated"; import { NamedKeyCredential, SASCredential, @@ -35,10 +40,8 @@ import { isSASCredential, isTokenCredential } from "@azure/core-auth"; -import { tablesNamedKeyCredentialPolicy } from "./tablesNamedCredentialPolicy"; -import "@azure/core-paging"; -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { GeneratedClient, TableDeleteEntityOptionalParams } from "./generated"; +import { STORAGE_SCOPE, TablesLoggingAllowedHeaderNames } from "./utils/constants"; +import { decodeContinuationToken, encodeContinuationToken } from "./utils/continuationToken"; import { deserialize, deserializeObjectsArray, @@ -47,28 +50,25 @@ import { serializeQueryOptions, serializeSignedIdentifiers } from "./serialization"; -import { Table } from "./generated/operationsInterfaces"; -import { STORAGE_SCOPE, TablesLoggingAllowedHeaderNames } from "./utils/constants"; -import { - FullOperationResponse, - InternalClientPipelineOptions, - OperationOptions -} from "@azure/core-client"; -import { logger } from "./logger"; -import { createSpan } from "./utils/tracing"; -import { SpanStatusCode } from "@azure/core-tracing"; +import { parseXML, stringifyXML } from "@azure/core-xml"; import { InternalTableTransaction } from "./TableTransaction"; import { ListEntitiesResponse } from "./utils/internalModels"; -import { Uuid } from "./utils/uuid"; -import { parseXML, stringifyXML } from "@azure/core-xml"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { Pipeline } from "@azure/core-rest-pipeline"; -import { isCredential } from "./utils/isCredential"; -import { tablesSASTokenPolicy } from "./tablesSASTokenPolicy"; -import { isCosmosEndpoint } from "./utils/isCosmosEndpoint"; +import { SpanStatusCode } from "@azure/core-tracing"; +import { Table } from "./generated/operationsInterfaces"; +import { TableQueryEntitiesOptionalParams } from "./generated/models"; +import { Uuid } from "./utils/uuid"; import { cosmosPatchPolicy } from "./cosmosPathPolicy"; -import { decodeContinuationToken, encodeContinuationToken } from "./utils/continuationToken"; +import { createSpan } from "./utils/tracing"; import { escapeQuotes } from "./odata"; +import { getClientParamsFromConnectionString } from "./utils/connectionString"; import { handleTableAlreadyExists } from "./utils/errorHelpers"; +import { isCosmosEndpoint } from "./utils/isCosmosEndpoint"; +import { isCredential } from "./utils/isCredential"; +import { logger } from "./logger"; +import { tablesNamedKeyCredentialPolicy } from "./tablesNamedCredentialPolicy"; +import { tablesSASTokenPolicy } from "./tablesSASTokenPolicy"; /** * A TableClient represents a Client to the Azure Tables service allowing you diff --git a/sdk/tables/data-tables/src/TablePolicies.ts b/sdk/tables/data-tables/src/TablePolicies.ts index 5b32eb4135a2..b41fc01366ed 100644 --- a/sdk/tables/data-tables/src/TablePolicies.ts +++ b/sdk/tables/data-tables/src/TablePolicies.ts @@ -1,6 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { + HeaderConstants, + TRANSACTION_HTTP_LINE_ENDING, + TRANSACTION_HTTP_VERSION_1_1 +} from "./utils/constants"; import { PipelinePolicy, PipelineRequest, @@ -9,13 +14,8 @@ import { createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline"; -import { - HeaderConstants, - TRANSACTION_HTTP_LINE_ENDING, - TRANSACTION_HTTP_VERSION_1_1 -} from "./utils/constants"; -import { getChangeSetBoundary } from "./utils/transactionHelpers"; import { URL } from "./utils/url"; +import { getChangeSetBoundary } from "./utils/transactionHelpers"; export const transactionRequestAssemblePolicyName = "transactionRequestAssemblePolicy"; diff --git a/sdk/tables/data-tables/src/TableServiceClient.ts b/sdk/tables/data-tables/src/TableServiceClient.ts index 2887dcade067..9b784b9510c3 100644 --- a/sdk/tables/data-tables/src/TableServiceClient.ts +++ b/sdk/tables/data-tables/src/TableServiceClient.ts @@ -1,14 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { GeneratedClient } from "./generated/generatedClient"; -import { Service, Table } from "./generated"; -import { - ListTableItemsOptions, - TableItem, - TableQueryOptions, - TableServiceClientOptions -} from "./models"; +import "@azure/core-paging"; import { GetPropertiesResponse, GetStatisticsResponse, @@ -16,7 +9,13 @@ import { SetPropertiesOptions, SetPropertiesResponse } from "./generatedModels"; -import { getClientParamsFromConnectionString } from "./utils/connectionString"; +import { InternalClientPipelineOptions, OperationOptions } from "@azure/core-client"; +import { + ListTableItemsOptions, + TableItem, + TableQueryOptions, + TableServiceClientOptions +} from "./models"; import { NamedKeyCredential, SASCredential, @@ -25,20 +24,21 @@ import { isSASCredential, isTokenCredential } from "@azure/core-auth"; -import "@azure/core-paging"; -import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { STORAGE_SCOPE, TablesLoggingAllowedHeaderNames } from "./utils/constants"; -import { logger } from "./logger"; -import { InternalClientPipelineOptions, OperationOptions } from "@azure/core-client"; -import { SpanStatusCode } from "@azure/core-tracing"; -import { createSpan } from "./utils/tracing"; -import { tablesNamedKeyCredentialPolicy } from "./tablesNamedCredentialPolicy"; +import { Service, Table } from "./generated"; import { parseXML, stringifyXML } from "@azure/core-xml"; +import { GeneratedClient } from "./generated/generatedClient"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { Pipeline } from "@azure/core-rest-pipeline"; -import { isCredential } from "./utils/isCredential"; -import { tablesSASTokenPolicy } from "./tablesSASTokenPolicy"; +import { SpanStatusCode } from "@azure/core-tracing"; import { TableItemResultPage } from "./models"; +import { createSpan } from "./utils/tracing"; +import { getClientParamsFromConnectionString } from "./utils/connectionString"; import { handleTableAlreadyExists } from "./utils/errorHelpers"; +import { isCredential } from "./utils/isCredential"; +import { logger } from "./logger"; +import { tablesNamedKeyCredentialPolicy } from "./tablesNamedCredentialPolicy"; +import { tablesSASTokenPolicy } from "./tablesSASTokenPolicy"; /** * A TableServiceClient represents a Client to the Azure Tables service allowing you diff --git a/sdk/tables/data-tables/src/TableTransaction.ts b/sdk/tables/data-tables/src/TableTransaction.ts index 5ce885236e33..409fb6901c13 100644 --- a/sdk/tables/data-tables/src/TableTransaction.ts +++ b/sdk/tables/data-tables/src/TableTransaction.ts @@ -1,21 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { - Pipeline, - PipelineRequest, - PipelineResponse, - RestError, - createHttpHeaders, - createPipelineRequest -} from "@azure/core-rest-pipeline"; -import { - OperationOptions, - ServiceClient, - ServiceClientOptions, - serializationPolicy, - serializationPolicyName -} from "@azure/core-client"; import { DeleteTableEntityOptions, TableEntity, @@ -33,26 +18,41 @@ import { isSASCredential, isTokenCredential } from "@azure/core-auth"; -import { getAuthorizationHeader } from "./tablesNamedCredentialPolicy"; -import { TableClientLike } from "./utils/internalModels"; -import { createSpan } from "./utils/tracing"; -import { SpanStatusCode } from "@azure/core-tracing"; -import { TableServiceErrorOdataError } from "./generated"; -import { getTransactionHeaders } from "./utils/transactionHeaders"; +import { + OperationOptions, + ServiceClient, + ServiceClientOptions, + serializationPolicy, + serializationPolicyName +} from "@azure/core-client"; +import { + Pipeline, + PipelineRequest, + PipelineResponse, + RestError, + createHttpHeaders, + createPipelineRequest +} from "@azure/core-rest-pipeline"; import { getInitialTransactionBody, getTransactionHttpRequestBody } from "./utils/transactionHelpers"; -import { signURLWithSAS } from "./tablesSASTokenPolicy"; import { transactionHeaderFilterPolicy, transactionHeaderFilterPolicyName, transactionRequestAssemblePolicy, transactionRequestAssemblePolicyName } from "./TablePolicies"; -import { isCosmosEndpoint } from "./utils/isCosmosEndpoint"; -import { cosmosPatchPolicy } from "./cosmosPathPolicy"; import { STORAGE_SCOPE } from "./utils/constants"; +import { SpanStatusCode } from "@azure/core-tracing"; +import { TableClientLike } from "./utils/internalModels"; +import { TableServiceErrorOdataError } from "./generated"; +import { cosmosPatchPolicy } from "./cosmosPathPolicy"; +import { createSpan } from "./utils/tracing"; +import { getAuthorizationHeader } from "./tablesNamedCredentialPolicy"; +import { getTransactionHeaders } from "./utils/transactionHeaders"; +import { isCosmosEndpoint } from "./utils/isCosmosEndpoint"; +import { signURLWithSAS } from "./tablesSASTokenPolicy"; /** * Helper to build a list of transaction actions diff --git a/sdk/tables/data-tables/src/models.ts b/sdk/tables/data-tables/src/models.ts index fe71669b5dff..566de110c492 100644 --- a/sdk/tables/data-tables/src/models.ts +++ b/sdk/tables/data-tables/src/models.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { TableGetAccessPolicyHeaders, TableInsertEntityHeaders } from "./generated/models"; import { CommonClientOptions, OperationOptions } from "@azure/core-client"; +import { TableGetAccessPolicyHeaders, TableInsertEntityHeaders } from "./generated/models"; /** * Represents the Create or Delete Entity operation to be included in a Transaction request diff --git a/sdk/tables/data-tables/src/sas/accountSasSignatureValues.ts b/sdk/tables/data-tables/src/sas/accountSasSignatureValues.ts index fe20fc0011da..6d7f43ed4108 100644 --- a/sdk/tables/data-tables/src/sas/accountSasSignatureValues.ts +++ b/sdk/tables/data-tables/src/sas/accountSasSignatureValues.ts @@ -1,18 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { NamedKeyCredential } from "@azure/core-auth"; -import { computeHMACSHA256 } from "../utils/computeHMACSHA256"; -import { SERVICE_VERSION } from "../utils/constants"; -import { truncatedISO8061Date } from "../utils/truncateISO8061Date"; import { AccountSasPermissions, accountSasPermissionsToString } from "./accountSasPermissions"; +import { SasIPRange, ipRangeToString } from "./sasIPRange"; +import { SasProtocol, SasQueryParameters } from "./sasQueryParameters"; import { accountSasResourceTypesFromString, accountSasResourceTypesToString } from "./accountSasResourceTypes"; import { accountSasServicesFromString, accountSasServicesToString } from "./accountSasServices"; -import { SasIPRange, ipRangeToString } from "./sasIPRange"; -import { SasProtocol, SasQueryParameters } from "./sasQueryParameters"; +import { NamedKeyCredential } from "@azure/core-auth"; +import { SERVICE_VERSION } from "../utils/constants"; +import { computeHMACSHA256 } from "../utils/computeHMACSHA256"; +import { truncatedISO8061Date } from "../utils/truncateISO8061Date"; /** * ONLY AVAILABLE IN NODE.JS RUNTIME. diff --git a/sdk/tables/data-tables/src/sas/generateAccountSas.ts b/sdk/tables/data-tables/src/sas/generateAccountSas.ts index ace91f1b8346..84b855879429 100644 --- a/sdk/tables/data-tables/src/sas/generateAccountSas.ts +++ b/sdk/tables/data-tables/src/sas/generateAccountSas.ts @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { NamedKeyCredential, isNamedKeyCredential } from "@azure/core-auth"; import { AccountSasPermissions, accountSasPermissionsFromString } from "./accountSasPermissions"; import { AccountSasServices, accountSasServicesFromString, accountSasServicesToString } from "./accountSasServices"; -import { generateAccountSasQueryParameters } from "./accountSasSignatureValues"; +import { NamedKeyCredential, isNamedKeyCredential } from "@azure/core-auth"; import { SasIPRange } from "./sasIPRange"; import { SasProtocol } from "./sasQueryParameters"; +import { generateAccountSasQueryParameters } from "./accountSasSignatureValues"; /** * Generates a Table Account Shared Access Signature (SAS) URI based on the client properties diff --git a/sdk/tables/data-tables/src/sas/generateTableSas.ts b/sdk/tables/data-tables/src/sas/generateTableSas.ts index 92d271d54263..c580c13a1a77 100644 --- a/sdk/tables/data-tables/src/sas/generateTableSas.ts +++ b/sdk/tables/data-tables/src/sas/generateTableSas.ts @@ -2,11 +2,11 @@ // Licensed under the MIT license. import { NamedKeyCredential, isNamedKeyCredential } from "@azure/core-auth"; -import { tableSasPermissionsFromString } from "./tableSasPermisions"; import { TableSasSignatureValues, generateTableSasQueryParameters } from "./tableSasSignatureValues"; +import { tableSasPermissionsFromString } from "./tableSasPermisions"; /** * Generates a Table Service Shared Access Signature (SAS) URI based on the client properties diff --git a/sdk/tables/data-tables/src/sas/sasQueryParameters.ts b/sdk/tables/data-tables/src/sas/sasQueryParameters.ts index 6e1ee97d0fa0..cf52ca6b8751 100644 --- a/sdk/tables/data-tables/src/sas/sasQueryParameters.ts +++ b/sdk/tables/data-tables/src/sas/sasQueryParameters.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { truncatedISO8061Date } from "../utils/truncateISO8061Date"; -import { UserDelegationKey } from "./models"; import { SasIPRange, ipRangeToString } from "./sasIPRange"; +import { UserDelegationKey } from "./models"; +import { truncatedISO8061Date } from "../utils/truncateISO8061Date"; /** * Protocols for generated SAS. diff --git a/sdk/tables/data-tables/src/sas/tableSasSignatureValues.ts b/sdk/tables/data-tables/src/sas/tableSasSignatureValues.ts index b7e9582ddc4f..b9a6e3f7a505 100644 --- a/sdk/tables/data-tables/src/sas/tableSasSignatureValues.ts +++ b/sdk/tables/data-tables/src/sas/tableSasSignatureValues.ts @@ -7,13 +7,13 @@ * TableSASSignatureValues is used to help generating SAS tokens for tables. */ -import { NamedKeyCredential } from "@azure/core-auth"; -import { computeHMACSHA256 } from "../utils/computeHMACSHA256"; -import { SERVICE_VERSION } from "../utils/constants"; -import { truncatedISO8061Date } from "../utils/truncateISO8061Date"; import { SasIPRange, ipRangeToString } from "./sasIPRange"; import { SasProtocol, SasQueryParameters } from "./sasQueryParameters"; import { TableSasPermissions, tableSasPermissionsToString } from "./tableSasPermisions"; +import { NamedKeyCredential } from "@azure/core-auth"; +import { SERVICE_VERSION } from "../utils/constants"; +import { computeHMACSHA256 } from "../utils/computeHMACSHA256"; +import { truncatedISO8061Date } from "../utils/truncateISO8061Date"; /** * ONLY AVAILABLE IN NODE.JS RUNTIME. diff --git a/sdk/tables/data-tables/src/serialization.ts b/sdk/tables/data-tables/src/serialization.ts index e29930efbcf1..f4de0990139d 100644 --- a/sdk/tables/data-tables/src/serialization.ts +++ b/sdk/tables/data-tables/src/serialization.ts @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { base64Decode, base64Encode } from "./utils/bufferSerializer"; + import { EdmTypes, SignedIdentifier, TableEntityQueryOptions } from "./models"; -import { truncatedISO8061Date } from "./utils/truncateISO8061Date"; import { QueryOptions as GeneratedQueryOptions, SignedIdentifier as GeneratedSignedIdentifier } from "./generated/models"; +import { base64Decode, base64Encode } from "./utils/bufferSerializer"; +import { truncatedISO8061Date } from "./utils/truncateISO8061Date"; const propertyCaseMap: Map = new Map([ ["PartitionKey", "partitionKey"], diff --git a/sdk/tables/data-tables/src/tablesNamedCredentialPolicy.ts b/sdk/tables/data-tables/src/tablesNamedCredentialPolicy.ts index 0d31a823bca2..467c661db19d 100644 --- a/sdk/tables/data-tables/src/tablesNamedCredentialPolicy.ts +++ b/sdk/tables/data-tables/src/tablesNamedCredentialPolicy.ts @@ -7,8 +7,8 @@ import { PipelineResponse, SendRequest } from "@azure/core-rest-pipeline"; -import { NamedKeyCredential } from "@azure/core-auth"; import { HeaderConstants } from "./utils/constants"; +import { NamedKeyCredential } from "@azure/core-auth"; import { URL } from "./utils/url"; import { computeHMACSHA256 } from "./utils/computeHMACSHA256"; diff --git a/sdk/tables/data-tables/src/tablesSASTokenPolicy.ts b/sdk/tables/data-tables/src/tablesSASTokenPolicy.ts index 371ad6c9f281..51ae76337922 100644 --- a/sdk/tables/data-tables/src/tablesSASTokenPolicy.ts +++ b/sdk/tables/data-tables/src/tablesSASTokenPolicy.ts @@ -7,8 +7,8 @@ import { PipelineResponse, SendRequest } from "@azure/core-rest-pipeline"; -import { SASCredential } from "@azure/core-auth"; import { URL, URLSearchParams } from "./utils/url"; +import { SASCredential } from "@azure/core-auth"; /** * The programmatic identifier of the tablesSASTokenPolicy. diff --git a/sdk/tables/data-tables/src/utils/accountConnectionString.browser.ts b/sdk/tables/data-tables/src/utils/accountConnectionString.browser.ts index 629792dc47c2..b83ac46fb5ad 100644 --- a/sdk/tables/data-tables/src/utils/accountConnectionString.browser.ts +++ b/sdk/tables/data-tables/src/utils/accountConnectionString.browser.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { TableServiceClientOptions } from ".."; import { ConnectionString } from "./internalModels"; +import { TableServiceClientOptions } from ".."; /** * Gets client parameters from an Account Connection String diff --git a/sdk/tables/data-tables/src/utils/accountConnectionString.ts b/sdk/tables/data-tables/src/utils/accountConnectionString.ts index 34fb860b4877..a041ecbe695e 100644 --- a/sdk/tables/data-tables/src/utils/accountConnectionString.ts +++ b/sdk/tables/data-tables/src/utils/accountConnectionString.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { TableServiceClientOptions } from ".."; import { ClientParamsFromConnectionString, ConnectionString } from "./internalModels"; import { AzureNamedKeyCredential } from "@azure/core-auth"; +import { TableServiceClientOptions } from ".."; /** * Gets client parameters from an Account Connection String diff --git a/sdk/tables/data-tables/src/utils/connectionString.ts b/sdk/tables/data-tables/src/utils/connectionString.ts index 2d333eb924f7..1b8d99e3426a 100644 --- a/sdk/tables/data-tables/src/utils/connectionString.ts +++ b/sdk/tables/data-tables/src/utils/connectionString.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { TableServiceClientOptions } from "../models"; -import { fromAccountConnectionString, getAccountConnectionString } from "./accountConnectionString"; import { ClientParamsFromConnectionString, ConnectionString } from "./internalModels"; +import { fromAccountConnectionString, getAccountConnectionString } from "./accountConnectionString"; +import { TableServiceClientOptions } from "../models"; import { URL } from "./url"; const DevelopmentConnectionString = diff --git a/sdk/tables/data-tables/src/utils/errorHelpers.ts b/sdk/tables/data-tables/src/utils/errorHelpers.ts index ae32d44d1e3a..2f490119e291 100644 --- a/sdk/tables/data-tables/src/utils/errorHelpers.ts +++ b/sdk/tables/data-tables/src/utils/errorHelpers.ts @@ -3,8 +3,8 @@ import { OperationOptions, OperationRequest } from "@azure/core-client"; import { PipelineResponse, RestError } from "@azure/core-rest-pipeline"; -import { SpanStatusCode } from "@azure/core-tracing"; import { AzureLogger } from "@azure/logger"; +import { SpanStatusCode } from "@azure/core-tracing"; import { TableServiceError } from "../generated"; export type TableServiceErrorResponse = PipelineResponse & { diff --git a/sdk/tables/data-tables/src/utils/internalModels.ts b/sdk/tables/data-tables/src/utils/internalModels.ts index 5b817a6b245a..7dc9b14b9197 100644 --- a/sdk/tables/data-tables/src/utils/internalModels.ts +++ b/sdk/tables/data-tables/src/utils/internalModels.ts @@ -16,11 +16,11 @@ import { UpdateMode, UpdateTableEntityOptions } from "../models"; +import { DeleteTableEntityResponse, UpdateEntityResponse, UpsertEntityResponse } from ".."; import { Pipeline, PipelineRequest } from "@azure/core-rest-pipeline"; import { NamedKeyCredential } from "@azure/core-auth"; -import { DeleteTableEntityResponse, UpdateEntityResponse, UpsertEntityResponse } from ".."; -import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { OperationOptions } from "@azure/core-client"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; export interface ConnectionString { kind: "AccountConnString" | "SASConnString"; diff --git a/sdk/tables/data-tables/test/internal/odata.spec.ts b/sdk/tables/data-tables/test/internal/odata.spec.ts index 764affe4d9b2..ce80ae4e87ea 100644 --- a/sdk/tables/data-tables/test/internal/odata.spec.ts +++ b/sdk/tables/data-tables/test/internal/odata.spec.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { odata } from "../../src"; import { assert } from "chai"; +import { odata } from "../../src"; describe("odata", () => { it("should handle empty string", () => { diff --git a/sdk/tables/data-tables/test/internal/serialization.spec.ts b/sdk/tables/data-tables/test/internal/serialization.spec.ts index 1faa0ead4452..ed3222f10688 100644 --- a/sdk/tables/data-tables/test/internal/serialization.spec.ts +++ b/sdk/tables/data-tables/test/internal/serialization.spec.ts @@ -1,15 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "chai"; - -import { Edm } from "../../src"; import { deserialize, deserializeSignedIdentifier, serialize, serializeSignedIdentifiers } from "../../src/serialization"; +import { Edm } from "../../src"; +import { assert } from "chai"; import { isNode8 } from "@azure/test-utils"; interface Entity { diff --git a/sdk/tables/data-tables/test/internal/sharedKeyCredential.spec.ts b/sdk/tables/data-tables/test/internal/sharedKeyCredential.spec.ts index 9b29303cc28f..c73e4f232a2a 100644 --- a/sdk/tables/data-tables/test/internal/sharedKeyCredential.spec.ts +++ b/sdk/tables/data-tables/test/internal/sharedKeyCredential.spec.ts @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { Context } from "mocha"; import { PipelineRequest, PipelineResponse, @@ -9,12 +8,12 @@ import { createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline"; -import { isNode } from "@azure/test-utils"; -import { assert } from "chai"; - -import { tablesNamedKeyCredentialPolicy } from "../../src/tablesNamedCredentialPolicy"; import { AzureNamedKeyCredential } from "@azure/core-auth"; +import { Context } from "mocha"; +import { assert } from "chai"; import { expectedSharedKeyLiteHeader } from "./fakeTestSecrets"; +import { isNode } from "@azure/test-utils"; +import { tablesNamedKeyCredentialPolicy } from "../../src/tablesNamedCredentialPolicy"; describe("TablesSharedKeyCredential", () => { let originalToUTCString: () => string; diff --git a/sdk/tables/data-tables/test/internal/tableTransaction.spec.ts b/sdk/tables/data-tables/test/internal/tableTransaction.spec.ts index 708a6aaf6cf4..e0d3ecd40142 100644 --- a/sdk/tables/data-tables/test/internal/tableTransaction.spec.ts +++ b/sdk/tables/data-tables/test/internal/tableTransaction.spec.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "chai"; -import { parseTransactionResponse } from "../../src/TableTransaction"; import { PipelineResponse, createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline"; +import { assert } from "chai"; +import { parseTransactionResponse } from "../../src/TableTransaction"; describe("TableTransaction", () => { describe("parseTransactionResponse", () => { diff --git a/sdk/tables/data-tables/test/internal/utils.spec.ts b/sdk/tables/data-tables/test/internal/utils.spec.ts index 37b49cbcc676..9b963374fa88 100644 --- a/sdk/tables/data-tables/test/internal/utils.spec.ts +++ b/sdk/tables/data-tables/test/internal/utils.spec.ts @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { extractConnectionStringParts } from "../../src/utils/connectionString"; -import { Context } from "mocha"; import { base64Decode, base64Encode } from "../../src/utils/bufferSerializer"; -import { isNode } from "@azure/test-utils"; -import { assert } from "chai"; import { ConnectionString } from "../../src/utils/internalModels"; +import { Context } from "mocha"; +import { assert } from "chai"; +import { extractConnectionStringParts } from "../../src/utils/connectionString"; +import { isNode } from "@azure/test-utils"; describe("Utility Helpers", () => { describe("extractConnectionStringParts", () => { diff --git a/sdk/tables/data-tables/test/public/accessPolicy.spec.ts b/sdk/tables/data-tables/test/public/accessPolicy.spec.ts index 4d6b8d40171e..d1f64c78d0e1 100644 --- a/sdk/tables/data-tables/test/public/accessPolicy.spec.ts +++ b/sdk/tables/data-tables/test/public/accessPolicy.spec.ts @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { TableClient } from "../../src"; -import { Context } from "mocha"; import { Recorder, isPlaybackMode, record } from "@azure-tools/test-recorder"; import { createTableClient, recordedEnvironmentSetup } from "./utils/recordedClient"; -import { isNode } from "@azure/test-utils"; +import { Context } from "mocha"; +import { TableClient } from "../../src"; import { assert } from "chai"; +import { isNode } from "@azure/test-utils"; describe(`Access Policy operations`, () => { let client: TableClient; diff --git a/sdk/tables/data-tables/test/public/createTable.spec.ts b/sdk/tables/data-tables/test/public/createTable.spec.ts index 18a7b4e36d56..7edeb168b9d6 100644 --- a/sdk/tables/data-tables/test/public/createTable.spec.ts +++ b/sdk/tables/data-tables/test/public/createTable.spec.ts @@ -2,11 +2,11 @@ // Licensed under the MIT license. import { RestError, TableClient, TableServiceClient } from "../../src"; +import { createTableClient, createTableServiceClient } from "./utils/recordedClient"; import { Context } from "mocha"; +import { TableServiceErrorResponse } from "../../src/utils/errorHelpers"; import { assert } from "chai"; -import { createTableClient, createTableServiceClient } from "./utils/recordedClient"; import { createHttpHeaders } from "@azure/core-rest-pipeline"; -import { TableServiceErrorResponse } from "../../src/utils/errorHelpers"; describe("TableClient CreationHandling", () => { let client: TableClient; diff --git a/sdk/tables/data-tables/test/public/specialCharacters.spec.ts b/sdk/tables/data-tables/test/public/specialCharacters.spec.ts index 3fa0a146d4e3..6b0f8e6219b8 100644 --- a/sdk/tables/data-tables/test/public/specialCharacters.spec.ts +++ b/sdk/tables/data-tables/test/public/specialCharacters.spec.ts @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { Recorder, isLiveMode, record } from "@azure-tools/test-recorder"; import { TableClient, TableEntityResult, TransactionAction, odata } from "../../src"; -import { assert } from "chai"; import { createTableClient, recordedEnvironmentSetup } from "./utils/recordedClient"; -import { isNode } from "@azure/test-utils"; -import { Recorder, isLiveMode, record } from "@azure-tools/test-recorder"; import { Context } from "mocha"; +import { assert } from "chai"; +import { isNode } from "@azure/test-utils"; describe("SpecialCharacters", function() { before(function(this: Context) { diff --git a/sdk/tables/data-tables/test/public/tableclient.spec.ts b/sdk/tables/data-tables/test/public/tableclient.spec.ts index 677b96c27b5f..359cc9b16b3c 100644 --- a/sdk/tables/data-tables/test/public/tableclient.spec.ts +++ b/sdk/tables/data-tables/test/public/tableclient.spec.ts @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { Edm, TableClient, TableEntity, TableEntityResult, odata } from "../../src"; -import { Context } from "mocha"; -import { assert } from "chai"; -import { Recorder, isLiveMode, isPlaybackMode, record } from "@azure-tools/test-recorder"; import { CreateClientMode, createTableClient, recordedEnvironmentSetup } from "./utils/recordedClient"; +import { Edm, TableClient, TableEntity, TableEntityResult, odata } from "../../src"; +import { Recorder, isLiveMode, isPlaybackMode, record } from "@azure-tools/test-recorder"; import { isNode, isNode8 } from "@azure/test-utils"; +import { Context } from "mocha"; import { FullOperationResponse } from "@azure/core-client"; +import { assert } from "chai"; // SASConnectionString and SASToken are supported in both node and browser const authModes: CreateClientMode[] = ["TokenCredential", "SASConnectionString"]; diff --git a/sdk/tables/data-tables/test/public/tableserviceclient.spec.ts b/sdk/tables/data-tables/test/public/tableserviceclient.spec.ts index d9d88e3d3736..b099425a878b 100644 --- a/sdk/tables/data-tables/test/public/tableserviceclient.spec.ts +++ b/sdk/tables/data-tables/test/public/tableserviceclient.spec.ts @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { TableItem, TableItemResultPage, TableServiceClient } from "../../src"; -import { Context } from "mocha"; -import { Recorder, isLiveMode, isPlaybackMode, record } from "@azure-tools/test-recorder"; import { CreateClientMode, createTableServiceClient, recordedEnvironmentSetup } from "./utils/recordedClient"; -import { isNode } from "@azure/test-utils"; -import { assert } from "chai"; +import { Recorder, isLiveMode, isPlaybackMode, record } from "@azure-tools/test-recorder"; +import { TableItem, TableItemResultPage, TableServiceClient } from "../../src"; +import { Context } from "mocha"; import { FullOperationResponse } from "@azure/core-client"; +import { assert } from "chai"; +import { isNode } from "@azure/test-utils"; // SASConnectionString and SASToken are supported in both node and browser const authModes: CreateClientMode[] = ["TokenCredential", "SASConnectionString"]; diff --git a/sdk/tables/data-tables/test/public/transaction.spec.ts b/sdk/tables/data-tables/test/public/transaction.spec.ts index 830ddfd9dc9e..a86ef1269bb6 100644 --- a/sdk/tables/data-tables/test/public/transaction.spec.ts +++ b/sdk/tables/data-tables/test/public/transaction.spec.ts @@ -1,18 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { TableClient, TableTransaction, TransactionAction, odata } from "../../src"; -import { Context } from "mocha"; -import { assert } from "chai"; -import { Recorder, isLiveMode, isPlaybackMode, record } from "@azure-tools/test-recorder"; +import * as sinon from "sinon"; import { CreateClientMode, createTableClient, recordedEnvironmentSetup } from "./utils/recordedClient"; -import { isNode } from "@azure/test-utils"; +import { Recorder, isLiveMode, isPlaybackMode, record } from "@azure-tools/test-recorder"; +import { TableClient, TableTransaction, TransactionAction, odata } from "../../src"; +import { Context } from "mocha"; import { Uuid } from "../../src/utils/uuid"; -import * as sinon from "sinon"; +import { assert } from "chai"; +import { isNode } from "@azure/test-utils"; // SASConnectionString and SASToken are supported in both node and browser const authModes: CreateClientMode[] = ["TokenCredential", "SASConnectionString"]; diff --git a/sdk/tables/data-tables/test/public/utils/recordedClient.ts b/sdk/tables/data-tables/test/public/utils/recordedClient.ts index fd7353206598..d5e953887116 100644 --- a/sdk/tables/data-tables/test/public/utils/recordedClient.ts +++ b/sdk/tables/data-tables/test/public/utils/recordedClient.ts @@ -1,13 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import "./env"; +import { AzureNamedKeyCredential, AzureSASCredential } from "@azure/core-auth"; import { RecorderEnvironmentSetup, env } from "@azure-tools/test-recorder"; - -import { ClientSecretCredential } from "@azure/identity"; import { TableClient, TableServiceClient } from "../../../src"; -import { AzureNamedKeyCredential, AzureSASCredential } from "@azure/core-auth"; - -import "./env"; +import { ClientSecretCredential } from "@azure/identity"; const mockAccountName = "fakeaccount"; const mockAccountKey = "fakeKey";