Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
Fixed launchers
Build scripts
  • Loading branch information
bjowes committed Apr 20, 2019
1 parent 7ccf726 commit da9d41c
Show file tree
Hide file tree
Showing 25 changed files with 440 additions and 1,493 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 1.0.0 - released 2019-04-20

* *BREAKING CHANGE*: The import files for cypress plugin and cypress command have been relocated due to the TypeScript rewrite.
* Update your import path in `cypress/plugins/index.js`: change `import 'cypress-ntlm-auth/src/plugin'` to `import 'cypress-ntlm-auth/dist/plugin'`
* Update your import path in `cypress/support/index.js`: change `import 'cypress-ntlm-auth/src/commands'` to `import 'cypress-ntlm-auth/dist/commands'`
* Rewritten in TypeScript
* Improved unit testing
* Fixed issue #28: Plain GET call to proxy causes infinite loop
* Updated dependencies

## 0.9.2 - released 2019-03-05

* Fixed issue #23: proxying sites on default ports when cy.ntlm was called without the port number.
Expand Down
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ Read the intro at [their site](https://www.cypress.io/) and find out if it is th

Parts of this library should be readily reusable, the ntlm-proxy is application agnostic and should be usable with Selenium or other solutions - you'll have to provide the streamlining into your application yourself though.

## *BREAKING CHANGE* from release 1.0.0
The import files for cypress plugin and cypress command have been relocated due to the TypeScript rewrite.
* Update your import path in `cypress/plugins/index.js`: change `import 'cypress-ntlm-auth/src/plugin'` to `import 'cypress-ntlm-auth/dist/plugin'`
* Update your import path in `cypress/support/index.js`: change `import 'cypress-ntlm-auth/src/commands'` to `import 'cypress-ntlm-auth/dist/commands'`

## Install

```shell
Expand All @@ -39,7 +44,7 @@ Follow these steps to configure Cypress to utilize this plugin:
Modify the file `cypress/plugins/index.js` so it contains:

```javascript
const ntlmAuth = require('cypress-ntlm-auth/src/plugin');
const ntlmAuth = require('cypress-ntlm-auth/dist/plugin');
module.exports = (on, config) => {
config = ntlmAuth.initNtlmAuth(config);
return config;
Expand All @@ -57,7 +62,7 @@ cypress without the launcher, the plugin must be disabled (commenting out the ca
In the file `cypress/support/index.js` add this line

```javascript
import 'cypress-ntlm-auth/src/commands';
import 'cypress-ntlm-auth/dist/commands';
```

### 3. package.json
Expand Down Expand Up @@ -289,6 +294,26 @@ The NTLM proxy will accept self-signed certificates for sites that are served fr
* Support custom http.Agent / https.Agent configuration
* Configuration option to disable self-signed certificates even for localhost

## Build instructions

### Transpile

The plugin has been rewritten in TypeScript (release 1.0.0) and the git repository does not include the transpiled files. Hence, if you need to build the plugin from source:

```script
npm run build
```

This transpiles the sources into the `dist` folder, copies additional files to `dist` and sets permissions for the launchers.

### Test

To run the unit test suite:

```script
npm test
```

## Credits

* [http-mitm-proxy](https://github.com/joeferner/node-http-mitm-proxy) - this proxy is used to intercept the traffic and inject the NTLM handshake. I chose this one because it includes full https support with certificate generation.
Expand Down
2 changes: 0 additions & 2 deletions build/models/ports.file.model.js

This file was deleted.

69 changes: 0 additions & 69 deletions build/util/ports.file.js

This file was deleted.

Loading

0 comments on commit da9d41c

Please sign in to comment.