tedious 18.2.4 → 18.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/connection.d.ts +14 -2
- package/lib/connection.js +36 -5
- package/lib/connection.js.map +1 -1
- package/lib/data-types/tvp.js +11 -2
- package/lib/data-types/tvp.js.map +1 -1
- package/lib/errors.d.ts +2 -0
- package/lib/errors.js +4 -2
- package/lib/errors.js.map +1 -1
- package/lib/rpcrequest-payload.js +9 -2
- package/lib/rpcrequest-payload.js.map +1 -1
- package/package.json +2 -1
package/lib/connection.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as tls from 'tls';
|
|
8
8
|
import * as net from 'net';
|
|
9
9
|
import { type SecureContextOptions } from 'tls';
|
|
10
|
+
import { type TokenCredential } from '@azure/core-auth';
|
|
10
11
|
import BulkLoad, { type Options as BulkLoadOptions, type Callback as BulkLoadCallback } from './bulk-load';
|
|
11
12
|
import Debug from './debug';
|
|
12
13
|
import { EventEmitter } from 'events';
|
|
@@ -169,6 +170,16 @@ interface AzureActiveDirectoryServicePrincipalSecret {
|
|
|
169
170
|
tenantId: string;
|
|
170
171
|
};
|
|
171
172
|
}
|
|
173
|
+
/** Structure that defines the options that are necessary to authenticate the Tedious.JS instance with an `@azure/identity` token credential. */
|
|
174
|
+
interface TokenCredentialAuthentication {
|
|
175
|
+
/** Unique designator for the type of authentication to be used. */
|
|
176
|
+
type: 'token-credential';
|
|
177
|
+
/** Set of configurations that are required or allowed with this authentication type. */
|
|
178
|
+
options: {
|
|
179
|
+
/** Credential object used to authenticate to the resource. */
|
|
180
|
+
credential: TokenCredential;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
172
183
|
interface NtlmAuthentication {
|
|
173
184
|
type: 'ntlm';
|
|
174
185
|
options: {
|
|
@@ -201,7 +212,7 @@ interface DefaultAuthentication {
|
|
|
201
212
|
password?: string | undefined;
|
|
202
213
|
};
|
|
203
214
|
}
|
|
204
|
-
export type ConnectionAuthentication = DefaultAuthentication | NtlmAuthentication | AzureActiveDirectoryPasswordAuthentication | AzureActiveDirectoryMsiAppServiceAuthentication | AzureActiveDirectoryMsiVmAuthentication | AzureActiveDirectoryAccessTokenAuthentication | AzureActiveDirectoryServicePrincipalSecret | AzureActiveDirectoryDefaultAuthentication;
|
|
215
|
+
export type ConnectionAuthentication = DefaultAuthentication | NtlmAuthentication | TokenCredentialAuthentication | AzureActiveDirectoryPasswordAuthentication | AzureActiveDirectoryMsiAppServiceAuthentication | AzureActiveDirectoryMsiVmAuthentication | AzureActiveDirectoryAccessTokenAuthentication | AzureActiveDirectoryServicePrincipalSecret | AzureActiveDirectoryDefaultAuthentication;
|
|
205
216
|
interface InternalConnectionConfig {
|
|
206
217
|
server: string;
|
|
207
218
|
authentication: ConnectionAuthentication;
|
|
@@ -283,7 +294,7 @@ interface State {
|
|
|
283
294
|
reconnect?(this: Connection): void;
|
|
284
295
|
};
|
|
285
296
|
}
|
|
286
|
-
type Authentication = DefaultAuthentication | NtlmAuthentication | AzureActiveDirectoryPasswordAuthentication | AzureActiveDirectoryMsiAppServiceAuthentication | AzureActiveDirectoryMsiVmAuthentication | AzureActiveDirectoryAccessTokenAuthentication | AzureActiveDirectoryServicePrincipalSecret | AzureActiveDirectoryDefaultAuthentication;
|
|
297
|
+
type Authentication = DefaultAuthentication | NtlmAuthentication | TokenCredentialAuthentication | AzureActiveDirectoryPasswordAuthentication | AzureActiveDirectoryMsiAppServiceAuthentication | AzureActiveDirectoryMsiVmAuthentication | AzureActiveDirectoryAccessTokenAuthentication | AzureActiveDirectoryServicePrincipalSecret | AzureActiveDirectoryDefaultAuthentication;
|
|
287
298
|
type AuthenticationType = Authentication['type'];
|
|
288
299
|
export interface ConnectionConfiguration {
|
|
289
300
|
/**
|
|
@@ -339,6 +350,7 @@ interface AuthenticationOptions {
|
|
|
339
350
|
*
|
|
340
351
|
* * `default`: [[DefaultAuthentication.options]]
|
|
341
352
|
* * `ntlm` :[[NtlmAuthentication]]
|
|
353
|
+
* * `token-credential`: [[CredentialChainAuthentication.options]]
|
|
342
354
|
* * `azure-active-directory-password` : [[AzureActiveDirectoryPasswordAuthentication.options]]
|
|
343
355
|
* * `azure-active-directory-access-token` : [[AzureActiveDirectoryAccessTokenAuthentication.options]]
|
|
344
356
|
* * `azure-active-directory-msi-vm` : [[AzureActiveDirectoryMsiVmAuthentication.options]]
|