Skip to content

Commit 7456106

Browse files
committed
merge main
2 parents c3d3d69 + 502b591 commit 7456106

File tree

11 files changed

+57
-220
lines changed

11 files changed

+57
-220
lines changed

api/.npmignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
node_modules/
22
.vscode/
3-
src/
3+
src/*
44
tsconfig.json
55
*.tgz
66
test/
@@ -15,7 +15,9 @@ resources/*.png
1515
*.tsbuildinfo
1616
docs/
1717

18-
out/**/*.d.ts
19-
out/**/*.d.ts.map
20-
out/**/*.js.map
18+
dist/**/*.d.ts
19+
dist/**/*.d.ts.map
20+
dist/**/*.js.map
2121
api-extractor.json
22+
23+
!dist/vscode-azureresources-api.d.ts

api/api-extractor.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
*
4343
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
4444
*/
45-
"mainEntryPointFilePath": "<projectFolder>/out/src/index.d.ts",
45+
"mainEntryPointFilePath": "<projectFolder>/dist/esm/src/index.d.ts",
4646
/**
4747
* A list of NPM package names whose exports should be treated as part of this package.
4848
*

api/package-lock.json

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
{
22
"name": "@microsoft/vscode-azureresources-api",
3-
"version": "2.6.3",
3+
"version": "3.0.0",
44
"description": "Type declarations and client library for the Azure Resources extension API",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/Microsoft/vscode-azureresourcegroups",
88
"directory": "api"
99
},
10-
"main": "out/src/index.js",
10+
"module": "dist/esm/src/index.js",
11+
"main": "dist/cjs/src/index.js",
1112
"types": "dist/vscode-azureresources-api.d.ts",
1213
"scripts": {
1314
"prepack": "npm run api-extractor",
1415
"api-extractor": "npm run build && api-extractor run",
15-
"build": "tsc -p ./"
16+
"build": "npm run build:esm && npm run build:cjs",
17+
"build:esm": "tsc -p ./ --outDir dist/esm",
18+
"build:cjs": "tsc -p ./ --outDir dist/cjs --module nodenext --moduleResolution nodenext"
1619
},
1720
"author": "Microsoft",
1821
"license": "MIT",
22+
"engines": {
23+
"vscode": "^1.105.0"
24+
},
1925
"devDependencies": {
2026
"@types/node": "^16.0.0",
2127
"@types/vscode": "1.104.0"

api/src/index.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,26 @@ export * from './resources/workspace';
1313
export * from './utils/apiUtils';
1414
export * from './utils/getApi';
1515
export * from './utils/wrapper';
16+
17+
// Temporary until @types/vscode 1.105.0 is published
18+
declare module 'vscode' {
19+
/**
20+
* Represents parameters for creating a session based on a WWW-Authenticate header value.
21+
* This is used when an API returns a 401 with a WWW-Authenticate header indicating
22+
* that additional authentication is required. The details of which will be passed down
23+
* to the authentication provider to create a session.
24+
*/
25+
export interface AuthenticationWwwAuthenticateRequest {
26+
/**
27+
* The raw WWW-Authenticate header value that triggered this challenge.
28+
* This will be parsed by the authentication provider to extract the necessary
29+
* challenge information.
30+
*/
31+
readonly wwwAuthenticate: string;
32+
33+
/**
34+
* The fallback scopes to use if no scopes are found in the WWW-Authenticate header.
35+
*/
36+
readonly fallbackScopes?: readonly string[];
37+
}
38+
}

api/src/resources/azure.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ export interface AzureAuthentication {
2222
/**
2323
* Gets a VS Code authentication session for an Azure subscription.
2424
*
25-
* @param scopes - The scopes for which the authentication is needed. Use AuthenticationWwwAuthenticateRequest for supporting challenge requests.
26-
* Note: use of AuthenticationWwwAuthenticateRequest requires VS Code v1.104
25+
* @param scopeListOrRequest - The scopes for which the authentication is needed. Use AuthenticationWwwAuthenticateRequest for supporting challenge requests.
26+
* Note: use of AuthenticationWwwAuthenticateRequest requires VS Code v1.105.0
2727
*
2828
* @returns A VS Code authentication session or undefined, if none could be obtained.
2929
*/
30-
getSessionWithScopes(scopes: string[] | vscode.AuthenticationWwwAuthenticateRequest): vscode.ProviderResult<vscode.AuthenticationSession>;
30+
getSessionWithScopes(scopeListOrRequest: string[] | vscode.AuthenticationWwwAuthenticateRequest): vscode.ProviderResult<vscode.AuthenticationSession>;
3131
}
3232

3333
/**

api/src/vscode.proposed.authLearnMore.d.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

api/src/vscode.proposed.authenticationChallenges.d.ts

Lines changed: 0 additions & 178 deletions
This file was deleted.

api/tsconfig.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
4+
"module": "es2022",
5+
"moduleResolution": "bundler",
6+
"target": "es2022",
7+
"lib": [
8+
"es2022",
9+
],
410
"declaration": true,
511
"declarationMap": true,
612
"rootDir": ".",
7-
"outDir": "out",
813
"baseUrl": "./",
914
},
10-
"exclude": [
11-
"node_modules",
12-
"out",
13-
"dist",
14-
]
1515
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@
889889
"webpack-prod": "npm run build && gulp webpack-prod",
890890
"webpack-profile": "webpack --profile --json --mode production > webpack-stats.json && echo Use http://webpack.github.io/analyse to analyze the stats",
891891
"all": "npm i && npm run lint && npm test",
892-
"api-extractor": "tsc -p ./api && api-extractor run -c ./api/api-extractor.json"
892+
"api-extractor": "cd api && npm run api-extractor"
893893
},
894894
"devDependencies": {
895895
"@azure/arm-authorization": "^9.0.0",

0 commit comments

Comments
 (0)