@azure/identity-vscode 1.0.1-alpha.20241028.2 → 1.0.1-alpha.20241030.1

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/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AzurePluginContext } from \"../../identity/src/plugins/provider\";\nimport { IdentityPlugin } from \"@azure/identity\";\nimport keytar from \"keytar\";\n\nconst VSCodeServiceName = \"VS Code Azure\";\n\n/**\n * A plugin that provides the dependencies of `VisualStudioCodeCredential`\n * and enables it within `@azure/identity`. The plugin API is compatible with\n * `@azure/identity` versions 2.0.0 and later. Load this plugin using the\n * `useIdentityPlugin` function, imported from `@azure/identity`.\n *\n * `VisualStudioCodeCredential` uses the authentication session from the \"Azure\n * Account\" extension in VS Code.\n *\n * To use this functionality, import `VisualStudioCodeCredential` or\n * `DefaultAzureCredential` from `@azure/identity`. If this plugin is not\n * enabled, then `VisualStudioCodeCredential` will throw a\n * `CredentialUnavailableError`, and `DefaultAzureCredential` will not be able\n * to use authentication through Visual Studio Code.\n *\n * Example:\n *\n * ```javascript\n * import { useIdentityPlugin, VisualStudioCodeCredential } from \"@azure/identity\";\n * import { vsCodePlugin } from \"@azure/identity-vscode\";\n *\n * // Load the plugin\n * useIdentityPlugin(vsCodePlugin);\n *\n * // Now that the plugin is loaded, this credential may be used\n * const credential = new VisualStudioCodeCredential();\n * ```\n */\nexport const vsCodePlugin: IdentityPlugin = (context) => {\n const { vsCodeCredentialControl } = context as AzurePluginContext;\n\n vsCodeCredentialControl.setVsCodeCredentialFinder(() =>\n keytar.findCredentials(VSCodeServiceName),\n );\n};\n"],"names":[],"mappings":";;;;;;AAAA;AACA;AAMA,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AACU,MAAA,YAAY,GAAmB,CAAC,OAAO,KAAI;AACtD,IAAA,MAAM,EAAE,uBAAuB,EAAE,GAAG,OAA6B,CAAC;AAElE,IAAA,uBAAuB,CAAC,yBAAyB,CAAC,MAChD,MAAM,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAC1C,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AzurePluginContext } from \"../../identity/src/plugins/provider\";\nimport type { IdentityPlugin } from \"@azure/identity\";\nimport keytar from \"keytar\";\n\nconst VSCodeServiceName = \"VS Code Azure\";\n\n/**\n * A plugin that provides the dependencies of `VisualStudioCodeCredential`\n * and enables it within `@azure/identity`. The plugin API is compatible with\n * `@azure/identity` versions 2.0.0 and later. Load this plugin using the\n * `useIdentityPlugin` function, imported from `@azure/identity`.\n *\n * `VisualStudioCodeCredential` uses the authentication session from the \"Azure\n * Account\" extension in VS Code.\n *\n * To use this functionality, import `VisualStudioCodeCredential` or\n * `DefaultAzureCredential` from `@azure/identity`. If this plugin is not\n * enabled, then `VisualStudioCodeCredential` will throw a\n * `CredentialUnavailableError`, and `DefaultAzureCredential` will not be able\n * to use authentication through Visual Studio Code.\n *\n * Example:\n *\n * ```javascript\n * import { useIdentityPlugin, VisualStudioCodeCredential } from \"@azure/identity\";\n * import { vsCodePlugin } from \"@azure/identity-vscode\";\n *\n * // Load the plugin\n * useIdentityPlugin(vsCodePlugin);\n *\n * // Now that the plugin is loaded, this credential may be used\n * const credential = new VisualStudioCodeCredential();\n * ```\n */\nexport const vsCodePlugin: IdentityPlugin = (context) => {\n const { vsCodeCredentialControl } = context as AzurePluginContext;\n\n vsCodeCredentialControl.setVsCodeCredentialFinder(() =>\n keytar.findCredentials(VSCodeServiceName),\n );\n};\n"],"names":[],"mappings":";;;;;;AAAA;AACA;AAMA,MAAM,iBAAiB,GAAG,eAAe;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AACU,MAAA,YAAY,GAAmB,CAAC,OAAO,KAAI;AACtD,IAAA,MAAM,EAAE,uBAAuB,EAAE,GAAG,OAA6B;AAEjE,IAAA,uBAAuB,CAAC,yBAAyB,CAAC,MAChD,MAAM,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAC1C;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../../identity/src/plugins/provider.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCachePersistenceOptions } from \"../msal/nodeFlows/tokenCachePersistenceOptions\";\nimport { VSCodeCredentialFinder } from \"../credentials/visualStudioCodeCredentialPlugin\";\n\n/**\n * The type of an Azure Identity plugin, a function accepting a plugin\n * context.\n */\nexport type IdentityPlugin = (context: unknown) => void;\n\n/**\n * Plugin context entries for controlling cache plugins.\n */\nexport interface CachePluginControl {\n setPersistence(\n persistenceFactory: (\n options?: TokenCachePersistenceOptions,\n ) => Promise<import(\"@azure/msal-node\").ICachePlugin>,\n ): void;\n}\n\nexport interface NativeBrokerPluginControl {\n setNativeBroker(nativeBroker: import(\"@azure/msal-node\").INativeBrokerPlugin): void;\n}\n\n/**\n * Plugin context entries for controlling VisualStudioCodeCredential.\n */\nexport interface VisualStudioCodeCredentialControl {\n setVsCodeCredentialFinder(finder: VSCodeCredentialFinder): void;\n}\n\n/**\n * Context options passed to a plugin during initialization.\n *\n * Plugin authors are responsible for casting their plugin context values\n * to this type.\n *\n * @internal\n */\nexport interface AzurePluginContext {\n cachePluginControl: CachePluginControl;\n nativeBrokerPluginControl: NativeBrokerPluginControl;\n vsCodeCredentialControl: VisualStudioCodeCredentialControl;\n}\n"]}
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../../identity/src/plugins/provider.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCachePersistenceOptions } from \"../msal/nodeFlows/tokenCachePersistenceOptions\";\nimport type { VSCodeCredentialFinder } from \"../credentials/visualStudioCodeCredentialPlugin\";\n\n/**\n * The type of an Azure Identity plugin, a function accepting a plugin\n * context.\n */\nexport type IdentityPlugin = (context: unknown) => void;\n\n/**\n * Plugin context entries for controlling cache plugins.\n */\nexport interface CachePluginControl {\n setPersistence(\n persistenceFactory: (\n options?: TokenCachePersistenceOptions,\n ) => Promise<import(\"@azure/msal-node\").ICachePlugin>,\n ): void;\n}\n\nexport interface NativeBrokerPluginControl {\n setNativeBroker(nativeBroker: import(\"@azure/msal-node\").INativeBrokerPlugin): void;\n}\n\n/**\n * Plugin context entries for controlling VisualStudioCodeCredential.\n */\nexport interface VisualStudioCodeCredentialControl {\n setVsCodeCredentialFinder(finder: VSCodeCredentialFinder): void;\n}\n\n/**\n * Context options passed to a plugin during initialization.\n *\n * Plugin authors are responsible for casting their plugin context values\n * to this type.\n *\n * @internal\n */\nexport interface AzurePluginContext {\n cachePluginControl: CachePluginControl;\n nativeBrokerPluginControl: NativeBrokerPluginControl;\n vsCodeCredentialControl: VisualStudioCodeCredentialControl;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,YAAY,GAAmB,CAAC,OAAO,EAAE,EAAE;IACtD,MAAM,EAAE,uBAAuB,EAAE,GAAG,OAA6B,CAAC;IAElE,uBAAuB,CAAC,yBAAyB,CAAC,GAAG,EAAE,CACrD,MAAM,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAC1C,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AzurePluginContext } from \"../../identity/src/plugins/provider\";\nimport { IdentityPlugin } from \"@azure/identity\";\nimport keytar from \"keytar\";\n\nconst VSCodeServiceName = \"VS Code Azure\";\n\n/**\n * A plugin that provides the dependencies of `VisualStudioCodeCredential`\n * and enables it within `@azure/identity`. The plugin API is compatible with\n * `@azure/identity` versions 2.0.0 and later. Load this plugin using the\n * `useIdentityPlugin` function, imported from `@azure/identity`.\n *\n * `VisualStudioCodeCredential` uses the authentication session from the \"Azure\n * Account\" extension in VS Code.\n *\n * To use this functionality, import `VisualStudioCodeCredential` or\n * `DefaultAzureCredential` from `@azure/identity`. If this plugin is not\n * enabled, then `VisualStudioCodeCredential` will throw a\n * `CredentialUnavailableError`, and `DefaultAzureCredential` will not be able\n * to use authentication through Visual Studio Code.\n *\n * Example:\n *\n * ```javascript\n * import { useIdentityPlugin, VisualStudioCodeCredential } from \"@azure/identity\";\n * import { vsCodePlugin } from \"@azure/identity-vscode\";\n *\n * // Load the plugin\n * useIdentityPlugin(vsCodePlugin);\n *\n * // Now that the plugin is loaded, this credential may be used\n * const credential = new VisualStudioCodeCredential();\n * ```\n */\nexport const vsCodePlugin: IdentityPlugin = (context) => {\n const { vsCodeCredentialControl } = context as AzurePluginContext;\n\n vsCodeCredentialControl.setVsCodeCredentialFinder(() =>\n keytar.findCredentials(VSCodeServiceName),\n );\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,YAAY,GAAmB,CAAC,OAAO,EAAE,EAAE;IACtD,MAAM,EAAE,uBAAuB,EAAE,GAAG,OAA6B,CAAC;IAElE,uBAAuB,CAAC,yBAAyB,CAAC,GAAG,EAAE,CACrD,MAAM,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAC1C,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AzurePluginContext } from \"../../identity/src/plugins/provider\";\nimport type { IdentityPlugin } from \"@azure/identity\";\nimport keytar from \"keytar\";\n\nconst VSCodeServiceName = \"VS Code Azure\";\n\n/**\n * A plugin that provides the dependencies of `VisualStudioCodeCredential`\n * and enables it within `@azure/identity`. The plugin API is compatible with\n * `@azure/identity` versions 2.0.0 and later. Load this plugin using the\n * `useIdentityPlugin` function, imported from `@azure/identity`.\n *\n * `VisualStudioCodeCredential` uses the authentication session from the \"Azure\n * Account\" extension in VS Code.\n *\n * To use this functionality, import `VisualStudioCodeCredential` or\n * `DefaultAzureCredential` from `@azure/identity`. If this plugin is not\n * enabled, then `VisualStudioCodeCredential` will throw a\n * `CredentialUnavailableError`, and `DefaultAzureCredential` will not be able\n * to use authentication through Visual Studio Code.\n *\n * Example:\n *\n * ```javascript\n * import { useIdentityPlugin, VisualStudioCodeCredential } from \"@azure/identity\";\n * import { vsCodePlugin } from \"@azure/identity-vscode\";\n *\n * // Load the plugin\n * useIdentityPlugin(vsCodePlugin);\n *\n * // Now that the plugin is loaded, this credential may be used\n * const credential = new VisualStudioCodeCredential();\n * ```\n */\nexport const vsCodePlugin: IdentityPlugin = (context) => {\n const { vsCodeCredentialControl } = context as AzurePluginContext;\n\n vsCodeCredentialControl.setVsCodeCredentialFinder(() =>\n keytar.findCredentials(VSCodeServiceName),\n );\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/identity-vscode",
3
- "version": "1.0.1-alpha.20241028.2",
3
+ "version": "1.0.1-alpha.20241030.1",
4
4
  "sdk-type": "client",
5
5
  "description": "Use the Azure Account extension for Visual Studio Code to authenticate with Azure Identity",
6
6
  "main": "dist/index.js",
@@ -1,4 +1,4 @@
1
- import { IdentityPlugin } from '@azure/identity';
1
+ import type { IdentityPlugin } from '@azure/identity';
2
2
 
3
3
  /**
4
4
  * A plugin that provides the dependencies of `VisualStudioCodeCredential`