@ms-cloudpack/remote-cache 0.7.5 → 0.7.6
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.
|
@@ -26301,7 +26301,7 @@ __name(getCredentialInternal, "getCredentialInternal");
|
|
|
26301
26301
|
async function getCredential(options, context) {
|
|
26302
26302
|
var _a;
|
|
26303
26303
|
const { loginMethod, cachePath, tenantId } = options;
|
|
26304
|
-
const { reporter, azureLogger } = context;
|
|
26304
|
+
const { reporter, azureLogger, telemetryClient } = context;
|
|
26305
26305
|
if (loginMethod == "azure-cli") {
|
|
26306
26306
|
return new import_identity3.AzureCliCredential();
|
|
26307
26307
|
}
|
|
@@ -26326,6 +26326,10 @@ async function getCredential(options, context) {
|
|
|
26326
26326
|
(_a = tasks.interactiveAuthentication) == null ? void 0 : _a.complete({
|
|
26327
26327
|
message: "You have successfully signed in."
|
|
26328
26328
|
});
|
|
26329
|
+
telemetryClient.rootSpan.addEvent("SYNC_AUTH", {
|
|
26330
|
+
loginMethod,
|
|
26331
|
+
browserActionRequired: !!tasks.interactiveAuthentication
|
|
26332
|
+
});
|
|
26329
26333
|
return storageCustomCredential;
|
|
26330
26334
|
}
|
|
26331
26335
|
__name(getCredential, "getCredential");
|
package/dist/index.js
CHANGED
|
@@ -95,13 +95,13 @@ async function createRemoteCacheClient(params) {
|
|
|
95
95
|
const azureLogEventHandler = registerAzureLogger();
|
|
96
96
|
const { context, options } = params;
|
|
97
97
|
const { container, loginMethod, storageAccount, cachePath, tenantId } = options;
|
|
98
|
-
const { getCredential } = await import("./getCredential-
|
|
98
|
+
const { getCredential } = await import("./getCredential-MVHPI27L.js");
|
|
99
99
|
const { AzureRemoteCacheClient } = await import("./AzureRemoteCacheClient-ZZ27K4AF.js");
|
|
100
100
|
const { ReporterDecorator } = await import("./ReporterDecorator-I4CR7TWD.js");
|
|
101
101
|
const { getListOfBlobs } = await import("./getListOfBlobs-YTVBR3IU.js");
|
|
102
102
|
const credential = await getCredential(
|
|
103
103
|
{ loginMethod, cachePath, tenantId },
|
|
104
|
-
{
|
|
104
|
+
{ ...context, azureLogger: azureLogEventHandler }
|
|
105
105
|
);
|
|
106
106
|
const remoteCacheClientOptions = {
|
|
107
107
|
storageAccount,
|
|
@@ -3,6 +3,7 @@ import { type TokenCredential } from '@azure/identity';
|
|
|
3
3
|
import type { LoginMethod } from '../types/LoginMethod.js';
|
|
4
4
|
import type { TaskReporter } from '@ms-cloudpack/task-reporter';
|
|
5
5
|
import type EventEmitter from 'events';
|
|
6
|
+
import type { TelemetryClient } from '@ms-cloudpack/telemetry';
|
|
6
7
|
/**
|
|
7
8
|
* Gets a credential for the given login method.
|
|
8
9
|
* If the login method is 'azure-cli', it will return an AzureCliCredential.
|
|
@@ -16,5 +17,6 @@ export declare function getCredential(options: {
|
|
|
16
17
|
}, context: {
|
|
17
18
|
reporter: TaskReporter;
|
|
18
19
|
azureLogger: EventEmitter;
|
|
20
|
+
telemetryClient: TelemetryClient;
|
|
19
21
|
}): Promise<TokenCredential>;
|
|
20
22
|
//# sourceMappingURL=getCredential.d.ts.map
|