@azure/identity-vscode 1.0.1-alpha.20241112.1 → 1.0.1-alpha.20241114.2

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 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
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { IdentityPlugin } from \"@azure/identity\";\nimport keytar from \"keytar\";\n\nconst VSCodeServiceName = \"VS Code Azure\";\n\n/**\n * A function that searches for credentials in the Visual Studio Code credential store.\n *\n * @returns an array of credentials (username and password)\n */\ntype VSCodeCredentialFinder = () => Promise<Array<{ account: string; password: string }>>;\n\n/**\n * Plugin context entries for controlling VisualStudioCodeCredential.\n */\ninterface 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 */\ninterface AzurePluginContext {\n vsCodeCredentialControl: VisualStudioCodeCredentialControl;\n}\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;AAKA,MAAM,iBAAiB,GAAG,eAAe;AA4BzC;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,iBAAiB,GAAG,eAAe,CAAC;AA4B1C;;;;;;;;;;;;;;;;;;;;;;;;;;;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 { IdentityPlugin } from \"@azure/identity\";\nimport keytar from \"keytar\";\n\nconst VSCodeServiceName = \"VS Code Azure\";\n\n/**\n * A function that searches for credentials in the Visual Studio Code credential store.\n *\n * @returns an array of credentials (username and password)\n */\ntype VSCodeCredentialFinder = () => Promise<Array<{ account: string; password: string }>>;\n\n/**\n * Plugin context entries for controlling VisualStudioCodeCredential.\n */\ninterface 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 */\ninterface AzurePluginContext {\n vsCodeCredentialControl: VisualStudioCodeCredentialControl;\n}\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,10 +1,10 @@
1
1
  {
2
2
  "name": "@azure/identity-vscode",
3
- "version": "1.0.1-alpha.20241112.1",
3
+ "version": "1.0.1-alpha.20241114.2",
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",
7
- "module": "dist-esm/identity-vscode/src/index.js",
7
+ "module": "dist-esm/src/index.js",
8
8
  "types": "./types/identity-vscode.d.ts",
9
9
  "scripts": {
10
10
  "build": "npm run clean && npm run extract-api && tsc -p . && dev-tool run bundle",
@@ -31,8 +31,7 @@
31
31
  },
32
32
  "files": [
33
33
  "dist/",
34
- "dist-esm/identity/src",
35
- "dist-esm/identity-vscode/src",
34
+ "dist-esm/src",
36
35
  "types/identity-vscode.d.ts",
37
36
  "README.md",
38
37
  "LICENSE"
@@ -1,70 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- /**
4
- * Current version of the `@azure/identity` package.
5
- */
6
- export const SDK_VERSION = `4.5.1`;
7
- /**
8
- * The default client ID for authentication
9
- * @internal
10
- */
11
- // TODO: temporary - this is the Azure CLI clientID - we'll replace it when
12
- // Developer Sign On application is available
13
- // https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9
14
- export const DeveloperSignOnClientId = "04b07795-8ddb-461a-bbee-02f9e1bf7b46";
15
- /**
16
- * The default tenant for authentication
17
- * @internal
18
- */
19
- export const DefaultTenantId = "common";
20
- /**
21
- * A list of known Azure authority hosts
22
- */
23
- export var AzureAuthorityHosts;
24
- (function (AzureAuthorityHosts) {
25
- /**
26
- * China-based Azure Authority Host
27
- */
28
- AzureAuthorityHosts["AzureChina"] = "https://login.chinacloudapi.cn";
29
- /**
30
- * Germany-based Azure Authority Host
31
- *
32
- * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.
33
- *
34
- * */
35
- AzureAuthorityHosts["AzureGermany"] = "https://login.microsoftonline.de";
36
- /**
37
- * US Government Azure Authority Host
38
- */
39
- AzureAuthorityHosts["AzureGovernment"] = "https://login.microsoftonline.us";
40
- /**
41
- * Public Cloud Azure Authority Host
42
- */
43
- AzureAuthorityHosts["AzurePublicCloud"] = "https://login.microsoftonline.com";
44
- })(AzureAuthorityHosts || (AzureAuthorityHosts = {}));
45
- /**
46
- * @internal
47
- * The default authority host.
48
- */
49
- export const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;
50
- /**
51
- * @internal
52
- * Allow acquiring tokens for any tenant for multi-tentant auth.
53
- */
54
- export const ALL_TENANTS = ["*"];
55
- /**
56
- * @internal
57
- */
58
- export const CACHE_CAE_SUFFIX = "cae";
59
- /**
60
- * @internal
61
- */
62
- export const CACHE_NON_CAE_SUFFIX = "nocae";
63
- /**
64
- * @internal
65
- *
66
- * The default name for the cache persistence plugin.
67
- * Matches the constant defined in the cache persistence package.
68
- */
69
- export const DEFAULT_TOKEN_CACHE_NAME = "msal.cache";
70
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../identity/src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC;;;GAGG;AACH,2EAA2E;AAC3E,6CAA6C;AAC7C,uGAAuG;AACvG,MAAM,CAAC,MAAM,uBAAuB,GAAG,sCAAsC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,CAAN,IAAY,mBAoBX;AApBD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,oEAA6C,CAAA;IAC7C;;;;;SAKK;IACL,wEAAiD,CAAA;IACjD;;OAEG;IACH,2EAAoD,CAAA;IACpD;;OAEG;IACH,6EAAsD,CAAA;AACxD,CAAC,EApBW,mBAAmB,KAAnB,mBAAmB,QAoB9B;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAa,CAAC,GAAG,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/identity` package.\n */\nexport const SDK_VERSION = `4.5.1`;\n\n/**\n * The default client ID for authentication\n * @internal\n */\n// TODO: temporary - this is the Azure CLI clientID - we'll replace it when\n// Developer Sign On application is available\n// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9\nexport const DeveloperSignOnClientId = \"04b07795-8ddb-461a-bbee-02f9e1bf7b46\";\n\n/**\n * The default tenant for authentication\n * @internal\n */\nexport const DefaultTenantId = \"common\";\n\n/**\n * A list of known Azure authority hosts\n */\nexport enum AzureAuthorityHosts {\n /**\n * China-based Azure Authority Host\n */\n AzureChina = \"https://login.chinacloudapi.cn\",\n /**\n * Germany-based Azure Authority Host\n *\n * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.\n *\n * */\n AzureGermany = \"https://login.microsoftonline.de\",\n /**\n * US Government Azure Authority Host\n */\n AzureGovernment = \"https://login.microsoftonline.us\",\n /**\n * Public Cloud Azure Authority Host\n */\n AzurePublicCloud = \"https://login.microsoftonline.com\",\n}\n\n/**\n * @internal\n * The default authority host.\n */\nexport const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;\n\n/**\n * @internal\n * Allow acquiring tokens for any tenant for multi-tentant auth.\n */\nexport const ALL_TENANTS: string[] = [\"*\"];\n\n/**\n * @internal\n */\nexport const CACHE_CAE_SUFFIX = \"cae\";\n\n/**\n * @internal\n */\nexport const CACHE_NON_CAE_SUFFIX = \"nocae\";\n\n/**\n * @internal\n *\n * The default name for the cache persistence plugin.\n * Matches the constant defined in the cache persistence package.\n */\nexport const DEFAULT_TOKEN_CACHE_NAME = \"msal.cache\";\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- export {};
4
- //# sourceMappingURL=visualStudioCodeCredentialPlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"visualStudioCodeCredentialPlugin.js","sourceRoot":"","sources":["../../../../../identity/src/credentials/visualStudioCodeCredentialPlugin.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * A function that searches for credentials in the Visual Studio Code credential store.\n *\n * @returns an array of credentials (username and password)\n * @internal\n */\nexport type VSCodeCredentialFinder = () => Promise<Array<{ account: string; password: string }>>;\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- export {};
4
- //# sourceMappingURL=tokenCachePersistenceOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokenCachePersistenceOptions.js","sourceRoot":"","sources":["../../../../../../identity/src/msal/nodeFlows/tokenCachePersistenceOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Parameters that enable token cache persistence in the Identity credentials.\n */\nexport interface TokenCachePersistenceOptions {\n /**\n * If set to true, persistent token caching will be enabled for this credential instance.\n */\n enabled: boolean;\n /**\n * Unique identifier for the persistent token cache.\n *\n * Based on this identifier, the persistence file will be located in any of the following places:\n * - Darwin: '/Users/user/.IdentityService/<name>'\n * - Windows 8+: 'C:\\\\Users\\\\user\\\\AppData\\\\Local\\\\.IdentityService\\\\<name>'\n * - Linux: '/home/user/.IdentityService/<name>'\n */\n name?: string;\n /**\n * If set to true, the cache will be stored without encryption if no OS level user encryption is available.\n * When set to false, the PersistentTokenCache will throw an error if no OS level user encryption is available.\n */\n unsafeAllowUnencryptedStorage?: boolean;\n}\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- export {};
4
- //# sourceMappingURL=provider.js.map
@@ -1 +0,0 @@
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 +0,0 @@
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"]}
File without changes