Skip to content

Commit 1b0828c

Browse files
authored
[sort-imports] update core-lro with respect to sort-imports rule (Azure#19038)
* updated with respect to ```sort-imports``` rule * prettier
1 parent 69bb6fe commit 1b0828c

21 files changed

+63
-64
lines changed

sdk/core/core-lro/src/lroEngine/azureAsyncPolling.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
// Licensed under the MIT license.
33

44
import {
5-
failureStates,
6-
LroResourceLocationConfig,
75
LongRunningOperation,
86
LroBody,
7+
LroResourceLocationConfig,
98
LroResponse,
109
LroStatus,
11-
successStates,
12-
RawResponse
10+
RawResponse,
11+
failureStates,
12+
successStates
1313
} from "./models";
1414
import { isUnexpectedPollingResponse } from "./requestUtils";
1515

sdk/core/core-lro/src/lroEngine/bodyPolling.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// Licensed under the MIT license.
33

44
import {
5-
failureStates,
65
LroBody,
76
LroResponse,
87
LroStatus,
98
RawResponse,
9+
failureStates,
1010
successStates
1111
} from "./models";
1212
import { isUnexpectedPollingResponse } from "./requestUtils";

sdk/core/core-lro/src/lroEngine/lroEngine.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
import { Poller } from "../poller";
5-
import { PollOperationState } from "../pollOperation";
64
import {
75
LongRunningOperation,
86
LroEngineOptions,
97
PollerConfig,
108
ResumablePollOperationState
119
} from "./models";
1210
import { GenericPollOperation } from "./operation";
11+
import { PollOperationState } from "../pollOperation";
12+
import { Poller } from "../poller";
1313

1414
function deserializeState<TResult, TState>(
1515
serializedState: string

sdk/core/core-lro/src/lroEngine/operation.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
import { AbortSignalLike } from "@azure/abort-controller";
5-
import { PollOperation, PollOperationState } from "../pollOperation";
6-
import { logger } from "./logger";
74
import {
8-
PollerConfig,
9-
ResumablePollOperationState,
10-
LongRunningOperation,
115
GetLroStatusFromResponse,
6+
LongRunningOperation,
127
LroResourceLocationConfig,
13-
LroStatus,
148
LroResponse,
15-
RawResponse
9+
LroStatus,
10+
PollerConfig,
11+
RawResponse,
12+
ResumablePollOperationState
1613
} from "./models";
17-
import { getPollingUrl } from "./requestUtils";
14+
import { PollOperation, PollOperationState } from "../pollOperation";
1815
import { createGetLroStatusFromResponse, createInitializeState, createPoll } from "./stateMachine";
16+
import { AbortSignalLike } from "@azure/abort-controller";
17+
import { getPollingUrl } from "./requestUtils";
18+
import { logger } from "./logger";
1919

2020
export class GenericPollOperation<TResult, TState extends PollOperationState<TResult>>
2121
implements PollOperation<TState, TResult> {

sdk/core/core-lro/src/lroEngine/stateMachine.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
import { processAzureAsyncOperationResult } from "./azureAsyncPolling";
5-
import { isBodyPollingDone, processBodyPollingOperationResult } from "./bodyPolling";
6-
import { processLocationPollingOperationResult } from "./locationPolling";
7-
import { logger } from "./logger";
84
import {
9-
LroResourceLocationConfig,
105
GetLroStatusFromResponse,
116
LongRunningOperation,
127
LroConfig,
13-
PollerConfig,
14-
ResumablePollOperationState,
8+
LroResourceLocationConfig,
159
LroResponse,
16-
LroStatus
10+
LroStatus,
11+
PollerConfig,
12+
ResumablePollOperationState
1713
} from "./models";
18-
import { processPassthroughOperationResult } from "./passthrough";
1914
import { getPollingUrl, inferLroMode, isUnexpectedInitialResponse } from "./requestUtils";
15+
import { isBodyPollingDone, processBodyPollingOperationResult } from "./bodyPolling";
16+
import { logger } from "./logger";
17+
import { processAzureAsyncOperationResult } from "./azureAsyncPolling";
18+
import { processLocationPollingOperationResult } from "./locationPolling";
19+
import { processPassthroughOperationResult } from "./passthrough";
2020

2121
/**
2222
* creates a stepping function that maps an LRO state to another.

sdk/core/core-lro/test/abort.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
import { assert } from "chai";
5-
import { delay, WebResource, HttpHeaders } from "@azure/core-http";
6-
import { TestClient } from "./utils/testClient";
4+
import { HttpHeaders, WebResource, delay } from "@azure/core-http";
75
import { AbortController } from "@azure/abort-controller";
86
import { PollerStoppedError } from "../src";
7+
import { TestClient } from "./utils/testClient";
98
import { TestTokenCredential } from "./utils/testTokenCredential";
9+
import { assert } from "chai";
1010

1111
const testHttpHeaders: HttpHeaders = new HttpHeaders();
1212
const testHttpRequest: WebResource = new WebResource();

sdk/core/core-lro/test/engine.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
import { assert } from "chai";
5-
import { RawResponse } from "../src/lroEngine/models";
64
import { mockedPoller, runMockedLro } from "./utils/router";
5+
import { RawResponse } from "../src/lroEngine/models";
6+
import { assert } from "chai";
77

88
describe("Lro Engine", function() {
99
it("put201Succeeded", async function() {

sdk/core/core-lro/test/testClient.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
// Copyright (c) Microsoft Corporation. All rights reserved.
55
// Licensed under the MIT License. See License.txt in the project root for license information.
66

7-
import { assert } from "chai";
8-
import { delay, WebResource, HttpHeaders, isNode } from "@azure/core-http";
7+
import { HttpHeaders, WebResource, delay, isNode } from "@azure/core-http";
8+
import { PollerCancelledError, PollerStoppedError } from "../src";
99
import { TestClient } from "./utils/testClient";
10-
import { PollerStoppedError, PollerCancelledError } from "../src";
11-
import { TestTokenCredential } from "./utils/testTokenCredential";
1210
import { TestOperationState } from "./utils/testOperation";
11+
import { TestTokenCredential } from "./utils/testTokenCredential";
12+
import { assert } from "chai";
1313

1414
const testHttpHeaders: HttpHeaders = new HttpHeaders();
1515
const testHttpRequest: WebResource = new WebResource();

sdk/core/core-lro/test/utils/coreRestPipelineLro.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
import { PipelineRequest } from "@azure/core-rest-pipeline";
54
import { LongRunningOperation, LroResponse } from "../../src";
5+
import { PipelineRequest } from "@azure/core-rest-pipeline";
66

77
export type SendOperationFn<T> = (request: PipelineRequest) => Promise<LroResponse<T>>;
88

sdk/core/core-lro/test/utils/router.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
// Licensed under the MIT license.
33

44
import {
5-
createHttpHeaders,
65
HttpClient,
76
HttpMethods,
87
PipelineRequest,
98
PipelineResponse,
10-
RestError
9+
RestError,
10+
createHttpHeaders
1111
} from "@azure/core-rest-pipeline";
12-
import { LroEngine, PollerLike, PollOperationState } from "../../src";
1312
import {
14-
LroResourceLocationConfig,
1513
LroBody,
14+
LroResourceLocationConfig,
1615
LroResponse,
1716
RawResponse
1817
} from "../../src/lroEngine/models";
19-
import { CoreRestPipelineLro } from "./coreRestPipelineLro";
20-
import { paramRoutes } from "./router/paramRoutes";
18+
import { LroEngine, PollOperationState, PollerLike } from "../../src";
2119
import { routes, routesTable } from "./router/routesTable";
20+
import { CoreRestPipelineLro } from "./coreRestPipelineLro";
2221
import { applyScenarios } from "./router/utils";
22+
import { paramRoutes } from "./router/paramRoutes";
2323

2424
/**
2525
* Re-implementation of the lro routes in Autorest test server located in https://github.com/Azure/autorest.testserver/blob/main/legacy/routes/lros.js

0 commit comments

Comments
 (0)