Skip to content

Commit

Permalink
Merge pull request #132 from microsoftgraph/Middleware
Browse files Browse the repository at this point in the history
Middleware Architecture Implementation
  • Loading branch information
muthurathinam authored Jan 29, 2019
2 parents 9000584 + 93342d2 commit 1522954
Show file tree
Hide file tree
Showing 314 changed files with 14,968 additions and 4,844 deletions.
17 changes: 8 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@
tmp
node_modules
typings
coverage
**/*.tgz
npm-debug.log

src/**/*.js
src/**/*.js.map
src/**/*.d.ts
coverage
**/*.tgz

samples/node/secrets.json
samples/browser/secrets.js
npm-debug.log
samples/typescript/sample.js
samples/typescript/sample.d.ts
samples/typescript/graph-typings.d.ts
samples/typescript/sample.js.map
src/index.d.ts
samples/browser/src/secrets.js
samples/browser/src/graph-js-sdk-core.js

spec/**/*.js
spec/**/*.d.ts
spec/**/*.js.map
spec/**/secrets.ts
16 changes: 14 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "node",
"request": "launch",
"name": "Run node samples",
"program": "${workspaceRoot}/samples/node/node-sample.js",
"program": "${workspaceRoot}/samples/node/main.js",
"cwd": "${workspaceRoot}",
"outFiles": [],
"internalConsoleOptions": "openOnSessionStart"
Expand All @@ -24,6 +24,18 @@
"cwd": "${workspaceRoot}",
"outFiles": [],
"internalConsoleOptions": "openOnSessionStart"
},
{
"type": "node",
"request": "launch",
"name": "Run workload tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"${workspaceRoot}/spec/development/workload/*.js"
],
"cwd": "${workspaceRoot}",
"outFiles": [],
"internalConsoleOptions": "openOnSessionStart"
}
]
}
}
63 changes: 29 additions & 34 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Contribute to this documentation

Thank you for your interest in our documentation!
# Contributing

* [Ways to contribute](#ways-to-contribute)
* [Contribute using GitHub](#contribute-using-github)
Expand All @@ -20,22 +18,21 @@ Here are some ways you can contribute to this documentation:

## Contribute using GitHub

Use GitHub to contribute to this documentation without having to clone the repo to your desktop. This is the easiest way to create a pull request in this repository. Use this method to make a minor change that doesn't involve code changes.
Use GitHub to contribute to this documentation without having to clone the repository to your desktop. This is the easiest way to create a pull request in this repository. Use this method to make a minor change that doesn't involve code changes.

**Note** Using this method allows you to contribute to one article at a time.

### To Contribute using GitHub

1. Find the article you want to contribute to on GitHub.
1. Find the article you want to contribute to on GitHub.

If the article is in MSDN, choose the **suggest and submit changes** link in the **Contribute to this content** section and you'll be taken to the same article on GitHub.
2. Once you are on the article in GitHub, sign in to GitHub (get a free account [Join GitHub](https://github.com/join).
3. Choose the **pencil icon** (edit the file in your fork of this project) and make your changes in the **<>Edit file** window.
3. Choose the **pencil icon** (edit the file in your fork of this project) and make your changes in the **<>Edit file** window.
4. Scroll to the bottom and enter a description.
5. Choose **Propose file change**>**Create pull request**.

You now have successfully submitted a pull request. Pull requests are typically reviewed within 10 business days.

You now have successfully submitted a pull request. Pull requests are typically reviewed within 10 business days.

## Contribute using Git

Expand All @@ -48,7 +45,7 @@ Use Git to contribute substantive changes, such as:

### To Contribute using Git

1. If you don't have a GitHub account, set one up at [GitHub](https://github.com/join).
1. If you don't have a GitHub account, set one up at [GitHub](https://github.com/join).
2. After you have an account, install Git on your computer. Follow the steps in [Setting up Git Tutorial](https://help.github.com/articles/set-up-git/).
3. To submit a pull request using Git, follow the steps in [Use GitHub, Git, and this repository](#use-github-git-and-this-repository).
4. You will be asked to sign the Contributor's License Agreement if you are:
Expand All @@ -68,10 +65,10 @@ Pull requests are typically reviewed within 10 business days.

### To set up your fork of the repository

1. Set up a GitHub account so you can contribute to this project. If you haven't done this, go to [GitHub](https://github.com/join) and do it now.
2. Install Git on your computer. Follow the steps in the [Setting up Git Tutorial] [Set Up Git].
3. Create your own fork of this repository. To do this, at the top of the page, choose the **Fork** button.
4. Copy your fork to your computer. To do this, open Git Bash. At the command prompt enter:
1. Set up a GitHub account so you can contribute to this project. If you haven't done this, go to [GitHub](https://github.com/join) and do it now.
2. Install Git on your computer. Follow the steps in the [Setting up Git Tutorial] [Set Up Git].
3. Create your own fork of this repository. To do this, at the top of the page, choose the **Fork** button.
4. Copy your fork to your computer. To do this, open Git Bash. At the command prompt enter:

git clone https://github.com/<your user name>/<repo name>.git

Expand Down Expand Up @@ -102,10 +99,10 @@ To make the contribution process as seamless as possible, follow these steps.

#### To create a new branch

1. Open Git Bash.
2. At the Git Bash command prompt, type `git pull upstream master:<new branch name>`. This creates a new branch locally that is copied from the latest MicrosoftGraph master branch.
3. At the Git Bash command prompt, type `git push origin <new branch name>`. This alerts GitHub to the new branch. You should now see the new branch in your fork of the repository on GitHub.
4. At the Git Bash command prompt, type `git checkout <new branch name>` to switch to your new branch.
1.Open Git Bash.
2.At the Git Bash command prompt, type `git pull upstream master:<new branch name>`. This creates a new branch locally that is copied from the latest MicrosoftGraph master branch.
3.At the Git Bash command prompt, type `git push origin <new branch name>`. This alerts GitHub to the new branch. You should now see the new branch in your fork of the repository on GitHub.
4.At the Git Bash command prompt, type `git checkout <new branch name>` to switch to your new branch.

#### Add new content or edit existing content

Expand All @@ -118,7 +115,7 @@ The files in `C:\Users\<yourusername>\<repo name>` are a working copy of the new
git add .
git commit -v -a -m "<Describe the changes made in this commit>"

The `add` command adds your changes to a staging area in preparation for committing them to the repository. The period after the `add` command specifies that you want to stage all of the files that you added or modified, checking subfolders recursively. (If you don't want to commit all of the changes, you can add specific files. You can also undo a commit. For help, type `git add -help` or `git status`.)
The `add` command adds your changes to a staging area in preparation for committing them to the repository. The period after the `add` command specifies that you want to stage all of the files that you added or modified, checking sub folders recursively. (If you don't want to commit all of the changes, you can add specific files. You can also undo a commit. For help, type `git add -help` or `git status`.)

The `commit` command applies the staged changes to the repository. The switch `-m` means you are providing the commit comment in the command line. The -v and -a switches can be omitted. The -v switch is for verbose output from the command, and -a does what you already did with the add command.

Expand All @@ -130,13 +127,13 @@ When you're finished with your work and are ready to have it merged into the mai

#### To submit a pull request to the main repository

1. In the Git Bash command prompt, type `git push origin <new branch name>`. In your local repository, `origin` refers to your GitHub repository that you cloned the local repository from. This command pushes the current state of your new branch, including all commits made in the previous steps, to your GitHub fork.
2. On the GitHub site, navigate in your fork to the new branch.
3. Choose the **Pull Request** button at the top of the page.
4. Verify the Base branch is `microsoftgraph/<repo name>@master` and the Head branch is `<your username>/<repo name>@<branch name>`.
5. Choose the **Update Commit Range** button.
6. Add a title to your pull request, and describe all the changes you're making.
7. Submit the pull request.
1.In the Git Bash command prompt, type `git push origin <new branch name>`. In your local repository, `origin` refers to your GitHub repository that you cloned the local repository from. This command pushes the current state of your new branch, including all commits made in the previous steps, to your GitHub fork.
2.On the GitHub site, navigate in your fork to the new branch.
3.Choose the **Pull Request** button at the top of the page.
4.Verify the Base branch is `microsoftgraph/<repo name>@master` and the Head branch is `<your username>/<repo name>@<branch name>`.
5.Choose the **Update Commit Range** button.
6.Add a title to your pull request, and describe all the changes you're making.
7.Submit the pull request.

One of the site administrators will process your pull request. Your pull request will surface on the microsoftgraph/<repo name> site under Issues. When the pull request is accepted, the issue will be resolved.

Expand All @@ -162,9 +159,9 @@ Once your changes are successfully merged into the main repository, delete the b

#### To delete a branch

1. In the Git Bash command prompt, type `git checkout master`. This ensures that you aren't in the branch to be deleted (which isn't allowed).
2. Next, at the command prompt, type `git branch -d <branch name>`. This deletes the branch on your computer only if it has been successfully merged to the upstream repository. (You can override this behavior with the `–D` flag, but first be sure you want to do this.)
3. Finally, type `git push origin :<branch name>` at the command prompt (a space before the colon and no space after it). This will delete the branch on your github fork.
1. In the Git Bash command prompt, type `git checkout master`. This ensures that you aren't in the branch to be deleted (which isn't allowed).
2. Next, at the command prompt, type `git branch -d <branch name>`. This deletes the branch on your computer only if it has been successfully merged to the upstream repository. (You can override this behavior with the `–D` flag, but first be sure you want to do this.)
3. Finally, type `git push origin :<branch name>` at the command prompt (a space before the colon and no space after it). This will delete the branch on your github fork.

Congratulations, you have successfully contributed to the project!

Expand All @@ -174,18 +171,17 @@ Congratulations, you have successfully contributed to the project!

The [markdown template](/articles/0-markdown-template-for-new-articles.md) contains the basic Markdown for a topic that includes a table of contents, sections with subheadings, links to other Office developer topics, links to other sites, bold text, italic text, numbered and bulleted lists, code snippets, and images.


### Standard Markdown

All of the articles in this repository use Markdown. A complete introduction (and listing of all the syntax) can be found at [Markdown Home] [].

## FAQ

### How do I get a GitHub account?

Fill out the form at [Join GitHub](https://github.com/join) to open a free GitHub account.

### Where do I get a Contributor's License Agreement?
### Where do I get a Contributor's License Agreement?

You will automatically be sent a notice that you need to sign the Contributor's License Agreement (CLA) if your pull request requires one.

Expand All @@ -194,7 +190,7 @@ As a community member, **you must sign the Contribution License Agreement (CLA)
### What happens with my contributions?

When you submit your changes, via a pull request, our team will be notified and will review your pull request. You will receive notifications about your pull request from GitHub; you may also be notified by someone from our team if we need more information. We reserve the right to edit your submission for legal, style, clarity, or other issues.

### Can I become an approver for this repository's GitHub pull requests?

Currently, we are not allowing external contributors to approve pull requests in this repository.
Expand All @@ -212,5 +208,4 @@ We typically review pull requests and respond to issues within 10 business days.
[GitHub Help]: http://help.github.com/
[Set Up Git]: http://help.github.com/win-set-up-git/
[Markdown Home]: http://daringfireball.net/projects/markdown/
[Daring Fireball]: http://daringfireball.net/

[Daring Fireball]: http://daringfireball.net/
29 changes: 18 additions & 11 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
msgraph-sdk-javascript

Copyright (c) Microsoft Corporation
All rights reserved. 
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright (c) 2018 Microsoft Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

https://github.com/visionmedia/superagent
Superagent
version 2.2
license is MIT: https://github.com/visionmedia/superagent/blob/master/LICENSE
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 1522954

Please sign in to comment.