Skip to content

Commit 22133f4

Browse files
authored
[core-client] Create package for AutoRest specific code (Azure#9620)
Create a new package we can use for helpers for generated code.
1 parent 0fbfe0b commit 22133f4

20 files changed

+617
-0
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 53 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dataplane.code-workspace

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
"name": "core-auth",
2525
"path": "sdk\\core\\core-auth"
2626
},
27+
{
28+
"name": "core-client",
29+
"path": "sdk\\core\\core-client"
30+
},
2731
{
2832
"name": "core-http",
2933
"path": "sdk\\core\\core-http"

rush.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,11 @@
367367
"projectFolder": "sdk/core/core-auth",
368368
"versionPolicyName": "core"
369369
},
370+
{
371+
"packageName": "@azure/core-client",
372+
"projectFolder": "sdk/core/core-client",
373+
"versionPolicyName": "core"
374+
},
370375
{
371376
"packageName": "@azure/core-http",
372377
"projectFolder": "sdk/core/core-http",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"plugins": ["@azure/azure-sdk"],
3+
"extends": ["plugin:@azure/azure-sdk/azure-sdk-base"]
4+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Current TS File",
11+
"args": ["${fileBasename}"],
12+
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
13+
"cwd": "${fileDirname}",
14+
"sourceMaps": true,
15+
"protocol": "inspector"
16+
},
17+
{
18+
"type": "node",
19+
"request": "launch",
20+
"name": "Run unit tests",
21+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
22+
"args": ["--timeout", "999999", "--colors", "${workspaceFolder}/dist-test/index.node.js"],
23+
"cwd": "${workspaceFolder}",
24+
"internalConsoleOptions": "openOnSessionStart",
25+
"skipFiles": ["<node_internals>/**/async_hooks.js", "<node_internals>/**/*.js"]
26+
}
27+
]
28+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Build Node",
8+
"type": "npm",
9+
"script": "build:node",
10+
"group": {
11+
"kind": "build",
12+
"isDefault": true
13+
}
14+
}
15+
]
16+
}

sdk/core/core-client/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Release History
2+
3+
## 1.0.0.preview.1 (UNRELEASED)

sdk/core/core-client/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2020 Microsoft
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.
14+
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.

sdk/core/core-client/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Azure Core Service client library for JavaScript (Experimental)
2+
3+
This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest) and [`autorest.typescript`](https://github.com/Azure/autorest.typescript).
4+
5+
## Getting started
6+
7+
### Requirements
8+
9+
- [Node.js](https://nodejs.org) version > 8.x
10+
11+
### Installation
12+
13+
This package is primarily used in generated code and not meant to be consumed directly by end users.
14+
15+
## Key concepts
16+
17+
TODO: talk about OperationSpec?
18+
19+
## Examples
20+
21+
Examples can be found in the `samples` folder.
22+
23+
## Next steps
24+
25+
TODO: need some good content here
26+
27+
## Troubleshooting
28+
29+
If you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new).
30+
31+
## Contributing
32+
33+
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code.
34+
35+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-client%2FREADME.png)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3+
"mainEntryPointFilePath": "types/latest/src/index.d.ts",
4+
"docModel": {
5+
"enabled": false
6+
},
7+
"apiReport": {
8+
"enabled": true,
9+
"reportFolder": "./review"
10+
},
11+
"dtsRollup": {
12+
"enabled": true,
13+
"untrimmedFilePath": "",
14+
"publicTrimmedFilePath": "./types/latest/core-client.d.ts"
15+
},
16+
"messages": {
17+
"tsdocMessageReporting": {
18+
"default": {
19+
"logLevel": "none"
20+
}
21+
},
22+
"extractorMessageReporting": {
23+
"ae-missing-release-tag": {
24+
"logLevel": "none"
25+
},
26+
"ae-unresolved-link": {
27+
"logLevel": "none"
28+
}
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)