Skip to content

Commit

Permalink
Remove use automation-client deprecations
Browse files Browse the repository at this point in the history
[changelog:removed]
  • Loading branch information
David Dooling committed Jul 1, 2020
1 parent f327742 commit 7f7bdb0
Show file tree
Hide file tree
Showing 8 changed files with 246 additions and 382 deletions.
21 changes: 9 additions & 12 deletions lib/api-helper/code/autofix/spawnedCommandAutofix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,23 @@
* limitations under the License.
*/

/* tslint:disable:deprecation */

import { SpawnCommand } from "@atomist/automation-client/lib/util/spawn";
import { PushTest } from "../../../api/mapping/PushTest";
import {
AutofixRegistration,
AutofixRegistrationOptions,
} from "../../../api/registration/AutofixRegistration";
import { AutofixRegistration, AutofixRegistrationOptions } from "../../../api/registration/AutofixRegistration";
import { localCommandsCodeTransform } from "../../command/transform/localCommandsCodeTransform";
import { SpawnLogInvocation } from "../../misc/child_process";

/**
* Register an autofix based on spawned local shell commands.
* For example, could wrap a linter
* @deprecated use spawnCommandAutofix
*/
export function spawnedCommandAutofix(name: string,
pushTest: PushTest,
options: AutofixRegistrationOptions,
command1: SpawnCommand,
...additionalCommands: SpawnCommand[]): AutofixRegistration {
export function spawnedCommandAutofix(
name: string,
pushTest: PushTest,
options: AutofixRegistrationOptions,
command1: SpawnLogInvocation,
...additionalCommands: SpawnLogInvocation[]
): AutofixRegistration {
return {
name,
transform: localCommandsCodeTransform([command1].concat(additionalCommands)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
* limitations under the License.
*/

/* tslint:disable:deprecation */

import { SpawnCommand } from "@atomist/automation-client/lib/util/spawn";
import { CodeTransform } from "../../../api/registration/CodeTransform";
import { ProgressLog } from "../../../spi/log/ProgressLog";
import { SpawnLogInvocation } from "../../misc/child_process";
import { spawnCodeTransform } from "./spawnCodeTransform";

/**
Expand All @@ -29,6 +27,6 @@ import { spawnCodeTransform } from "./spawnCodeTransform";
* @return code transform function
* @deprecated use spawnCodeTransform
*/
export function localCommandsCodeTransform(commands: SpawnCommand[], log?: ProgressLog): CodeTransform {
export function localCommandsCodeTransform(commands: SpawnLogInvocation[], log?: ProgressLog): CodeTransform {
return spawnCodeTransform(commands, log);
}
51 changes: 0 additions & 51 deletions lib/api-helper/misc/spawned.ts

This file was deleted.

4 changes: 1 addition & 3 deletions lib/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ export { TypeScriptES6FileParser } from "@atomist/automation-client/lib/tree/ast
export { MicrogrammarBasedFileParser } from "@atomist/automation-client/lib/tree/ast/microgrammar/MicrogrammarBasedFileParser";
export { RegexFileParser } from "@atomist/automation-client/lib/tree/ast/regex/RegexFileParser";
export { WritableLog } from "@atomist/automation-client/lib/util/child_process";
export * from "@atomist/automation-client/lib/util/exec";
export { deepLink, Issue, raiseIssue } from "@atomist/automation-client/lib/util/gitHub";
export {
LoggingFormat,
Expand All @@ -174,10 +173,9 @@ export {
LogCallback,
logger,
} from "@atomist/automation-client/lib/util/logger";
export { addRedaction, addLogRedaction } from "@atomist/automation-client/lib/util/redact";
export { addRedaction } from "@atomist/automation-client/lib/util/redact";
export { doWithRetry, RetryOptions } from "@atomist/automation-client/lib/util/retry";
export { executeAll } from "@atomist/automation-client/lib/util/pool";
export * from "@atomist/automation-client/lib/util/spawn";
export { Maker } from "@atomist/automation-client/lib/util/constructionUtils";
export * from "@atomist/automation-client/lib/operations/common/gitlabRepoLoader";
export * from "@atomist/automation-client/lib/operations/common/GitlabPrivateTokenCredentials";
Expand Down
Loading

0 comments on commit 7f7bdb0

Please sign in to comment.