Skip to content

Commit 408a923

Browse files
Merge pull request #1 from Azure/swapnil/sdkBindingExtensions
Blob SDK binding Support extensions
2 parents a21bc1e + fa090f6 commit 408a923

Some content is hidden

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

71 files changed

+14607
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"plugins": ["@typescript-eslint", "header", "deprecation", "simple-import-sort", "import"],
4+
"parserOptions": {
5+
"project": "tsconfig.json",
6+
"sourceType": "module"
7+
},
8+
"extends": [
9+
"eslint:recommended",
10+
"plugin:@typescript-eslint/recommended",
11+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
12+
"plugin:prettier/recommended"
13+
],
14+
"rules": {
15+
"header/header": [
16+
2,
17+
"line",
18+
[" Copyright (c) .NET Foundation. All rights reserved.", " Licensed under the MIT License."],
19+
2
20+
],
21+
"deprecation/deprecation": "error",
22+
"@typescript-eslint/no-empty-interface": "off",
23+
"@typescript-eslint/no-explicit-any": "off",
24+
"@typescript-eslint/no-namespace": "off",
25+
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_", "ignoreRestSiblings": true }],
26+
"prefer-const": ["error", { "destructuring": "all" }],
27+
"@typescript-eslint/explicit-member-accessibility": [
28+
"error",
29+
{
30+
"accessibility": "no-public"
31+
}
32+
],
33+
"no-return-await": "off",
34+
"@typescript-eslint/return-await": "error",
35+
"eqeqeq": "error",
36+
"@typescript-eslint/no-empty-function": "off",
37+
"simple-import-sort/imports": [
38+
"error",
39+
{
40+
"groups": [["^\\u0000", "^node:", "^@?\\w", "^", "^\\."]]
41+
}
42+
],
43+
"simple-import-sort/exports": "error",
44+
"import/first": "error",
45+
"import/newline-after-import": "error",
46+
"import/no-duplicates": "error"
47+
},
48+
"ignorePatterns": ["**/*.js", "**/*.mjs", "**/*.cjs", "out", "dist"]
49+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @azure/azure-functions-nodejs
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# nyc test coverage
18+
.nyc_output
19+
20+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21+
.grunt
22+
23+
# node-waf configuration
24+
.lock-wscript
25+
26+
# Compiled binary addons (http://nodejs.org/api/addons.html)
27+
build/Release
28+
29+
# Dependency directories
30+
node_modules
31+
jspm_packages
32+
33+
# Optional npm cache directory
34+
.npm
35+
36+
# Optional REPL history
37+
.node_repl_history
38+
39+
dist
40+
out
41+
pkg
42+
*.tgz
43+
44+
**/*-test-results.xml
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
out
2+
dist
3+
node_modules
4+
5+
# Exclude markdown until this bug is fixed: https://github.com/prettier/prettier/issues/5019
6+
*.md
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"tabWidth": 4,
3+
"singleQuote": true,
4+
"printWidth": 120,
5+
"endOfLine": "auto"
6+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
3+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "attach",
7+
"name": "Attach by Process ID",
8+
"processId": "${command:PickProcess}"
9+
},
10+
{
11+
"name": "Launch Unit Tests",
12+
"runtimeExecutable": "npm",
13+
"runtimeArgs": ["test"],
14+
"request": "launch",
15+
"skipFiles": ["<node_internals>/**"],
16+
"type": "node"
17+
}
18+
]
19+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"azureFunctions.showProjectWarning": false,
3+
"editor.codeActionsOnSave": ["source.fixAll"],
4+
"editor.formatOnSave": true,
5+
"editor.defaultFormatter": "esbenp.prettier-vscode",
6+
"typescript.tsdk": "node_modules/typescript/lib",
7+
"typescript.preferences.importModuleSpecifier": "relative"
8+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "npm: watch",
6+
"type": "npm",
7+
"script": "watch",
8+
"group": {
9+
"kind": "build",
10+
"isDefault": true
11+
},
12+
"problemMatcher": ["$ts-checker-webpack-watch"],
13+
"isBackground": true,
14+
"presentation": {
15+
"reveal": "never"
16+
}
17+
},
18+
{
19+
"type": "npm",
20+
"script": "lint",
21+
"problemMatcher": "$eslint-stylish",
22+
"label": "npm: lint"
23+
}
24+
]
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Contributing
2+
3+
- Clone the repository locally and open in VS Code
4+
- Run "Extensions: Show Recommended Extensions" from the [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) and install all extensions listed under "Workspace Recommendations"
5+
- Run `npm install`
6+
- Run `npm run build`
7+
- Run `npm link`
8+
- Create or open a local function app to test with
9+
- In the local function app:
10+
- Follow the steps in the "Usage" section of the README for this repo
11+
- Run `npm link @azure/functions-extensions-base`. This will point your app to the local repository for the `@azure/functions-extensions-base` package
12+
- Add the following settings to your "local.settings.json" file or configure them directly as environment variables
13+
- `languageWorkers__node__arguments`: `--inspect`
14+
> 💡 Tip: Set `logging__logLevel__Worker` to `debug` if you want to view worker-specific logs in the output of `func start`
15+
- Start the app (i.e. run `func start` or press <kbd>F5</kbd>)
16+
- Back in this repository, press <kbd>F5</kbd> and select the process for your running function app
17+
- Before you submit a PR, run `npm test` and fix any issues. If you want to debug the tests, switch your [launch profile](https://code.visualstudio.com/docs/editor/debugging) in VS Code to "Launch Unit Tests" and press <kbd>F5</kbd>.
18+
19+
## Code of Conduct
20+
21+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
22+
23+
## Contributing to type definitions
24+
25+
The type definitions are located in the `types` folder. Please make sure to update the tests in `./test/types/index.test.ts` as well.

0 commit comments

Comments
 (0)