Skip to content

Commit

Permalink
[core-https] Rename core-https to core-rest-pipeline (Azure#14042)
Browse files Browse the repository at this point in the history
  • Loading branch information
xirzec authored Mar 3, 2021
1 parent 2f21805 commit e4838de
Show file tree
Hide file tree
Showing 107 changed files with 140 additions and 122 deletions.
97 changes: 48 additions & 49 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dataplane.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
"path": "sdk/core/core-http"
},
{
"name": "core-https",
"path": "sdk/core/core-https"
"name": "core-rest-pipeline",
"path": "sdk/core/core-rest-pipeline"
},
{
"name": "core-lro",
Expand Down
4 changes: 2 additions & 2 deletions rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@
"versionPolicyName": "core"
},
{
"packageName": "@azure/core-https",
"projectFolder": "sdk/core/core-https",
"packageName": "@azure/core-rest-pipeline",
"projectFolder": "sdk/core/core-rest-pipeline",
"versionPolicyName": "core"
},
{
Expand Down
6 changes: 3 additions & 3 deletions sdk/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ These packages are generally not used directly by consumers, but are used as dep

## Core "v1" and Core "v2"

The package `@azure/core-http` is heavily based on `@azure/ms-rest-js` and inherited legacy API surface and concepts that sometimes conflicted with our design principles. A full explanation is available here: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-https/documentation/core2.md
The package `@azure/core-http` is heavily based on `@azure/ms-rest-js` and inherited legacy API surface and concepts that sometimes conflicted with our design principles. A full explanation is available here: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-rest-pipeline/documentation/core2.md

For the purposes of this document, understand that "core v1" refers to the package `@azure/core-http` and is considered legacy. "Core v2" refers to the packages `@azure/core-https`, `@azure/core-client`, and `@azure/core-xml`.
For the purposes of this document, understand that "core v1" refers to the package `@azure/core-http` and is considered legacy. "Core v2" refers to the packages `@azure/core-rest-pipeline`, `@azure/core-client`, and `@azure/core-xml`.

## Common Patterns for REST

Expand All @@ -20,7 +20,7 @@ Many service operations require client libraries to make one or more HTTP calls

The `Pipeline` is what manages these common behaviors, which are grouped into items called `PipelinePolicy`s. Each client library configures its own `Pipeline` using a set of standard `PipelineOptions`.

For more information, refer to https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/core-https#key-concepts
For more information, refer to https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/core-rest-pipeline#key-concepts

### ServiceClient

Expand Down
4 changes: 2 additions & 2 deletions sdk/core/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ extends:
safeName: azurecorecrypto
- name: azure-core-http
safeName: azurecorehttp
- name: azure-core-https
safeName: azurecorehttps
- name: azure-core-rest-pipeline
safeName: azurecorerestpipeline
- name: azure-core-lro
safeName: azurecorelro
- name: azure-core-paging
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/core-client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
- First release of package, see README.md for details.
- Changes from related functionality in `core-http`:
- Replace URLBuilder with runtime-supported URL primitive.
- Rewrite `ServiceClient` on top of `core-https` and remove unused codepaths.
- Rewrite `ServiceClient` on top of `core-rest-pipeline` and remove unused codepaths.
- Remove `_response` on operation results and replace with `onResponse` callback.
2 changes: 1 addition & 1 deletion sdk/core/core-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This package is primarily used in generated code and not meant to be consumed di

This is the common base class for generated clients. It provides the methods `sendOperationRequest` and `sendRequest`.

`sendRequest` simply makes an HTTP request using a `Pipeline` (see `@azure/core-https` for details.)
`sendRequest` simply makes an HTTP request using a `Pipeline` (see `@azure/core-rest-pipeline` for details.)

`sendOperationRequest` is used by generated code to make a request using an `OperationSpec` and `OperationArguments`. An `OperationSpec` is a translation of request requirements from the OpenAPI/Swagger file that describes the service.

Expand Down
2 changes: 1 addition & 1 deletion sdk/core/core-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"@azure/abort-controller": "^1.0.0",
"@azure/core-asynciterator-polyfill": "^1.0.0",
"@azure/core-auth": "^1.2.0",
"@azure/core-https": "1.0.0-beta.2",
"@azure/core-rest-pipeline": "1.0.0-beta.2",
"@azure/core-tracing": "1.0.0-beta.1",
"@opentelemetry/api": "^0.10.2",
"tslib": "^2.0.0"
Expand Down
18 changes: 9 additions & 9 deletions sdk/core/core-client/review/core-client.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
```ts

import { AbortSignalLike } from '@azure/abort-controller';
import { HttpMethods } from '@azure/core-https';
import { HttpsClient } from '@azure/core-https';
import { InternalPipelineOptions } from '@azure/core-https';
import { HttpMethods } from '@azure/core-rest-pipeline';
import { HttpsClient } from '@azure/core-rest-pipeline';
import { InternalPipelineOptions } from '@azure/core-rest-pipeline';
import { OperationTracingOptions } from '@azure/core-tracing';
import { Pipeline } from '@azure/core-https';
import { PipelineOptions } from '@azure/core-https';
import { PipelinePolicy } from '@azure/core-https';
import { PipelineRequest } from '@azure/core-https';
import { PipelineResponse } from '@azure/core-https';
import { Pipeline } from '@azure/core-rest-pipeline';
import { PipelineOptions } from '@azure/core-rest-pipeline';
import { PipelinePolicy } from '@azure/core-rest-pipeline';
import { PipelineRequest } from '@azure/core-rest-pipeline';
import { PipelineResponse } from '@azure/core-rest-pipeline';
import { TokenCredential } from '@azure/core-auth';
import { TransferProgressEvent } from '@azure/core-https';
import { TransferProgressEvent } from '@azure/core-rest-pipeline';

// @public (undocumented)
export interface BaseMapper {
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/core-client/src/deserializationPolicy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
SendRequest,
PipelinePolicy,
RestError
} from "@azure/core-https";
} from "@azure/core-rest-pipeline";
import {
OperationRequest,
OperationResponseMap,
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/core-client/src/httpClientCache.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { HttpsClient, createDefaultHttpsClient } from "@azure/core-https";
import { HttpsClient, createDefaultHttpsClient } from "@azure/core-rest-pipeline";

let cachedHttpsClient: HttpsClient | undefined;

Expand Down
2 changes: 1 addition & 1 deletion sdk/core/core-client/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
PipelineRequest,
PipelineOptions,
HttpsClient
} from "@azure/core-https";
} from "@azure/core-rest-pipeline";

/**
* Default key used to access the XML attributes.
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/core-client/src/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Pipeline,
createPipelineFromOptions,
bearerTokenAuthenticationPolicy
} from "@azure/core-https";
} from "@azure/core-rest-pipeline";
import { deserializationPolicy, DeserializationPolicyOptions } from "./deserializationPolicy";
import { serializationPolicy, SerializationPolicyOptions } from "./serializationPolicy";

Expand Down
2 changes: 1 addition & 1 deletion sdk/core/core-client/src/serializationPolicy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { PipelineResponse, SendRequest, PipelinePolicy } from "@azure/core-https";
import { PipelineResponse, SendRequest, PipelinePolicy } from "@azure/core-rest-pipeline";
import {
OperationRequest,
SerializerOptions,
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/core-client/src/serviceClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
PipelineResponse,
Pipeline,
createPipelineRequest
} from "@azure/core-https";
} from "@azure/core-rest-pipeline";
import {
OperationArguments,
OperationSpec,
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/core-client/test/deserializationPolicy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
createHttpHeaders,
SendRequest,
RawHttpHeaders
} from "@azure/core-https";
} from "@azure/core-rest-pipeline";
import { parseXML } from "@azure/core-xml";
import { getOperationRequestInfo } from "../src/operationHelpers";

Expand Down
Loading

0 comments on commit e4838de

Please sign in to comment.