Skip to content

Commit 1522954

Browse files
Merge pull request #132 from microsoftgraph/Middleware
Middleware Architecture Implementation
2 parents 9000584 + 93342d2 commit 1522954

File tree

314 files changed

+14968
-4844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

314 files changed

+14968
-4844
lines changed

.gitignore

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@
55
tmp
66
node_modules
77
typings
8+
coverage
9+
**/*.tgz
10+
npm-debug.log
11+
812
src/**/*.js
913
src/**/*.js.map
1014
src/**/*.d.ts
11-
coverage
12-
**/*.tgz
15+
1316
samples/node/secrets.json
14-
samples/browser/secrets.js
15-
npm-debug.log
16-
samples/typescript/sample.js
17-
samples/typescript/sample.d.ts
18-
samples/typescript/graph-typings.d.ts
19-
samples/typescript/sample.js.map
20-
src/index.d.ts
17+
samples/browser/src/secrets.js
18+
samples/browser/src/graph-js-sdk-core.js
2119

2220
spec/**/*.js
2321
spec/**/*.d.ts
2422
spec/**/*.js.map
23+
spec/**/secrets.ts

.vscode/launch.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"type": "node",
99
"request": "launch",
1010
"name": "Run node samples",
11-
"program": "${workspaceRoot}/samples/node/node-sample.js",
11+
"program": "${workspaceRoot}/samples/node/main.js",
1212
"cwd": "${workspaceRoot}",
1313
"outFiles": [],
1414
"internalConsoleOptions": "openOnSessionStart"
@@ -24,6 +24,18 @@
2424
"cwd": "${workspaceRoot}",
2525
"outFiles": [],
2626
"internalConsoleOptions": "openOnSessionStart"
27+
},
28+
{
29+
"type": "node",
30+
"request": "launch",
31+
"name": "Run workload tests",
32+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
33+
"args": [
34+
"${workspaceRoot}/spec/development/workload/*.js"
35+
],
36+
"cwd": "${workspaceRoot}",
37+
"outFiles": [],
38+
"internalConsoleOptions": "openOnSessionStart"
2739
}
2840
]
29-
}
41+
}

CONTRIBUTING.md

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
Contribute to this documentation
2-
3-
Thank you for your interest in our documentation!
1+
# Contributing
42

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

2119
## Contribute using GitHub
2220

23-
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.
21+
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.
2422

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

2725
### To Contribute using GitHub
2826

29-
1. Find the article you want to contribute to on GitHub.
27+
1. Find the article you want to contribute to on GitHub.
3028

3129
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.
3230
2. Once you are on the article in GitHub, sign in to GitHub (get a free account [Join GitHub](https://github.com/join).
33-
3. Choose the **pencil icon** (edit the file in your fork of this project) and make your changes in the **<>Edit file** window.
31+
3. Choose the **pencil icon** (edit the file in your fork of this project) and make your changes in the **<>Edit file** window.
3432
4. Scroll to the bottom and enter a description.
3533
5. Choose **Propose file change**>**Create pull request**.
3634

37-
You now have successfully submitted a pull request. Pull requests are typically reviewed within 10 business days.
38-
35+
You now have successfully submitted a pull request. Pull requests are typically reviewed within 10 business days.
3936

4037
## Contribute using Git
4138

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

4946
### To Contribute using Git
5047

51-
1. If you don't have a GitHub account, set one up at [GitHub](https://github.com/join).
48+
1. If you don't have a GitHub account, set one up at [GitHub](https://github.com/join).
5249
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/).
5350
3. To submit a pull request using Git, follow the steps in [Use GitHub, Git, and this repository](#use-github-git-and-this-repository).
5451
4. You will be asked to sign the Contributor's License Agreement if you are:
@@ -68,10 +65,10 @@ Pull requests are typically reviewed within 10 business days.
6865

6966
### To set up your fork of the repository
7067

71-
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.
72-
2. Install Git on your computer. Follow the steps in the [Setting up Git Tutorial] [Set Up Git].
73-
3. Create your own fork of this repository. To do this, at the top of the page, choose the **Fork** button.
74-
4. Copy your fork to your computer. To do this, open Git Bash. At the command prompt enter:
68+
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.
69+
2. Install Git on your computer. Follow the steps in the [Setting up Git Tutorial] [Set Up Git].
70+
3. Create your own fork of this repository. To do this, at the top of the page, choose the **Fork** button.
71+
4. Copy your fork to your computer. To do this, open Git Bash. At the command prompt enter:
7572

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

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

103100
#### To create a new branch
104101

105-
1. Open Git Bash.
106-
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.
107-
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.
108-
4. At the Git Bash command prompt, type `git checkout <new branch name>` to switch to your new branch.
102+
1.Open Git Bash.
103+
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.
104+
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.
105+
4.At the Git Bash command prompt, type `git checkout <new branch name>` to switch to your new branch.
109106

110107
#### Add new content or edit existing content
111108

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

121-
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`.)
118+
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`.)
122119

123120
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.
124121

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

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

133-
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.
134-
2. On the GitHub site, navigate in your fork to the new branch.
135-
3. Choose the **Pull Request** button at the top of the page.
136-
4. Verify the Base branch is `microsoftgraph/<repo name>@master` and the Head branch is `<your username>/<repo name>@<branch name>`.
137-
5. Choose the **Update Commit Range** button.
138-
6. Add a title to your pull request, and describe all the changes you're making.
139-
7. Submit the pull request.
130+
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.
131+
2.On the GitHub site, navigate in your fork to the new branch.
132+
3.Choose the **Pull Request** button at the top of the page.
133+
4.Verify the Base branch is `microsoftgraph/<repo name>@master` and the Head branch is `<your username>/<repo name>@<branch name>`.
134+
5.Choose the **Update Commit Range** button.
135+
6.Add a title to your pull request, and describe all the changes you're making.
136+
7.Submit the pull request.
140137

141138
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.
142139

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

163160
#### To delete a branch
164161

165-
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).
166-
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.)
167-
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.
162+
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).
163+
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.)
164+
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.
168165

169166
Congratulations, you have successfully contributed to the project!
170167

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

175172
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.
176173

177-
178174
### Standard Markdown
179175

180176
All of the articles in this repository use Markdown. A complete introduction (and listing of all the syntax) can be found at [Markdown Home] [].
181-
177+
182178
## FAQ
183179

184180
### How do I get a GitHub account?
185181

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

188-
### Where do I get a Contributor's License Agreement?
184+
### Where do I get a Contributor's License Agreement?
189185

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

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

196192
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.
197-
193+
198194
### Can I become an approver for this repository's GitHub pull requests?
199195

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

LICENSE

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
msgraph-sdk-javascript
2-
3-
Copyright (c) Microsoft Corporation
4-
All rights reserved. 
51
MIT License
6-
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:
7-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8-
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.
92

3+
Copyright (c) 2018 Microsoft Corporation
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
1014

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

0 commit comments

Comments
 (0)