From 2945f6b2a3964362d2f417f17e3a33e1bb9388d0 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 17 Jul 2024 03:16:45 -0400 Subject: [PATCH] Spelling (#2424) * spelling: account Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: actually Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: annotation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: audience Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: authentication Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: azurite Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: because Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: behavior Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: binary Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: breakperiod Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: calculate Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: calling Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: case-insensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: case-sensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: committed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: conflict Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: conflicting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: container Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: corresponding Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: count Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: currently Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: daemon Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: datetime Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: definition Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: delete Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: deliberately Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: deserializer Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: disable Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: doesn't Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: earlier Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: entities Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: expiry Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: expression Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: fine-grained Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: functions Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: granularity Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: identifier Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: ignore Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: immediately Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: initialization Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: internal Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: invalid Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: its Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: javascript Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: local Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: maxresults Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: merged Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: message Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: metadata Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: multiple Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: nonexistent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: nonexistentcontainer Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: odataid Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: opened Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: origin Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: overlap Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: overridden Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: parameters Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: partition Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: payload Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: permission Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: pipeline Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: precondition Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: prettier Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: request Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: response Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: result Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: retrieve Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: return Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: separately Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: service Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: size Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: snapshot Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: specified Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: support Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: table Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: typescript Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: uncommitted Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: unmatchedetag Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: uri Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: variable Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: version Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: was Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: with Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --------- Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: Wei Wei --- BreakingChanges.md | 4 +- CONTRIBUTION.md | 2 +- ChangeLog.md | 32 ++++++++-------- README.mcr.md | 6 +-- README.md | 22 +++++------ azure-pipelines.yml | 14 +++---- src/blob/BlobEnvironment.ts | 6 +-- src/blob/BlobRequestListenerFactory.ts | 2 +- .../BlobSharedKeyAuthenticator.ts | 2 +- .../authentication/BlobTokenAuthenticator.ts | 2 +- .../OperationAccountSASPermission.ts | 6 +-- .../conditions/ConditionResourceAdapter.ts | 4 +- .../ReadConditionalHeadersValidator.ts | 4 +- .../WriteConditionalHeadersValidator.ts | 4 +- src/blob/errors/StorageErrorFactory.ts | 6 +-- src/blob/handlers/BlobBatchHandler.ts | 4 +- src/blob/handlers/BlockBlobHandler.ts | 2 +- src/blob/handlers/ServiceHandler.ts | 2 +- .../blobStorageContext.middleware.ts | 6 +-- src/blob/persistence/LokiBlobMetadataStore.ts | 16 ++++---- src/blob/persistence/SqlBlobMetadataStore.ts | 2 +- src/common/Environment.ts | 6 +-- src/common/persistence/IExtentMetadata.ts | 2 +- src/common/utils/constants.ts | 2 +- src/common/utils/utils.ts | 2 +- src/queue/QueueEnvironment.ts | 6 +-- .../authentication/QueueSASAuthenticator.ts | 2 +- .../QueueSharedKeyAuthenticator.ts | 2 +- .../authentication/QueueTokenAuthenticator.ts | 2 +- src/queue/errors/StorageErrorFactory.ts | 15 +------- src/queue/handlers/MessageIdHandler.ts | 2 +- src/queue/handlers/MessagesHandler.ts | 2 +- src/queue/handlers/QueueHandler.ts | 2 +- src/queue/handlers/ServiceHandler.ts | 14 +++---- .../persistence/LokiQueueMetadataStore.ts | 6 +-- src/queue/utils/constants.ts | 4 +- src/queue/utils/utils.ts | 2 +- src/table/ITableEnvironment.ts | 2 +- src/table/TableEnvironment.ts | 6 +-- .../TableSharedKeyAuthenticator.ts | 2 +- .../TableSharedKeyLiteAuthenticator.ts | 2 +- .../authentication/TableTokenAuthenticator.ts | 2 +- src/table/batch/BatchErrorConstants.ts | 2 +- src/table/batch/BatchRequest.ts | 4 +- src/table/batch/TableBatchOrchestrator.ts | 8 ++-- src/table/batch/TableBatchSerialization.ts | 38 +++++++++---------- src/table/entity/EntityProperty.ts | 2 +- src/table/errors/StorageError.ts | 10 ++--- src/table/errors/StorageErrorFactory.ts | 2 +- src/table/handlers/ServiceHandler.ts | 2 +- src/table/handlers/TableHandler.ts | 2 +- src/table/persistence/ITableMetadataStore.ts | 2 +- .../persistence/LokiTableMetadataStore.ts | 34 ++++++++--------- src/table/utils/constants.ts | 2 +- swagger/queue.md | 2 +- .../OPTIONSRequestPolicyFactory.ts | 18 ++++----- .../QueryRequestPolicyFactory.ts | 2 +- tests/blob/apis/blob.test.ts | 10 ++--- tests/blob/apis/blockblob.test.ts | 14 +++---- tests/blob/apis/container.test.ts | 8 ++-- tests/blob/apis/pageblob.test.ts | 6 +-- tests/blob/apis/service.test.ts | 4 +- tests/blob/blobCorsRequest.test.ts | 24 ++++++------ tests/blob/conditions.test.ts | 14 +++---- tests/blob/oauth.test.ts | 2 +- tests/blob/sas.test.ts | 2 +- tests/exe.test.ts | 2 +- tests/linuxbinary.test.ts | 2 +- .../OPTIONSRequestPolicyFactory.ts | 18 ++++----- tests/queue/queueCorsRequest.test.ts | 24 ++++++------ tests/queue/queueSpecialnaming.test.ts | 8 ++-- .../RequestPolicy/OPTIONSRequestPolicy.ts | 10 ++--- ...le.entity.apostrophe.azure-storage.test.ts | 2 +- .../table.entity.azure.data-tables.test.ts | 6 +-- tests/table/apis/table.entity.issues.test.ts | 2 +- tests/table/apis/table.entity.rest.test.ts | 6 +-- tests/table/apis/table.test.ts | 2 +- tests/table/auth/tableCorsRequest.test.ts | 2 +- tests/table/go/main.go | 2 +- tests/table/unit/deserialization.unit.test.ts | 2 +- .../mock.request.serialization.strings.ts | 12 +++--- .../mock.response.serialization.strings.ts | 4 +- ...mock.serialization.batchrequest.factory.ts | 2 +- .../table/unit/query.interpreter.unit.test.ts | 4 +- tests/table/unit/query.parser.unit.test.ts | 2 +- tests/table/unit/serialization.unit.test.ts | 2 +- tests/table/utils/table.entity.test.utils.ts | 4 +- 87 files changed, 277 insertions(+), 288 deletions(-) diff --git a/BreakingChanges.md b/BreakingChanges.md index ba651f3b5..375baccc2 100644 --- a/BreakingChanges.md +++ b/BreakingChanges.md @@ -10,8 +10,8 @@ ## 2021.9 Version 3.14.2 -- [Breaking] Remove the support of DNS name with mutiple blocks but without accout name, like "http://foo.bar.com:10000/devstoreaccount1/container". - - When use DNS name with mutiple blocks, storage account name must be in the first block, like "http://devstoreaccount1.blob.localhost:10000/container" +- [Breaking] Remove the support of DNS name with multiple blocks but without account name, like "http://foo.bar.com:10000/devstoreaccount1/container". + - When use DNS name with multiple blocks, storage account name must be in the first block, like "http://devstoreaccount1.blob.localhost:10000/container" ## 2019.12 Version 3.4.0 diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index f34da77a3..e22217373 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -51,7 +51,7 @@ Select and start Visual Studio Code debug configuration "Run Extension". For every newly implemented REST API and handler, there should be at least coverage from 1 unit / integration test case. -We also provide a predefined Visual Studio Code debug configuration "Current Mocha", allowing you to execute mocha tests within the currently opended file. +We also provide a predefined Visual Studio Code debug configuration "Current Mocha", allowing you to execute mocha tests within the currently opened file. Or manually execute all test cases: diff --git a/ChangeLog.md b/ChangeLog.md index 5c339687c..0fc1d2323 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -104,7 +104,7 @@ Table: General: -- Updated examples of setting Customized Storage Accounts & Keys in enviroment varialbe. +- Updated examples of setting Customized Storage Accounts & Keys in enviroment variable. - Bump up service API version to 2023-08-03 Blob: @@ -143,7 +143,7 @@ General: Blob: -- Fixed issue of: blob batch subresponse is slightly different from the on from Azure serivce, which causes exception in CPP SDK. +- Fixed issue of: blob batch subresponse is slightly different from the on from Azure service, which causes exception in CPP SDK. - Fixed issue of: setMetadata API allows invalid metadata name with hyphen. - Supported rest API GetBlobTag, SetBlobTag. - Supported set Blob Tags in upload blob, copy blob. @@ -162,7 +162,7 @@ General: - Return 404 StatusCode when Storage account not exist - Migrated tslint to eslint. -- Typescript upgraded from 4.2.4 to 4.9.5. +- TypeScript upgraded from 4.2.4 to 4.9.5. - Migrated test pipeline from Node.js 10/12 to Node.js 14/16/18. - Bump up service API version to 2022-11-02 @@ -248,7 +248,7 @@ General: Table: -- Correctly responds with status 202 on merge with non-existent entity. +- Correctly responds with status 202 on merge with nonexistent entity. - Properly differentiate between upsert and update in batch merge and replace. - Added additional tests via raw REST tests. - Correctly deletes a table that is a substring of another table. @@ -260,7 +260,7 @@ Table: General: - Bump up service API version to 2021-08-06 -- Modified the error messge for invalid API version to make it more actionable. +- Modified the error message for invalid API version to make it more actionable. Blob: @@ -291,7 +291,7 @@ General: Table: - Fixed empty partition key and row key handling in batch write operations. -- Fixed batch reponse for Go SDK, includes additional CRLF on closure of changesetresponse section. +- Fixed batch response for Go SDK, includes additional CRLF on closure of changesetresponse section. - Removed query strings from Location and DataServiceId batch response headers. - Modified the deserialization of batch request for case that a raw / not url encoded % is present in the body. - Added additional tests and checks for table names on creation. @@ -310,7 +310,7 @@ General: Blob: -- Fixed issue that startCopyFromURL and copyFromURL API not respect `--disableProductStyleUrl` parameter in parse source Uri. +- Fixed issue that startCopyFromURL and copyFromURL API not respect `--disableProductStyleUrl` parameter in parse source URI. Queue: @@ -338,7 +338,7 @@ Table: General: - Bump up service API version to 2021-02-12 -- Fixed access to secondary location with IP style Uri from JS/.net SDK failure. +- Fixed access to secondary location with IP style URI from JS/.net SDK failure. - Fixed an issue in Visual Studio Code extension, by changing the Location with relative path, from base on Visual Studio Code installation path, to base on the current opened workspace folder. Blob: @@ -349,17 +349,17 @@ Blob: General: -- Added new parameter `--disableProductStyleUrl`, to force parsing storage account from request Uri path, instead of from request Uri host. +- Added new parameter `--disableProductStyleUrl`, to force parsing storage account from request URI path, instead of from request URI host. - Restored ability to connect to host.docker.internal. Blob: -- Fixed list blob API "include" query parameter not work when not lower case, by make it case insensitive. +- Fixed list blob API "include" query parameter not work when not lower case, by make it case-insensitive. - Supported list container/blob with "include" query parameter as empty string. - Added more allowed value to list blob request "include" query parameter:'tags', 'versions', 'deletedwithversions', 'immutabilitypolicy', 'legalhold', 'permissions'. - Added more allowed value to list container request "include" query parameter: 'deleted'. - Raised 416 when start range is bigger than blob length. -- Fixed issue that duplicated decode rscd, rsce, rscl and rsct of SAS token in input request Uri. +- Fixed issue that duplicated decode rscd, rsce, rscl and rsct of SAS token in input request URI. Queue: @@ -367,7 +367,7 @@ Queue: Table: -- Supported basic level of OAuth autentication on Table service. +- Supported basic level of OAuth authentication on Table service. - Removed extra CRLF from batch transaction response which caused issues for Microsoft.Azure.Cosmos.Table NuGet package. Table: @@ -426,7 +426,7 @@ Table: Blob: -- Fixed list containers, get service properties or account properties API failure, when request Uri has a suffix '/' after account name. +- Fixed list containers, get service properties or account properties API failure, when request URI has a suffix '/' after account name. - Fixed get system container failure. ## 2021.6 Version 3.13.0 @@ -458,7 +458,7 @@ Table: - Preview of Table Service in npm package and docker image. (Visual Studio Code extension doesn't support Table Service in this release) - Allow empty RowKey in an entity. - Fix etag format to be aligned with Azure server. -- Fix delet none exist table error code and error message, to be aligned with Azure server. +- Fix delete nonexistent table error code and error message, to be aligned with Azure server. - Convert entity properties with type "Edm.DateTime" to UTC time, to be aligned with Azure server. - Support Batch API. - Allow complex RowKey and PartitionKey in batch API. @@ -502,7 +502,7 @@ Blob: - Add support for async copy blobs on sql metadata store. - Add support for blob syncCopyFromURL within same Azurite instance on loki metadata store. - Allow mixed case characters for blob metadata prefix. -- Fix SqlBlobMetadataStore.getBlockList, to make it fail for non-existent blobs. +- Fix SqlBlobMetadataStore.getBlockList, to make it fail for nonexistent blobs. ## 2020.07 Version 3.8.0 @@ -515,7 +515,7 @@ Blob: ## 2020.04 Version 3.7.0 - Supported HTTPS endpoint. Specific parameter `azurite --cert server.cert --key server.key` to enable HTTPS mode. -- Supported basic level of OAuth autentication. Specific parameter `azurite --oauth basic` to enable OAuth autentication. +- Supported basic level of OAuth authentication. Specific parameter `azurite --oauth basic` to enable OAuth authentication. Blob: diff --git a/README.mcr.md b/README.mcr.md index 531c4cfd1..f9275a60e 100644 --- a/README.mcr.md +++ b/README.mcr.md @@ -30,7 +30,7 @@ Just run blob service: docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite azurite-blob --blobHost 0.0.0.0 ``` -Run the image as a service (`-d` = deamon) named `azurite` and restart unless specifically stopped (this is useful when re-starting your development machine for example) +Run the image as a service (`-d` = daemon) named `azurite` and restart unless specifically stopped (this is useful when re-starting your development machine for example) ```bash docker run --name azurite -d --restart unless-stopped -p 10000:10000 -p 10001:10001 -p 10002:10002 mcr.microsoft.com/azure-storage/azurite @@ -72,9 +72,9 @@ Above command will try to start Azurite image with configurations: `--skipApiVersionCheck` skip the request API version check. -`--disableProductStyleUrl` force parsing storage account name from request Uri path, instead of from request Uri host. +`--disableProductStyleUrl` force parsing storage account name from request URI path, instead of from request URI host. -> If you use customized azurite paramters for docker image, `--blobHost 0.0.0.0`, `--queueHost 0.0.0.0` are required parameters. +> If you use customized azurite parameters for docker image, `--blobHost 0.0.0.0`, `--queueHost 0.0.0.0` are required parameters. > In above sample, you need to use **double first forward slash** for location and debug path parameters to avoid a [known issue](https://stackoverflow.com/questions/48427366/docker-build-command-add-c-program-files-git-to-the-path-passed-as-build-argu) for Git on Windows. diff --git a/README.md b/README.md index 822d4464a..7b5633bf2 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ Following extension configurations are supported: - `azurite.pwd` PFX cert password. Required when `azurite.cert` points to a PFX file. - `azurite.oauth` OAuth oauthentication level. Candidate level values: `basic`. - `azurite.skipApiVersionCheck` Skip the request API version check, by default false. -- `azurite.disableProductStyleUrl` Force parsing storage account name from request Uri path, instead of from request Uri host. +- `azurite.disableProductStyleUrl` Force parsing storage account name from request URI path, instead of from request URI host. - `azurite.inMemoryPersistence` Disable persisting any data to disk. If the Azurite process is terminated, all data is lost. - `azurite.extentMemoryLimit` When using in-memory persistence, limit the total size of extents (blob and queue content) to a specific number of megabytes. This does not limit blob, queue, or table metadata. Defaults to 50% of total memory. @@ -259,7 +259,7 @@ Above command will try to start Azurite image with configurations: `--skipApiVersionCheck` skip the request API version check. -`--disableProductStyleUrl` force parsing storage account name from request Uri path, instead of from request Uri host. +`--disableProductStyleUrl` force parsing storage account name from request URI path, instead of from request URI host. > If you use customized azurite parameters for docker image, `--blobHost 0.0.0.0`, `--queueHost 0.0.0.0` are required parameters. @@ -390,13 +390,13 @@ Optional. By default Azurite will listen on HTTP protocol. Provide a PEM or PFX --cert path/server.pem ``` -When `--cert` is provided for a PEM file, must provide coresponding `--key`. +When `--cert` is provided for a PEM file, must provide corresponding `--key`. ```cmd --key path/key.pem ``` -When `--cert` is provided for a PFX file, must provide coresponding `--pwd` +When `--cert` is provided for a PFX file, must provide corresponding `--pwd` ```cmd --pwd pfxpassword @@ -428,7 +428,7 @@ Optional. By default Azurite will check the request API version is valid API ver ### Disable Product Style Url -Optional. When using FQDN instead of IP in request Uri host, by default Azurite will parse storage account name from request Uri host. Force parsing storage account name from request Uri path by: +Optional. When using FQDN instead of IP in request URI host, by default Azurite will parse storage account name from request URI host. Force parsing storage account name from request URI path by: ```cmd --disableProductStyleUrl @@ -807,10 +807,10 @@ Following files or folders may be created when initializing Azurite in selected - `azurite_db_blob.json` Metadata file used by Azurite blob service. (No when starting Azurite against external database) - `azurite_db_blob_extent.json` Extent metadata file used by Azurite blob service. (No when starting Azurite against external database) -- `blobstorage` Persisted bindary data by Azurite blob service. +- `blobstorage` Persisted binary data by Azurite blob service. - `azurite_db_queue.json` Metadata file used by Azurite queue service. (No when starting Azurite against external database) - `azurite_db_queue_extent.json` Extent metadata file used by Azurite queue service. (No when starting Azurite against external database) -- `queuestorage` Persisted bindary data by Azurite queue service. +- `queuestorage` Persisted binary data by Azurite queue service. - `azurite_db_table.json` Metadata file used by Azurite table service. > Note. Delete above files and folders and restart Azurite to clean up Azurite. It will remove all data stored in Azurite!! @@ -827,7 +827,7 @@ Optionally, you could modify your hosts file, to access accounts with production ### Endpoint & Connection URL -The service endpoints for Azurite are different from those of an Azure storage account. The difference is because Azuite runs on local computer, and normally, no DNS resolves address to local. +The service endpoints for Azurite are different from those of an Azure storage account. The difference is because Azurite runs on local computer, and normally, no DNS resolves address to local. When you address a resource in an Azure storage account, use the following scheme. The account name is part of the URI host name, and the resource being addressed is part of the URI path: @@ -843,7 +843,7 @@ https://myaccount.blob.core.windows.net/mycontainer/myblob.txt #### IP-style URL -However, because Azuite runs on local computer, it use IP-style URI by default, and the account name is part of the URI path instead of the host name. Use the following URI format for a resource in Azurite: +However, because Azurite runs on local computer, it use IP-style URI by default, and the account name is part of the URI path instead of the host name. Use the following URI format for a resource in Azurite: ``` http://:// @@ -893,7 +893,7 @@ DefaultEndpointsProtocol=http;AccountName=account1;AccountKey=key1;BlobEndpoint= > Note. When use Production-style URL to access Azurite, by default the account name should be the host name in FQDN, like "". To use Production-style URL with account name in URL path, like "", please start Azurite with `--disableProductStyleUrl`. -> Note. If use "host.docker.internal" as request Uri host, like "", Azurite will always get account name from request Uri path, not matter Azurite start with `--disableProductStyleUrl` or not. +> Note. If use "host.docker.internal" as request URI host, like "", Azurite will always get account name from request URI path, not matter Azurite start with `--disableProductStyleUrl` or not. ### Scalability & Performance @@ -952,7 +952,7 @@ Azurite V3 leverages a TypeScript server code generator based on Azure Storage R ### TypeScript -Azurite V3 selected TypeScript as its' programming language, as this facilitates broad collaboration, whilst also ensuring quality. +Azurite V3 selected TypeScript as its programming language, as this facilitates broad collaboration, whilst also ensuring quality. ### Features Scope diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 26ed48da7..8e192fa02 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -283,7 +283,7 @@ jobs: vmImage: "ubuntu-latest" strategy: matrix: - # Table tests no longer suport older node versions + # Table tests no longer support older node versions node_14_x: node_version: 14.x node_16_x: @@ -317,7 +317,7 @@ jobs: vmImage: "windows-latest" strategy: matrix: - # Table tests no longer suport older node versions + # Table tests no longer support older node versions node_14_x: node_version: 14.x node_16_x: @@ -351,7 +351,7 @@ jobs: vmImage: "macOS-latest" strategy: matrix: - # Table tests no longer suport older node versions + # Table tests no longer support older node versions node_16_x: node_version: 16.x node_18_x: @@ -385,8 +385,8 @@ jobs: vmImage: "ubuntu-latest" strategy: matrix: - # Table tests no longer suport older node versions - # skip node 14 Azurite install test, since it has issue iwth new npm, which is not azurite issue. + # Table tests no longer support older node versions + # skip node 14 Azurite install test, since it has issue with new npm, which is not azurite issue. # Track with https://github.com/Azure/Azurite/issues/1550. Will add node 14 back later when the issue resolved. #node_14_x: # node_version: 14.x @@ -435,7 +435,7 @@ jobs: vmImage: "windows-latest" strategy: matrix: - # Table tests no longer suport older node versions + # Table tests no longer support older node versions node_14_x: node_version: 14.x node_16_x: @@ -483,7 +483,7 @@ jobs: vmImage: "macOS-latest" strategy: matrix: - # Table tests no longer suport node_8_x + # Table tests no longer support node_8_x node_14_x: node_version: 14.x node_16_x: diff --git a/src/blob/BlobEnvironment.ts b/src/blob/BlobEnvironment.ts index bdc06f5a0..65e203828 100644 --- a/src/blob/BlobEnvironment.ts +++ b/src/blob/BlobEnvironment.ts @@ -58,7 +58,7 @@ if (!(args as any).config.name) { .option(["", "pwd"], "Optional. Password for .pfx file") .option( ["", "disableProductStyleUrl"], - "Optional. Disable getting account name from the host of request Uri, always get account name from the first path segment of request Uri." + "Optional. Disable getting account name from the host of request URI, always get account name from the first path segment of request URI." ); (args as any).config.name = "azurite-blob"; @@ -101,7 +101,7 @@ export default class BlobEnvironment implements IBlobEnvironment { if (this.flags.skipApiVersionCheck !== undefined) { return true; } - // default is false which will check API veresion + // default is false which will check API version return false; } @@ -125,7 +125,7 @@ export default class BlobEnvironment implements IBlobEnvironment { if (this.flags.disableProductStyleUrl !== undefined) { return true; } - // default is false which will try to get account name from request Uri hostname + // default is false which will try to get account name from request URI hostname return false; } diff --git a/src/blob/BlobRequestListenerFactory.ts b/src/blob/BlobRequestListenerFactory.ts index c3bd075a8..c01f248b2 100644 --- a/src/blob/BlobRequestListenerFactory.ts +++ b/src/blob/BlobRequestListenerFactory.ts @@ -137,7 +137,7 @@ export default class BlobRequestListenerFactory app.use(morgan("common", { stream: this.accessLogWriteStream })); } - // Manually created middleware to deserialize feature related context which swagger doesn"t know + // Manually created middleware to deserialize feature related context which swagger doesn't know app.use(createStorageBlobContextMiddleware(this.skipApiVersionCheck, this.disableProductStyleUrl, this.loose)); // Dispatch incoming HTTP request to specific operation diff --git a/src/blob/authentication/BlobSharedKeyAuthenticator.ts b/src/blob/authentication/BlobSharedKeyAuthenticator.ts index f762d5438..f0f184326 100644 --- a/src/blob/authentication/BlobSharedKeyAuthenticator.ts +++ b/src/blob/authentication/BlobSharedKeyAuthenticator.ts @@ -139,7 +139,7 @@ export default class BlobSharedKeyAuthenticator implements IAuthenticator { if (context.context.isSecondary && blobContext.authenticationPath?.indexOf(account) === 1) { - // JS/.net Track2 SDK will generate stringToSign from IP style Uri with "-secondary" in authenticationPath, so will also compare signature with this kind stringToSign + // JS/.net Track2 SDK will generate stringToSign from IP style URI with "-secondary" in authenticationPath, so will also compare signature with this kind stringToSign const stringToSign_secondary: string = [ req.getMethod().toUpperCase(), diff --git a/src/blob/authentication/BlobTokenAuthenticator.ts b/src/blob/authentication/BlobTokenAuthenticator.ts index d81b9d82e..a9959a85a 100644 --- a/src/blob/authentication/BlobTokenAuthenticator.ts +++ b/src/blob/authentication/BlobTokenAuthenticator.ts @@ -225,7 +225,7 @@ export default class BlobTokenAuthenticator implements IAuthenticator { if (m !== null) { if (m[0] === aud) { if (m[1] !== undefined && m[1] !== blobContext.account) { - // If account name doesn't match for fine grained audiance + // If account name doesn't match for fine-grained audience break; } audMatch = true; diff --git a/src/blob/authentication/OperationAccountSASPermission.ts b/src/blob/authentication/OperationAccountSASPermission.ts index 6fc42e445..56cd123f8 100644 --- a/src/blob/authentication/OperationAccountSASPermission.ts +++ b/src/blob/authentication/OperationAccountSASPermission.ts @@ -358,7 +358,7 @@ OPERATION_ACCOUNT_SAS_PERMISSIONS.set( new OperationAccountSASPermission( AccountSASService.Blob, AccountSASResourceType.Object, - // Create permission is only available for non existing block blob. Handle this scenario separately + // Create permission is only available for nonexistent block blob. Handle this scenario separately AccountSASPermission.Write + AccountSASPermission.Create ) ); @@ -368,7 +368,7 @@ OPERATION_ACCOUNT_SAS_PERMISSIONS.set( new OperationAccountSASPermission( AccountSASService.Blob, AccountSASResourceType.Object, - // Create permission is only available for non existing page blob. Handle this scenario separately + // Create permission is only available for nonexistent page blob. Handle this scenario separately AccountSASPermission.Write + AccountSASPermission.Create ) ); @@ -378,7 +378,7 @@ OPERATION_ACCOUNT_SAS_PERMISSIONS.set( new OperationAccountSASPermission( AccountSASService.Blob, AccountSASResourceType.Object, - // Create permission is only available for non existing append blob. Handle this scenario separately + // Create permission is only available for nonexistent append blob. Handle this scenario separately AccountSASPermission.Write + AccountSASPermission.Create ) ); diff --git a/src/blob/conditions/ConditionResourceAdapter.ts b/src/blob/conditions/ConditionResourceAdapter.ts index 2cc0144db..f6a54c0ed 100644 --- a/src/blob/conditions/ConditionResourceAdapter.ts +++ b/src/blob/conditions/ConditionResourceAdapter.ts @@ -10,10 +10,10 @@ export default class ConditionResourceAdapter implements IConditionResource { if ( resource === undefined || resource === null || - (resource as BlobModel).isCommitted === false // Treat uncommitted blob as unexist resource + (resource as BlobModel).isCommitted === false // Treat uncommitted blob as nonexistent resource ) { this.exist = false; - this.etag = "UNEXIST_RESOURCE_ETAG"; + this.etag = "NONEXISTENT_RESOURCE_ETAG"; this.lastModified = undefined as any; return; } diff --git a/src/blob/conditions/ReadConditionalHeadersValidator.ts b/src/blob/conditions/ReadConditionalHeadersValidator.ts index 6943d5f5e..acf6036e7 100644 --- a/src/blob/conditions/ReadConditionalHeadersValidator.ts +++ b/src/blob/conditions/ReadConditionalHeadersValidator.ts @@ -46,7 +46,7 @@ export default class ReadConditionalHeadersValidator } // If If-Unmodified-Since - // Skip for unexist resource + // Skip for nonexistent resource // If-None-Match if ( @@ -58,7 +58,7 @@ export default class ReadConditionalHeadersValidator } // If-Modified-Since - // Skip for unexist resource + // Skip for nonexistent resource } else { // Read against an existing resource // If-Match && If-Unmodified-Since && (If-None-Match || If-Modified-Since) diff --git a/src/blob/conditions/WriteConditionalHeadersValidator.ts b/src/blob/conditions/WriteConditionalHeadersValidator.ts index 15cf67728..9572f47b1 100644 --- a/src/blob/conditions/WriteConditionalHeadersValidator.ts +++ b/src/blob/conditions/WriteConditionalHeadersValidator.ts @@ -124,9 +124,9 @@ export default class WriteConditionalHeadersValidator if (conditionalHeaders.ifNoneMatch[0] === "*") { // According to restful doc, specify the wildcard character (*) to perform the operation // only if the resource does not exist, and fail the operation if it does exist. - // However, Azure Storage Set Blob Properties Operation for an existing blob doesn't reuturn 412 with * + // However, Azure Storage Set Blob Properties Operation for an existing blob doesn't return 412 with * // TODO: Check accurate behavior for different write operations - // Put Blob, Commit Block List has special logic for ifNoneMatch equals *, will return 409 conflict for existing blob, will handled in createBlob metatdata store. + // Put Blob, Commit Block List has special logic for ifNoneMatch equals *, will return 409 conflict for existing blob, will handled in createBlob metadata store. // throw StorageErrorFactory.getConditionNotMet(context.contextId!); return; } diff --git a/src/blob/errors/StorageErrorFactory.ts b/src/blob/errors/StorageErrorFactory.ts index f37d1949b..5290b7854 100644 --- a/src/blob/errors/StorageErrorFactory.ts +++ b/src/blob/errors/StorageErrorFactory.ts @@ -754,7 +754,7 @@ export default class StorageErrorFactory { return new StorageError( 400, "InvalidResourceName", - `The specifed resource name contains invalid characters.`, + `The specified resource name contains invalid characters.`, contextID ); } @@ -827,12 +827,12 @@ export default class StorageErrorFactory { ); } - public static getInvaidXmlDocument( + public static getInvalidXmlDocument( contextID: string = "" ): StorageError { return new StorageError( 400, - "InvaidXmlDocument", + "InvalidXmlDocument", `XML specified is not syntactically valid.`, contextID ); diff --git a/src/blob/handlers/BlobBatchHandler.ts b/src/blob/handlers/BlobBatchHandler.ts index 296b62c22..98cdabfba 100644 --- a/src/blob/handlers/BlobBatchHandler.ts +++ b/src/blob/handlers/BlobBatchHandler.ts @@ -25,7 +25,7 @@ import HandlerMiddlewareFactory from "../generated/middleware/HandlerMiddlewareF import serializerMiddleware from "../generated/middleware/serializer.middleware"; import ILogger from "../generated/utils/ILogger"; import AuthenticationMiddlewareFactory from "../middlewares/AuthenticationMiddlewareFactory"; -import { internnalBlobStorageContextMiddleware } from "../middlewares/blobStorageContext.middleware"; +import { internalBlobStorageContextMiddleware } from "../middlewares/blobStorageContext.middleware"; import IBlobMetadataStore from "../persistence/IBlobMetadataStore"; import { DEFAULT_CONTEXT_PATH, HTTP_HEADER_DELIMITER, HTTP_LINE_ENDING } from "../utils/constants"; import AppendBlobHandler from "./AppendBlobHandler"; @@ -61,7 +61,7 @@ export class BlobBatchHandler { ) { const subRequestContextMiddleware = (req: IRequest, res: IResponse, locals: any, next: SubRequestNextFunction) => { const urlbuilder = URLBuilder.parse(req.getUrl()); - internnalBlobStorageContextMiddleware( + internalBlobStorageContextMiddleware( new BlobStorageContext(locals, DEFAULT_CONTEXT_PATH), req, res, diff --git a/src/blob/handlers/BlockBlobHandler.ts b/src/blob/handlers/BlockBlobHandler.ts index 97ad30838..025809987 100644 --- a/src/blob/handlers/BlockBlobHandler.ts +++ b/src/blob/handlers/BlockBlobHandler.ts @@ -304,7 +304,7 @@ export default class BlockBlobHandler parsed = await parseXML(rawBody, true); } catch (err) { // return the 400(InvalidXmlDocument) error for issue 1955 - throw StorageErrorFactory.getInvaidXmlDocument(context.contextId); + throw StorageErrorFactory.getInvalidXmlDocument(context.contextId); } // Validate selected block list diff --git a/src/blob/handlers/ServiceHandler.ts b/src/blob/handlers/ServiceHandler.ts index ae377ecc5..27a2d3f96 100644 --- a/src/blob/handlers/ServiceHandler.ts +++ b/src/blob/handlers/ServiceHandler.ts @@ -171,7 +171,7 @@ export default class ServiceHandler extends BaseHandler const blobCtx = new BlobStorageContext(context); const accountName = blobCtx.account!; - // TODO: deserializor has a bug that when cors is undefined, + // TODO: deserializer has a bug that when cors is undefined, // it will serialize it to empty array instead of undefined const body = blobCtx.request!.getBody(); const parsedBody = await parseXML(body || ""); diff --git a/src/blob/middlewares/blobStorageContext.middleware.ts b/src/blob/middlewares/blobStorageContext.middleware.ts index e325f5d5b..db992db10 100644 --- a/src/blob/middlewares/blobStorageContext.middleware.ts +++ b/src/blob/middlewares/blobStorageContext.middleware.ts @@ -41,7 +41,7 @@ export default function createStorageBlobContextMiddleware( * @param {Response} res An express compatible Response object * @param {NextFunction} next An express middleware next callback */ -export function internnalBlobStorageContextMiddleware( +export function internalBlobStorageContextMiddleware( blobContext: BlobStorageContext, req: IRequest, res: IResponse, @@ -121,7 +121,7 @@ export function internnalBlobStorageContextMiddleware( return next(handlerError); } - // validate conatainer name, when container name has value (not undefined or empty string) + // validate container name, when container name has value (not undefined or empty string) // skip validate system container if (container && !container.startsWith("$")) { validateContainerName(requestID, container); @@ -224,7 +224,7 @@ export function blobStorageContextMiddleware( return next(handlerError); } - // validate conatainer name, when container name has value (not undefined or empty string) + // validate container name, when container name has value (not undefined or empty string) // skip validate system container if (container && !container.startsWith("$")) { validateContainerName(requestID, container); diff --git a/src/blob/persistence/LokiBlobMetadataStore.ts b/src/blob/persistence/LokiBlobMetadataStore.ts index 21b041a6d..dbf231c9b 100644 --- a/src/blob/persistence/LokiBlobMetadataStore.ts +++ b/src/blob/persistence/LokiBlobMetadataStore.ts @@ -1193,7 +1193,7 @@ export default class LokiBlobMetadataStore validateReadConditions(context, modifiedAccessConditions, doc); - // When block blob don't have commited block, should return 404 + // When block blob don't have committed block, should return 404 if (!doc) { throw StorageErrorFactory.getBlobNotFound(context.contextId); } @@ -1468,7 +1468,7 @@ export default class LokiBlobMetadataStore undefined, context, false - ); // This may return an uncommitted blob, or undefined for an unexist blob + ); // This may return an uncommitted blob, or undefined for an nonexistent blob validateWriteConditions(context, options.modifiedAccessConditions, doc); @@ -1518,7 +1518,7 @@ export default class LokiBlobMetadataStore undefined, context, false - ); // This may return an uncommitted blob, or undefined for an unexist blob + ); // This may return an uncommitted blob, or undefined for an nonexistent blob validateWriteConditions(context, options.modifiedAccessConditions, doc); @@ -1568,7 +1568,7 @@ export default class LokiBlobMetadataStore undefined, context, false - ); // This may return an uncommitted blob, or undefined for an unexist blob + ); // This may return an uncommitted blob, or undefined for an nonexistent blob validateWriteConditions(context, options.modifiedAccessConditions, doc); @@ -1620,7 +1620,7 @@ export default class LokiBlobMetadataStore undefined, context, false - ); // This may return an uncommitted blob, or undefined for an unexist blob + ); // This may return an uncommitted blob, or undefined for an nonexistent blob validateWriteConditions(context, options.modifiedAccessConditions, doc); @@ -1670,7 +1670,7 @@ export default class LokiBlobMetadataStore undefined, context, false - ); // This may return an uncommitted blob, or undefined for an unexist blob + ); // This may return an uncommitted blob, or undefined for an nonexistent blob validateWriteConditions(context, options.modifiedAccessConditions, doc); @@ -2280,7 +2280,7 @@ export default class LokiBlobMetadataStore const coll = this.db.getCollection(this.BLOCKS_COLLECTION); - // If the new block ID does not have same length with before uncommited block ID, return failure. + // If the new block ID does not have same length with before uncommitted block ID, return failure. if (blobExist) { const existBlockDoc = coll.findOne({ accountName: block.accountName, @@ -3392,7 +3392,7 @@ export default class LokiBlobMetadataStore true ); - // When block blob don't have commited block, should return 404 + // When block blob don't have committed block, should return 404 if (!doc) { throw StorageErrorFactory.getBlobNotFound(context.contextId); } diff --git a/src/blob/persistence/SqlBlobMetadataStore.ts b/src/blob/persistence/SqlBlobMetadataStore.ts index b137eaf31..45666056f 100644 --- a/src/blob/persistence/SqlBlobMetadataStore.ts +++ b/src/blob/persistence/SqlBlobMetadataStore.ts @@ -1383,7 +1383,7 @@ export default class SqlBlobMetadataStore implements IBlobMetadataStore { ).validate(new BlobWriteLeaseValidator(leaseAccessConditions)); } - // If the new block ID does not have same length with before uncommited block ID, return failure. + // If the new block ID does not have same length with before uncommitted block ID, return failure. const existBlock = await BlocksModel.findOne({ attributes: ["blockName"], where: { diff --git a/src/common/Environment.ts b/src/common/Environment.ts index 47f0dd658..768c53402 100644 --- a/src/common/Environment.ts +++ b/src/common/Environment.ts @@ -65,7 +65,7 @@ args ) .option( ["", "disableProductStyleUrl"], - "Optional. Disable getting account name from the host of request Uri, always get account name from the first path segment of request Uri" + "Optional. Disable getting account name from the host of request URI, always get account name from the first path segment of request URI" ) .option(["", "oauth"], 'Optional. OAuth level. Candidate values: "basic"') .option(["", "cert"], "Optional. Path to certificate file") @@ -138,7 +138,7 @@ export default class Environment implements IEnvironment { if (this.flags.skipApiVersionCheck !== undefined) { return true; } - // default is false which will check API veresion + // default is false which will check API version return false; } @@ -146,7 +146,7 @@ export default class Environment implements IEnvironment { if (this.flags.disableProductStyleUrl !== undefined) { return true; } - // default is false which will try to get account name from request Uri hostname + // default is false which will try to get account name from request URI hostname return false; } diff --git a/src/common/persistence/IExtentMetadata.ts b/src/common/persistence/IExtentMetadata.ts index 595a2e845..4b7f6831b 100644 --- a/src/common/persistence/IExtentMetadata.ts +++ b/src/common/persistence/IExtentMetadata.ts @@ -14,7 +14,7 @@ export interface IExtentModel { } /** - * This interface is provided to arrange the loacal extent storage + * This interface is provided to arrange the local extent storage * * @export * @interface IExtentMetadata diff --git a/src/common/utils/constants.ts b/src/common/utils/constants.ts index 6bf50c37b..4ed88ae2d 100644 --- a/src/common/utils/constants.ts +++ b/src/common/utils/constants.ts @@ -18,7 +18,7 @@ export const IP_REGEX = new RegExp("^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$"); // Otherwise, try to extract string before first dot, as account name. export const NO_ACCOUNT_HOST_NAMES = new Set().add("host.docker.internal"); -// Use utf8mb4_bin instead of utf8mb4_general_ci to honor case sensitive +// Use utf8mb4_bin instead of utf8mb4_general_ci to honor case-sensitive // https://dev.mysql.com/doc/refman/8.0/en/case-sensitivity.html export const DEFAULT_SQL_COLLATE = "utf8mb4_bin"; export const DEFAULT_SQL_OPTIONS = { diff --git a/src/common/utils/utils.ts b/src/common/utils/utils.ts index 12f47291a..8df02200f 100644 --- a/src/common/utils/utils.ts +++ b/src/common/utils/utils.ts @@ -13,7 +13,7 @@ export function minDate(date1: Date, date2: Date): Date { return date1 > date2 ? date2 : date1; } -// Blob Snapshot is has 7 digital for Milliseconds, but Datatime has Milliseconds with 3 digital. So need convert. +// Blob Snapshot is has 7 digital for Milliseconds, but Datetime has Milliseconds with 3 digital. So need convert. export function convertDateTimeStringMsTo7Digital( dateTimeString: string ): string { diff --git a/src/queue/QueueEnvironment.ts b/src/queue/QueueEnvironment.ts index de2c5752c..e169e6788 100644 --- a/src/queue/QueueEnvironment.ts +++ b/src/queue/QueueEnvironment.ts @@ -30,7 +30,7 @@ args ) .option( ["", "disableProductStyleUrl"], - "Optional. DDisable getting account name from the host of request Uri, always get account name from the first path segment of request Uri." + "Optional. Disable getting account name from the host of request URI, always get account name from the first path segment of request URI." ) .option( ["", "skipApiVersionCheck"], @@ -91,7 +91,7 @@ export default class QueueEnvironment implements IQueueEnvironment { if (this.flags.skipApiVersionCheck !== undefined) { return true; } - // default is false which will check API veresion + // default is false which will check API version return false; } @@ -115,7 +115,7 @@ export default class QueueEnvironment implements IQueueEnvironment { if (this.flags.disableProductStyleUrl !== undefined) { return true; } - // default is false which will try to get account name from request Uri hostname + // default is false which will try to get account name from request URI hostname return false; } diff --git a/src/queue/authentication/QueueSASAuthenticator.ts b/src/queue/authentication/QueueSASAuthenticator.ts index 463e20a67..0bedeabee 100644 --- a/src/queue/authentication/QueueSASAuthenticator.ts +++ b/src/queue/authentication/QueueSASAuthenticator.ts @@ -194,7 +194,7 @@ export default class QueueSASAuthenticator implements IAuthenticator { throw StorageErrorFactory.getAuthorizationFailure(context.contextID!); } - // As Azure Storage, SAS with indentifier should not contains any overlap values. + // As Azure Storage, SAS with identifier should not contains any overlap values. if ( values.startTime !== undefined || values.expiryTime !== undefined || diff --git a/src/queue/authentication/QueueSharedKeyAuthenticator.ts b/src/queue/authentication/QueueSharedKeyAuthenticator.ts index a6dc36378..6c779fd6f 100644 --- a/src/queue/authentication/QueueSharedKeyAuthenticator.ts +++ b/src/queue/authentication/QueueSharedKeyAuthenticator.ts @@ -105,7 +105,7 @@ export default class QueueSharedKeyAuthenticator implements IAuthenticator { if (context.context.isSecondary && queueContext.authenticationPath?.indexOf(account) === 1) { - // JS/.net Track2 SDK will generate stringToSign from IP style Uri with "-secondary" in authenticationPath, so will also compare signature with this kind stringToSign + // JS/.net Track2 SDK will generate stringToSign from IP style URI with "-secondary" in authenticationPath, so will also compare signature with this kind stringToSign const stringToSign_secondary: string = headersToSign + this.getCanonicalizedResourceString( diff --git a/src/queue/authentication/QueueTokenAuthenticator.ts b/src/queue/authentication/QueueTokenAuthenticator.ts index f2b0a0879..22e80a89d 100644 --- a/src/queue/authentication/QueueTokenAuthenticator.ts +++ b/src/queue/authentication/QueueTokenAuthenticator.ts @@ -225,7 +225,7 @@ export default class QueueTokenAuthenticator implements IAuthenticator { if (m !== null) { if (m[0] === aud) { if (m[1] !== undefined && m[1] !== queueContext.account) { - // If account name doesn't match for fine grained audiance + // If account name doesn't match for fine-grained audience break; } audMatch = true; diff --git a/src/queue/errors/StorageErrorFactory.ts b/src/queue/errors/StorageErrorFactory.ts index f564d9da8..be2d3f77e 100644 --- a/src/queue/errors/StorageErrorFactory.ts +++ b/src/queue/errors/StorageErrorFactory.ts @@ -55,17 +55,6 @@ export default class StorageErrorFactory { ); } - public static getInvaidXmlDocument( - contextID: string = defaultID - ): StorageError { - return new StorageError( - 400, - "InvaidXmlDocument", - `XML specified is not syntactically valid.`, - contextID - ); - } - public static corsPreflightFailure( contextID: string = defaultID, additionalMessages?: { [key: string]: string } @@ -86,7 +75,7 @@ export default class StorageErrorFactory { return new StorageError( 400, "InvalidUri", - "The specifed resource name contains invalid characters.", + "The specified resource name contains invalid characters.", contextID ); } @@ -315,7 +304,7 @@ export default class StorageErrorFactory { return new StorageError( 400, "InvalidResourceName", - `The specifed resource name contains invalid characters.`, + `The specified resource name contains invalid characters.`, contextID ); } diff --git a/src/queue/handlers/MessageIdHandler.ts b/src/queue/handlers/MessageIdHandler.ts index f00c5b7f4..1bd820a4d 100644 --- a/src/queue/handlers/MessageIdHandler.ts +++ b/src/queue/handlers/MessageIdHandler.ts @@ -51,7 +51,7 @@ export default class MessageIdHandler extends BaseHandler const messageId = queueCtx.messageId!; // TODO: Similar to enqueue, deserialize does not support the message text with only empty character. - // If the text is undefined, try to retrive it from the XML body here. + // If the text is undefined, try to retrieve it from the XML body here. if (queueMessage.messageText === undefined) { const body = queueCtx.request!.getBody(); const parsedBody = await parseXMLwithEmpty(body || ""); diff --git a/src/queue/handlers/MessagesHandler.ts b/src/queue/handlers/MessagesHandler.ts index 4be1192b7..6a9a2bc1a 100644 --- a/src/queue/handlers/MessagesHandler.ts +++ b/src/queue/handlers/MessagesHandler.ts @@ -188,7 +188,7 @@ export default class MessagesHandler extends BaseHandler const body = queueCtx.request!.getBody(); // TODO: deserialize does not support the message text with only empty character. - // If the text is undefined, try to retrive it from the XML body here. + // If the text is undefined, try to retrieve it from the XML body here. const parsedBody = await parseXMLwithEmpty(body || ""); for (const text in parsedBody) { if ( diff --git a/src/queue/handlers/QueueHandler.ts b/src/queue/handlers/QueueHandler.ts index 22133d6eb..9983b89e4 100644 --- a/src/queue/handlers/QueueHandler.ts +++ b/src/queue/handlers/QueueHandler.ts @@ -289,7 +289,7 @@ export default class QueueHandler extends BaseHandler implements IQueueHandler { } /** - * Parse and retrive the original metadata name headers array to preserve its case. + * Parse and retrieve the original metadata name headers array to preserve its case. * * @private * @param {({ [propertyName: string]: string } | undefined)} reqMetadata diff --git a/src/queue/handlers/ServiceHandler.ts b/src/queue/handlers/ServiceHandler.ts index ad754b6a8..cf55b4f35 100644 --- a/src/queue/handlers/ServiceHandler.ts +++ b/src/queue/handlers/ServiceHandler.ts @@ -5,8 +5,8 @@ import Context from "../generated/Context"; import IServiceHandler from "../generated/handlers/IServiceHandler"; import { parseXML } from "../generated/utils/xml"; import { - LIST_QUEUE_MAXRESSULTS_MAX, - LIST_QUEUE_MAXRESSULTS_MIN, + LIST_QUEUE_MAXRESULTS_MAX, + LIST_QUEUE_MAXRESULTS_MIN, QUEUE_API_VERSION } from "../utils/constants"; import BaseHandler from "./BaseHandler"; @@ -82,7 +82,7 @@ export default class ServiceHandler extends BaseHandler const queueCtx = new QueueStorageContext(context); const accountName = queueCtx.account!; - // TODO: deserializor has a bug that when cors is undefined, + // TODO: deserializer has a bug that when cors is undefined, // it will serialize it to empty array instead of undefined const body = queueCtx.request!.getBody(); const parsedBody = await parseXML(body || ""); @@ -204,16 +204,16 @@ export default class ServiceHandler extends BaseHandler let maxresults = this.LIST_QUEUES_MAX_RESULTS_DEFAULT; if (options.maxresults !== undefined) { if ( - options.maxresults < LIST_QUEUE_MAXRESSULTS_MIN || - options.maxresults > LIST_QUEUE_MAXRESSULTS_MAX + options.maxresults < LIST_QUEUE_MAXRESULTS_MIN || + options.maxresults > LIST_QUEUE_MAXRESULTS_MAX ) { throw StorageErrorFactory.getOutOfRangeQueryParameterValue( context.contextID, { QueryParameterName: "maxresults", QueryParameterValue: `${options.maxresults}`, - MinimumAllowed: `${LIST_QUEUE_MAXRESSULTS_MIN}`, - MaximumAllowed: `${LIST_QUEUE_MAXRESSULTS_MAX}` + MinimumAllowed: `${LIST_QUEUE_MAXRESULTS_MIN}`, + MaximumAllowed: `${LIST_QUEUE_MAXRESULTS_MAX}` } ); } diff --git a/src/queue/persistence/LokiQueueMetadataStore.ts b/src/queue/persistence/LokiQueueMetadataStore.ts index 56b376647..a93534c82 100644 --- a/src/queue/persistence/LokiQueueMetadataStore.ts +++ b/src/queue/persistence/LokiQueueMetadataStore.ts @@ -293,7 +293,7 @@ export default class LokiQueueMetadataStore implements IQueueMetadataStore { /** * Create a queue in persistency layer. - * Return 201 if create a new one, 204 if a same one exist, 409 error if a conflit one exist. + * Return 201 if create a new one, 204 if a same one exist, 409 error if a conflicting one exist. * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-queue4 * * @param {QueueModel} queue @@ -311,7 +311,7 @@ export default class LokiQueueMetadataStore implements IQueueMetadataStore { name: queue.name }); - // Check whether a conflication exists if there exist a queue with the given name. + // Check whether a conflict exists if there exist a queue with the given name. // If the exist queue has the same metadata as the given queue, then return 204, else throw 409 error. if (doc) { const docMeta = doc.metadata; @@ -348,7 +348,7 @@ export default class LokiQueueMetadataStore implements IQueueMetadataStore { } } - // Check if all the matadata of exist queue is the same as another. + // Check if all the metadata of exist queue is the same as another. for (const item in docMeta) { if (docMeta.hasOwnProperty(item)) { const queueMetaName = nameMap.get(item.toLowerCase()); diff --git a/src/queue/utils/constants.ts b/src/queue/utils/constants.ts index b990bc6f3..3af4b0b0f 100644 --- a/src/queue/utils/constants.ts +++ b/src/queue/utils/constants.ts @@ -18,8 +18,8 @@ export const LOGGER_CONFIGS = {}; export const DEFAULT_GC_INTERVAL_MS = 60 * 1000; export const NEVER_EXPIRE_DATE = new Date("9999-12-31T23:59:59.999Z"); export const QUEUE_SERVICE_PERMISSION = "raup"; -export const LIST_QUEUE_MAXRESSULTS_MIN = 1; -export const LIST_QUEUE_MAXRESSULTS_MAX = 2147483647; +export const LIST_QUEUE_MAXRESULTS_MIN = 1; +export const LIST_QUEUE_MAXRESULTS_MAX = 2147483647; export const DEFAULT_DEQUEUE_VISIBILITYTIMEOUT = 30; // 30s as default. export const DEQUEUE_VISIBILITYTIMEOUT_MIN = 1; export const DEQUEUE_VISIBILITYTIMEOUT_MAX = 604800; diff --git a/src/queue/utils/utils.ts b/src/queue/utils/utils.ts index e36fded0d..d1899e35a 100644 --- a/src/queue/utils/utils.ts +++ b/src/queue/utils/utils.ts @@ -179,7 +179,7 @@ export function getUTF8ByteSize(text: string): number { } /** - * Retrive the value from XML body without ignoring the empty characters. + * Retrieve the value from XML body without ignoring the empty characters. * * @export * @param {string} param diff --git a/src/table/ITableEnvironment.ts b/src/table/ITableEnvironment.ts index bbd0b2374..d1932d4bb 100644 --- a/src/table/ITableEnvironment.ts +++ b/src/table/ITableEnvironment.ts @@ -16,7 +16,7 @@ export default interface ITableEnvironment { loose(): boolean; /** Optional. Skip the request API version check request with all Api versions will be allowed */ skipApiVersionCheck(): boolean; - /** Optional. Disable getting account name from the host of request Uri, always get account name from the first path segment of request Uri. */ + /** Optional. Disable getting account name from the host of request URI, always get account name from the first path segment of request URI. */ disableProductStyleUrl(): boolean; /** Optional. Enable debug log by providing a valid local file, path as log destination path as log destination */ debug(): Promise; diff --git a/src/table/TableEnvironment.ts b/src/table/TableEnvironment.ts index bc4477a9e..73a7f735f 100644 --- a/src/table/TableEnvironment.ts +++ b/src/table/TableEnvironment.ts @@ -37,7 +37,7 @@ args ) .option( ["", "disableProductStyleUrl"], - "Optional. Disable getting account name from the host of request Uri, always get account name from the first path segment of request Uri." + "Optional. Disable getting account name from the host of request URI, always get account name from the first path segment of request URI." ) .option( ["", "inMemoryPersistence"], @@ -93,7 +93,7 @@ export default class TableEnvironment implements ITableEnvironment { if (this.flags.skipApiVersionCheck !== undefined) { return true; } - // default is false which will check API veresion + // default is false which will check API version return false; } @@ -101,7 +101,7 @@ export default class TableEnvironment implements ITableEnvironment { if (this.flags.disableProductStyleUrl !== undefined) { return true; } - // default is false which will try to get account name from request Uri hostname + // default is false which will try to get account name from request URI hostname return false; } diff --git a/src/table/authentication/TableSharedKeyAuthenticator.ts b/src/table/authentication/TableSharedKeyAuthenticator.ts index 7f98ab67f..bbded03fd 100644 --- a/src/table/authentication/TableSharedKeyAuthenticator.ts +++ b/src/table/authentication/TableSharedKeyAuthenticator.ts @@ -105,7 +105,7 @@ export default class TableSharedKeyAuthenticator implements IAuthenticator { if (context.context.isSecondary && tableContext.authenticationPath?.indexOf(account) === 1) { - // JS/.net Track2 SDK will generate stringToSign from IP style Uri with "-secondary" in authenticationPath, so will also compare signature with this kind stringToSign + // JS/.net Track2 SDK will generate stringToSign from IP style URI with "-secondary" in authenticationPath, so will also compare signature with this kind stringToSign const stringToSign_secondary: string = [ req.getMethod().toUpperCase(), diff --git a/src/table/authentication/TableSharedKeyLiteAuthenticator.ts b/src/table/authentication/TableSharedKeyLiteAuthenticator.ts index 8c3a6d9c4..91914a3ce 100644 --- a/src/table/authentication/TableSharedKeyLiteAuthenticator.ts +++ b/src/table/authentication/TableSharedKeyLiteAuthenticator.ts @@ -105,7 +105,7 @@ export default class TableSharedKeyLiteAuthenticator implements IAuthenticator { if (context.context.isSecondary && tableContext.authenticationPath?.indexOf(account) === 1) { - // JS/.net Track2 SDK will generate stringToSign from IP style Uri with "-secondary" in authenticationPath, so will also compare signature with this kind stringToSignconst stringToSign: string = + // JS/.net Track2 SDK will generate stringToSign from IP style URI with "-secondary" in authenticationPath, so will also compare signature with this kind stringToSignconst stringToSign: string = const stringToSign_secondary: string = [ this.getHeaderValueToSign(req, HeaderConstants.DATE) || diff --git a/src/table/authentication/TableTokenAuthenticator.ts b/src/table/authentication/TableTokenAuthenticator.ts index 548900de8..d1eb0426d 100644 --- a/src/table/authentication/TableTokenAuthenticator.ts +++ b/src/table/authentication/TableTokenAuthenticator.ts @@ -225,7 +225,7 @@ export default class TableTokenAuthenticator implements IAuthenticator { if (m !== null) { if (m[0] === aud) { if (m[1] !== undefined && m[1] !== tableContext.account) { - // If account name doesn't match for fine grained audiance + // If account name doesn't match for fine-grained audience break; } audMatch = true; diff --git a/src/table/batch/BatchErrorConstants.ts b/src/table/batch/BatchErrorConstants.ts index 25be2b935..17e3935f0 100644 --- a/src/table/batch/BatchErrorConstants.ts +++ b/src/table/batch/BatchErrorConstants.ts @@ -7,5 +7,5 @@ export default class BatchErrorConstants { public static readonly PROTOCOL_NULL = "Protocol null when calling getProtocol on BatchRequest"; public static readonly TOO_MANY_OPERATIONS = "0:The batch request operation exceeds the maximum 100 changes per change set."; public static readonly UNKNOWN_QUERYOPTION = "Unknown query options type."; - public static readonly URI_NULL = "Uri or path null when calling getUrl on BatchRequest."; + public static readonly URI_NULL = "URI or path null when calling getUrl on BatchRequest."; } \ No newline at end of file diff --git a/src/table/batch/BatchRequest.ts b/src/table/batch/BatchRequest.ts index 719149d62..e6067f24a 100644 --- a/src/table/batch/BatchRequest.ts +++ b/src/table/batch/BatchRequest.ts @@ -12,7 +12,7 @@ import BatchErrorConstants from "./BatchErrorConstants"; /* * Represents a request in the context of batch operations. * ToDo: Requires validation against all operation types - * Currently several funcitons of the interface are not implemented + * Currently several functions of the interface are not implemented * @export * @class BatchRequest * @implements {IRequest} @@ -108,7 +108,7 @@ export default class BatchRequest implements IRequest { // ToDo: here we also assume https, which is also not true... // we need to parse this from the request // return `https://${this.accountName}.${this.batchOperation.batchType}.core.windows.net/$batch`; - // in delete, it seems that we actuall expect the full uri + // in delete, it seems that we actually expect the full uri if (this.batchOperation.uri != null && this.batchOperation.path != null) { return this.batchOperation.uri; } else { diff --git a/src/table/batch/TableBatchOrchestrator.ts b/src/table/batch/TableBatchOrchestrator.ts index c1ceca892..a30215521 100644 --- a/src/table/batch/TableBatchOrchestrator.ts +++ b/src/table/batch/TableBatchOrchestrator.ts @@ -349,9 +349,9 @@ export default class TableBatchOrchestrator { /** * Creates a clone of the context for the batch operation. - * Becuase the context that we have will not work with the calls and needs + * Because the context that we have will not work with the calls and needs * updating for batch operations. - * We use a deep clone, as each request needs to be treated seaprately. + * We use a deep clone, as each request needs to be treated separately. * * @private * @param {Context} context @@ -623,7 +623,7 @@ export default class TableBatchOrchestrator { ); return { - __return: this.serialization.serializeTablMergeEntityBatchResponse( + __return: this.serialization.serializeTableMergeEntityBatchResponse( request, response ), @@ -697,7 +697,7 @@ export default class TableBatchOrchestrator { /** * Replace Double ticks for single ticks without replaceAll string prototype - * function, becuase node 14 does not support it. + * function, because node 14 does not support it. * @param key * @returns */ diff --git a/src/table/batch/TableBatchSerialization.ts b/src/table/batch/TableBatchSerialization.ts index b00017fcc..40205f1b3 100644 --- a/src/table/batch/TableBatchSerialization.ts +++ b/src/table/batch/TableBatchSerialization.ts @@ -54,7 +54,7 @@ export class TableBatchSerialization extends BatchSerialization { subRequests = splitBody; } - // This goes through each operation in the the request and maps the content + // This goes through each operation in the request and maps the content // of the request by deserializing it into a BatchOperation Type const batchOperations: TableBatchOperation[] = subRequests.map( (subRequest) => { @@ -286,7 +286,7 @@ export class TableBatchSerialization extends BatchSerialization { * @return {*} {string} * @memberof TableBatchSerialization */ - public serializeTablMergeEntityBatchResponse( + public serializeTableMergeEntityBatchResponse( request: BatchRequest, response: Models.TableMergeEntityResponse ): string { @@ -597,24 +597,24 @@ export class TableBatchSerialization extends BatchSerialization { contentID: number, request: BatchRequest ): string { - let errorReponse = ""; + let errorResponse = ""; const odataError = err as StorageError; // Errors in batch processing generate Bad Request error - errorReponse = this.serializeHttpStatusCode(errorReponse, err.statusCode); - errorReponse += "Content-ID: " + contentID + "\r\n"; - errorReponse = this.serializeDataServiceVersion(errorReponse, request); + errorResponse = this.serializeHttpStatusCode(errorResponse, err.statusCode); + errorResponse += "Content-ID: " + contentID + "\r\n"; + errorResponse = this.serializeDataServiceVersion(errorResponse, request); // ToDo: Check if we need to observe other odata formats for errors - errorReponse += + errorResponse += "Content-Type: application/json;odata=minimalmetadata;charset=utf-8\r\n"; - errorReponse += "\r\n"; + errorResponse += "\r\n"; // the odata error needs to include the index of the operation that fails // see sample from: // https://docs.microsoft.com/en-us/rest/api/storageservices/performing-entity-group-transactions#sample-error-response // In this case, we need to use a 0 based index for the failing operation - errorReponse += + errorResponse += odataError.body?.replace('"value":"', `\"value\":\"${contentID - 1}:`) + "\r\n"; - return errorReponse; + return errorResponse; } /** @@ -633,24 +633,24 @@ export class TableBatchSerialization extends BatchSerialization { "changeset", "changesetresponse" ); - let errorReponse = ""; + let errorResponse = ""; - errorReponse += changesetBoundary + "\r\n"; + errorResponse += changesetBoundary + "\r\n"; // Errors in batch processing generate Bad Request error - errorReponse = this.serializeHttpStatusCode(errorReponse, 400); - errorReponse = this.SerializeXContentTypeOptions(errorReponse); - errorReponse = this.serializeDataServiceVersion(errorReponse, undefined); + errorResponse = this.serializeHttpStatusCode(errorResponse, 400); + errorResponse = this.SerializeXContentTypeOptions(errorResponse); + errorResponse = this.serializeDataServiceVersion(errorResponse, undefined); // ToDo: Serialize Content type etc - errorReponse += + errorResponse += "Content-Type: application/json;odata=minimalmetadata;charset=utf-8\r\n"; - errorReponse += "\r\n"; + errorResponse += "\r\n"; let requestIdResponseString = ""; if (requestId !== undefined) { requestIdResponseString = `RequestId:${requestId}\\n`; } // 2021-04-23T12:40:31.4944778 const date = truncatedISO8061Date(new Date(), true); - errorReponse += `{\"odata.error\":{\"code\":\"InvalidInput\",\"message\":{\"lang\":\"en-US\",\"value\":\"${odataErrorString}\\n${requestIdResponseString}Time:${date}\"}}}\r\n`; - return errorReponse; + errorResponse += `{\"odata.error\":{\"code\":\"InvalidInput\",\"message\":{\"lang\":\"en-US\",\"value\":\"${odataErrorString}\\n${requestIdResponseString}Time:${date}\"}}}\r\n`; + return errorResponse; } } diff --git a/src/table/entity/EntityProperty.ts b/src/table/entity/EntityProperty.ts index 94a850809..45c7b353b 100644 --- a/src/table/entity/EntityProperty.ts +++ b/src/table/entity/EntityProperty.ts @@ -30,7 +30,7 @@ export function toAnnotationLevel(level: string): AnnotationLevel { case NO_METADATA_ACCEPT: return AnnotationLevel.NO; default: - throw TypeError(`Invalid OData annonation level ${level}.`); + throw TypeError(`Invalid OData annotation level ${level}.`); } } diff --git a/src/table/errors/StorageError.ts b/src/table/errors/StorageError.ts index eac709909..cd75395e5 100644 --- a/src/table/errors/StorageError.ts +++ b/src/table/errors/StorageError.ts @@ -41,11 +41,11 @@ export default class StorageError extends MiddlewareError { storageAdditionalErrorMessages: { [key: string]: string } = {}, context: Context ) { - const pyaload = getPayloadFormat(context); + const payload = getPayloadFormat(context); const isJSON = - pyaload === NO_METADATA_ACCEPT || - pyaload === MINIMAL_METADATA_ACCEPT || - pyaload === FULL_METADATA_ACCEPT; + payload === NO_METADATA_ACCEPT || + payload === MINIMAL_METADATA_ACCEPT || + payload === FULL_METADATA_ACCEPT; const bodyInJSON: any = isJSON ? { @@ -81,7 +81,7 @@ export default class StorageError extends MiddlewareError { "x-ms-version": TABLE_API_VERSION }, body, - isJSON ? `${pyaload};streaming=true;charset=utf-8` : "application/xml" + isJSON ? `${payload};streaming=true;charset=utf-8` : "application/xml" ); this.name = "StorageError"; diff --git a/src/table/errors/StorageErrorFactory.ts b/src/table/errors/StorageErrorFactory.ts index d84a1a834..d9638860c 100644 --- a/src/table/errors/StorageErrorFactory.ts +++ b/src/table/errors/StorageErrorFactory.ts @@ -298,7 +298,7 @@ export default class StorageErrorFactory { return new StorageError( 400, "", - `The specifed resource name contains invalid characters.`, + `The specified resource name contains invalid characters.`, context.contextID || defaultID, undefined, context diff --git a/src/table/handlers/ServiceHandler.ts b/src/table/handlers/ServiceHandler.ts index 51bd3e003..6fe1ad820 100644 --- a/src/table/handlers/ServiceHandler.ts +++ b/src/table/handlers/ServiceHandler.ts @@ -94,7 +94,7 @@ export default class ServiceHandler const tableCtx = new TableStorageContext(context); const accountName = tableCtx.account!; - // TODO: deserializor has a bug that when cors is undefined, + // TODO: deserializer has a bug that when cors is undefined, // it will serialize it to empty array instead of undefined const body = tableCtx.request!.getBody(); const parsedBody = await parseXML(body || ""); diff --git a/src/table/handlers/TableHandler.ts b/src/table/handlers/TableHandler.ts index 699ecc342..183418659 100644 --- a/src/table/handlers/TableHandler.ts +++ b/src/table/handlers/TableHandler.ts @@ -187,7 +187,7 @@ export default class TableHandler extends BaseHandler implements ITableHandler { const prefer = this.getAndCheckPreferHeader(tableContext); this.checkBodyLimit(context, context.request?.getBody()); - // curently unable to use checking functions as the partitionKey + // currently unable to use checking functions as the partitionKey // and rowKey are not coming through the context. // const partitionKey = this.getAndCheckPartitionKey(tableContext); // const rowKey = this.getAndCheckRowKey(tableContext); diff --git a/src/table/persistence/ITableMetadataStore.ts b/src/table/persistence/ITableMetadataStore.ts index 8e5f8fde6..3248e4c5d 100644 --- a/src/table/persistence/ITableMetadataStore.ts +++ b/src/table/persistence/ITableMetadataStore.ts @@ -9,7 +9,7 @@ interface IServiceAdditionalProperties { export type ServicePropertiesModel = Models.TableServiceProperties & IServiceAdditionalProperties; -// Since the host name may change, we don't store host in {@code odatametadata, odatatid} +// Since the host name may change, we don't store host in {@code odatametadata, odataid} export interface IOdataAnnotations { odatametadata: string; odatatype: string; diff --git a/src/table/persistence/LokiTableMetadataStore.ts b/src/table/persistence/LokiTableMetadataStore.ts index 55186ee5d..88cb09503 100644 --- a/src/table/persistence/LokiTableMetadataStore.ts +++ b/src/table/persistence/LokiTableMetadataStore.ts @@ -54,7 +54,7 @@ export default class LokiTableMetadataStore implements ITableMetadataStore { this.createTablesCollection(); this.createServicePropsCollection(); await this.saveDBState(); - this.finalizeInitializionState(); + this.finalizeInitializationState(); } /** @@ -111,7 +111,7 @@ export default class LokiTableMetadataStore implements ITableMetadataStore { public async createTable(context: Context, tableModel: Table): Promise { // Check for table entry in the table registry collection const coll = this.db.getCollection(this.TABLES_COLLECTION); - // Azure Storage Service is case insensitive + // Azure Storage Service is case-insensitive tableModel.table = tableModel.table; this.checkIfTableExists(coll, tableModel, context); @@ -136,7 +136,7 @@ export default class LokiTableMetadataStore implements ITableMetadataStore { ): Promise { // remove table reference from collection registry const coll = this.db.getCollection(this.TABLES_COLLECTION); - // Azure Storage Service is case insensitive + // Azure Storage Service is case-insensitive const tableLower = table.toLocaleLowerCase(); const doc = coll.findOne({ account, @@ -165,7 +165,7 @@ export default class LokiTableMetadataStore implements ITableMetadataStore { tableACL?: TableACL ): Promise { const coll = this.db.getCollection(this.TABLES_COLLECTION); - // Azure Storage Service is case insensitive + // Azure Storage Service is case-insensitive const tableLower = table.toLocaleLowerCase(); const persistedTable = coll.findOne({ account, @@ -195,7 +195,7 @@ export default class LokiTableMetadataStore implements ITableMetadataStore { context: Context ): Promise { const coll = this.db.getCollection(this.TABLES_COLLECTION); - // Azure Storage Service is case insensitive + // Azure Storage Service is case-insensitive const doc = coll.findOne({ account, table: { $regex: [`^${table}$`, "i"] } @@ -607,7 +607,7 @@ export default class LokiTableMetadataStore implements ITableMetadataStore { this.transactionRollbackTheseEntities.length > 0 || this.transactionDeleteTheseEntities.length > 0 ) { - throw new Error("Transaction Overlapp!"); + throw new Error("Transaction Overlap!"); } } @@ -651,7 +651,7 @@ export default class LokiTableMetadataStore implements ITableMetadataStore { * @private * @memberof LokiTableMetadataStore */ - private finalizeInitializionState() { + private finalizeInitializationState() { this.initialized = true; this.closed = false; } @@ -805,8 +805,8 @@ export default class LokiTableMetadataStore implements ITableMetadataStore { } /** - * Gets the collection of entites for a specific table. - * Ensures that table name is case insensitive. + * Gets the collection of entities for a specific table. + * Ensures that table name is case-insensitive. * * @private * @param {string} account @@ -990,7 +990,7 @@ export default class LokiTableMetadataStore implements ITableMetadataStore { encodedIfMatch === "*" || (encodedIfMatch !== undefined && encodedEtag === encodedIfMatch) ) { - const mergedDEntity: Entity = { + const mergedEntity: Entity = { ...doc, ...entity, properties: { @@ -1007,14 +1007,14 @@ export default class LokiTableMetadataStore implements ITableMetadataStore { } const value = entity.properties[key]; - mergedDEntity.properties[key] = value; + mergedEntity.properties[key] = value; - this.filterOdataMetaData(entity, key, mergedDEntity); + this.filterOdataMetaData(entity, key, mergedEntity); } } - tableEntityCollection.update(mergedDEntity); - return mergedDEntity; + tableEntityCollection.update(mergedEntity); + return mergedEntity; } throw StorageErrorFactory.getPreconditionFailed(context); } @@ -1022,13 +1022,13 @@ export default class LokiTableMetadataStore implements ITableMetadataStore { private filterOdataMetaData( entity: Entity, key: string, - mergedDEntity: Entity + mergedEntity: Entity ) { if (entity.properties[`${key}${ODATA_TYPE}`] !== undefined) { - mergedDEntity.properties[`${key}${ODATA_TYPE}`] = + mergedEntity.properties[`${key}${ODATA_TYPE}`] = entity.properties[`${key}${ODATA_TYPE}`]; } else { - delete mergedDEntity.properties[`${key}${ODATA_TYPE}`]; + delete mergedEntity.properties[`${key}${ODATA_TYPE}`]; } } diff --git a/src/table/utils/constants.ts b/src/table/utils/constants.ts index 3dc443a2d..b9d1d78b1 100644 --- a/src/table/utils/constants.ts +++ b/src/table/utils/constants.ts @@ -21,7 +21,7 @@ export const TABLE_API_VERSION = "2024-08-04"; export const VERSION = "3.31.0"; // Max Body size is 4 MB export const BODY_SIZE_MAX = 1024 * 1024 * 4; -// Max Entity sizxe is 1 MB +// Max Entity size is 1 MB export const ENTITY_SIZE_MAX = 1024 * 1024; export const HeaderConstants = { diff --git a/swagger/queue.md b/swagger/queue.md index 44bfbbee0..26e419ba1 100644 --- a/swagger/queue.md +++ b/swagger/queue.md @@ -20,4 +20,4 @@ enum-types: true 1. Remove minimum/maximum limitation for "VisibilityTimeout" and "VisibilityTimeoutRequired". -2. Remove "required" section from defination "AccessPolicy" to align with server behavior. +2. Remove "required" section from definition "AccessPolicy" to align with server behavior. diff --git a/tests/blob/RequestPolicy/OPTIONSRequestPolicyFactory.ts b/tests/blob/RequestPolicy/OPTIONSRequestPolicyFactory.ts index 57e042fcc..a96d8d60a 100644 --- a/tests/blob/RequestPolicy/OPTIONSRequestPolicyFactory.ts +++ b/tests/blob/RequestPolicy/OPTIONSRequestPolicyFactory.ts @@ -5,12 +5,12 @@ import { BaseRequestPolicy, WebResource } from "@azure/storage-blob"; export default class OPTIONSRequestPolicyFactory { // Constructor to accept parameters private origin: string | undefined; - private requstMethod: string | undefined; + private requestMethod: string | undefined; private requestHeaders: string | undefined; - constructor(origin?: string, requstMethod?: string, requestHeaders?: string) { + constructor(origin?: string, requestMethod?: string, requestHeaders?: string) { this.origin = origin; - this.requstMethod = requstMethod; + this.requestMethod = requestMethod; this.requestHeaders = requestHeaders; } @@ -20,7 +20,7 @@ export default class OPTIONSRequestPolicyFactory { nextPolicy, options, this.origin, - this.requstMethod, + this.requestMethod, this.requestHeaders ); } @@ -29,18 +29,18 @@ export default class OPTIONSRequestPolicyFactory { // Create a policy by extending from Azure.BaseRequestPolicy class OPTIONSRequestPolicy extends BaseRequestPolicy { private origin: string | undefined; - private requstMethod: string | undefined; + private requestMethod: string | undefined; private requestHeaders: string | undefined; constructor( nextPolicy: any, options: any, origin?: string, - requstMethod?: string, + requestMethod?: string, requestHeaders?: string ) { super(nextPolicy, options); this.origin = origin; - this.requstMethod = requstMethod; + this.requestMethod = requestMethod; this.requestHeaders = requestHeaders; } @@ -52,10 +52,10 @@ class OPTIONSRequestPolicy extends BaseRequestPolicy { if (this.origin !== undefined) { request.headers.set("Origin", `${this.origin}`); } - if (this.requstMethod !== undefined) { + if (this.requestMethod !== undefined) { request.headers.set( "Access-Control-Request-Method", - `${this.requstMethod}` + `${this.requestMethod}` ); } if (this.requestHeaders !== undefined) { diff --git a/tests/blob/RequestPolicy/QueryRequestPolicyFactory.ts b/tests/blob/RequestPolicy/QueryRequestPolicyFactory.ts index 22996816b..99d3d4fc1 100644 --- a/tests/blob/RequestPolicy/QueryRequestPolicyFactory.ts +++ b/tests/blob/RequestPolicy/QueryRequestPolicyFactory.ts @@ -1,6 +1,6 @@ import { BaseRequestPolicy, WebResource } from "@azure/storage-blob"; -// Replace the Query in Uri, from old value to new value. This need run with SAS authentication. +// Replace the Query in URI, from old value to new value. This need run with SAS authentication. // Create a policy factory with create() method provided // In TypeScript, following factory class needs to implement Azure.RequestPolicyFactory type export default class QueryRequestPolicyFactory { diff --git a/tests/blob/apis/blob.test.ts b/tests/blob/apis/blob.test.ts index 51325c3b1..ac07bc396 100644 --- a/tests/blob/apis/blob.test.ts +++ b/tests/blob/apis/blob.test.ts @@ -73,7 +73,7 @@ describe("BlobAPIs", () => { await containerClient.delete(); }); - it("download with with default parameters @loki @sql", async () => { + it("download with default parameters @loki @sql", async () => { const result = await blobClient.download(0); assert.deepStrictEqual(await bodyToString(result, content.length), content); assert.equal(result.contentRange, undefined); @@ -295,7 +295,7 @@ describe("BlobAPIs", () => { it("delete should work for valid ifNoneMatch @loki @sql", async () => { const result = await blobClient.delete({ conditions: { - ifNoneMatch: "unmatchetag" + ifNoneMatch: "unmatchedetag" } }); assert.equal( @@ -1762,7 +1762,7 @@ describe("BlobAPIs", () => { let blockBlobClient1 = containerClient.getBlockBlobClient(blockBlobName1); await blockBlobClient1.upload(content, content.length); - // tag acount should <= 10 + // tag count should <= 10 const tooManyTags = { tag1: "val1", tag2: "val2", @@ -1954,11 +1954,11 @@ describe("BlobAPIs", () => { // TODO: implement the case later }); - it("Break Lease on Infinite Lease, if give valid breakPeriod, should be broken after breadperiod @loki @sql", async () => { + it("Break Lease on Infinite Lease, if give valid breakPeriod, should be broken after breakperiod @loki @sql", async () => { // TODO: implement the case later }); - it("Break Lease on Infinite Lease, if not give breakPeriod, should be broken immidiately @loki @sql", async () => { + it("Break Lease on Infinite Lease, if not give breakPeriod, should be broken immediately @loki @sql", async () => { // TODO: implement the case later }); diff --git a/tests/blob/apis/blockblob.test.ts b/tests/blob/apis/blockblob.test.ts index 35845deae..b483a2e7a 100644 --- a/tests/blob/apis/blockblob.test.ts +++ b/tests/blob/apis/blockblob.test.ts @@ -164,7 +164,7 @@ describe("BlockBlobAPIs", () => { ); await blockBlobClient.stageBlock(base64encode("2"), body, body.length); - // TODO: azure/storage-blob 12.9.0 will fail on list uncimmited blob from container, will skip following code until this is fix in SDK or Azurite + // TODO: azure/storage-blob 12.9.0 will fail on list uncommitted blob from container, will skip following code until this is fix in SDK or Azurite // const listBlobResponse = await ( // await containerClient // .listBlobsFlat({ includeUncommitedBlobs: true }) @@ -196,7 +196,7 @@ describe("BlockBlobAPIs", () => { await blockBlobClient.stageBlock(base64encode("1"), body, body.length); - // TODO: azure/storage-blob 12.9.0 will fail on list uncimmited blob from container, will skip following code until this is fix in SDK or Azurite + // TODO: azure/storage-blob 12.9.0 will fail on list uncommitted blob from container, will skip following code until this is fix in SDK or Azurite // const listBlobResponse = ( // await containerClient // .listBlobsFlat({ includeUncommitedBlobs: true }) @@ -480,7 +480,7 @@ describe("BlockBlobAPIs", () => { await blockBlobClient.stageBlock(base64encode("1"), body, body.length); await blockBlobClient.stageBlock(base64encode("2"), body, body.length); - // Getproperties on a block blob without commited block will return 404 + // Getproperties on a block blob without committed block will return 404 let err; try { await blockBlobClient.getProperties(); @@ -489,7 +489,7 @@ describe("BlockBlobAPIs", () => { } assert.deepStrictEqual(err.statusCode, 404); - // Stage block with block Id length different than the exist uncommited blocks will fail with 400 + // Stage block with block Id length different than the exist uncommitted blocks will fail with 400 try { await blockBlobClient.stageBlock(base64encode("123"), body, body.length); } catch (error) { @@ -529,7 +529,7 @@ describe("BlockBlobAPIs", () => { assert.equal(listResponse.uncommittedBlocks![0].size, body.length); }); - it("getBlockList for non-existent blob @loki @sql", async () => { + it("getBlockList for nonexistent blob @loki @sql", async () => { try { await blockBlobClient.getBlockList("committed"); } catch (error) { @@ -539,7 +539,7 @@ describe("BlockBlobAPIs", () => { assert.fail(); }); - it("getBlockList for non-existent container @loki @sql", async () => { + it("getBlockList for nonexistent container @loki @sql", async () => { const fakeContainer = getUniqueName("container"); const fakeContainerClient = serviceClient.getContainerClient(fakeContainer); const fakeBlobClient = fakeContainerClient.getBlobClient(blobName); @@ -632,7 +632,7 @@ describe("BlockBlobAPIs", () => { try { await destBlobClient.beginCopyFromURL(sourceURLWithoutPermission); - assert.fail("Copy without required permision should fail"); + assert.fail("Copy without required permission should fail"); } catch (ex) { assert.deepStrictEqual(ex.statusCode, 403); diff --git a/tests/blob/apis/container.test.ts b/tests/blob/apis/container.test.ts index 64cf39880..ca9aa039a 100644 --- a/tests/blob/apis/container.test.ts +++ b/tests/blob/apis/container.test.ts @@ -563,7 +563,7 @@ describe("ContainerAPIs", () => { } }); - // TODO: azure/storage-blob 12.9.0 will fail on list uncimmited blob from container, will skip the case until this is fix in SDK or Azurite + // TODO: azure/storage-blob 12.9.0 will fail on list uncommitted blob from container, will skip the case until this is fix in SDK or Azurite it.skip("should only show uncommitted blobs in listBlobFlatSegment with uncommittedblobs option @loki @sql", async () => { const blobClient = containerClient.getBlobClient( getUniqueName("uncommittedblob") @@ -1121,7 +1121,7 @@ describe("ContainerAPIs", () => { assert.ok(result); assert.equal(result.segment.blobItems.length, 4); - // list with mutiple include + // list with multiple include // create container client for pipeline = newPipeline( new AnonymousCredential(), @@ -1138,7 +1138,7 @@ describe("ContainerAPIs", () => { ContainerClientForOptions = serviceClientForOptions.getContainerClient(containerName); - // list blob with mutiple include + // list blob with multiple include result = ( await ContainerClientForOptions .listBlobsFlat({ @@ -1151,7 +1151,7 @@ describe("ContainerAPIs", () => { assert.equal(result.segment.blobItems.length, 4); }); - // Skip the case currently since js sdk caculate the stringToSign with "+" in prefix instead of decode to space + // Skip the case currently since js sdk calculate the stringToSign with "+" in prefix instead of decode to space it.skip("List blob should success with '+' in query @loki @sql", async () => { const blobClients = []; let blobNames: Array = [ diff --git a/tests/blob/apis/pageblob.test.ts b/tests/blob/apis/pageblob.test.ts index eb9bdfb27..ac6ed07d2 100644 --- a/tests/blob/apis/pageblob.test.ts +++ b/tests/blob/apis/pageblob.test.ts @@ -68,10 +68,10 @@ describe("PageBlobAPIs", () => { }); it("create with default parameters @loki", async () => { - const reuslt_create = await pageBlobClient.create(512); + const result_create = await pageBlobClient.create(512); assert.equal( - reuslt_create._response.request.headers.get("x-ms-client-request-id"), - reuslt_create.clientRequestId + result_create._response.request.headers.get("x-ms-client-request-id"), + result_create.clientRequestId ); const result = await blobClient.download(0); diff --git a/tests/blob/apis/service.test.ts b/tests/blob/apis/service.test.ts index a79884450..1f52e86d9 100644 --- a/tests/blob/apis/service.test.ts +++ b/tests/blob/apis/service.test.ts @@ -413,7 +413,7 @@ describe("ServiceAPIs", () => { }); // fix issue 2382, 2416 - it("ListContainers without include metadata should not return contaienr metadata. @loki @sql", async () => { + it("ListContainers without include metadata should not return container metadata. @loki @sql", async () => { const containerNamePrefix = getUniqueName("container"); const containerName1 = `${containerNamePrefix}x1`; const containerName2 = `${containerNamePrefix}x2`; @@ -467,7 +467,7 @@ describe("ServiceAPIs", () => { ); }); - it("Get Account/Service Properties with Uri has suffix '/' after account name @loki @sql", async () => { + it("Get Account/Service Properties with URI has suffix '/' after account name @loki @sql", async () => { const baseURL1 = `http://${server.config.host}:${server.config.port}/devstoreaccount1/`; const serviceClient1 = new BlobServiceClient( baseURL1, diff --git a/tests/blob/blobCorsRequest.test.ts b/tests/blob/blobCorsRequest.test.ts index a2daa1188..cd54d667f 100644 --- a/tests/blob/blobCorsRequest.test.ts +++ b/tests/blob/blobCorsRequest.test.ts @@ -352,7 +352,7 @@ describe("Blob Cors requests test", () => { // No match let origin = "test"; let requestMethod = "GET"; - let reqestHeaders = "head"; + let requestHeaders = "head"; let pipeline = newPipeline( new StorageSharedKeyCredential( @@ -366,7 +366,7 @@ describe("Blob Cors requests test", () => { } ); pipeline.factories.unshift( - new OPTIONSRequestPolicyFactory(origin, requestMethod, reqestHeaders) + new OPTIONSRequestPolicyFactory(origin, requestMethod, requestHeaders) ); let serviceClientForOptions = new BlobServiceClient(baseURL, pipeline); @@ -387,7 +387,7 @@ describe("Blob Cors requests test", () => { // Match first cors. origin = "test"; requestMethod = "GET"; - reqestHeaders = "header"; + requestHeaders = "header"; pipeline = newPipeline( new StorageSharedKeyCredential( @@ -401,7 +401,7 @@ describe("Blob Cors requests test", () => { } ); pipeline.factories.unshift( - new OPTIONSRequestPolicyFactory(origin, requestMethod, reqestHeaders) + new OPTIONSRequestPolicyFactory(origin, requestMethod, requestHeaders) ); serviceClientForOptions = new BlobServiceClient(baseURL, pipeline); @@ -411,7 +411,7 @@ describe("Blob Cors requests test", () => { // Match second cors. origin = "test"; requestMethod = "PUT"; - reqestHeaders = "head"; + requestHeaders = "head"; pipeline = newPipeline( new StorageSharedKeyCredential( @@ -425,7 +425,7 @@ describe("Blob Cors requests test", () => { } ); pipeline.factories.unshift( - new OPTIONSRequestPolicyFactory(origin, requestMethod, reqestHeaders) + new OPTIONSRequestPolicyFactory(origin, requestMethod, requestHeaders) ); serviceClientForOptions = new BlobServiceClient(baseURL, pipeline); @@ -435,7 +435,7 @@ describe("Blob Cors requests test", () => { // No match. origin = "test"; requestMethod = "POST"; - reqestHeaders = "hea"; + requestHeaders = "hea"; pipeline = newPipeline( new StorageSharedKeyCredential( @@ -449,7 +449,7 @@ describe("Blob Cors requests test", () => { } ); pipeline.factories.unshift( - new OPTIONSRequestPolicyFactory(origin, requestMethod, reqestHeaders) + new OPTIONSRequestPolicyFactory(origin, requestMethod, requestHeaders) ); serviceClientForOptions = new BlobServiceClient(baseURL, pipeline); @@ -470,7 +470,7 @@ describe("Blob Cors requests test", () => { // Match third cors. origin = "test"; requestMethod = "POST"; - reqestHeaders = "headerheader"; + requestHeaders = "headerheader"; pipeline = newPipeline( new StorageSharedKeyCredential( @@ -484,7 +484,7 @@ describe("Blob Cors requests test", () => { } ); pipeline.factories.unshift( - new OPTIONSRequestPolicyFactory(origin, requestMethod, reqestHeaders) + new OPTIONSRequestPolicyFactory(origin, requestMethod, requestHeaders) ); serviceClientForOptions = new BlobServiceClient(baseURL, pipeline); @@ -492,7 +492,7 @@ describe("Blob Cors requests test", () => { assert.ok(res._response.status === 200); }); - it("OPTIONS request should work with matching rule containing Origion * @loki @sql", async () => { + it("OPTIONS request should work with matching rule containing Origin * @loki @sql", async () => { const serviceProperties = await serviceClient.getProperties(); const newCORS = { @@ -787,7 +787,7 @@ describe("Blob Cors requests test", () => { const serviceClientWithOrigin = new BlobServiceClient(baseURL, pipeline); const containerClientWithOrigin = - serviceClientWithOrigin.getContainerClient("notexistcontainer"); + serviceClientWithOrigin.getContainerClient("nonexistentcontainer"); try { await containerClientWithOrigin.getProperties(); diff --git a/tests/blob/conditions.test.ts b/tests/blob/conditions.test.ts index a155b4217..388535752 100644 --- a/tests/blob/conditions.test.ts +++ b/tests/blob/conditions.test.ts @@ -167,7 +167,7 @@ describe("ConditionResourceAdapter", () => { }); describe("ReadConditionalHeadersValidator for exist resource", () => { - it("Should return 412 preconditoin failed for failed if-match results @loki @sql", () => { + it("Should return 412 precondition failed for failed if-match results @loki @sql", () => { const validator = new ReadConditionalHeadersValidator(); const modifiedAccessConditions = { ifMatch: "etag1" }; const blobModel = { @@ -202,7 +202,7 @@ describe("ReadConditionalHeadersValidator for exist resource", () => { assert.fail(); }); - it("Should not return 412 preconditoin failed for successful if-match results @loki @sql", () => { + it("Should not return 412 precondition failed for successful if-match results @loki @sql", () => { const validator = new ReadConditionalHeadersValidator(); const modifiedAccessConditions = { ifMatch: "etag1" }; const blobModel = { @@ -364,7 +364,7 @@ describe("ReadConditionalHeadersValidator for exist resource", () => { ); }); - it("Should return 412 preconditoin failed for failed if-unmodified-since results @loki @sql", () => { + it("Should return 412 precondition failed for failed if-unmodified-since results @loki @sql", () => { const validator = new ReadConditionalHeadersValidator(); const modifiedAccessConditions = { ifUnmodifiedSince: new Date("2019/01/01") @@ -401,7 +401,7 @@ describe("ReadConditionalHeadersValidator for exist resource", () => { assert.fail(); }); - it("Should not return 412 preconditoin failed when if-unmodified-since same with lastModified @loki @sql", () => { + it("Should not return 412 precondition failed when if-unmodified-since same with lastModified @loki @sql", () => { const validator = new ReadConditionalHeadersValidator(); const modifiedAccessConditions = { ifUnmodifiedSince: new Date("2019/01/01") @@ -420,7 +420,7 @@ describe("ReadConditionalHeadersValidator for exist resource", () => { ); }); - it("Should not return 412 preconditoin failed for successful if-unmodified-since results @loki @sql", () => { + it("Should not return 412 precondition failed for successful if-unmodified-since results @loki @sql", () => { const validator = new ReadConditionalHeadersValidator(); const modifiedAccessConditions = { ifUnmodifiedSince: new Date("2019/01/01") @@ -627,7 +627,7 @@ describe("ReadConditionalHeadersValidator for exist resource", () => { }); }); -describe("ReadConditionalHeadersValidator for unexist resource", () => { +describe("ReadConditionalHeadersValidator for nonexistent resource", () => { it("Should return 412 Precondition Failed for any ifMatch @loki @sql", () => { const validator = new ReadConditionalHeadersValidator(); const modifiedAccessConditions = { @@ -693,7 +693,7 @@ describe("ReadConditionalHeadersValidator for unexist resource", () => { }); }); -describe("WriteConditionalHeadersValidator for unexist resource", () => { +describe("WriteConditionalHeadersValidator for nonexistent resource", () => { it("Should throw 400 Bad Request for invalid combinations conditional headers @loki @sql", () => { const validator = new WriteConditionalHeadersValidator(); const modifiedAccessConditions = { diff --git a/tests/blob/oauth.test.ts b/tests/blob/oauth.test.ts index e27480d73..ad5b8fdaf 100644 --- a/tests/blob/oauth.test.ts +++ b/tests/blob/oauth.test.ts @@ -355,7 +355,7 @@ describe("Blob OAuth Basic", () => { } assert.ok(failed); - // Eearlier user delegation key expirty time + // Earlier user delegation key expiry time startTime = new Date(); startTime.setDate(startTime.getDate() - 1); expiryTime = new Date(); diff --git a/tests/blob/sas.test.ts b/tests/blob/sas.test.ts index f7b7d34d3..d3164f58e 100644 --- a/tests/blob/sas.test.ts +++ b/tests/blob/sas.test.ts @@ -2168,7 +2168,7 @@ describe("Shared Access Signature (SAS) authentication", () => { } }); - // Copy From Uri + // Copy From URI const targetBlob = targetContainerClient.getBlockBlobClient(blobName); const targetBlobWithProps = targetContainerClient.getBlockBlobClient( blobName2 diff --git a/tests/exe.test.ts b/tests/exe.test.ts index 73b67cecf..267289704 100644 --- a/tests/exe.test.ts +++ b/tests/exe.test.ts @@ -287,7 +287,7 @@ describe("exe test", () => { afterEach(async () => { await containerClient.delete(); }); - it("download with with default parameters @loki @sql", async () => { + it("download with default parameters @loki @sql", async () => { const result = await blobClient.download(0); assert.deepStrictEqual( await bodyToString(result, content.length), diff --git a/tests/linuxbinary.test.ts b/tests/linuxbinary.test.ts index 7bfcac2ef..b0d56f03f 100644 --- a/tests/linuxbinary.test.ts +++ b/tests/linuxbinary.test.ts @@ -254,7 +254,7 @@ describe("linux binary test", () => { afterEach(async () => { await containerClient.delete(); }); - it("download with with default parameters @loki @sql", async () => { + it("download with default parameters @loki @sql", async () => { const result = await blobClient.download(0); assert.deepStrictEqual(await bodyToString(result, content.length), content); assert.equal(result.contentRange, undefined); diff --git a/tests/queue/RequestPolicy/OPTIONSRequestPolicyFactory.ts b/tests/queue/RequestPolicy/OPTIONSRequestPolicyFactory.ts index 9f859a2c3..e53271798 100644 --- a/tests/queue/RequestPolicy/OPTIONSRequestPolicyFactory.ts +++ b/tests/queue/RequestPolicy/OPTIONSRequestPolicyFactory.ts @@ -5,12 +5,12 @@ import { BaseRequestPolicy, WebResource } from "@azure/storage-queue"; export default class OPTIONSRequestPolicyFactory { // Constructor to accept parameters private origin: string | undefined; - private requstMethod: string | undefined; + private requestMethod: string | undefined; private requestHeaders: string | undefined; - constructor(origin?: string, requstMethod?: string, requestHeaders?: string) { + constructor(origin?: string, requestMethod?: string, requestHeaders?: string) { this.origin = origin; - this.requstMethod = requstMethod; + this.requestMethod = requestMethod; this.requestHeaders = requestHeaders; } @@ -20,7 +20,7 @@ export default class OPTIONSRequestPolicyFactory { nextPolicy, options, this.origin, - this.requstMethod, + this.requestMethod, this.requestHeaders ); } @@ -30,18 +30,18 @@ export default class OPTIONSRequestPolicyFactory { // tslint:disable-next-line: max-classes-per-file class OPTIONSRequestPolicy extends BaseRequestPolicy { private origin: string | undefined; - private requstMethod: string | undefined; + private requestMethod: string | undefined; private requestHeaders: string | undefined; constructor( nextPolicy: any, options: any, origin?: string, - requstMethod?: string, + requestMethod?: string, requestHeaders?: string ) { super(nextPolicy, options); this.origin = origin; - this.requstMethod = requstMethod; + this.requestMethod = requestMethod; this.requestHeaders = requestHeaders; } @@ -53,10 +53,10 @@ class OPTIONSRequestPolicy extends BaseRequestPolicy { if (this.origin !== undefined) { request.headers.set("Origin", `${this.origin}`); } - if (this.requstMethod !== undefined) { + if (this.requestMethod !== undefined) { request.headers.set( "Access-Control-Request-Method", - `${this.requstMethod}` + `${this.requestMethod}` ); } if (this.requestHeaders !== undefined) { diff --git a/tests/queue/queueCorsRequest.test.ts b/tests/queue/queueCorsRequest.test.ts index 5753b2681..f7e3ca726 100644 --- a/tests/queue/queueCorsRequest.test.ts +++ b/tests/queue/queueCorsRequest.test.ts @@ -358,7 +358,7 @@ describe("Queue Cors requests test", () => { // No match let origin = "test"; let requestMethod = "GET"; - let reqestHeaders = "head"; + let requestHeaders = "head"; let pipeline = newPipeline( new StorageSharedKeyCredential( @@ -370,7 +370,7 @@ describe("Queue Cors requests test", () => { } ); pipeline.factories.unshift( - new OPTIONSRequestPolicyFactory(origin, requestMethod, reqestHeaders) + new OPTIONSRequestPolicyFactory(origin, requestMethod, requestHeaders) ); let serviceClientForOPTIONS = new QueueServiceClient(baseURL, pipeline); @@ -391,7 +391,7 @@ describe("Queue Cors requests test", () => { // Match first cors. origin = "test"; requestMethod = "GET"; - reqestHeaders = "header"; + requestHeaders = "header"; pipeline = newPipeline( new StorageSharedKeyCredential( @@ -403,7 +403,7 @@ describe("Queue Cors requests test", () => { } ); pipeline.factories.unshift( - new OPTIONSRequestPolicyFactory(origin, requestMethod, reqestHeaders) + new OPTIONSRequestPolicyFactory(origin, requestMethod, requestHeaders) ); serviceClientForOPTIONS = new QueueServiceClient(baseURL, pipeline); @@ -413,7 +413,7 @@ describe("Queue Cors requests test", () => { // Match second cors. origin = "test"; requestMethod = "PUT"; - reqestHeaders = "head"; + requestHeaders = "head"; pipeline = newPipeline( new StorageSharedKeyCredential( @@ -425,7 +425,7 @@ describe("Queue Cors requests test", () => { } ); pipeline.factories.unshift( - new OPTIONSRequestPolicyFactory(origin, requestMethod, reqestHeaders) + new OPTIONSRequestPolicyFactory(origin, requestMethod, requestHeaders) ); serviceClientForOPTIONS = new QueueServiceClient(baseURL, pipeline); @@ -435,7 +435,7 @@ describe("Queue Cors requests test", () => { // No match. origin = "test"; requestMethod = "POST"; - reqestHeaders = "hea"; + requestHeaders = "hea"; pipeline = newPipeline( new StorageSharedKeyCredential( @@ -447,7 +447,7 @@ describe("Queue Cors requests test", () => { } ); pipeline.factories.unshift( - new OPTIONSRequestPolicyFactory(origin, requestMethod, reqestHeaders) + new OPTIONSRequestPolicyFactory(origin, requestMethod, requestHeaders) ); serviceClientForOPTIONS = new QueueServiceClient(baseURL, pipeline); @@ -468,7 +468,7 @@ describe("Queue Cors requests test", () => { // Match third cors. origin = "test"; requestMethod = "POST"; - reqestHeaders = "headerheader"; + requestHeaders = "headerheader"; pipeline = newPipeline( new StorageSharedKeyCredential( @@ -480,7 +480,7 @@ describe("Queue Cors requests test", () => { } ); pipeline.factories.unshift( - new OPTIONSRequestPolicyFactory(origin, requestMethod, reqestHeaders) + new OPTIONSRequestPolicyFactory(origin, requestMethod, requestHeaders) ); serviceClientForOPTIONS = new QueueServiceClient(baseURL, pipeline); @@ -488,7 +488,7 @@ describe("Queue Cors requests test", () => { assert.ok(res._response.status === 200); }); - it("OPTIONS request should work with matching rule containing Origion * @loki", async () => { + it("OPTIONS request should work with matching rule containing Origin * @loki", async () => { const serviceProperties = await serviceClient.getProperties(); const newCORS = { @@ -700,7 +700,7 @@ describe("Queue Cors requests test", () => { const serviceClientWithOrigin = new QueueServiceClient(baseURL, pipeline); const queueClientWithOrigin = serviceClientWithOrigin.getQueueClient( - "notexistcontainer" + "nonexistentcontainer" ); try { diff --git a/tests/queue/queueSpecialnaming.test.ts b/tests/queue/queueSpecialnaming.test.ts index f561b2e69..eb0046a44 100644 --- a/tests/queue/queueSpecialnaming.test.ts +++ b/tests/queue/queueSpecialnaming.test.ts @@ -127,7 +127,7 @@ describe("Queue SpecialNaming", () => { assert.ok(error); assert.ok( error.message.includes( - "The specifed resource name contains invalid characters." + "The specified resource name contains invalid characters." ) ); @@ -149,7 +149,7 @@ describe("Queue SpecialNaming", () => { assert.ok(error); assert.ok( error.message.includes( - "The specifed resource name contains invalid characters." + "The specified resource name contains invalid characters." ) ); @@ -164,7 +164,7 @@ describe("Queue SpecialNaming", () => { assert.ok(error); assert.ok( error.message.includes( - "The specifed resource name contains invalid characters." + "The specified resource name contains invalid characters." ) ); @@ -184,7 +184,7 @@ describe("Queue SpecialNaming", () => { assert.ok(error); assert.ok( error.message.includes( - "The specifed resource name contains invalid characters." + "The specified resource name contains invalid characters." ) ); }); diff --git a/tests/table/RequestPolicy/OPTIONSRequestPolicy.ts b/tests/table/RequestPolicy/OPTIONSRequestPolicy.ts index 1b2f4eaf5..02bee4e4a 100644 --- a/tests/table/RequestPolicy/OPTIONSRequestPolicy.ts +++ b/tests/table/RequestPolicy/OPTIONSRequestPolicy.ts @@ -4,14 +4,14 @@ import { SendRequest, PipelineRequest, PipelineResponse } from "@azure/core-rest export default class OPTIONSRequestPolicy { // Constructor to accept parameters private origin: string | undefined; - private requstMethod: string | undefined; + private requestMethod: string | undefined; private requestHeaders: string | undefined; name: string; - constructor(name: string, origin?: string, requstMethod?: string, requestHeaders?: string) { + constructor(name: string, origin?: string, requestMethod?: string, requestHeaders?: string) { this.name = name; this.origin = origin; - this.requstMethod = requstMethod; + this.requestMethod = requestMethod; this.requestHeaders = requestHeaders; } @@ -21,10 +21,10 @@ export default class OPTIONSRequestPolicy { if (this.origin !== undefined) { request.headers.set("Origin", `${this.origin}`); } - if (this.requstMethod !== undefined) { + if (this.requestMethod !== undefined) { request.headers.set( "Access-Control-Request-Method", - `${this.requstMethod}` + `${this.requestMethod}` ); } if (this.requestHeaders !== undefined) { diff --git a/tests/table/apis/table.entity.apostrophe.azure-storage.test.ts b/tests/table/apis/table.entity.apostrophe.azure-storage.test.ts index af951e17b..72537bdd9 100644 --- a/tests/table/apis/table.entity.apostrophe.azure-storage.test.ts +++ b/tests/table/apis/table.entity.apostrophe.azure-storage.test.ts @@ -405,7 +405,7 @@ function testMergeBatch( reject(batchError); } else { assert.strictEqual(batchResponse.statusCode, 202); - // the checks below deliverately do not follow the ordering + // the checks below deliberately do not follow the ordering // of the entity array tableService.retrieveEntity( tableName, diff --git a/tests/table/apis/table.entity.azure.data-tables.test.ts b/tests/table/apis/table.entity.azure.data-tables.test.ts index 8a7fc1ad1..3f4b9f3ff 100644 --- a/tests/table/apis/table.entity.azure.data-tables.test.ts +++ b/tests/table/apis/table.entity.azure.data-tables.test.ts @@ -224,7 +224,7 @@ describe("table Entity APIs test - using Azure/data-tables", () => { assert.notStrictEqual( result1259a.etag, undefined, - "Did not create entity correctly, etag weas null" + "Did not create entity correctly, etag was null" ); const check1259a = await tableClient.getEntity( @@ -284,7 +284,7 @@ describe("table Entity APIs test - using Azure/data-tables", () => { assert.notStrictEqual( result1259a.etag, undefined, - "Did not create entity correctly, etag weas null" + "Did not create entity correctly, etag was null" ); const check1259a = await tableClient.getEntity( @@ -384,7 +384,7 @@ describe("table Entity APIs test - using Azure/data-tables", () => { }); // https://github.com/Azure/Azurite/issues/1286 - it("08. Should update Etags with sufficient granualrity, @loki", async () => { + it("08. Should update Etags with sufficient granularity, @loki", async () => { const tableClient = createAzureDataTablesClient( testLocalAzuriteInstance, getUniqueName("etags") diff --git a/tests/table/apis/table.entity.issues.test.ts b/tests/table/apis/table.entity.issues.test.ts index 3cc1b03f6..a8d3af055 100644 --- a/tests/table/apis/table.entity.issues.test.ts +++ b/tests/table/apis/table.entity.issues.test.ts @@ -299,7 +299,7 @@ describe("table Entity APIs test : Issues", () => { }); // from issue #1201 - it("should allow the deletion of entities using empty string as the parition key, @loki", async () => { + it("should allow the deletion of entities using empty string as the partition key, @loki", async () => { const emptyPartitionKey = ""; const tableClient = createAzureDataTablesClient( testLocalAzuriteInstance, diff --git a/tests/table/apis/table.entity.rest.test.ts b/tests/table/apis/table.entity.rest.test.ts index 131090148..b5976b742 100644 --- a/tests/table/apis/table.entity.rest.test.ts +++ b/tests/table/apis/table.entity.rest.test.ts @@ -343,7 +343,7 @@ describe("table Entity APIs REST tests", () => { assert.strictEqual( notExist, 1, - "We did not get the expected non-existent error." + "We did not get the expected nonexistent error." ); }); @@ -631,7 +631,7 @@ describe("table Entity APIs REST tests", () => { * Check that ifmatch * update works... * if etag == *, then tableClient.updateEntity is calling "Merge" via PATCH with merge option. * Same if etag is omitted. Patch usage is not documented. - * if Replace option, calling "Update" in the table handler, which is caling insertOrUpdate in metadata + * if Replace option, calling "Update" in the table handler, which is calling insertOrUpdate in metadata * * Test If-Match cases * https://docs.microsoft.com/en-us/rest/api/storageservices/update-entity2 @@ -699,7 +699,7 @@ describe("table Entity APIs REST tests", () => { restFunction: putToAzurite, expectedStatus: 204, expectSuccess: true, - errorMessage: "We should not fail PUT with with * If-Match" + errorMessage: "We should not fail PUT with * If-Match" }, { name: "case 2 : Update Entity : PUT with old etag in If-Match.", diff --git a/tests/table/apis/table.test.ts b/tests/table/apis/table.test.ts index 6051bb996..82774c3f5 100644 --- a/tests/table/apis/table.test.ts +++ b/tests/table/apis/table.test.ts @@ -399,7 +399,7 @@ describe("table APIs test", () => { }); }); - it("should delete a table using case insensitive logic, @loki", (done) => { + it("should delete a table using case-insensitive logic, @loki", (done) => { tableName = getUniqueName("caseInsensitive"); tableService.createTable(tableName, (error) => { if (error) { diff --git a/tests/table/auth/tableCorsRequest.test.ts b/tests/table/auth/tableCorsRequest.test.ts index 076737670..611e150e2 100644 --- a/tests/table/auth/tableCorsRequest.test.ts +++ b/tests/table/auth/tableCorsRequest.test.ts @@ -405,7 +405,7 @@ describe("table Entity APIs test", () => { await serviceClientForOPTIONS.getProperties(); }); - it("OPTIONS request should work with matching rule containing Origion * @loki", async () => { + it("OPTIONS request should work with matching rule containing Origin * @loki", async () => { const serviceProperties = await serviceClient.getProperties(); const newCORS = { diff --git a/tests/table/go/main.go b/tests/table/go/main.go index 144bb9c20..752643cfa 100644 --- a/tests/table/go/main.go +++ b/tests/table/go/main.go @@ -18,7 +18,7 @@ insert some entities as a batch, and query the table for those entities. This is to reproduce and ensure that we have not introduced any MIME Serialization bugs for the Azure Go SDK. I use the modified samples from the SDK and the Go SDK team to create this test and validate -the behvaior of Azurite: +the behavior of Azurite: https://github.com/Azure/azure-sdk-for-go/tree/sdk/data/aztables/v1.0.1/sdk/data/aztables/ */ func main() { diff --git a/tests/table/unit/deserialization.unit.test.ts b/tests/table/unit/deserialization.unit.test.ts index b185611ba..95f0557d0 100644 --- a/tests/table/unit/deserialization.unit.test.ts +++ b/tests/table/unit/deserialization.unit.test.ts @@ -356,7 +356,7 @@ describe("batch deserialization unit tests, these are not the API integration te assert.strictEqual( extractedPath[0], value.path, - "Uri path did not parse correctly!" + "URI path did not parse correctly!" ); } else { assert.notStrictEqual( diff --git a/tests/table/unit/mock.request.serialization.strings.ts b/tests/table/unit/mock.request.serialization.strings.ts index 2ecd2d3e6..053c15c1a 100644 --- a/tests/table/unit/mock.request.serialization.strings.ts +++ b/tests/table/unit/mock.request.serialization.strings.ts @@ -2,25 +2,25 @@ export default class SerializationRequestMockStrings { // #################### - // Mocks for a batch of 3 Inserts using the Javascript SDK + // Mocks for a batch of 3 Inserts using the JavaScript SDK // #################### // prettier-ignore public static Sample3InsertsUsingSDK: string ='--batch_7679a9f9b2dde130e791580c53508a5a\ncontent-type: multipart/mixed;charset="utf-8";boundary=changeset_7679a9f9b2dde130e791580c53508a5a\n\n--changeset_7679a9f9b2dde130e791580c53508a5a\ncontent-type: application/http\ncontent-transfer-encoding: binary\n\nPOST http://127.0.0.1:11002/devstoreaccount1/table160837408807101776 HTTP/1.1\nPrefer: return-content\ncontent-length: 76\ncontent-type: application/json;type=entry\naccept: application/json;odata=minimalmetadata\nmaxdataserviceversion: 3.0;NetFx\n\n{"PartitionKey":"part1","RowKey":"row160837408812000231","myValue":"value1"}\n--changeset_7679a9f9b2dde130e791580c53508a5a\ncontent-type: application/http\ncontent-transfer-encoding: binary\n\nPOST http://127.0.0.1:11002/devstoreaccount1/table160837408807101776 HTTP/1.1\nPrefer: return-content\ncontent-length: 76\ncontent-type: application/json;type=entry\naccept: application/json;odata=minimalmetadata\nmaxdataserviceversion: 3.0;NetFx\ncontent-id: 1\n\n{"PartitionKey":"part1","RowKey":"row160837408812008370","myValue":"value1"}\n--changeset_7679a9f9b2dde130e791580c53508a5a\ncontent-type: application/http\ncontent-transfer-encoding: binary\n\nPOST http://127.0.0.1:11002/devstoreaccount1/table160837408807101776 HTTP/1.1\nPrefer: return-content\ncontent-length: 76\ncontent-type: application/json;type=entry\naccept: application/json;odata=minimalmetadata\nmaxdataserviceversion: 3.0;NetFx\ncontent-id: 2\n\n{"PartitionKey":"part1","RowKey":"row160837408812003154","myValue":"value1"}\n--changeset_7679a9f9b2dde130e791580c53508a5a--\n--batch_7679a9f9b2dde130e791580c53508a5a--'; // #################### - // Mocks for a batch containing single retrieve entity using the Javascript SDK + // Mocks for a batch containing single retrieve entity using the JavaScript SDK // #################### // prettier-ignore public static Sample1QueryUsingSDK: string = "--batch_d737e1b79cb362526a8b4a13d46d6fc3\ncontent-type: application/http\ncontent-transfer-encoding: binary\n\nGET http://127.0.0.1:11002/devstoreaccount1/table160837567141205013(PartitionKey=%27part1%27,RowKey=%27row160837567145205850%27) HTTP/1.1\naccept: application/json;odata=minimalmetadata\nmaxdataserviceversion: 3.0;NetFx\n\n--batch_d737e1b79cb362526a8b4a13d46d6fc3--"; // #################### - // Mocks for a batch with insert then merge using the Javascript SDK + // Mocks for a batch with insert then merge using the JavaScript SDK // #################### // prettier-ignore public static SampleInsertThenMergeUsingSDK: string = '--batch_aa71f86e6ed5d85b178b2a28cbb61f97\ncontent-type: multipart/mixed;charset="utf-8";boundary=changeset_aa71f86e6ed5d85b178b2a28cbb61f97\n\n--changeset_aa71f86e6ed5d85b178b2a28cbb61f97\ncontent-type: application/http\ncontent-transfer-encoding: binary\n\nPOST http://127.0.0.1:11002/devstoreaccount1/table160837770303307822 HTTP/1.1\nPrefer: return-content\ncontent-length: 76\ncontent-type: application/json;type=entry\naccept: application/json;odata=minimalmetadata\nmaxdataserviceversion: 3.0;NetFx\n\n{"PartitionKey":"part1","RowKey":"row160837770307508823","myValue":"value2"}\n--changeset_aa71f86e6ed5d85b178b2a28cbb61f97\ncontent-type: application/http\ncontent-transfer-encoding: binary\n\nMERGE http://127.0.0.1:11002/devstoreaccount1/table160837770303307822(PartitionKey=%27part1%27,RowKey=%27row160837770307508823%27) HTTP/1.1\nif-match: *\ncontent-length: 76\ncontent-type: application/json;type=entry\naccept: application/json;odata=minimalmetadata\nmaxdataserviceversion: 3.0;NetFx\ncontent-id: 1\n\n{"PartitionKey":"part1","RowKey":"row160837770307508823","myValue":"valueMerge"}\n--changeset_aa71f86e6ed5d85b178b2a28cbb61f97--\n--batch_aa71f86e6ed5d85b178b2a28cbb61f97--'; // #################### - // Mocks for a batch of 3 Deletes using the Javascript SDK + // Mocks for a batch of 3 Deletes using the JavaScript SDK // #################### // prettier-ignore public static Sample3DeletesUsingSDK: string = '--batch_2d60b21ff9edaf2bc1bc4f60664c0283\ncontent-type: multipart/mixed;charset="utf-8";boundary=changeset_2d60b21ff9edaf2bc1bc4f60664c0283\n\n--changeset_2d60b21ff9edaf2bc1bc4f60664c0283\ncontent-type: application/http\ncontent-transfer-encoding: binary\n\nDELETE http://127.0.0.1:11002/devstoreaccount1/table161216830457901592(PartitionKey=%27part1%27,RowKey=%27row161216830462208585%27) HTTP/1.1\nif-match: *\naccept: application/json;odata=minimalmetadata\nmaxdataserviceversion: 3.0;NetFx\n\n\n--changeset_2d60b21ff9edaf2bc1bc4f60664c0283\ncontent-type: application/http\ncontent-transfer-encoding: binary\n\nDELETE http://127.0.0.1:11002/devstoreaccount1/table161216830457901592(PartitionKey=%27part1%27,RowKey=%27row161216830462204546%27) HTTP/1.1\nif-match: *\naccept: application/json;odata=minimalmetadata\nmaxdataserviceversion: 3.0;NetFx\ncontent-id: 1\n\n\n--changeset_2d60b21ff9edaf2bc1bc4f60664c0283\ncontent-type: application/http\ncontent-transfer-encoding: binary\n\nDELETE http://127.0.0.1:11002/devstoreaccount1/table161216830457901592(PartitionKey=%27part1%27,RowKey=%27row161216830462201168%27) HTTP/1.1\nif-match: *\naccept: application/json;odata=minimalmetadata\nmaxdataserviceversion: 3.0;NetFx\ncontent-id: 2\n\n\n--changeset_2d60b21ff9edaf2bc1bc4f60664c0283--\n--batch_2d60b21ff9edaf2bc1bc4f60664c0283--'; @@ -82,10 +82,10 @@ export default class SerializationRequestMockStrings { "--batch_5496aa30-4c31-467f-4a4d-d51307b6f323\r\nContent-Type: multipart/mixed; boundary=changeset_67ee7ecb-8e1d-42ba-5eb8-70569f8a7236\r\n\r\n--changeset_67ee7ecb-8e1d-42ba-5eb8-70569f8a7236\r\nContent-Transfer-Encoding: binary\r\nContent-Type: application/http\r\n\r\nPOST http://127.0.0.1:10002/devstoreaccount1/TestTable?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: 93\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"PartitionKey\":\"5cad691a-3fb3-4016-8061-9a18fd8dea4a\",\"RowKey\":\"rkey1\",\"product\":\"product1\"}\r\n--changeset_67ee7ecb-8e1d-42ba-5eb8-70569f8a7236\r\nContent-Transfer-Encoding: binary\r\nContent-Type: application/http\r\n\r\nPOST http://127.0.0.1:10002/devstoreaccount1/TestTable?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: 93\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"PartitionKey\":\"5cad691a-3fb3-4016-8061-9a18fd8dea4a\",\"RowKey\":\"rkey2\",\"product\":\"product2\"}\r\n--changeset_67ee7ecb-8e1d-42ba-5eb8-70569f8a7236--\r\n\r\n--batch_5496aa30-4c31-467f-4a4d-d51307b6f323--\r\n"; public static BatchFuncToolsDeleteString: string = - // prettier-ingore + // prettier-ignore "--batch_e6bedae0-33a0-4875-bf7a-dc3963071819\nContent-Type: multipart/mixed; boundary=changeset_f3679e9d-3491-4ba7-95f3-59a8e24cd7bf\n\n--changeset_f3679e9d-3491-4ba7-95f3-59a8e24cd7bf\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nDELETE http://127.0.0.1:10002/devstoreaccount1/TestHubNameHistory(PartitionKey='00000000EDGC5674',RowKey='0000000000000000') HTTP/1.1\nAccept: application/json;odata=minimalmetadata\nContent-Type: application/json\nDataServiceVersion: 3.0;\nIf-Match: W/\"datetime'2023-03-17T15%3A06%3A18.3075721Z'\"\n\n--changeset_f3679e9d-3491-4ba7-95f3-59a8e24cd7bf\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nDELETE http://127.0.0.1:10002/devstoreaccount1/TestHubNameHistory(PartitionKey='00000000EDGC5674',RowKey='0000000000000001') HTTP/1.1\nAccept: application/json;odata=minimalmetadata\nContent-Type: application/json\nDataServiceVersion: 3.0;\nIf-Match: W/\"datetime'2023-03-17T15%3A06%3A18.3075732Z'\"\n\n--changeset_f3679e9d-3491-4ba7-95f3-59a8e24cd7bf\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nDELETE http://127.0.0.1:10002/devstoreaccount1/TestHubNameHistory(PartitionKey='00000000EDGC5674',RowKey='0000000000000002') HTTP/1.1\nAccept: application/json;odata=minimalmetadata\nContent-Type: application/json\nDataServiceVersion: 3.0;\nIf-Match: W/\"datetime'2023-03-17T15%3A06%3A18.3075737Z'\"\n\n--changeset_f3679e9d-3491-4ba7-95f3-59a8e24cd7bf\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nDELETE http://127.0.0.1:10002/devstoreaccount1/TestHubNameHistory(PartitionKey='00000000EDGC5674',RowKey='0000000000000003') HTTP/1.1\nAccept: application/json;odata=minimalmetadata\nContent-Type: application/json\nDataServiceVersion: 3.0;\nIf-Match: W/\"datetime'2023-03-17T15%3A06%3A18.3075742Z'\"\n\n--changeset_f3679e9d-3491-4ba7-95f3-59a8e24cd7bf--\n--batch_e6bedae0-33a0-4875-bf7a-dc3963071819--"; public static BatchCloudNetDeleteString: string = - // prettier-ingore + // prettier-ignore "--batch_d5351566-6c65-4b24-b030-a3c1e7c459ab\r\nContent-Type: multipart/mixed; boundary=changeset_a8e76d7b-1421-4226-9e63-0fb67554be26\r\n\r\n--changeset_a8e76d7b-1421-4226-9e63-0fb67554be26\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE http://127.0.0.1:10002/devstoreaccount1/GatewayManagerInventoryTable(PartitionKey='0',RowKey='device_0_device1') HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Type: application/json\r\nDataServiceVersion: 3.0;\r\nIf-Match: W/\"datetime'2022-07-19T15%3A36%3A46.297987Z'\"\r\n\r\n--changeset_a8e76d7b-1421-4226-9e63-0fb67554be26\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE http://127.0.0.1:10002/devstoreaccount1/GatewayManagerInventoryTable(PartitionKey='0',RowKey='devicelocationmap_0_sanjose_0_device1') HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Type: application/json\r\nDataServiceVersion: 3.0;\r\nIf-Match: W/\"datetime'2022-07-19T15%3A36%3A46.297103Z'\"\r\n\r\n--changeset_a8e76d7b-1421-4226-9e63-0fb67554be26--\r\n--batch_d5351566-6c65-4b24-b030-a3c1e7c459ab--\r\n"; } diff --git a/tests/table/unit/mock.response.serialization.strings.ts b/tests/table/unit/mock.response.serialization.strings.ts index aa3a56ddd..2dd3a31b3 100644 --- a/tests/table/unit/mock.response.serialization.strings.ts +++ b/tests/table/unit/mock.response.serialization.strings.ts @@ -37,12 +37,12 @@ export default class SerializationResponseMockStrings { // #################### // "--batchresponse_5920f66b-704c-4f0d-a1ba-a024f44e4754\r\nContent-Type: multipart/mixed; boundary=changesetresponse_a3dab894-5e6c-4f3d-877e-dc918125467e\r\n\r\n--changesetresponse_a3dab894-5e6c-4f3d-877e-dc918125467e\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: 1.0;\r\n\r\n\r\n--changesetresponse_a3dab894-5e6c-4f3d-877e-dc918125467e--\r\n--batchresponse_5920f66b-704c-4f0d-a1ba-a024f44e4754--\r\n" public static FullBatchSingleDeleteResponseString: string = - // pretier-ignore + // prettier-ignore "--batchresponse_5920f66b-704c-4f0d-a1ba-a024f44e4754\r\nContent-Type: multipart/mixed; boundary=changesetresponse_a3dab894-5e6c-4f3d-877e-dc918125467e\r\n\r\n--changesetresponse_a3dab894-5e6c-4f3d-877e-dc918125467e\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: 1.0;\r\n\r\n\r\n--changesetresponse_a3dab894-5e6c-4f3d-877e-dc918125467e--\r\n--batchresponse_5920f66b-704c-4f0d-a1ba-a024f44e4754--\r\n"; // manually set dataserviceversion to 3.0, service responds with 1.0 public static PartialBatchSingleDeleteResponseString: string = - // pretier-ignore + // prettier-ignore "Content-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: 3.0;\r\n"; // #################### diff --git a/tests/table/unit/mock.serialization.batchrequest.factory.ts b/tests/table/unit/mock.serialization.batchrequest.factory.ts index 2d27a7a2c..eedf18886 100644 --- a/tests/table/unit/mock.serialization.batchrequest.factory.ts +++ b/tests/table/unit/mock.serialization.batchrequest.factory.ts @@ -23,7 +23,7 @@ export default class SerializationObjectForBatchRequestFactory { return mockRequest; } - public static GetBatchRequestForSingleDeletetResponseMock(): BatchRequest { + public static GetBatchRequestForSingleDeleteResponseMock(): BatchRequest { const mockRequest = new BatchRequest( SerializationBatchOperationFactory.GetBatchOperationMockForDeleteSingleEntity( SerializationResponseMockStrings.EmptyHeaderMock diff --git a/tests/table/unit/query.interpreter.unit.test.ts b/tests/table/unit/query.interpreter.unit.test.ts index 9f52361ce..5a9981952 100644 --- a/tests/table/unit/query.interpreter.unit.test.ts +++ b/tests/table/unit/query.interpreter.unit.test.ts @@ -428,7 +428,7 @@ describe("Query Interpreter", () => { }) describe("Regression Tests", () => { - runTestCases("Issue #1929: Querying non-existent fields", referenceEntity, [ + runTestCases("Issue #1929: Querying nonexistent fields", referenceEntity, [ { name: "Empty string fields should be queryable", originalQuery: "emptyString eq ''", @@ -445,7 +445,7 @@ describe("Query Interpreter", () => { expectedResult: true }, { - name: "Non-existent fields should not be queryable", + name: "Nonexistent fields should not be queryable", originalQuery: "nonExistent ne ''", expectedResult: false } diff --git a/tests/table/unit/query.parser.unit.test.ts b/tests/table/unit/query.parser.unit.test.ts index 803a5e915..ba4ea7c7a 100644 --- a/tests/table/unit/query.parser.unit.test.ts +++ b/tests/table/unit/query.parser.unit.test.ts @@ -51,7 +51,7 @@ describe("Query Parser", () => { expectedQuery: "(not (eq (id PartitionKey) \"test\"))" }, { - name: "Wrapping an expresssion group", + name: "Wrapping an expression group", originalQuery: "not (PartitionKey lt 'Part2')", expectedQuery: "(not (lt (id PartitionKey) \"Part2\"))" } diff --git a/tests/table/unit/serialization.unit.test.ts b/tests/table/unit/serialization.unit.test.ts index a8140f13f..d309e2fca 100644 --- a/tests/table/unit/serialization.unit.test.ts +++ b/tests/table/unit/serialization.unit.test.ts @@ -98,7 +98,7 @@ describe("batch serialization unit tests, these are not the API integration test ); const request = - SerializationObjectForBatchRequestFactory.GetBatchRequestForSingleDeletetResponseMock(); + SerializationObjectForBatchRequestFactory.GetBatchRequestForSingleDeleteResponseMock(); request.ingestOptionalParams(new BatchTableDeleteEntityOptionalParams()); const serializedBatchOperationResponse = diff --git a/tests/table/utils/table.entity.test.utils.ts b/tests/table/utils/table.entity.test.utils.ts index 8a7bc1a17..1f6aed6bd 100644 --- a/tests/table/utils/table.entity.test.utils.ts +++ b/tests/table/utils/table.entity.test.utils.ts @@ -68,7 +68,7 @@ export function createTableServerForTestHttps(): TableServer { * @return {*} {TableServer} */ export function createTableServerForQueryTestHttps(): TableServer { - // we need a unique name for the pipieline tests which + // we need a unique name for the pipeline tests which // all run on the same VM. const uniqueDbName = getUniqueName("querydb"); const uniqueDBpath = "./" + uniqueDbName + ".json"; @@ -134,7 +134,7 @@ export function createSecondaryConnectionStringForTest(dev: boolean): string { } /** - * return a unique parition key for data-tables tests + * return a unique partition key for data-tables tests * * @export * @return {*} {string}