Skip to content

Commit 8d5eaf1

Browse files
committed
fix: correct types and exports
1 parent bd1852d commit 8d5eaf1

File tree

5 files changed

+18
-22
lines changed

5 files changed

+18
-22
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
dist
2+
*.d.ts
3+
*.js

package.json

+2-7
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22
"name": "@intility/cypress-msal",
33
"version": "0.2.1",
44
"description": "A cypress plugin for projects using @azure/msal-browser.",
5-
"main": "dist/index.js",
6-
"exports": {
7-
".": "./dist/index.js",
8-
"./command": "./dist/command.js",
9-
"./package.json": "./dist/package.json"
10-
},
5+
"main": "index.js",
116
"type": "commonjs",
12-
"types": "dist/index.d.ts",
7+
"types": "index.d.ts",
138
"scripts": {
149
"build": "tsc",
1510
"test": "echo \"Error: no test specified\" && exit 1"

src/command.ts

+11
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,14 @@ Cypress.Commands.add('login', () => {
1616
})
1717
})
1818

19+
declare global {
20+
namespace Cypress {
21+
interface Chainable {
22+
/**
23+
* Custom command to log in using msal test user
24+
* @example cy.login()
25+
*/
26+
login(): Chainable<any>
27+
}
28+
}
29+
}

src/index.ts

-12
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,4 @@ export default function generateLogin(publicClientConfig: Configuration, request
5656
// return msal cache
5757
return pca.getTokenCache().getKVStore()
5858
}
59-
}
60-
61-
declare global {
62-
namespace Cypress {
63-
interface Chainable {
64-
/**
65-
* Custom command to log in using msal test user
66-
* @example cy.login()
67-
*/
68-
login(): Chainable<any>
69-
}
70-
}
7159
}

tsconfig.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
"module": "commonjs",
66
"moduleResolution": "node",
77
"esModuleInterop": true,
8-
"outDir": "dist",
8+
"outDir": "./",
99
"declaration": true
1010
},
11-
"include": ["src"]
11+
"include": ["src"],
12+
"exclude": []
1213
}

0 commit comments

Comments
 (0)