diff --git a/CHANGELOG.md b/CHANGELOG.md index fec1a0c6..e1335933 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [7.0.0-alpha.1] - 2024-09-22 + +### Fixed + +- Added azure/core-utils as an official dependency +- Added "main" field back to package.json + ## [7.0.0-alpha.0] - 2024-09-16 ### Changed -- Changed type of projects to be "module" to support EcmaScript modules. It shouldn't affect the usage of the SDK, if it does please open an issue. -- Types are now properly exported using "export type" -- CloudInfo is now exported +- Changed type of projects to be "module" to support EcmaScript modules. It shouldn't affect the usage of the SDK, if it does please open an issue. +- Types are now properly exported using "export type" +- CloudInfo is now exported ### Fixed @@ -19,7 +26,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated default endpoint urls ### Security -- Updated dependencies to fix security vulnerabilities + +- Updated dependencies to fix security vulnerabilities ## [6.0.2] - 2024-04-11 diff --git a/index.html b/index.html index 7ca7f184..454537a0 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + diff --git a/lerna.json b/lerna.json index b9712162..31cabe70 100644 --- a/lerna.json +++ b/lerna.json @@ -1,4 +1,4 @@ { - "version": "7.0.0-alpha.0", + "version": "7.0.0-alpha.1", "useNx": true } diff --git a/package-lock.json b/package-lock.json index 80531602..333c1dca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ ], "devDependencies": { "@types/jest": "^29.5.12", - "@types/node": "^18.0.0", + "@types/node": "^20.14.8", "@types/webpack-dev-server": "^4.7.2", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.32.0", @@ -24,7 +24,7 @@ "jest-junit": "^16.0.0", "lerna": "^7.4.2", "npm": "^9.6.2", - "prettier": "^2.8.4", + "prettier": "^3.3.3", "rimraf": "^3.0.2", "shx": "^0.3.4", "sinon": "^14.0.0", @@ -32,7 +32,7 @@ "ts-jest": "^29.2.5", "ts-loader": "^9.4.2", "ts-node": "^10.9.1", - "typescript": "^5.0.0", + "typescript": "^5.5.4", "webpack-cli": "^5.0.1" } }, @@ -202,15 +202,26 @@ } }, "node_modules/@azure/core-util": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.6.1.tgz", - "integrity": "sha512-h5taHeySlsV9qxuK64KZxy4iln1BtMYlNt5jbuEFN3UFSAd1EwKg/Gjl5a6tZ/W8t6li3xPnutOx7zbDyXnPmQ==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.10.0.tgz", + "integrity": "sha512-dqLWQsh9Nro1YQU+405POVtXnwrIVqPyfUzc4zXCbThTg7+vNNaiMkwbX9AMXKyoFYFClxmB3s25ZFr3+jZkww==", "dependencies": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.2.0" + "@azure/abort-controller": "^2.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" + } + }, + "node_modules/@azure/core-util/node_modules/@azure/abort-controller": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", + "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/@azure/core-xml": { @@ -613,9 +624,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", + "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", "dev": true, "engines": { "node": ">=6.9.0" @@ -819,6 +830,36 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz", + "integrity": "sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", @@ -930,6 +971,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", @@ -1085,18 +1141,18 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -1117,9 +1173,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1132,13 +1188,14 @@ "dev": true }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -1159,9 +1216,10 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", "dev": true }, "node_modules/@hutson/parse-repository-url": { @@ -3317,11 +3375,11 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.19.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.3.tgz", - "integrity": "sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg==", + "version": "20.16.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.5.tgz", + "integrity": "sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, "node_modules/@types/node-fetch": { @@ -3372,9 +3430,9 @@ "dev": true }, "node_modules/@types/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, "node_modules/@types/send": { @@ -3996,9 +4054,9 @@ } }, "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -4434,23 +4492,26 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", "dev": true, "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0" @@ -5555,11 +5616,11 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -6042,9 +6103,9 @@ } }, "node_modules/es-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", - "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", "dev": true, "peer": true }, @@ -6076,16 +6137,16 @@ } }, "node_modules/eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -6262,9 +6323,9 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -6500,9 +6561,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -6736,9 +6797,9 @@ } }, "node_modules/flat-cache": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", - "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { "flatted": "^3.2.9", @@ -6746,13 +6807,13 @@ "rimraf": "^3.0.2" }, "engines": { - "node": ">=12.0.0" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "node_modules/follow-redirects": { @@ -7183,9 +7244,9 @@ "peer": true }, "node_modules/globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -7619,9 +7680,9 @@ ] }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" @@ -10238,9 +10299,9 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/multicast-dns": { "version": "7.2.5", @@ -15108,15 +15169,15 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -16074,12 +16135,6 @@ "node": ">= 0.8" } }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/serialize-javascript": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", @@ -17865,9 +17920,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -17891,9 +17946,9 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" }, "node_modules/unique-filename": { "version": "2.0.1", @@ -18816,9 +18871,10 @@ } }, "packages/azure-kusto-data": { - "version": "7.0.0-alpha.0", + "version": "7.0.0-alpha.1", "license": "ISC", "dependencies": { + "@azure/core-util": "^1.10.0", "@azure/identity": "^4.0.1", "@types/uuid": "^8.3.4", "axios": "^1.6.0", @@ -18836,7 +18892,7 @@ } }, "packages/azure-kusto-ingest": { - "version": "7.0.0-alpha.0", + "version": "7.0.0-alpha.1", "license": "ISC", "dependencies": { "@azure/data-tables": "^13.2.2", @@ -18849,7 +18905,7 @@ "@types/tmp": "^0.2.3", "@types/uuid": "^8.3.4", "@types/uuid-validate": "0.0.1", - "azure-kusto-data": "^7.0.0-alpha.0", + "azure-kusto-data": "^7.0.0-alpha.1", "browserify-zlib": "0.2.0", "buffer": "^6.0.3", "is-ip": "^3.1.0", diff --git a/package.json b/package.json index ca69d3c6..50bf027d 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "@types/jest": "^29.5.12", - "@types/node": "^18.0.0", + "@types/node": "^20.14.8", "@types/webpack-dev-server": "^4.7.2", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.32.0", @@ -40,7 +40,7 @@ "jest-junit": "^16.0.0", "lerna": "^7.4.2", "npm": "^9.6.2", - "prettier": "^2.8.4", + "prettier": "^3.3.3", "rimraf": "^3.0.2", "shx": "^0.3.4", "sinon": "^14.0.0", @@ -48,9 +48,8 @@ "ts-jest": "^29.2.5", "ts-loader": "^9.4.2", "ts-node": "^10.9.1", - "typescript": "^5.0.0", + "typescript": "^5.5.4", "webpack-cli": "^5.0.1" - }, "workspaces": [ "packages/azure-kusto-data", diff --git a/packages/azure-kusto-data/package.json b/packages/azure-kusto-data/package.json index 226aac83..81f8446e 100644 --- a/packages/azure-kusto-data/package.json +++ b/packages/azure-kusto-data/package.json @@ -1,8 +1,9 @@ { "name": "azure-kusto-data", - "version": "7.0.0-alpha.0", + "version": "7.0.0-alpha.1", "description": "Azure Data Explorer Query SDK", "type": "module", + "main": "dist-esm/src/index.js", "exports": { ".": { "import": "./dist-esm/src/index.js", @@ -60,6 +61,7 @@ "rimraf": "^3.0.2" }, "dependencies": { + "@azure/core-util": "^1.10.0", "@azure/identity": "^4.0.1", "@types/uuid": "^8.3.4", "axios": "^1.6.0", diff --git a/packages/azure-kusto-data/src/client.ts b/packages/azure-kusto-data/src/client.ts index c6224977..854d9842 100644 --- a/packages/azure-kusto-data/src/client.ts +++ b/packages/azure-kusto-data/src/client.ts @@ -116,7 +116,7 @@ export class KustoClient { streamFormat: any, mappingName: string | null, blob?: string, - clientRequestId?: string + clientRequestId?: string, ): Promise { let endpoint = `${this.endpoints[ExecutionType.Ingest]}/${this.getDb(db)}/${table}?streamFormat=${streamFormat}`; if (mappingName != null) { @@ -141,7 +141,7 @@ export class KustoClient { executionType: ExecutionType, db: string | null, entity: RequestEntity, - properties?: ClientRequestProperties | null + properties?: ClientRequestProperties | null, ): Promise { this.ensureOpen(); kustoTrustedEndpoints.validateTrustedEndpoint(endpoint, (await CloudSettings.getCloudInfoForCluster(this.cluster)).LoginEndpoint); @@ -226,7 +226,7 @@ export class KustoClient { headers: { [header: string]: string }, payload: any, timeout: number, - properties?: ClientRequestProperties | null + properties?: ClientRequestProperties | null, ): Promise { // replace non-ascii characters with ? in headers for (const key of Object.keys(headers)) { diff --git a/packages/azure-kusto-data/src/clientDetails.ts b/packages/azure-kusto-data/src/clientDetails.ts index 40220c47..1b4d34a4 100644 --- a/packages/azure-kusto-data/src/clientDetails.ts +++ b/packages/azure-kusto-data/src/clientDetails.ts @@ -21,7 +21,10 @@ const None = "[none]"; export class ClientDetails { readonly versionForTracing: string; - constructor(public applicationNameForTracing: string | null, public userNameForTracing: string | null) { + constructor( + public applicationNameForTracing: string | null, + public userNameForTracing: string | null, + ) { if (this.applicationNameForTracing === null) { this.applicationNameForTracing = ClientDetails.defaultApplication(); } @@ -85,7 +88,7 @@ export class ClientDetails { app_version: string | null = null, send_user: boolean = false, override_user: string | null = null, - additional_fields: [string, string][] | null = null + additional_fields: [string, string][] | null = null, ): ClientDetails { const params: [string, string][] = [["Kusto." + this.escapeHeader(name, false), version]]; diff --git a/packages/azure-kusto-data/src/connectionBuilder.browser.ts b/packages/azure-kusto-data/src/connectionBuilder.browser.ts index 572aefcc..12625e9c 100644 --- a/packages/azure-kusto-data/src/connectionBuilder.browser.ts +++ b/packages/azure-kusto-data/src/connectionBuilder.browser.ts @@ -14,7 +14,7 @@ export class KustoConnectionStringBuilder extends KustoConnectionStringBuilderBa _connectionString: string, _userId: string, _password: string, - _authorityId?: string + _authorityId?: string, ): KustoConnectionStringBuilder { throw new Error("Not supported in browser - use withUserPrompt instead"); } @@ -23,7 +23,7 @@ export class KustoConnectionStringBuilder extends KustoConnectionStringBuilderBa _connectionString: string, _aadAppId: string, _appKey: string, - _authorityId?: string + _authorityId?: string, ): KustoConnectionStringBuilder { throw new Error("Not supported in browser - use withUserPrompt instead"); } @@ -34,7 +34,7 @@ export class KustoConnectionStringBuilder extends KustoConnectionStringBuilderBa _applicationCertificatePrivateKey?: string, _authorityId?: string, _applicationCertificateSendX5c?: boolean, - _applicationCertificatePath?: string + _applicationCertificatePath?: string, ): KustoConnectionStringBuilder { throw new Error("Not supported in browser - use withUserPrompt instead"); } @@ -42,7 +42,7 @@ export class KustoConnectionStringBuilder extends KustoConnectionStringBuilderBa static withAadDeviceAuthentication( _connectionString: string, _authorityId?: string, - _deviceCodeCallback?: (response: DeviceCodeInfo) => void + _deviceCodeCallback?: (response: DeviceCodeInfo) => void, ): KustoConnectionStringBuilder { throw new Error("Not supported in browser - use withUserPrompt instead"); } @@ -80,11 +80,11 @@ export class KustoConnectionStringBuilder extends KustoConnectionStringBuilderBa static withUserPrompt( connectionString: string, interactiveCredentialOptions: InteractiveBrowserCredentialNodeOptions | InteractiveBrowserCredentialInBrowserOptions, - timeoutMs?: number + timeoutMs?: number, ): KustoConnectionStringBuilder { if (!interactiveCredentialOptions) { throw new Error( - "Invalid parameters - You must provide interactiveCredentialOptions={clientId: string, redirectUri:string} to authenticate with user prompt in browser." + "Invalid parameters - You must provide interactiveCredentialOptions={clientId: string, redirectUri:string} to authenticate with user prompt in browser.", ); } const kcsb = new KustoConnectionStringBuilder(connectionString); diff --git a/packages/azure-kusto-data/src/connectionBuilder.ts b/packages/azure-kusto-data/src/connectionBuilder.ts index 53c3f026..7014ab98 100644 --- a/packages/azure-kusto-data/src/connectionBuilder.ts +++ b/packages/azure-kusto-data/src/connectionBuilder.ts @@ -48,7 +48,7 @@ export class KustoConnectionStringBuilder extends KustoConnectionStringBuilderBa applicationCertificatePrivateKey?: string, authorityId?: string, applicationCertificateSendX5c?: boolean, - applicationCertificatePrivatePath?: string + applicationCertificatePrivatePath?: string, ): KustoConnectionStringBuilder { if (aadAppId.trim().length === 0) throw new Error("Invalid app id"); const kcsb = new KustoConnectionStringBuilder(connectionString); @@ -80,7 +80,7 @@ export class KustoConnectionStringBuilder extends KustoConnectionStringBuilderBa static withAadDeviceAuthentication( connectionString: string, authorityId?: string, - deviceCodeCallback?: (response: DeviceCodeInfo) => void + deviceCodeCallback?: (response: DeviceCodeInfo) => void, ): KustoConnectionStringBuilder { const kcsb = new KustoConnectionStringBuilder(connectionString); kcsb.aadFederatedSecurity = true; @@ -97,7 +97,7 @@ export class KustoConnectionStringBuilder extends KustoConnectionStringBuilderBa connectionString: string, msiClientId?: string, authorityId?: string, - timeoutMs?: number + timeoutMs?: number, ): KustoConnectionStringBuilder { const kcsb = new KustoConnectionStringBuilder(connectionString); kcsb.aadFederatedSecurity = true; @@ -158,7 +158,7 @@ export class KustoConnectionStringBuilder extends KustoConnectionStringBuilderBa static withUserPrompt( connectionString: string, options?: InteractiveBrowserCredentialNodeOptions | InteractiveBrowserCredentialInBrowserOptions, - timeoutMs?: number + timeoutMs?: number, ): KustoConnectionStringBuilder { const kcsb = new KustoConnectionStringBuilder(connectionString); const { tenantId, clientId } = (options as InteractiveBrowserCredentialNodeOptions) || {}; diff --git a/packages/azure-kusto-data/src/connectionBuilderBase.ts b/packages/azure-kusto-data/src/connectionBuilderBase.ts index 23c9e7f9..7c051a23 100644 --- a/packages/azure-kusto-data/src/connectionBuilderBase.ts +++ b/packages/azure-kusto-data/src/connectionBuilderBase.ts @@ -161,7 +161,7 @@ export abstract class KustoConnectionStringBuilderBase { appVersion?: string, sendUser: boolean = false, overrideUser?: string, - additionalFields?: [string, string][] + additionalFields?: [string, string][], ): void { const clientDetails = ClientDetails.setConnectorDetails(name, version, appName, appVersion, sendUser, overrideUser, additionalFields); diff --git a/packages/azure-kusto-data/src/errors.ts b/packages/azure-kusto-data/src/errors.ts index fed5a25f..8256cd7b 100644 --- a/packages/azure-kusto-data/src/errors.ts +++ b/packages/azure-kusto-data/src/errors.ts @@ -2,14 +2,22 @@ // Licensed under the MIT License. export class KustoAuthenticationError extends Error { - constructor(message: string, public inner: Error | undefined, public tokenProviderName: string, public context: Record) { + constructor( + message: string, + public inner: Error | undefined, + public tokenProviderName: string, + public context: Record, + ) { super(message); this.name = "KustoAuthenticationError"; } } export class ThrottlingError extends Error { - constructor(message: string, public inner: Error | undefined) { + constructor( + message: string, + public inner: Error | undefined, + ) { super(message); this.name = "ThrottlingError"; } diff --git a/packages/azure-kusto-data/src/kustoTrustedEndpoints.ts b/packages/azure-kusto-data/src/kustoTrustedEndpoints.ts index 4dcdc236..d8f47290 100644 --- a/packages/azure-kusto-data/src/kustoTrustedEndpoints.ts +++ b/packages/azure-kusto-data/src/kustoTrustedEndpoints.ts @@ -14,7 +14,7 @@ export class MatchRule { * Indicates whether the match must be exact (the candidate must * not have any prefix) or not. */ - public exact: boolean + public exact: boolean, ) {} } diff --git a/packages/azure-kusto-data/src/models.ts b/packages/azure-kusto-data/src/models.ts index 21ac5038..bcc8e6f1 100644 --- a/packages/azure-kusto-data/src/models.ts +++ b/packages/azure-kusto-data/src/models.ts @@ -45,7 +45,7 @@ export class KustoResultRow { columns: KustoResultColumn[], row: { [ord: number]: any }, dateTimeParser: DateTimeParser = defaultDatetimeParser, - timeSpanParser: TimeSpanParser = defaultTimespanParser + timeSpanParser: TimeSpanParser = defaultTimespanParser, ) { this.columns = columns.sort((a, b) => a.ordinal - b.ordinal); this.raw = row; diff --git a/packages/azure-kusto-data/src/security.ts b/packages/azure-kusto-data/src/security.ts index 41f2d87b..6967aee0 100644 --- a/packages/azure-kusto-data/src/security.ts +++ b/packages/azure-kusto-data/src/security.ts @@ -21,7 +21,7 @@ export class AadHelper { kcsb.applicationClientId, kcsb.applicationKey, kcsb.authorityId, - kcsb.timeoutMs + kcsb.timeoutMs, ); } else if (!!kcsb.applicationClientId && (!!kcsb.applicationCertificatePrivateKey || !!kcsb.applicationCertificatePath)) { this.tokenProvider = new TokenProvider.ApplicationCertificateTokenProvider( @@ -31,7 +31,7 @@ export class AadHelper { kcsb.applicationCertificatePath, kcsb.applicationCertificateSendX5c, kcsb.authorityId, - kcsb.timeoutMs + kcsb.timeoutMs, ); } else if (kcsb.useManagedIdentityAuth) { this.tokenProvider = new TokenProvider.MsiTokenProvider(kcsb.dataSource, kcsb.msiClientId, kcsb.authorityId, kcsb.timeoutMs); @@ -62,7 +62,7 @@ export class AadHelper { e instanceof Error ? e.message : `${e}`, e instanceof Error ? e : undefined, this.tokenProvider.constructor.name, - this.tokenProvider.context() + this.tokenProvider.context(), ); } } diff --git a/packages/azure-kusto-data/src/tokenProvider.ts b/packages/azure-kusto-data/src/tokenProvider.ts index 60c8e5b7..defe68d1 100644 --- a/packages/azure-kusto-data/src/tokenProvider.ts +++ b/packages/azure-kusto-data/src/tokenProvider.ts @@ -139,7 +139,11 @@ export abstract class CloudSettingsTokenProvider extends TokenProviderBase { export abstract class AzureIdentityProvider extends CloudSettingsTokenProvider { private credential!: TokenCredential; - constructor(kustoUri: string, protected authorityId?: string, private timeoutMs?: number) { + constructor( + kustoUri: string, + protected authorityId?: string, + private timeoutMs?: number, + ) { super(kustoUri); } @@ -180,7 +184,11 @@ export abstract class AzureIdentityProvider extends CloudSettingsTokenProvider { * TokenCredentialProvider receives any TokenCredential to create a token with. */ export class TokenCredentialProvider extends AzureIdentityProvider { - constructor(kustoUri: string, private tokenCredential: TokenCredential, timeoutMs?: number) { + constructor( + kustoUri: string, + private tokenCredential: TokenCredential, + timeoutMs?: number, + ) { super(kustoUri, undefined, timeoutMs); } @@ -200,7 +208,7 @@ export class UserPromptProvider extends AzureIdentityProvider { constructor( kustoUri: string, private interactiveCredentialOptions?: InteractiveBrowserCredentialInBrowserOptions | InteractiveBrowserCredentialNodeOptions, - timeoutMs?: number + timeoutMs?: number, ) { super(kustoUri, interactiveCredentialOptions?.tenantId, timeoutMs); } @@ -232,7 +240,12 @@ export class UserPromptProvider extends AzureIdentityProvider { * The args parameter is a dictionary conforming with the ManagedIdentityCredential initializer API arguments */ export class MsiTokenProvider extends AzureIdentityProvider { - constructor(kustoUri: string, protected clientId?: string, authorityId?: string, timeoutMs?: number) { + constructor( + kustoUri: string, + protected clientId?: string, + authorityId?: string, + timeoutMs?: number, + ) { super(kustoUri, authorityId, timeoutMs); } @@ -287,7 +300,12 @@ export class UserPassTokenProvider extends AzureIdentityProvider { * Acquire a token from Device Login flow */ export class DeviceLoginTokenProvider extends AzureIdentityProvider { - constructor(kustoUri: string, private deviceCodeCallback?: (response: DeviceCodeInfo) => void, authorityId?: string, timeoutMs?: number) { + constructor( + kustoUri: string, + private deviceCodeCallback?: (response: DeviceCodeInfo) => void, + authorityId?: string, + timeoutMs?: number, + ) { super(kustoUri, authorityId, timeoutMs); } @@ -312,7 +330,7 @@ export class ApplicationCertificateTokenProvider extends AzureIdentityProvider { private certPath?: string, private sendX5c?: boolean, authorityId?: string, - timeoutMs?: number + timeoutMs?: number, ) { super(kustoUri, authorityId!, timeoutMs); } @@ -327,7 +345,7 @@ export class ApplicationCertificateTokenProvider extends AzureIdentityProvider { } as ClientCertificatePEMCertificate, { sendCertificateChain: this.sendX5c, - } as ClientCertificateCredentialOptions + } as ClientCertificateCredentialOptions, ); } @@ -349,7 +367,13 @@ export class ApplicationCertificateTokenProvider extends AzureIdentityProvider { * Acquire a token from MSAL with application id and Key */ export class ApplicationKeyTokenProvider extends AzureIdentityProvider { - constructor(kustoUri: string, private appClientId: string, private appKey: string, authorityId: string, timeoutMs?: number) { + constructor( + kustoUri: string, + private appClientId: string, + private appKey: string, + authorityId: string, + timeoutMs?: number, + ) { super(kustoUri, authorityId, timeoutMs); } @@ -357,7 +381,7 @@ export class ApplicationKeyTokenProvider extends AzureIdentityProvider { return new ClientSecretCredential( this.authorityId!, // The tenant ID in Azure Active Directory this.appClientId, // The app registration client Id in the AAD tenant - this.appKey // The app registration secret for the registered application + this.appKey, // The app registration secret for the registered application ); } diff --git a/packages/azure-kusto-data/src/version.ts b/packages/azure-kusto-data/src/version.ts index d57cd0d2..1061fd60 100644 --- a/packages/azure-kusto-data/src/version.ts +++ b/packages/azure-kusto-data/src/version.ts @@ -2,4 +2,4 @@ // Licensed under the MIT License. // SDK_VERSION should be updated in all 3 package.json and lerna.json(by running lerna version) -export const SDK_VERSION = "5.2.1"; +export const SDK_VERSION = "7.0.0-alpha.1"; diff --git a/packages/azure-kusto-data/test/clientTest.ts b/packages/azure-kusto-data/test/clientTest.ts index ac32957e..7194b942 100644 --- a/packages/azure-kusto-data/test/clientTest.ts +++ b/packages/azure-kusto-data/test/clientTest.ts @@ -125,8 +125,8 @@ describe("KustoClient", () => { assert( ex instanceof Error && ex.message.startsWith( - "Failed to parse response ({undefined}) with the following error [TypeError:" + " data.forEach is" + " not a function]." - ) + "Failed to parse response ({undefined}) with the following error [TypeError:" + " data.forEach is" + " not a function].", + ), ); return; } @@ -280,7 +280,7 @@ describe("KustoClient", () => { }; await method("db2", "Table | count"); }); - } + }, ); [ diff --git a/packages/azure-kusto-data/test/connectionBuilderTest.ts b/packages/azure-kusto-data/test/connectionBuilderTest.ts index 40d4cc38..d4ada543 100644 --- a/packages/azure-kusto-data/test/connectionBuilderTest.ts +++ b/packages/azure-kusto-data/test/connectionBuilderTest.ts @@ -12,7 +12,7 @@ const doComparsion = ( kcsbs: KustoConnectionStringBuilder[], expectedProperties: Partial>, expectedToString: string, - expectedToStringWithSecrets: string + expectedToStringWithSecrets: string, ) => { for (const [i, kcsb] of kcsbs.entries()) { console.log(`Checking connection string #${i} - ${kcsb.toString(false)}`); @@ -79,12 +79,12 @@ describe("KustoConnectionStringBuilder", () => { assert.throws( () => KustoConnectionStringBuilder.withAadUserPasswordAuthentication("https://test.kusto.windows.net/", " ", "password"), Error, - "Invalid user" + "Invalid user", ); assert.throws( () => KustoConnectionStringBuilder.withAadUserPasswordAuthentication("https://test.kusto.windows.net/", "user", " "), Error, - "Invalid password" + "Invalid password", ); }); @@ -92,17 +92,17 @@ describe("KustoConnectionStringBuilder", () => { assert.throws( () => KustoConnectionStringBuilder.withAadApplicationKeyAuthentication("https://test.kusto.windows.net/", " ", "password"), Error, - "Invalid app id" + "Invalid app id", ); assert.throws( () => KustoConnectionStringBuilder.withAadApplicationKeyAuthentication( "https://test.kusto.windows.net/", "53e12945-98b5-4d5c-9465-fd6b6edf848e", - " " + " ", ), Error, - "Invalid app key" + "Invalid app key", ); }); @@ -110,7 +110,7 @@ describe("KustoConnectionStringBuilder", () => { assert.throws( () => KustoConnectionStringBuilder.withAadApplicationCertificateAuthentication("https://test.kusto.windows.net/", " ", "private", "thumb"), Error, - "Invalid app id" + "Invalid app id", ); assert.throws( () => @@ -118,10 +118,10 @@ describe("KustoConnectionStringBuilder", () => { "https://test.kusto.windows.net/", "53e12945-98b5-4d5c-9465-fd6b6edf848e", " ", - "thumb" + "thumb", ), Error, - "Invalid app certificate" + "Invalid app certificate", ); }); }); @@ -142,7 +142,7 @@ describe("KustoConnectionStringBuilder", () => { authorityId: DEFAULT_AUTHORITY, }, "Data Source=localhost;Initial Catalog=NetDefaultDB;Authority Id=organizations", - "Data Source=localhost;Initial Catalog=NetDefaultDB;Authority Id=organizations" + "Data Source=localhost;Initial Catalog=NetDefaultDB;Authority Id=organizations", ); }); @@ -154,13 +154,13 @@ describe("KustoConnectionStringBuilder", () => { const kcsbs = [ new KustoConnectionStringBuilder(`localhost;AAD User ID=${expectedUser};password=${expectedPassword};AAD Federated Security=True`), new KustoConnectionStringBuilder( - `Data Source=localhost ; AaD User ID=${expectedUser}; Password =${expectedPassword};AAD Federated Security=True` + `Data Source=localhost ; AaD User ID=${expectedUser}; Password =${expectedPassword};AAD Federated Security=True`, ), new KustoConnectionStringBuilder( - ` Addr = localhost ; AAD User ID = ${expectedUser} ; Pwd =${expectedPassword};AAD Federated Security=True` + ` Addr = localhost ; AAD User ID = ${expectedUser} ; Pwd =${expectedPassword};AAD Federated Security=True`, ), new KustoConnectionStringBuilder( - `Network Address = localhost; AAD User iD = ${expectedUser} ; Pwd = ${expectedPassword};AAD Federated Security=True ` + `Network Address = localhost; AAD User iD = ${expectedUser} ; Pwd = ${expectedPassword};AAD Federated Security=True `, ), KustoConnectionStringBuilder.withAadUserPasswordAuthentication("localhost", expectedUser, expectedPassword), ]; @@ -180,7 +180,7 @@ describe("KustoConnectionStringBuilder", () => { aadFederatedSecurity: true, }, `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;AAD User ID=${expectedUser};Password=****;Authority Id=organizations`, - `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;AAD User ID=${expectedUser};Password=${expectedPassword};Authority Id=organizations` + `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;AAD User ID=${expectedUser};Password=${expectedPassword};Authority Id=organizations`, ); }); @@ -189,16 +189,16 @@ describe("KustoConnectionStringBuilder", () => { const kcsbs = [ new KustoConnectionStringBuilder( - `localhost;AAD User ID=${expectedUser};password=${expectedPassword};Authority Id=${expectedAuthorityId};AAD Federated Security=True` + `localhost;AAD User ID=${expectedUser};password=${expectedPassword};Authority Id=${expectedAuthorityId};AAD Federated Security=True`, ), new KustoConnectionStringBuilder( - `Data Source=localhost ; AaD User ID=${expectedUser}; Password =${expectedPassword};authority=${expectedAuthorityId};AAD Federated Security=True` + `Data Source=localhost ; AaD User ID=${expectedUser}; Password =${expectedPassword};authority=${expectedAuthorityId};AAD Federated Security=True`, ), new KustoConnectionStringBuilder( - ` Addr = localhost ; AAD User ID = ${expectedUser} ; Pwd =${expectedPassword};tenantid=${expectedAuthorityId};AAD Federated Security=True` + ` Addr = localhost ; AAD User ID = ${expectedUser} ; Pwd =${expectedPassword};tenantid=${expectedAuthorityId};AAD Federated Security=True`, ), new KustoConnectionStringBuilder( - `Network Address = localhost; AAD User iD = ${expectedUser} ; Pwd = ${expectedPassword};tid=${expectedAuthorityId};AAD Federated Security=True ` + `Network Address = localhost; AAD User iD = ${expectedUser} ; Pwd = ${expectedPassword};tid=${expectedAuthorityId};AAD Federated Security=True `, ), KustoConnectionStringBuilder.withAadUserPasswordAuthentication("localhost", expectedUser, expectedPassword, expectedAuthorityId), ]; @@ -220,7 +220,7 @@ describe("KustoConnectionStringBuilder", () => { aadFederatedSecurity: true, }, `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;AAD User ID=${expectedUser};Password=****;Authority Id=${expectedAuthorityId}`, - `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;AAD User ID=${expectedUser};Password=${expectedPassword};Authority Id=${expectedAuthorityId}` + `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;AAD User ID=${expectedUser};Password=${expectedPassword};Authority Id=${expectedAuthorityId}`, ); }); }); @@ -232,14 +232,14 @@ describe("KustoConnectionStringBuilder", () => { it.concurrent("without authority id", () => { const kcsbs = [ new KustoConnectionStringBuilder( - `localhost;Application client Id=${expectedUuid};application Key=${expectedKey};AAD Federated Security=True` + `localhost;Application client Id=${expectedUuid};application Key=${expectedKey};AAD Federated Security=True`, ), new KustoConnectionStringBuilder( - `Data Source=localhost ; Application Client Id=${expectedUuid}; Appkey =${expectedKey};AAD Federated Security=True` + `Data Source=localhost ; Application Client Id=${expectedUuid}; Appkey =${expectedKey};AAD Federated Security=True`, ), new KustoConnectionStringBuilder(` Addr = localhost ; AppClientId = ${expectedUuid} ; AppKey =${expectedKey};AAD Federated Security=True`), new KustoConnectionStringBuilder( - `Network Address = localhost; AppClientId = ${expectedUuid} ; AppKey =${expectedKey};AAD Federated Security=True` + `Network Address = localhost; AppClientId = ${expectedUuid} ; AppKey =${expectedKey};AAD Federated Security=True`, ), KustoConnectionStringBuilder.withAadApplicationKeyAuthentication("localhost", expectedUuid, expectedKey), ]; @@ -259,7 +259,7 @@ describe("KustoConnectionStringBuilder", () => { aadFederatedSecurity: true, }, `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${expectedUuid};Application Key=****;Authority Id=organizations`, - `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${expectedUuid};Application Key=${expectedKey};Authority Id=organizations` + `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${expectedUuid};Application Key=${expectedKey};Authority Id=organizations`, ); }); @@ -268,16 +268,16 @@ describe("KustoConnectionStringBuilder", () => { const kcsbs = [ new KustoConnectionStringBuilder( - `localhost;Application client Id=${expectedUuid};application Key=${expectedKey};Authority Id=${expectedAuthorityId};AAD Federated Security=True` + `localhost;Application client Id=${expectedUuid};application Key=${expectedKey};Authority Id=${expectedAuthorityId};AAD Federated Security=True`, ), new KustoConnectionStringBuilder( - `Data Source=localhost ; Application Client Id=${expectedUuid}; Appkey =${expectedKey};authority=${expectedAuthorityId};AAD Federated Security=True` + `Data Source=localhost ; Application Client Id=${expectedUuid}; Appkey =${expectedKey};authority=${expectedAuthorityId};AAD Federated Security=True`, ), new KustoConnectionStringBuilder( - ` Addr = localhost ; AppClientId = ${expectedUuid} ; AppKey =${expectedKey};tenantid=${expectedAuthorityId};AAD Federated Security=True` + ` Addr = localhost ; AppClientId = ${expectedUuid} ; AppKey =${expectedKey};tenantid=${expectedAuthorityId};AAD Federated Security=True`, ), new KustoConnectionStringBuilder( - `Network Address = localhost; AppClientId = ${expectedUuid} ; AppKey =${expectedKey};tid=${expectedAuthorityId};AAD Federated Security=True ` + `Network Address = localhost; AppClientId = ${expectedUuid} ; AppKey =${expectedKey};tid=${expectedAuthorityId};AAD Federated Security=True `, ), KustoConnectionStringBuilder.withAadApplicationKeyAuthentication("localhost", expectedUuid, expectedKey, expectedAuthorityId), ]; @@ -298,7 +298,7 @@ describe("KustoConnectionStringBuilder", () => { aadFederatedSecurity: true, }, `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${expectedUuid};Application Key=****;Authority Id=${expectedAuthorityId}`, - `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${expectedUuid};Application Key=${expectedKey};Authority Id=${expectedAuthorityId}` + `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${expectedUuid};Application Key=${expectedKey};Authority Id=${expectedAuthorityId}`, ); }); }); @@ -312,10 +312,10 @@ describe("KustoConnectionStringBuilder", () => { it.concurrent("with authority id", () => { const kcsbs = [ new KustoConnectionStringBuilder( - `localhost;Application client Id=${appId};application Certificate PrivateKey=${privateKey};Authority Id=${expectedAuthorityId};application certificate x5c=${cert5xc};AAD Federated Security=True` + `localhost;Application client Id=${appId};application Certificate PrivateKey=${privateKey};Authority Id=${expectedAuthorityId};application certificate x5c=${cert5xc};AAD Federated Security=True`, ), new KustoConnectionStringBuilder( - `localhost;AppClientId=${appId};Application Certificate PrivateKey=${privateKey};Authority Id=${expectedAuthorityId};SendX5c=${cert5xc};AAD Federated Security=True` + `localhost;AppClientId=${appId};Application Certificate PrivateKey=${privateKey};Authority Id=${expectedAuthorityId};SendX5c=${cert5xc};AAD Federated Security=True`, ), KustoConnectionStringBuilder.withAadApplicationCertificateAuthentication("localhost", appId, privateKey, expectedAuthorityId, cert5xc), ]; @@ -339,17 +339,17 @@ describe("KustoConnectionStringBuilder", () => { aadFederatedSecurity: true, }, `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${appId};Application Certificate PrivateKey=****;Application Certificate x5c=${cert5xc};Authority Id=${expectedAuthorityId}`, - `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${appId};Application Certificate PrivateKey=${privateKey};Application Certificate x5c=${cert5xc};Authority Id=${expectedAuthorityId}` + `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${appId};Application Certificate PrivateKey=${privateKey};Application Certificate x5c=${cert5xc};Authority Id=${expectedAuthorityId}`, ); }); it.concurrent("without authority id", () => { const kcsbs = [ new KustoConnectionStringBuilder( - `localhost;Application client Id=${appId};application Certificate PrivateKey=${privateKey};application certificate x5c=${cert5xc};AAD Federated Security=True` + `localhost;Application client Id=${appId};application Certificate PrivateKey=${privateKey};application certificate x5c=${cert5xc};AAD Federated Security=True`, ), new KustoConnectionStringBuilder( - `localhost;AppClientId=${appId};Application Certificate PrivateKey=${privateKey};SendX5c=${cert5xc};AAD Federated Security=True` + `localhost;AppClientId=${appId};Application Certificate PrivateKey=${privateKey};SendX5c=${cert5xc};AAD Federated Security=True`, ), KustoConnectionStringBuilder.withAadApplicationCertificateAuthentication("localhost", appId, privateKey, DEFAULT_AUTHORITY, cert5xc), ]; @@ -372,17 +372,17 @@ describe("KustoConnectionStringBuilder", () => { aadFederatedSecurity: true, }, `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${appId};Application Certificate PrivateKey=****;Application Certificate x5c=${cert5xc};Authority Id=organizations`, - `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${appId};Application Certificate PrivateKey=${privateKey};Application Certificate x5c=${cert5xc};Authority Id=organizations` + `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${appId};Application Certificate PrivateKey=${privateKey};Application Certificate x5c=${cert5xc};Authority Id=organizations`, ); }); it.concurrent("without 3xc", () => { const kcsbs = [ new KustoConnectionStringBuilder( - `localhost;Application client Id=${appId};application Certificate PrivateKey=${privateKey};AAD Federated Security=True` + `localhost;Application client Id=${appId};application Certificate PrivateKey=${privateKey};AAD Federated Security=True`, ), new KustoConnectionStringBuilder( - `localhost;AppClientId=${appId};Application Certificate PrivateKey=${privateKey};AAD Federated Security=True` + `localhost;AppClientId=${appId};Application Certificate PrivateKey=${privateKey};AAD Federated Security=True`, ), KustoConnectionStringBuilder.withAadApplicationCertificateAuthentication("localhost", appId, privateKey, DEFAULT_AUTHORITY), ]; @@ -403,7 +403,7 @@ describe("KustoConnectionStringBuilder", () => { aadFederatedSecurity: true, }, `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${appId};Application Certificate PrivateKey=****;Authority Id=organizations`, - `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${appId};Application Certificate PrivateKey=${privateKey};Authority Id=organizations` + `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Application Client Id=${appId};Application Certificate PrivateKey=${privateKey};Authority Id=organizations`, ); }); }); @@ -426,7 +426,7 @@ describe("KustoConnectionStringBuilder", () => { deviceCodeCallback: (res: DeviceCodeInfo) => res, }, "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", - "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations" + "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", ); }); @@ -447,7 +447,7 @@ describe("KustoConnectionStringBuilder", () => { aadFederatedSecurity: true, }, "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", - "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations" + "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", ); }); @@ -473,7 +473,7 @@ describe("KustoConnectionStringBuilder", () => { timeoutMs, }, "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", - "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations" + "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", ); }); }); @@ -502,7 +502,7 @@ describe("KustoConnectionStringBuilder", () => { useAzLoginAuth: true, }, "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", - "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations" + "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", ); }); @@ -522,7 +522,7 @@ describe("KustoConnectionStringBuilder", () => { accessToken: token, }, "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", - "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations" + "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", ); }); @@ -542,7 +542,7 @@ describe("KustoConnectionStringBuilder", () => { tokenProvider, }, "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", - "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations" + "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", ); }); @@ -563,7 +563,7 @@ describe("KustoConnectionStringBuilder", () => { aadFederatedSecurity: true, }, "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", - "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations" + "Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations", ); }); @@ -587,7 +587,7 @@ describe("KustoConnectionStringBuilder", () => { timeoutMs, }, `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations`, - `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations` + `Data Source=localhost;AAD Federated Security=true;Initial Catalog=NetDefaultDB;Authority Id=organizations`, ); }); }); diff --git a/packages/azure-kusto-data/test/headersTest.ts b/packages/azure-kusto-data/test/headersTest.ts index dca3bcf0..c1b6812f 100644 --- a/packages/azure-kusto-data/test/headersTest.ts +++ b/packages/azure-kusto-data/test/headersTest.ts @@ -58,7 +58,7 @@ describe("Test Headers", () => { assert.strictEqual(headers["x-ms-client-version"]?.startsWith("Kusto.JavaScript.Client:"), true); assert.strictEqual( headers["x-ms-app"], - "Kusto.Caf_:{1_._0}|App.{my_test____app}:{ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss}" + "Kusto.Caf_:{1_._0}|App.{my_test____app}:{ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss}", ); assert.notStrictEqual(headers["x-ms-user"], "[none]"); }); diff --git a/packages/azure-kusto-data/test/modelsTest.ts b/packages/azure-kusto-data/test/modelsTest.ts index 676eeb76..5e065f98 100644 --- a/packages/azure-kusto-data/test/modelsTest.ts +++ b/packages/azure-kusto-data/test/modelsTest.ts @@ -53,7 +53,7 @@ describe("KustoResultRow", () => { const reverseOrderColumns = rawColumns.slice().reverse(); const actual = new KustoResultRow( reverseOrderColumns.map((c, i) => new KustoResultColumn(c, rawColumns.length - i - 1)), - inputValues + inputValues, ); const asJson = actual.toJSON(); @@ -84,7 +84,7 @@ describe("KustoResultRow", () => { reverseOrderColumns.map((c, i) => new KustoResultColumn(c, rawColumns.length - i - 1)), inputValues, (t) => (t || "") + "-date", - (t) => (t || "") + "-time" + (t) => (t || "") + "-time", ); const asJson = actual.toJSON(); diff --git a/packages/azure-kusto-data/test/securityTest.ts b/packages/azure-kusto-data/test/securityTest.ts index d43c6075..dbd59579 100644 --- a/packages/azure-kusto-data/test/securityTest.ts +++ b/packages/azure-kusto-data/test/securityTest.ts @@ -145,14 +145,14 @@ describe("Test providers", () => { loginTest( "APP_ID", "TENANT_ID", - "APP_KEY" + "APP_KEY", )("test app key token provider", async () => { const cluster = "https://somecluster.kusto.windows.net"; const kcsb = KustoConnectionStringBuilder.withAadApplicationKeyAuthentication( cluster, process.env.APP_ID!, process.env.APP_KEY!, - process.env.TENANT_ID! + process.env.TENANT_ID!, ); const helper = new AadHelper(kcsb); @@ -164,14 +164,14 @@ describe("Test providers", () => { "APP_ID", "TENANT_ID", "CERT_PUBLIC", - "CERT_PEM" + "CERT_PEM", )("test app certificate token provider", async () => { const cluster = "https://somecluster.kusto.windows.net"; const kcsb = KustoConnectionStringBuilder.withAadApplicationCertificateAuthentication( cluster, process.env.APP_KEY!, process.env.CERT_PEM!, - process.env.CERT_PUBLIC! + process.env.CERT_PUBLIC!, ); const helper = new AadHelper(kcsb); @@ -182,14 +182,14 @@ describe("Test providers", () => { manualLoginTest( "APP_ID", "USER_NAME", - "USER_PASS" + "USER_PASS", )("test user pass provider", async () => { const cluster = "https://somecluster.kusto.windows.net"; const kcsb = KustoConnectionStringBuilder.withAadUserPasswordAuthentication( cluster, process.env.USER_NAME!, process.env.USER_PASS!, - process.env.TENANT_ID! + process.env.TENANT_ID!, ); const helper = new AadHelper(kcsb); diff --git a/packages/azure-kusto-ingest/example.js b/packages/azure-kusto-ingest/example.js index 7e7271ca..f812609d 100644 --- a/packages/azure-kusto-ingest/example.js +++ b/packages/azure-kusto-ingest/example.js @@ -32,7 +32,7 @@ const props = new IngestionProps({ // After using the client, you should use `close()` to free up resources const ingestClient = new IngestClient( KustoConnectionStringBuilder.withAadApplicationKeyAuthentication(`https://ingest-${clusterName}.kusto.windows.net`, appId, appKey, authorityId), - props + props, ); const statusQueues = new IngestStatusQueues(ingestClient); @@ -50,7 +50,7 @@ const props2 = new IngestionProps({ // Init with engine endpoint const streamingIngestClient = new StreamingIngestClient( KustoConnectionStringBuilder.withAadApplicationKeyAuthentication(`https://${clusterName}.kusto.windows.net`, appId, appKey, authorityId), - props2 + props2, ); startStreamingIngestion(); diff --git a/packages/azure-kusto-ingest/exampleBrowser.ts b/packages/azure-kusto-ingest/exampleBrowser.ts index 1f167aae..11859ab9 100644 --- a/packages/azure-kusto-ingest/exampleBrowser.ts +++ b/packages/azure-kusto-ingest/exampleBrowser.ts @@ -40,7 +40,7 @@ export const main = async (): Promise => { // https://learn.microsoft.com/azure/data-explorer/kusto/management/batchingpolicy await queryClient.execute( database, - `.alter table ${table} policy ingestionbatching @'{"MaximumBatchingTimeSpan":"00:00:10", "MaximumNumberOfItems": 500, "MaximumRawDataSizeMB": 1024}'` + `.alter table ${table} policy ingestionbatching @'{"MaximumBatchingTimeSpan":"00:00:10", "MaximumNumberOfItems": 500, "MaximumRawDataSizeMB": 1024}'`, ); // Push aggregation policy change to ingest service to take immidiate effect await dmCommandClient.execute(database, `.refresh database '${database}' table '${table}' cache ingestionbatchingpolicy`); diff --git a/packages/azure-kusto-ingest/package.json b/packages/azure-kusto-ingest/package.json index 7040fbef..7acb6813 100644 --- a/packages/azure-kusto-ingest/package.json +++ b/packages/azure-kusto-ingest/package.json @@ -1,8 +1,9 @@ { "name": "azure-kusto-ingest", - "version": "7.0.0-alpha.0", + "version": "7.0.0-alpha.1", "description": "Azure Data Explorer Ingestion SDK", "type": "module", + "main": "dist-esm/src/index.js", "exports": { ".": { "import": "./dist-esm/src/index.js", @@ -68,7 +69,7 @@ "@types/tmp": "^0.2.3", "@types/uuid": "^8.3.4", "@types/uuid-validate": "0.0.1", - "azure-kusto-data": "^7.0.0-alpha.0", + "azure-kusto-data": "^7.0.0-alpha.1", "browserify-zlib": "0.2.0", "buffer": "^6.0.3", "is-ip": "^3.1.0", diff --git a/packages/azure-kusto-ingest/src/columnMappings.ts b/packages/azure-kusto-ingest/src/columnMappings.ts index a3c91622..f4ed370e 100644 --- a/packages/azure-kusto-ingest/src/columnMappings.ts +++ b/packages/azure-kusto-ingest/src/columnMappings.ts @@ -39,7 +39,11 @@ interface ApiColumnMapping { } export abstract class ColumnMapping { - protected constructor(readonly columnName: string, readonly cslDataType?: string, readonly Properties?: MappingProperties) {} + protected constructor( + readonly columnName: string, + readonly cslDataType?: string, + readonly Properties?: MappingProperties, + ) {} public abstract mappingKind: IngestionMappingKind; @@ -73,7 +77,12 @@ export class CsvColumnMapping extends ColumnMapping { /** * @deprecated Use the factory methods instead. */ - protected constructor(readonly columnName: string, readonly cslDataType?: string, readonly ordinal?: string, constantValue?: {}) { + protected constructor( + readonly columnName: string, + readonly cslDataType?: string, + readonly ordinal?: string, + constantValue?: {}, + ) { super(columnName, cslDataType, { Ordinal: ordinal === undefined ? undefined : parseInt(ordinal, 10), ConstValue: constantValue, @@ -95,7 +104,13 @@ export class JsonColumnMapping extends ColumnMapping { /** * @deprecated Use the factory methods instead. */ - constructor(readonly columnName: string, readonly jsonPath?: string, cslDataType: string | null = null, constantValue?: {}, transform?: Transformation) { + constructor( + readonly columnName: string, + readonly jsonPath?: string, + cslDataType: string | null = null, + constantValue?: {}, + transform?: Transformation, + ) { super(columnName, cslDataType ?? undefined, { Path: jsonPath, ConstValue: constantValue, @@ -119,7 +134,14 @@ export class JsonColumnMapping extends ColumnMapping { } export class AvroColumnMapping extends ColumnMapping { - private constructor(readonly columnName: string, cslDataType?: string, path?: string, field?: string, constantValue?: {}, transform?: Transformation) { + private constructor( + readonly columnName: string, + cslDataType?: string, + path?: string, + field?: string, + constantValue?: {}, + transform?: Transformation, + ) { super(columnName, cslDataType ?? undefined, { Path: path, Field: field, @@ -148,7 +170,14 @@ export class AvroColumnMapping extends ColumnMapping { } export class ApacheAvroColumnMapping extends ColumnMapping { - private constructor(readonly columnName: string, cslDataType?: string, path?: string, field?: string, constantValue?: {}, transform?: Transformation) { + private constructor( + readonly columnName: string, + cslDataType?: string, + path?: string, + field?: string, + constantValue?: {}, + transform?: Transformation, + ) { super(columnName, cslDataType ?? undefined, { Path: path, Field: field, @@ -177,7 +206,14 @@ export class ApacheAvroColumnMapping extends ColumnMapping { } export class SStreamColumnMapping extends ColumnMapping { - private constructor(readonly columnName: string, cslDataType?: string, path?: string, field?: string, constantValue?: {}, transform?: Transformation) { + private constructor( + readonly columnName: string, + cslDataType?: string, + path?: string, + field?: string, + constantValue?: {}, + transform?: Transformation, + ) { super(columnName, cslDataType ?? undefined, { Path: path, Field: field, @@ -206,7 +242,14 @@ export class SStreamColumnMapping extends ColumnMapping { } export class ParquetColumnMapping extends ColumnMapping { - private constructor(readonly columnName: string, cslDataType?: string, path?: string, field?: string, constantValue?: {}, transform?: Transformation) { + private constructor( + readonly columnName: string, + cslDataType?: string, + path?: string, + field?: string, + constantValue?: {}, + transform?: Transformation, + ) { super(columnName, cslDataType ?? undefined, { Path: path, Field: field, @@ -235,7 +278,14 @@ export class ParquetColumnMapping extends ColumnMapping { } export class OrcColumnMapping extends ColumnMapping { - private constructor(readonly columnName: string, cslDataType?: string, path?: string, field?: string, constantValue?: {}, transform?: Transformation) { + private constructor( + readonly columnName: string, + cslDataType?: string, + path?: string, + field?: string, + constantValue?: {}, + transform?: Transformation, + ) { super(columnName, cslDataType ?? undefined, { Path: path, Field: field, @@ -264,7 +314,13 @@ export class OrcColumnMapping extends ColumnMapping { } export class W3CLogFileMapping extends ColumnMapping { - private constructor(readonly columnName: string, cslDataType?: string, field?: string, constantValue?: {}, transform?: Transformation) { + private constructor( + readonly columnName: string, + cslDataType?: string, + field?: string, + constantValue?: {}, + transform?: Transformation, + ) { super(columnName, cslDataType ?? undefined, { Field: field, ConstValue: constantValue, Transform: transform }); } diff --git a/packages/azure-kusto-ingest/src/descriptors.ts b/packages/azure-kusto-ingest/src/descriptors.ts index 0b4569e9..3c75b2b4 100644 --- a/packages/azure-kusto-ingest/src/descriptors.ts +++ b/packages/azure-kusto-ingest/src/descriptors.ts @@ -28,7 +28,10 @@ export function shouldCompressFileByExtension(extension?: string): boolean { } export abstract class AbstractDescriptor { - constructor(public sourceId: string | null = null, public size: number | null = null) { + constructor( + public sourceId: string | null = null, + public size: number | null = null, + ) { this.sourceId = getSourceId(sourceId); } } @@ -41,7 +44,7 @@ export class StreamDescriptor extends AbstractDescriptor { readonly stream: Readable | ArrayBuffer, sourceId: string | null = null, public compressionType: CompressionType = CompressionType.None, - size: number | null = null + size: number | null = null, ) { super(sourceId, size); } @@ -60,7 +63,11 @@ export class StreamDescriptor extends AbstractDescriptor { } export class BlobDescriptor extends AbstractDescriptor { - constructor(readonly path: string, size: number | null = null, sourceId: string | null = null) { + constructor( + readonly path: string, + size: number | null = null, + sourceId: string | null = null, + ) { super(sourceId, size); } diff --git a/packages/azure-kusto-ingest/src/fileDescriptor.browser.ts b/packages/azure-kusto-ingest/src/fileDescriptor.browser.ts index b2caa8ad..37414a11 100644 --- a/packages/azure-kusto-ingest/src/fileDescriptor.browser.ts +++ b/packages/azure-kusto-ingest/src/fileDescriptor.browser.ts @@ -18,7 +18,7 @@ export class FileDescriptor extends AbstractDescriptor implements FileDescriptor size: number | null = null, compressionType: CompressionType = CompressionType.None, readonly extension?: string, - readonly name?: string + readonly name?: string, ) { super(sourceId); this.compressionType = compressionType; diff --git a/packages/azure-kusto-ingest/src/fileDescriptor.ts b/packages/azure-kusto-ingest/src/fileDescriptor.ts index 5aa7a8d1..e6c40555 100644 --- a/packages/azure-kusto-ingest/src/fileDescriptor.ts +++ b/packages/azure-kusto-ingest/src/fileDescriptor.ts @@ -27,7 +27,7 @@ export class FileDescriptor extends AbstractDescriptor implements FileDescriptor size: number | null = null, compressionType: CompressionType = CompressionType.None, readonly extension?: string, // Extracted from file name by default - readonly name?: string // Extracted from file name by default + readonly name?: string, // Extracted from file name by default ) { super(sourceId, size); this.compressionType = compressionType; diff --git a/packages/azure-kusto-ingest/src/ingestClientBase.ts b/packages/azure-kusto-ingest/src/ingestClientBase.ts index 83e09ec8..40ee90e5 100644 --- a/packages/azure-kusto-ingest/src/ingestClientBase.ts +++ b/packages/azure-kusto-ingest/src/ingestClientBase.ts @@ -35,7 +35,7 @@ export abstract class KustoIngestClientBase extends AbstractKustoClient { kcsb: string | KustoConnectionStringBuilder, defaultProps?: IngestionPropertiesInput, autoCorrectEndpoint: boolean = true, - isBrowser?: boolean + isBrowser?: boolean, ) { super(defaultProps); if (typeof kcsb === "string") { @@ -55,7 +55,7 @@ export abstract class KustoIngestClientBase extends AbstractKustoClient { async ingestFromBlob( blob: string | BlobDescriptor, ingestionProperties?: IngestionPropertiesInput, - maxRetries: number = KustoIngestClientBase.MaxNumberOfRetryAttempts + maxRetries: number = KustoIngestClientBase.MaxNumberOfRetryAttempts, ): Promise { this.ensureOpen(); const props = this._getMergedProps(ingestionProperties); @@ -122,7 +122,7 @@ export abstract class KustoIngestClientBase extends AbstractKustoClient { async uploadToBlobWithRetry( descriptor: string | Blob | ArrayBuffer | StreamDescriptor, blobName: string, - maxRetries: number = KustoIngestClientBase.MaxNumberOfRetryAttempts + maxRetries: number = KustoIngestClientBase.MaxNumberOfRetryAttempts, ): Promise { const containers = await this.resourceManager.getContainers(); diff --git a/packages/azure-kusto-ingest/src/ingestionBlobInfo.ts b/packages/azure-kusto-ingest/src/ingestionBlobInfo.ts index 76a33460..57d6fb80 100644 --- a/packages/azure-kusto-ingest/src/ingestionBlobInfo.ts +++ b/packages/azure-kusto-ingest/src/ingestionBlobInfo.ts @@ -28,7 +28,7 @@ export class IngestionBlobInfo { ingestionProperties: IngestionProperties, authContext: string | null = null, applicationForTracing: string | null = null, - clientVersionForTracing: string | null = null + clientVersionForTracing: string | null = null, ) { this.BlobPath = blobDescriptor.path; this.RawDataSize = blobDescriptor.size; diff --git a/packages/azure-kusto-ingest/src/ingestionProperties.ts b/packages/azure-kusto-ingest/src/ingestionProperties.ts index 7e250305..35bdebe0 100644 --- a/packages/azure-kusto-ingest/src/ingestionProperties.ts +++ b/packages/azure-kusto-ingest/src/ingestionProperties.ts @@ -144,7 +144,7 @@ export enum ValidationImplications { export class ValidationPolicy { constructor( readonly validationOptions: ValidationOptions = ValidationOptions.DoNotValidate, - readonly validationImplications: ValidationImplications = ValidationImplications.BestEffort + readonly validationImplications: ValidationImplications = ValidationImplications.BestEffort, ) {} toJSON(): Record { @@ -220,14 +220,14 @@ export class IngestionProperties { if (!this.ingestionMappingColumns && !this.ingestionMappingReference) { if (this.ingestionMappingKind) { throw new IngestionPropertiesValidationError( - "Cannot define ingestionMappingKind without either ingestionMappingColumns or" + " ingestionMappingReference" + "Cannot define ingestionMappingKind without either ingestionMappingColumns or" + " ingestionMappingReference", ); } } else { const mappingKind = dataFormatMappingKind(this.format); if (this.ingestionMappingKind && this.ingestionMappingKind !== mappingKind) { throw new IngestionPropertiesValidationError( - `Mapping kind '${this.ingestionMappingKind}' does not match format '${this.format}' (should be '${mappingKind}')` + `Mapping kind '${this.ingestionMappingKind}' does not match format '${this.format}' (should be '${mappingKind}')`, ); } if (this.ingestionMappingColumns) { @@ -242,7 +242,7 @@ export class IngestionProperties { const wrongMappings = this.ingestionMappingColumns .filter((m) => m.mappingKind !== mappingKind) .map( - (m) => `Mapping kind mismatch for column '${m.columnName}' - expected data format kind - '${mappingKind}', but was '${m.mappingKind}'` + (m) => `Mapping kind mismatch for column '${m.columnName}' - expected data format kind - '${mappingKind}', but was '${m.mappingKind}'`, ); if (wrongMappings.length > 0) { throw new IngestionPropertiesValidationError(`Invalid columns:\n${wrongMappings.join("\n")}`); @@ -265,7 +265,7 @@ export class IngestionProperties { const assign = ( obj: IngestionPropertiesFields, prop: K, - value: V + value: V, ) => { obj[prop] = value; }; diff --git a/packages/azure-kusto-ingest/src/ingestionResult.ts b/packages/azure-kusto-ingest/src/ingestionResult.ts index ae1d7cb2..5027ef9d 100644 --- a/packages/azure-kusto-ingest/src/ingestionResult.ts +++ b/packages/azure-kusto-ingest/src/ingestionResult.ts @@ -33,7 +33,10 @@ export enum OperationStatus { } export class TableReportIngestionResult implements IngestionResult { - public constructor(private ingestionStatusInTableDescription: IngestionStatusInTableDescription, public tableClient: TableClient | null = null) {} + public constructor( + private ingestionStatusInTableDescription: IngestionStatusInTableDescription, + public tableClient: TableClient | null = null, + ) {} public async getIngestionStatusCollection(): Promise { if (!this.tableClient) { @@ -42,7 +45,7 @@ export class TableReportIngestionResult implements IngestionResult { return await this.tableClient.getEntity( this.ingestionStatusInTableDescription.partitionKey, - this.ingestionStatusInTableDescription.rowKey + this.ingestionStatusInTableDescription.rowKey, ); } } @@ -58,7 +61,11 @@ export class IngestionStatusResult implements IngestionResult { } export class IngestionStatusInTableDescription { - constructor(public tableConnectionString: string, public partitionKey: string, public rowKey: string) {} + constructor( + public tableConnectionString: string, + public partitionKey: string, + public rowKey: string, + ) {} } export interface IngestionStatus { diff --git a/packages/azure-kusto-ingest/src/managedStreamingIngestClient.ts b/packages/azure-kusto-ingest/src/managedStreamingIngestClient.ts index d3dba202..51e65013 100644 --- a/packages/azure-kusto-ingest/src/managedStreamingIngestClient.ts +++ b/packages/azure-kusto-ingest/src/managedStreamingIngestClient.ts @@ -35,7 +35,7 @@ class KustoManagedStreamingIngestClient extends AbstractKustoClient { */ static fromDmConnectionString( dmConnectionString: KustoConnectionStringBuilder, - defaultProps?: IngestionPropertiesInput + defaultProps?: IngestionPropertiesInput, ): KustoManagedStreamingIngestClient { if (dmConnectionString.dataSource == null || !dmConnectionString.dataSource.startsWith(ingestPrefix)) { throw new Error(`DM connection string must include the prefix '${ingestPrefix}'`); @@ -57,7 +57,7 @@ class KustoManagedStreamingIngestClient extends AbstractKustoClient { */ static fromEngineConnectionString( engineConnectionString: KustoConnectionStringBuilder, - defaultProps?: IngestionPropertiesInput + defaultProps?: IngestionPropertiesInput, ): KustoManagedStreamingIngestClient { if (engineConnectionString.dataSource == null || engineConnectionString.dataSource.startsWith(ingestPrefix)) { throw new Error(`Engine connection string must not include the prefix '${ingestPrefix}'`); @@ -73,7 +73,7 @@ class KustoManagedStreamingIngestClient extends AbstractKustoClient { engineKcsb: string | KustoConnectionStringBuilder, dmKcsb: string | KustoConnectionStringBuilder, defaultProps?: IngestionPropertiesInput, - autoCorrectEndpoint: boolean = true + autoCorrectEndpoint: boolean = true, ) { super(defaultProps); this.streamingIngestClient = new StreamingIngestClient(engineKcsb, defaultProps, autoCorrectEndpoint); @@ -81,7 +81,7 @@ class KustoManagedStreamingIngestClient extends AbstractKustoClient { if (this.streamingIngestClient.defaultDatabase && this.streamingIngestClient.defaultDatabase !== this.queuedIngestClient.defaultDatabase) { throw new Error( - `Default database for streaming ingest client (${this.streamingIngestClient.defaultDatabase}) must match default database for queued ingest client (${this.queuedIngestClient.defaultDatabase})` + `Default database for streaming ingest client (${this.streamingIngestClient.defaultDatabase}) must match default database for queued ingest client (${this.queuedIngestClient.defaultDatabase})`, ); } @@ -94,7 +94,7 @@ class KustoManagedStreamingIngestClient extends AbstractKustoClient { async ingestFromStream( stream: StreamDescriptor | Readable | ArrayBuffer, ingestionProperties?: IngestionPropertiesInput, - clientRequestId?: string + clientRequestId?: string, ): Promise { this.ensureOpen(); const props = this._getMergedProps(ingestionProperties); @@ -105,11 +105,11 @@ class KustoManagedStreamingIngestClient extends AbstractKustoClient { // tryStreamToArray returns a Buffer in NodeJS impl if stream size is small enouph if ((isNode && result instanceof Buffer) || !isNode) { streamingResult = await this.streamWithRetries( - isNode ? descriptor.size ?? 0 : (descriptor.stream as ArrayBuffer).byteLength, + isNode ? (descriptor.size ?? 0) : (descriptor.stream as ArrayBuffer).byteLength, descriptor, props, clientRequestId, - result + result, ); result = isNode ? readableToStream(result) : descriptor.stream; @@ -123,7 +123,7 @@ class KustoManagedStreamingIngestClient extends AbstractKustoClient { */ async ingestFromFile( file: FileDescriptor | string | Blob, - ingestionProperties?: IngestionPropertiesInput + ingestionProperties?: IngestionPropertiesInput, ): Promise { this.ensureOpen(); @@ -134,7 +134,7 @@ class KustoManagedStreamingIngestClient extends AbstractKustoClient { async ingestFromBlob( blob: string | BlobDescriptor, ingestionProperties?: IngestionPropertiesInput, - clientRequestId?: string + clientRequestId?: string, ): Promise { const props = this._getMergedProps(ingestionProperties); const descriptor = blob instanceof BlobDescriptor ? blob : new BlobDescriptor(blob); @@ -150,7 +150,7 @@ class KustoManagedStreamingIngestClient extends AbstractKustoClient { descriptor: AbstractDescriptor, props?: IngestionPropertiesInput, clientRequestId?: string, - stream?: Readable | ArrayBuffer + stream?: Readable | ArrayBuffer, ): Promise { const isBlob = descriptor instanceof BlobDescriptor; if (length <= maxStreamSize) { @@ -169,7 +169,7 @@ class KustoManagedStreamingIngestClient extends AbstractKustoClient { return await this.streamingIngestClient.ingestFromStream( new StreamDescriptor(readableToStream(stream!)).merge(descriptor as StreamDescriptor), props, - sourceId + sourceId, ); } diff --git a/packages/azure-kusto-ingest/src/rankedStorageAccount.ts b/packages/azure-kusto-ingest/src/rankedStorageAccount.ts index 6798a55d..43ef4da9 100644 --- a/packages/azure-kusto-ingest/src/rankedStorageAccount.ts +++ b/packages/azure-kusto-ingest/src/rankedStorageAccount.ts @@ -27,7 +27,12 @@ export class RankedStorageAccount { private lastUpdateTime: number; private currentBucketIndex: number; - constructor(private accountName: string, private numberOfBuckets: number, private bucketDuration: number, private timeProvider: () => number) { + constructor( + private accountName: string, + private numberOfBuckets: number, + private bucketDuration: number, + private timeProvider: () => number, + ) { this.buckets = new Array(numberOfBuckets).fill(new StorageAccountStats()).map(() => new StorageAccountStats()); this.lastUpdateTime = this.timeProvider(); this.currentBucketIndex = 0; diff --git a/packages/azure-kusto-ingest/src/rankedStorageAccountSet.ts b/packages/azure-kusto-ingest/src/rankedStorageAccountSet.ts index 9848e613..6f1aff1b 100644 --- a/packages/azure-kusto-ingest/src/rankedStorageAccountSet.ts +++ b/packages/azure-kusto-ingest/src/rankedStorageAccountSet.ts @@ -17,7 +17,7 @@ export class RankedStorageAccountSet { private numberOfBuckets: number = RankedStorageAccountSet.DefaultNumberOfBuckets, private bucketDuration: number = RankedStorageAccountSet.DefaultBucketDurationInSeconds, private tiers: number[] = RankedStorageAccountSet.DefaultTiers, - private timeProvider: () => number = RankedStorageAccountSet.DefaultTimeProviderInSeconds + private timeProvider: () => number = RankedStorageAccountSet.DefaultTimeProviderInSeconds, ) { this.accounts = new Map(); } diff --git a/packages/azure-kusto-ingest/src/resourceManager.ts b/packages/azure-kusto-ingest/src/resourceManager.ts index cb18286e..ada4f25d 100644 --- a/packages/azure-kusto-ingest/src/resourceManager.ts +++ b/packages/azure-kusto-ingest/src/resourceManager.ts @@ -17,7 +17,11 @@ export enum ResourceType { } export class ResourceURI { - constructor(readonly uri: string, readonly accountName: string, readonly resourceType: ResourceType) {} + constructor( + readonly uri: string, + readonly accountName: string, + readonly resourceType: ResourceType, + ) {} } export class IngestClientResources { @@ -26,7 +30,7 @@ export class IngestClientResources { readonly failedIngestionsQueues: ResourceURI[] | null = null, readonly successfulIngestionsQueues: ResourceURI[] | null = null, readonly containers: ResourceURI[] | null = null, - readonly statusTables: ResourceURI[] | null = null + readonly statusTables: ResourceURI[] | null = null, ) {} valid() { @@ -47,7 +51,10 @@ export class ResourceManager { private baseJitterSecs = 1; private rankedStorageAccountSet: RankedStorageAccountSet; - constructor(readonly kustoClient: Client, readonly isBrowser: boolean = false) { + constructor( + readonly kustoClient: Client, + readonly isBrowser: boolean = false, + ) { this.refreshPeriod = TimeUtils.toMilliseconds(1, 0, 0); this.refreshPeriodOnError = TimeUtils.toMilliseconds(0, 10, 0); @@ -81,7 +88,7 @@ export class ResourceManager { this.getResourceByName(table, "FailedIngestionsQueue", ResourceType.Queue), this.getResourceByName(table, "SuccessfulIngestionsQueue", ResourceType.Queue), this.getResourceByName(table, "TempStorage", ResourceType.Container), - this.getResourceByName(table, "IngestionsStatusTable", ResourceType.Table) + this.getResourceByName(table, "IngestionsStatusTable", ResourceType.Table), ); if (!resoures.valid()) { diff --git a/packages/azure-kusto-ingest/src/retry.ts b/packages/azure-kusto-ingest/src/retry.ts index 07bb3339..4142bf3a 100644 --- a/packages/azure-kusto-ingest/src/retry.ts +++ b/packages/azure-kusto-ingest/src/retry.ts @@ -10,7 +10,11 @@ export const sleep = (ms: number): Promise => { export class ExponentialRetry { public currentAttempt: number; - constructor(public attemptCount: number, public sleepBaseSecs: number, public maxJitterSecs: number) { + constructor( + public attemptCount: number, + public sleepBaseSecs: number, + public maxJitterSecs: number, + ) { this.currentAttempt = 0; } diff --git a/packages/azure-kusto-ingest/src/statusQ.ts b/packages/azure-kusto-ingest/src/statusQ.ts index 2c22dcfd..a5af2416 100644 --- a/packages/azure-kusto-ingest/src/statusQ.ts +++ b/packages/azure-kusto-ingest/src/statusQ.ts @@ -6,7 +6,10 @@ import { ResourceURI } from "./resourceManager.js"; import { StatusMessage } from "./status.js"; class QueueDetails { - constructor(readonly name: string, readonly service: QueueClient) {} + constructor( + readonly name: string, + readonly service: QueueClient, + ) {} } const shuffle = (a: T[]): T[] => { @@ -32,7 +35,10 @@ interface PopParams { type Message = PeekedMessageItem | StatusMessage; export class StatusQueue { - constructor(readonly getQueuesFunc: () => Promise, readonly messageCls: typeof StatusMessage) {} + constructor( + readonly getQueuesFunc: () => Promise, + readonly messageCls: typeof StatusMessage, + ) {} _getQServices(queuesDetails: ResourceURI[]) { return queuesDetails.map((q) => { @@ -105,7 +111,7 @@ export class StatusQueue { async _pop( qs: QueueDetails[], n: number, - options: PopParams | null + options: PopParams | null, ): Promise<{ result: Message[] & { nonEmptyQs?: QueueDetails[] }; nonEmptyQs: any[]; done: boolean }> { const nonEmptyQs: any[] = []; const result = []; diff --git a/packages/azure-kusto-ingest/src/streamingIngestClient.browser.ts b/packages/azure-kusto-ingest/src/streamingIngestClient.browser.ts index d977981b..f67ca99a 100644 --- a/packages/azure-kusto-ingest/src/streamingIngestClient.browser.ts +++ b/packages/azure-kusto-ingest/src/streamingIngestClient.browser.ts @@ -28,7 +28,7 @@ class KustoStreamingIngestClient extends KustoStreamingIngestClientBase { descriptor.stream, props.format, props.ingestionMappingReference ?? null, - clientRequestId + clientRequestId, ); } diff --git a/packages/azure-kusto-ingest/src/streamingIngestClient.ts b/packages/azure-kusto-ingest/src/streamingIngestClient.ts index d60358ff..3e5e4340 100644 --- a/packages/azure-kusto-ingest/src/streamingIngestClient.ts +++ b/packages/azure-kusto-ingest/src/streamingIngestClient.ts @@ -22,7 +22,7 @@ class KustoStreamingIngestClient extends KustoStreamingIngestClientBase { async ingestFromStream( stream: StreamDescriptor | Readable | ArrayBuffer, ingestionProperties?: IngestionPropertiesInput, - clientRequestId?: string + clientRequestId?: string, ): Promise { this.ensureOpen(); @@ -41,7 +41,7 @@ class KustoStreamingIngestClient extends KustoStreamingIngestClientBase { compressedStream, props.format, props.ingestionMappingReference ?? null, - clientRequestId + clientRequestId, ); } diff --git a/packages/azure-kusto-ingest/src/streamingIngestClientBase.ts b/packages/azure-kusto-ingest/src/streamingIngestClientBase.ts index b8679302..beffd284 100644 --- a/packages/azure-kusto-ingest/src/streamingIngestClientBase.ts +++ b/packages/azure-kusto-ingest/src/streamingIngestClientBase.ts @@ -34,7 +34,7 @@ export abstract class KustoStreamingIngestClientBase extends AbstractKustoClient props.format, props.ingestionMappingReference ?? null, descriptor.path, - clientRequestId + clientRequestId, ); } diff --git a/packages/azure-kusto-ingest/test/browserClientTest.ts b/packages/azure-kusto-ingest/test/browserClientTest.ts index 2835a99b..7eec8f30 100644 --- a/packages/azure-kusto-ingest/test/browserClientTest.ts +++ b/packages/azure-kusto-ingest/test/browserClientTest.ts @@ -31,7 +31,7 @@ describe("Kcsb", () => { assert.strictEqual( client.resourceManager.kustoClient.cluster, "https://ingest-somecluster.kusto.windows.net", - "Kusto cluster URL does not match expected value" + "Kusto cluster URL does not match expected value", ); }); it.concurrent("auto correct from ingestion endpoint", () => { @@ -39,7 +39,7 @@ describe("Kcsb", () => { assert.strictEqual( client.resourceManager.kustoClient.cluster, "https://ingest-somecluster.kusto.windows.net", - "Kusto cluster URL does not match expected value" + "Kusto cluster URL does not match expected value", ); }); }); diff --git a/packages/azure-kusto-ingest/test/e2eTests/e2eTest.ts b/packages/azure-kusto-ingest/test/e2eTests/e2eTest.ts index b6bcc269..a250c831 100644 --- a/packages/azure-kusto-ingest/test/e2eTests/e2eTest.ts +++ b/packages/azure-kusto-ingest/test/e2eTests/e2eTest.ts @@ -91,7 +91,7 @@ const main = (): void => { baseJitterSecs: 0, defaultProps: new IngestionProperties({}), }, - ManagedStreamingIngestClient.prototype + ManagedStreamingIngestClient.prototype, ); const tables = [ @@ -115,7 +115,7 @@ const main = (): void => { public path: string, public rows: number, public ingestionPropertiesCallback: (t: string) => IngestionProperties, - public testOnStreamingIngestion = true + public testOnStreamingIngestion = true, ) {} } @@ -127,7 +127,7 @@ const main = (): void => { const mapping = fs.readFileSync(getTestResourcePath("dataset_mapping.json"), { encoding: "utf8" }); const columnMapping = (JSON.parse(mapping) as ParsedJsonMapping[]).map((m: ParsedJsonMapping) => - JsonColumnMapping.withPath(m.column, m.Properties.Path, m.datatype) + JsonColumnMapping.withPath(m.column, m.Properties.Path, m.datatype), ); const ingestionPropertiesWithoutMapping = (t: string) => new IngestionProperties({ @@ -194,11 +194,11 @@ const main = (): void => { try { await queryClient.execute( database, - `.alter table ${table} policy ingestionbatching @'{"MaximumBatchingTimeSpan":"00:00:10", "MaximumNumberOfItems": 500, "MaximumRawDataSizeMB": 1024}'` + `.alter table ${table} policy ingestionbatching @'{"MaximumBatchingTimeSpan":"00:00:10", "MaximumNumberOfItems": 500, "MaximumRawDataSizeMB": 1024}'`, ); await dmKustoClient.execute( KustoConnectionStringBuilder.DefaultDatabaseName, - `.refresh database '${database}' table '${table}' cache ingestionbatchingpolicy` + `.refresh database '${database}' table '${table}' cache ingestionbatchingpolicy`, ); } catch (err) { console.error("Failed refreshing policies from DM: " + util.format(err)); @@ -217,7 +217,7 @@ const main = (): void => { } assert.fail(`Failed to create table $,{tableName} ${err} ${databaseName}, error: ${util.format(err)}`); } - }) + }), ); await queryClient.execute(databaseName, ".clear database cache streamingingestion schema"); @@ -237,7 +237,7 @@ const main = (): void => { it.concurrent.each( testItems.map((i) => { return { item: i }; - }) + }), )("ingestFromFile_$item.description", async ({ item }) => { const table = tableNames[("queued_file" + "_" + item.description) as Table]; try { @@ -251,7 +251,7 @@ const main = (): void => { it.concurrent.each( testItems.map((i) => { return { item: i }; - }) + }), )("ingestFromFile_TableReporting_$item.description", async ({ item }) => { const table = tableNames[("status_table" + "_" + item.description) as Table]; const props = item.ingestionPropertiesCallback(table); @@ -280,7 +280,7 @@ const main = (): void => { it.concurrent.each( testItems.map((i) => { return { item: i }; - }) + }), )("ingestFromStream_$item.description", async ({ item }) => { let stream: ReadStream | StreamDescriptor = fs.createReadStream(item.path); if (item.path.endsWith("gz")) { @@ -302,7 +302,7 @@ const main = (): void => { .filter((i) => i.testOnStreamingIngestion) .map((i) => { return { item: i }; - }) + }), )("ingestFromFile_$item.description", async ({ item }) => { const table = tableNames[("streaming_file" + "_" + item.description) as Table]; try { @@ -318,7 +318,7 @@ const main = (): void => { .filter((i) => i.testOnStreamingIngestion) .map((i) => { return { item: i }; - }) + }), )("ingestFromStream_$item.description", async ({ item }) => { let stream: ReadStream | StreamDescriptor = fs.createReadStream(item.path); if (item.path.endsWith("gz")) { @@ -338,7 +338,7 @@ const main = (): void => { .filter((i) => i.testOnStreamingIngestion) .map((i) => { return { item: i }; - }) + }), )("ingestFromBlob_$item.description", async ({ item }) => { const blobName = uuidv4() + basename(item.path); const blobUri = await ingestClient.uploadToBlobWithRetry(item.path, blobName); @@ -359,7 +359,7 @@ const main = (): void => { .filter((i) => i.testOnStreamingIngestion) .map((i) => { return { item: i }; - }) + }), )("ingestFromFile_$item.description", async ({ item }) => { // Expect mocked client to retry stream after transient failure and succeed from queue with same stream const table = tableNames[("managed_mocked_file" + "_" + item.description) as Table]; @@ -375,7 +375,7 @@ const main = (): void => { .filter((i) => i.testOnStreamingIngestion) .map((i) => { return { item: i }; - }) + }), )("ingestFromFile_$item.description", async ({ item }) => { const table = tableNames[("managed_file" + "_" + item.description) as Table]; try { @@ -390,7 +390,7 @@ const main = (): void => { .filter((i) => i.testOnStreamingIngestion) .map((i) => { return { item: i }; - }) + }), )("ingestFromStream_$item.description", async ({ item }) => { let stream: ReadStream | StreamDescriptor = fs.createReadStream(item.path); if (item.path.endsWith("gz")) { @@ -454,7 +454,7 @@ const main = (): void => { `https://statusreturner.azurewebsites.net/nocloud/${code}`, "fake", "fake", - "fake" + "fake", ); const client = new Client(kcsb); try { diff --git a/packages/azure-kusto-ingest/test/ingestClientTest.ts b/packages/azure-kusto-ingest/test/ingestClientTest.ts index 2da5fadf..8f4a3840 100644 --- a/packages/azure-kusto-ingest/test/ingestClientTest.ts +++ b/packages/azure-kusto-ingest/test/ingestClientTest.ts @@ -20,7 +20,7 @@ describe("KustoIngestClient", () => { table: "table", format: "json", } as IngestionProperties, - false + false, ); assert.notStrictEqual(ingestClient.defaultProps, null); @@ -245,7 +245,7 @@ describe("KustoIngestClient", () => { assert.strictEqual( client.resourceManager.kustoClient.cluster, "https://ingest-somecluster.kusto.windows.net", - "Kusto cluster URL does not match expected value" + "Kusto cluster URL does not match expected value", ); }); it.concurrent("auto correct from ingestion endpoint", () => { @@ -253,7 +253,7 @@ describe("KustoIngestClient", () => { assert.strictEqual( client.resourceManager.kustoClient.cluster, "https://ingest-somecluster.kusto.windows.net", - "Kusto cluster URL does not match expected value" + "Kusto cluster URL does not match expected value", ); }); }); diff --git a/packages/azure-kusto-ingest/test/ingestionPropertiesTest.ts b/packages/azure-kusto-ingest/test/ingestionPropertiesTest.ts index 5a0432a4..d7b35d27 100644 --- a/packages/azure-kusto-ingest/test/ingestionPropertiesTest.ts +++ b/packages/azure-kusto-ingest/test/ingestionPropertiesTest.ts @@ -117,7 +117,7 @@ describe("IngestionProperties", () => { assert.strictEqual( ex.message, "Invalid columns:\nMapping kind mismatch for column 'b' - expected data format kind - 'Csv', but was" + - " 'Json'\nMapping kind mismatch for column 'c' - expected data format kind - 'Csv', but was 'Avro'" + " 'Json'\nMapping kind mismatch for column 'c' - expected data format kind - 'Csv', but was 'Avro'", ); return; } @@ -174,7 +174,7 @@ describe("IngestionProperties", () => { ]; assert.deepStrictEqual( [type.withOrdinal("a", 0), type.withConstantValue("b", "const_value2")].map((m) => m.toApiMapping()), - result + result, ); }); }); @@ -202,7 +202,7 @@ describe("IngestionProperties", () => { ]; assert.deepStrictEqual( [type.withConstantValue("a", "const_value"), type.withConstantValue("b", "const_value2")].map((m) => m.toApiMapping()), - result + result, ); }); }); @@ -236,7 +236,7 @@ describe("IngestionProperties", () => { ]; assert.deepStrictEqual( [type.withConstantValue("a", obj), type.withConstantValue("b", 5)].map((m) => m.toApiMapping()), - result + result, ); }); }); @@ -264,9 +264,9 @@ describe("IngestionProperties", () => { ]; assert.deepStrictEqual( [type.withConstantValue("a", "const_value"), type.withTransform("b", ConstantTransformation.SourceLineNumber, "int")].map((m) => - m.toApiMapping() + m.toApiMapping(), ), - result + result, ); }); }); @@ -285,7 +285,7 @@ describe("IngestionProperties", () => { ]; assert.deepStrictEqual( [type.withPath("a", "$.a"), type.withConstantValue("b", "const_value2")].map((m) => m.toApiMapping()), - result + result, ); }); }); @@ -312,7 +312,7 @@ describe("IngestionProperties", () => { type.withPath("a", "$.a", "datetime", FieldTransformation.DateTimeFromUnixSeconds), type.withConstantValue("b", "const_value2", "int"), ].map((m) => m.toApiMapping()), - result + result, ); }); }); @@ -339,7 +339,7 @@ describe("IngestionProperties", () => { type.withField("a", "a", "datetime", FieldTransformation.DateTimeFromUnixSeconds), type.withConstantValue("b", "const_value2", "int"), ].map((m) => m.toApiMapping()), - result + result, ); }); }); diff --git a/packages/azure-kusto-ingest/test/managedStreamingIngestClientTest.ts b/packages/azure-kusto-ingest/test/managedStreamingIngestClientTest.ts index 37d7b01c..fd0071bc 100644 --- a/packages/azure-kusto-ingest/test/managedStreamingIngestClientTest.ts +++ b/packages/azure-kusto-ingest/test/managedStreamingIngestClientTest.ts @@ -37,7 +37,7 @@ describe("ManagedStreamingIngestClient", () => { table: "table", }), }, - KustoManagedStreamingIngestClient.prototype + KustoManagedStreamingIngestClient.prototype, ); return { sandbox, streamStub, queuedStub, managedClient }; @@ -111,7 +111,7 @@ describe("ManagedStreamingIngestClient", () => { database: "db", table: "t1", format: DataFormat.CSV, - }) + }), ); sandbox.assert.calledOnce(streamStub); @@ -126,17 +126,17 @@ describe("ManagedStreamingIngestClient", () => { it.concurrent("auto correct on regular ingestClient", () => { const client = new KustoManagedStreamingIngestClient( "https://ingest-somecluster.kusto.windows.net", - "https://ingest-somecluster.kusto.windows.net" + "https://ingest-somecluster.kusto.windows.net", ); assert.strictEqual( (client as any).queuedIngestClient.resourceManager.kustoClient.cluster, "https://ingest-somecluster.kusto.windows.net", - "Client URI was not extracted correctly from query endpoint" + "Client URI was not extracted correctly from query endpoint", ); assert.strictEqual( (client as any).streamingIngestClient.kustoClient.cluster, "https://somecluster.kusto.windows.net", - "Client URI was not extracted correctly from ingestion endpoint" + "Client URI was not extracted correctly from ingestion endpoint", ); }); }); @@ -162,7 +162,7 @@ describe("ManagedStreamingIngestClient", () => { database: "db", table: "t1", format: DataFormat.CSV, - }) + }), ); sandbox.assert.calledThrice(streamStub); @@ -190,7 +190,7 @@ describe("ManagedStreamingIngestClient", () => { baseJitterSecs: 0, defaultProps: new IngestionProperties({}), }, - KustoManagedStreamingIngestClient.prototype + KustoManagedStreamingIngestClient.prototype, ); const singleBufferSize = 1023 * 1024; @@ -210,7 +210,7 @@ describe("ManagedStreamingIngestClient", () => { database: "db", table: "t1", format: DataFormat.CSV, - }) + }), ); validateStream(queuedStub, buffers, sourceId); @@ -228,7 +228,7 @@ describe("ManagedStreamingIngestClient", () => { assert.strictEqual( (client as any).queuedIngestClient.resourceManager.kustoClient.connectionString.dataSource, - "https://ingest-dummy.kusto.windows.net" + "https://ingest-dummy.kusto.windows.net", ); assert.strictEqual((client as any).streamingIngestClient.kustoClient.connectionString.dataSource, "https://dummy.kusto.windows.net"); }); @@ -240,13 +240,13 @@ describe("ManagedStreamingIngestClient", () => { assert.strictEqual( (client as any).queuedIngestClient.resourceManager.kustoClient.connectionString.dataSource, - "https://ingest-dummy.kusto.windows.net" + "https://ingest-dummy.kusto.windows.net", ); assert.strictEqual((client as any).streamingIngestClient.kustoClient.connectionString.dataSource, "https://dummy.kusto.windows.net"); }); it.concurrent("should fail when trying to create a ManagedStreamingIngestClient from an invalid Engine URI", () => { assert.throws(() => - KustoManagedStreamingIngestClient.fromEngineConnectionString(new KustoConnectionStringBuilder("https://ingest-dummy.kusto.windows.net")) + KustoManagedStreamingIngestClient.fromEngineConnectionString(new KustoConnectionStringBuilder("https://ingest-dummy.kusto.windows.net")), ); }); diff --git a/packages/quick_start/src/SampleApp.ts b/packages/quick_start/src/SampleApp.ts index 32eb693b..16e47413 100644 --- a/packages/quick_start/src/SampleApp.ts +++ b/packages/quick_start/src/SampleApp.ts @@ -70,7 +70,7 @@ class SampleApp { this.waitForUser = config.waitForUser; if (config.authenticationMode === AuthenticationModeOptions.UserPrompt) { await this.waitForUserToProceed( - "You will be prompted *twice* for credentials during this script. Please return to the console after" + " authenticating." + "You will be prompted *twice* for credentials during this script. Please return to the console after" + " authenticating.", ); } const kustoConnectionString = await Authentication.generateConnectionString( @@ -79,7 +79,7 @@ class SampleApp { config.certificatePath, config.certificatePassword, config.applicationId, - config.tenantId + config.tenantId, ); const ingestConnectionString = await Authentication.generateConnectionString( config.ingestUri, @@ -87,7 +87,7 @@ class SampleApp { config.certificatePath, config.certificatePassword, config.applicationId, - config.tenantId + config.tenantId, ); // Tip: Avoid creating a new Kusto/ingest client for each use.Instead, create the clients once and reuse them. @@ -239,7 +239,7 @@ class SampleApp { databaseName: string, tableName: string, batchingPolicy: string, - ingestServiceCmdClient: KustoClient + ingestServiceCmdClient: KustoClient, ) { // Tip 1: Though most users should be fine with the defaults, to speed up ingestion, such as during development and in this sample app, we opt to // modify the default ingestion policy to ingest data after at most 10 seconds. @@ -280,7 +280,7 @@ class SampleApp { config.tableName, mappingName, dataFile.mappingValue, - dataFormat + dataFormat, ); // Learn More: For more information about ingesting data to Kusto in C#, // see: https://docs.microsoft.com/en-us/azure/data-explorer/net-sdk-ingest-data @@ -308,7 +308,7 @@ class SampleApp { tableName: string, mappingName: string, mappingValue: string, - dataFormat: DataFormat + dataFormat: DataFormat, ): Promise { if (useExistingMapping || !mappingValue) { return; @@ -339,7 +339,7 @@ class SampleApp { databaseName: string, tableName: string, mappingName: string, - ignoreFirstRecord: boolean + ignoreFirstRecord: boolean, ) { const sourceType = dataFile.sourceType.toLowerCase(); const sourceUri = dataFile.dataSourceUri; @@ -403,7 +403,7 @@ class SampleApp { rl.question("Press ENTER to proceed with this operation...", (ans) => { rl.close(); resolve(ans); - }) + }), ); } } diff --git a/packages/quick_start/src/Utils.ts b/packages/quick_start/src/Utils.ts index 14db09d8..9cb8d35c 100644 --- a/packages/quick_start/src/Utils.ts +++ b/packages/quick_start/src/Utils.ts @@ -51,7 +51,7 @@ export class Authentication extends Utils { certificatePath: string | undefined, certificatePassword: string | undefined, applicationId: string | undefined, - tenantId: string | undefined + tenantId: string | undefined, ): Promise { // Learn More: For additional information on how to authorize users and apps in Kusto see: // https://docs.microsoft.com/azure/data-explorer/manage-database-permissions @@ -118,7 +118,7 @@ export class Authentication extends Utils { certificatePassword: string | undefined, applicationId: string | undefined, tenantId: string | undefined, - sendX5c?: boolean + sendX5c?: boolean, ): Promise { const appId: string | undefined = process?.env?.APP_ID; const appTenant: string | undefined = process?.env?.APP_TENANT; @@ -211,7 +211,7 @@ export class Ingestion extends Utils { tableName: string, dataFormat: DataFormat, mappingName: string, - ignoreFirstRecordFlag: boolean + ignoreFirstRecordFlag: boolean, ): IngestionProperties { return new IngestionProperties({ database: databaseName, @@ -246,7 +246,7 @@ export class Ingestion extends Utils { filePath: string, dataFormat: DataFormat, mappingName: string, - ignoreFirstRecord: boolean + ignoreFirstRecord: boolean, ) { const ingestionProp = this.createIngestionProperties(databaseName, tableName, dataFormat, mappingName, ignoreFirstRecord); // Tip 1: For optimal ingestion batching and performance, specify the uncompressed data size in the file descriptor instead of the default below of @@ -274,7 +274,7 @@ export class Ingestion extends Utils { blobUri: string, dataFormat: DataFormat, mappingName: string, - ignoreFirstRecord: boolean + ignoreFirstRecord: boolean, ) { const ingestionProp = this.createIngestionProperties(databaseName, tableName, dataFormat, mappingName, ignoreFirstRecord); // Tip 1: For optimal ingestion batching and performance, specify the uncompressed data size in the file descriptor instead of the default below of @@ -290,7 +290,7 @@ export class Ingestion extends Utils { public static async waitForIngestionToComplete(waitForIngestSeconds: number) { Console.log( `Sleeping ${waitForIngestSeconds} seconds for queued ingestion to complete. Note: This may take longer depending on the file size and ingestion - batching policy.` + batching policy.`, ); Console.log(); Console.log(); diff --git a/packages/quick_start_browser/index.html b/packages/quick_start_browser/index.html index 7abb5d92..a21b9988 100644 --- a/packages/quick_start_browser/index.html +++ b/packages/quick_start_browser/index.html @@ -1,4 +1,4 @@ - + diff --git a/packages/quick_start_browser/src/App.tsx b/packages/quick_start_browser/src/App.tsx index 4e4feac0..2d28b5b1 100644 --- a/packages/quick_start_browser/src/App.tsx +++ b/packages/quick_start_browser/src/App.tsx @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + import { Dropdown, FluentProvider, Option, Switch, Theme, webDarkTheme, webLightTheme } from "@fluentui/react-components"; import { Client, KustoConnectionStringBuilder } from "azure-kusto-data"; import { IngestClient } from "azure-kusto-ingest"; @@ -35,7 +36,7 @@ function App() { KustoConnectionStringBuilder.withUserPrompt(config.kustoUri, { redirectUri: window.location.href, clientId: config.applicationId, - }) + }), ) : null; } catch (error) { @@ -52,7 +53,9 @@ function App() { }); return { ingestClient: new IngestClient(kcsb), ingestAdminClient: new Client(kcsb) }; } - } catch (error) {} + } catch (error) { + // ignored + } return { ingestClient: null, ingestAdminClient: null }; }, [config.ingestUri, config.applicationId]); diff --git a/packages/quick_start_browser/src/main.tsx b/packages/quick_start_browser/src/main.tsx index 17544f83..5492669d 100644 --- a/packages/quick_start_browser/src/main.tsx +++ b/packages/quick_start_browser/src/main.tsx @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + // import { FluentProvider, webDarkTheme } from '@fluentui/react-components' import React from "react"; import ReactDOM from "react-dom/client"; @@ -6,5 +9,5 @@ import App from "./App.tsx"; ReactDOM.createRoot(document.getElementById("root")!).render( - + , );