Skip to content

Releases: Azure/azure-kusto-node

V3.0.0 - Managed Streaming Ingest, Interactive Login, token provider improvements, custom parsers for datetime results, and security fixes

27 Feb 11:56
725ffb3
Compare
Choose a tag to compare

Breaking Changes

  • The minimum node.js version was bumped from 8 to 14, the earliest version still under support.
    This was required from dependent packages in order to keep up-to-date with security patches.
  • Stricter checks on formats and mapping types. If your code breaks due to this, you had a bug. Includes providing a incompatible formats to the mappings or providing more than one type of mapping.
  • IngestionProperties properties can no longer be null- they can now be their value, or undefined
  • Added an option to create a Connection String without auth, to align with the other sdks.
    Before, not providing any auth defaulted to Device Code, now it will default to no auth.
  • Device Code Login now requires useDeviceCodeAuth to be true. withAadDeviceAuthentication sets it automatically.
  • Added the AAD Federated Security property to all With* methods of KustoConnectionStringBuilder by default. It's possible to turn off by setting the property aadFederatedSecurity to undefined.
  • Renaming some of the properties in KustoConnectionStringBuilder, if you used the WithX methods there is nothing to change:
    • managedIdentity -> useManagedIdentityAuth
    • azLoginIdentity -> useAzLoginAuth
  • Column Mappings now live in "./source/columnMappings". This shouldn't affect clients that import them from "azure-kusto-ingest" directly.

Deprecations

  • Deprecated toJson methods on various type, they are now wrappers around the proper, compliant, toJSON methods.
  • Creating a JsonColumnMapping or a CsvColumnMapping from the constructor has been deprecated. Use the new type-safe withX methods
  • ingestionMappingType has been renamed to ingestionMappingKind. The original still exists, but is deprecated.
  • ingestionMapping has been renamed to ingestionMappingColumns. The original still exists, but is deprecated.
  • Importing IngestionPropertiesEnums has been deprecated, instead import classes directly from "azure-kusto-ingest"

Token Providers

Improvements

  • Added UserPrompt token provider, which will pop-up a browser window and let you login from there. You can create it using withUserPrompt or setting useUserPromptAuth.
  • Added withTokenProvider to create an authentication token from a custom function.
  • Correctly pass scopes and authority url to all types based on cloud info.
  • Added ToString() to KustoConnectionStringBuilder. It censors secrets by default, but it's possible to override with a parameter.
  • Added authorityId and timeoutMs parameters to withAzLoginIdentity and withAadManagedIdentities
  • Added more known aliases to connection string parts
  • Added better errors for failed tokens with the type KustoAuthenticationError, which also includes context on the token provider.

Internal Fixes

  • Added extensive tests to Connection Strings and token providers
  • Some tests are now skipped based on environment variables:
    • AUTO_TEST - will skip tests that require manual run (for example, interactive log)
    • LOGIN_TEST- if not set, will skip tests that are related to logging in.
    • Some login tests require additional credentials as env variables.
  • Simplified the KeywordMapping type and made it less prone to mistakes using the power of typescript
  • Simplified TokenProvider code by using a better class hierarchy
  • Removed useless checks that typescript already checks for

Managed Streaming Ingestion

  • Adds a new type of ingestion client - ManagedStreamingIngestClient.
  • Drop-in replacement for StreamingIngestClient
  • The client will default to using streaming ingestion, but will be more robust to errors.
  • If it fails to use streaming ingestion, it will fall back to queued when:
    • Retrying streaming ingest fails multiple times, getting transient errors
    • The size of the ingested object is more than 4MB

Type-safe Column Mappings

  • There are now distinct types for each kind of column mappings (e.g AvroColumnMapping), that can only be constructed with their properties in a type safe way - e.g AvroColumnMapping.withField will define a column mapping from a field to a field, and AvroColumnMapping.withConstantValue will define a mapping with a constant value.
  • Fixed issues with serialization that caused column mappings to not be sent correctly sometimes.
  • Old constructors for Json and Csv column mappings have been deprecated.

Custom Parsers

By default, when working with KustoResultRow, the SDK will parse date and time fields to moment.js objects.

You can now override this behaviors, either from the constructor of KustoReesultRow, or the properties timeSpanParser and dateTimeParser of KustoResultTable.

This is useful for cases that the standard datetime objects do not support, such as significant nanoseconds.

Other Fixes

  • IngestFromStream now accepts any readable
  • IngestFromStream now supports Client Request ID
  • Bumped azure-msal, azure-identity, axios and mocha to their latest versions, fixing security warnings
  • Added docs to DataFormats
  • toJson in rows and columns is now generic, for easier object conversion.

internal Changes

  • The code has moved from the deprecated tslint to eslint, and now has more strict lints, including for types and headers.
  • The code is now formatted, and enforces formatting using prettify

Bump axios & uuid and move @types/mocha to devDependencies #148

12 Sep 11:16
cd3e613
Compare
Choose a tag to compare

Breaking Changes:

  • None

Features:

  • None

Fixes:

  • bump axios 0.21.1 -> 0.21.2
  • bump uuid 3.4.0 -> 8.3.2
  • move @types/mocha to devDependencies

AzCli authentication via @azure/identity

08 Aug 12:29
a4b6805
Compare
Choose a tag to compare

Breaking Changes:

  • None

Features:

  • None

Fixes:

  • Remove problematic dependencies (adal-node, xmldom)

Remove 'adal-node' from dependencies

18 Jul 08:46
5034886
Compare
Choose a tag to compare
Remove adal-node from dependencies (#142)

* Remove adal from dependencies

* bump

* fix

* fix azCli

Moving to MSAL

11 Jul 07:43
a6ccdf5
Compare
Choose a tag to compare

Refactoring token acquiring and migrate from ADAL to MSAL

Add support for application and user in ClientRequestProperties

20 Jun 08:07
45d0fce
Compare
Choose a tag to compare
Add application and user to Client Request Properties (#136)

* Support machine and app in CRP

* nit

axios improvements

23 May 14:28
6f77491
Compare
Choose a tag to compare

Add validateStatus and "Keep-Alive" for axios client

Fixed Typescript integration

21 Feb 13:55
6e93648
Compare
Choose a tag to compare

Now ts files aren't included in the npm package, as they should.
Also we moved typings from dev-dependencies, to normal dependencies.
These should stop issues when depending on this project on an already typescript codebase.

Add support for query V1

16 Feb 15:29
803e4f5
Compare
Choose a tag to compare

Add support for query V1

Breaking Changes:

  • None

Features:

  • Method executeQueryV1 for query V1 endpoint

Fixes:

  • None

Fixed lock files

06 Jan 08:16
Compare
Choose a tag to compare
v2.1.3

Properly update lock files.