Refactored type declarations

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 8 years ago
parent ce5d5aac02
commit d63cdf06c5
  1. 1
      BuildServer/lib/builder.ts
  2. 2
      BuildServer/lib/report-processor.ts
  3. 2
      BuildServer/lib/task-processor.ts
  4. 2
      BuildServer/lib/tasks/cleanupafterdotnetbuild.ts
  5. 2
      BuildServer/lib/tasks/conditional.ts
  6. 2
      BuildServer/lib/tasks/copy.ts
  7. 2
      BuildServer/lib/tasks/copyglob.ts
  8. 2
      BuildServer/lib/tasks/cssnano.ts
  9. 3
      BuildServer/lib/tasks/cssnanoall.ts
  10. 2
      BuildServer/lib/tasks/deletefromcode.ts
  11. 1
      BuildServer/lib/tasks/dotnetbuild.ts
  12. 1
      BuildServer/lib/tasks/dotnetbuildandtest.ts
  13. 1
      BuildServer/lib/tasks/dotnetbuilderwrapper.ts
  14. 1
      BuildServer/lib/tasks/dotnetbuildwithoutcleanup.ts
  15. 2
      BuildServer/lib/tasks/dotnetcheckstyle.ts
  16. 2
      BuildServer/lib/tasks/dotnetcompile.ts
  17. 2
      BuildServer/lib/tasks/dotnetnugetpack.ts
  18. 1
      BuildServer/lib/tasks/dotnetnugetprocess.ts
  19. 2
      BuildServer/lib/tasks/dotnetnugetprocessinternal.ts
  20. 2
      BuildServer/lib/tasks/dotnetnugetpush.ts
  21. 1
      BuildServer/lib/tasks/dotnetnugetpushonly.ts
  22. 2
      BuildServer/lib/tasks/dotnetnugetrestore.ts
  23. 2
      BuildServer/lib/tasks/dotnetnunit.ts
  24. 3
      BuildServer/lib/tasks/dotnetnunitall.ts
  25. 2
      BuildServer/lib/tasks/dotnetpackwebapp.ts
  26. 2
      BuildServer/lib/tasks/dotnetrewrite.ts
  27. 2
      BuildServer/lib/tasks/echo.ts
  28. 2
      BuildServer/lib/tasks/eslintbrowser.ts
  29. 3
      BuildServer/lib/tasks/eslintbrowserall.ts
  30. 2
      BuildServer/lib/tasks/index.ts
  31. 2
      BuildServer/lib/tasks/noop.ts
  32. 1
      BuildServer/lib/tasks/packform.ts
  33. 2
      BuildServer/lib/tasks/parallel.ts
  34. 2
      BuildServer/lib/tasks/sequential.ts
  35. 2
      BuildServer/lib/tasks/uglifyjs.ts
  36. 2
      BuildServer/lib/tasks/uglifyjsall.ts
  37. 2
      BuildServer/lib/tasks/writefile.ts
  38. 2
      BuildServer/lib/tasks/zip.ts
  39. 13
      BuildServer/types.d.ts

@ -7,6 +7,7 @@ import * as JSONParse from "json-parse-safe";
import { join } from "path"; import { join } from "path";
import settings from "../settings"; import settings from "../settings";
import { ReportResult } from "../types";
import { gitLoader } from "./git/loader"; import { gitLoader } from "./git/loader";
import { send as sendMail } from "./mail-sender"; import { send as sendMail } from "./mail-sender";
import { writeReport } from "./report-processor"; import { writeReport } from "./report-processor";

@ -8,6 +8,8 @@ import { ReadableStreamBuffer, WritableStreamBuffer } from "stream-buffers";
import * as _ from "underscore"; import * as _ from "underscore";
import { createGunzip, createGzip } from "zlib"; import { createGunzip, createGzip } from "zlib";
import { Message, Report, ReportResult } from "../types";
const reportFilename = "report.json.gz"; const reportFilename = "report.json.gz";
const maxAttemptsNumber = 100; const maxAttemptsNumber = 100;
const attemptsTimeout = 30000; const attemptsTimeout = 30000;

@ -1,6 +1,8 @@
"use strict"; "use strict";
import * as _ from "underscore"; import * as _ from "underscore";
import { MessagesRoot, TaskInfo, TaskProcessor, TaskProcessorCallback, TaskProcessorCore } from "../types";
import tasks from "./tasks"; import tasks from "./tasks";
// TaskProcessor does not look like EventEmitter, so no need to extend EventEmitter and use `emit' here. // TaskProcessor does not look like EventEmitter, so no need to extend EventEmitter and use `emit' here.

@ -2,6 +2,8 @@
import * as glob from "glob"; import * as glob from "glob";
import { Task } from "../../types";
export default ((params, processor) => () => glob("**/obj/{Debug,Release}/*.{dll,pdb,xml}", { export default ((params, processor) => () => glob("**/obj/{Debug,Release}/*.{dll,pdb,xml}", {
cwd: processor.context.exported, cwd: processor.context.exported,
dot: true, dot: true,

@ -1,5 +1,7 @@
"use strict"; "use strict";
import { Task } from "../../types";
export default ((params, processor) => { export default ((params, processor) => {
const condition = (!params.owner || params.owner === processor.context.owner) const condition = (!params.owner || params.owner === processor.context.owner)
&& (!params.branch || params.branch === processor.context.branch || `refs/heads/${params.branch}` === processor.context.branch); && (!params.branch || params.branch === processor.context.branch || `refs/heads/${params.branch}` === processor.context.branch);

@ -3,6 +3,8 @@
import { copy } from "fs-extra"; import { copy } from "fs-extra";
import { join } from "path"; import { join } from "path";
import { Task } from "../../types";
export default ((params, processor) => () => { export default ((params, processor) => () => {
const sourceFilePath = join(processor.context.exported, params.filename); const sourceFilePath = join(processor.context.exported, params.filename);
const targetFilePath = join(processor.context.release, params.filename); const targetFilePath = join(processor.context.release, params.filename);

@ -2,6 +2,8 @@
import * as glob from "glob"; import * as glob from "glob";
import { Task } from "../../types";
export default ((params, processor) => () => glob(params.mask, { export default ((params, processor) => () => glob(params.mask, {
cwd: processor.context.exported, cwd: processor.context.exported,
dot: true, dot: true,

@ -4,6 +4,8 @@ import { process as cssnanoProcess } from "cssnano";
import { readFile, writeFile } from "fs"; import { readFile, writeFile } from "fs";
import { join } from "path"; import { join } from "path";
import { Task } from "../../types";
export default ((params, processor) => () => { export default ((params, processor) => () => {
const filePath = join(processor.context.exported, params.filename); const filePath = join(processor.context.exported, params.filename);

@ -1,6 +1,9 @@
"use strict"; "use strict";
import * as glob from "glob"; import * as glob from "glob";
import { Task } from "../../types";
const flagDoneName = "cssnanoallDone"; const flagDoneName = "cssnanoallDone";
export default ((params, processor) => () => { export default ((params, processor) => () => {

@ -3,6 +3,8 @@
import { remove } from "fs-extra"; import { remove } from "fs-extra";
import { join } from "path"; import { join } from "path";
import { Task } from "../../types";
export default ((params, processor) => () => { export default ((params, processor) => () => {
const sourceFilePath = join(processor.context.exported, params.filename); const sourceFilePath = join(processor.context.exported, params.filename);

@ -1,5 +1,6 @@
"use strict"; "use strict";
import { Task } from "../../types";
import sequential from "./sequential"; import sequential from "./sequential";
export default ((params, processor) => sequential({ export default ((params, processor) => sequential({

@ -1,5 +1,6 @@
"use strict"; "use strict";
import { Task } from "../../types";
import sequential from "./sequential"; import sequential from "./sequential";
export default ((params, processor) => sequential({ export default ((params, processor) => sequential({

@ -5,6 +5,7 @@ import * as JSONParse from "json-parse-safe";
import { WritableStreamBuffer } from "stream-buffers"; import { WritableStreamBuffer } from "stream-buffers";
import settings from "../../settings"; import settings from "../../settings";
import { Task } from "../../types";
const wrapBuilder = (builder, input, onExit) => { const wrapBuilder = (builder, input, onExit) => {
const stdoutPromise = new Promise((resolve, reject) => { const stdoutPromise = new Promise((resolve, reject) => {

@ -1,5 +1,6 @@
"use strict"; "use strict";
import { Task } from "../../types";
import sequential from "./sequential"; import sequential from "./sequential";
const createTasks = function *(params) { const createTasks = function *(params) {

@ -5,6 +5,8 @@ import { readFile } from "fs";
import * as glob from "glob"; import * as glob from "glob";
import { join } from "path"; import { join } from "path";
import { Task } from "../../types";
const autoGeneratedMarker const autoGeneratedMarker
= "//------------------------------------------------------------------------------\n" = "//------------------------------------------------------------------------------\n"
+ "// <auto-generated>"; + "// <auto-generated>";

@ -2,7 +2,9 @@
import { join } from "path"; import { join } from "path";
import * as _ from "underscore"; import * as _ from "underscore";
import settings from "../../settings"; import settings from "../../settings";
import { Task } from "../../types";
import dotnetbuilderwrapper from "./dotnetbuilderwrapper"; import dotnetbuilderwrapper from "./dotnetbuilderwrapper";
export default ((params, processor) => { export default ((params, processor) => {

@ -1,6 +1,8 @@
"use strict"; "use strict";
import * as _ from "underscore"; import * as _ from "underscore";
import { Task } from "../../types";
import dotnetnugetprocessinternal from "./dotnetnugetprocessinternal"; import dotnetnugetprocessinternal from "./dotnetnugetprocessinternal";
export default ((params, processor) => dotnetnugetprocessinternal(_.extendOwn(params, { export default ((params, processor) => dotnetnugetprocessinternal(_.extendOwn(params, {

@ -1,5 +1,6 @@
"use strict"; "use strict";
import { Task } from "../../types";
import conditional from "./conditional"; import conditional from "./conditional";
export default ((params, processor) => conditional({ export default ((params, processor) => conditional({

@ -1,6 +1,8 @@
"use strict"; "use strict";
import { join } from "path"; import { join } from "path";
import { Task } from "../../types";
import sequential from "./sequential"; import sequential from "./sequential";
const postfixLength = 16; const postfixLength = 16;

@ -1,6 +1,8 @@
"use strict"; "use strict";
import * as _ from "underscore"; import * as _ from "underscore";
import { Task } from "../../types";
import dotnetnugetprocessinternal from "./dotnetnugetprocessinternal"; import dotnetnugetprocessinternal from "./dotnetnugetprocessinternal";
export default ((params, processor) => dotnetnugetprocessinternal(_.extendOwn(params, { export default ((params, processor) => dotnetnugetprocessinternal(_.extendOwn(params, {

@ -3,6 +3,7 @@
import { join } from "path"; import { join } from "path";
import settings from "../../settings"; import settings from "../../settings";
import { Task } from "../../types";
import dotnetbuilderwrapper from "./dotnetbuilderwrapper"; import dotnetbuilderwrapper from "./dotnetbuilderwrapper";
export default ((params, processor) => dotnetbuilderwrapper({ export default ((params, processor) => dotnetbuilderwrapper({

@ -1,6 +1,8 @@
"use strict"; "use strict";
import { join } from "path"; import { join } from "path";
import { Task } from "../../types";
import sequential from "./sequential"; import sequential from "./sequential";
export default ((params, processor) => sequential({ export default ((params, processor) => sequential({

@ -1,6 +1,8 @@
"use strict"; "use strict";
import { join } from "path"; import { join } from "path";
import { Task } from "../../types";
import dotNetBuilderWrapper from "./dotnetbuilderwrapper"; import dotNetBuilderWrapper from "./dotnetbuilderwrapper";
export default ((params, processor) => dotNetBuilderWrapper({ export default ((params, processor) => dotNetBuilderWrapper({

@ -1,6 +1,9 @@
"use strict"; "use strict";
import * as glob from "glob"; import * as glob from "glob";
import { Task } from "../../types";
const flagDoneName = "dotnetnunitallDone"; const flagDoneName = "dotnetnunitallDone";
export default ((params, processor) => () => { export default ((params, processor) => () => {

@ -3,6 +3,8 @@
import { readFileSync } from "fs"; import { readFileSync } from "fs";
import { render } from "mustache"; import { render } from "mustache";
import { join } from "path"; import { join } from "path";
import { Task } from "../../types";
import sequential from "./sequential"; import sequential from "./sequential";
const msbuildTemplate = readFileSync(join(__dirname, "/dotnetpackwebapp.template.msbuild"), { encoding: "utf8" }); const msbuildTemplate = readFileSync(join(__dirname, "/dotnetpackwebapp.template.msbuild"), { encoding: "utf8" });

@ -4,7 +4,9 @@ import { parallel, waterfall } from "async";
import { readFile, writeFile } from "fs"; import { readFile, writeFile } from "fs";
import * as glob from "glob"; import * as glob from "glob";
import { join } from "path"; import { join } from "path";
import settings from "../../settings"; import settings from "../../settings";
import { Task } from "../../types";
const flagDoneName = "dotnetrewriterDone"; const flagDoneName = "dotnetrewriterDone";

@ -1,5 +1,7 @@
"use strict"; "use strict";
import { Task } from "../../types";
export default ((params, processor) => () => { export default ((params, processor) => () => {
if (params.error) { if (params.error) {
processor.onError(params.error); processor.onError(params.error);

@ -2,7 +2,9 @@
import { CLIEngine } from "eslint"; import { CLIEngine } from "eslint";
import { join } from "path"; import { join } from "path";
import settings from "../../settings"; import settings from "../../settings";
import { Task } from "../../types";
const cli = new CLIEngine({ configFile: settings.eslintBrowserConfig }); const cli = new CLIEngine({ configFile: settings.eslintBrowserConfig });

@ -1,6 +1,9 @@
"use strict"; "use strict";
import * as glob from "glob"; import * as glob from "glob";
import { Task } from "../../types";
const flagDoneName = "eslintbrowserallDone"; const flagDoneName = "eslintbrowserallDone";
export default ((params, processor) => () => { export default ((params, processor) => () => {

@ -3,6 +3,8 @@
import { readdirSync } from "fs"; import { readdirSync } from "fs";
import * as _ from "underscore"; import * as _ from "underscore";
import { Tasks } from "../../types";
const taskNames = _.unique(readdirSync(__dirname).map((file) => { const taskNames = _.unique(readdirSync(__dirname).map((file) => {
if (file.match(/\.ts$/) !== null) { if (file.match(/\.ts$/) !== null) {
return file.substr(0, file.length - 3); return file.substr(0, file.length - 3);

@ -1,3 +1,5 @@
"use strict"; "use strict";
import { Task } from "../../types";
export default ((params, processor) => processor.done()) as Task; export default ((params, processor) => processor.done()) as Task;

@ -1,5 +1,6 @@
"use strict"; "use strict";
import { Task } from "../../types";
import sequential from "./sequential"; import sequential from "./sequential";
export default ((params, processor) => sequential({ export default ((params, processor) => sequential({

@ -2,6 +2,8 @@
import { parallel } from "async"; import { parallel } from "async";
import { Task } from "../../types";
const mapper = (processor) => (task) => (callback) => processor.processTask(task, callback); const mapper = (processor) => (task) => (callback) => processor.processTask(task, callback);
export default ((params, processor) => () => parallel(params.tasks.map(mapper(processor)), processor.done)) as Task; export default ((params, processor) => () => parallel(params.tasks.map(mapper(processor)), processor.done)) as Task;

@ -2,6 +2,8 @@
import { series } from "async"; import { series } from "async";
import { Task } from "../../types";
const mapper = (processor) => (task) => (callback) => processor.processTask(task, callback); const mapper = (processor) => (task) => (callback) => processor.processTask(task, callback);
export default ((params, processor) => () => series(params.tasks.map(mapper(processor)), processor.done)) as Task; export default ((params, processor) => () => series(params.tasks.map(mapper(processor)), processor.done)) as Task;

@ -4,6 +4,8 @@ import { writeFile } from "fs";
import { join, normalize } from "path"; import { join, normalize } from "path";
import { minify } from "uglify-js"; import { minify } from "uglify-js";
import { Task } from "../../types";
export default ((params, processor) => () => { export default ((params, processor) => () => {
const filePath = normalize(join(processor.context.exported, params.filename)); const filePath = normalize(join(processor.context.exported, params.filename));
const result = minify(filePath); const result = minify(filePath);

@ -2,6 +2,8 @@
import * as glob from "glob"; import * as glob from "glob";
import { Task } from "../../types";
const doneFlagName = "uglifyjsallDone"; const doneFlagName = "uglifyjsallDone";
export default ((params, processor) => () => { export default ((params, processor) => () => {

@ -3,6 +3,8 @@
import { writeFile } from "fs"; import { writeFile } from "fs";
import { join } from "path"; import { join } from "path";
import { Task } from "../../types";
export default ((params, processor) => () => { export default ((params, processor) => () => {
const filePath = join(processor.context.exported, params.filename); const filePath = join(processor.context.exported, params.filename);

@ -4,6 +4,8 @@ import { create as createArchiver } from "archiver";
import { createWriteStream } from "fs"; import { createWriteStream } from "fs";
import { join, normalize } from "path"; import { join, normalize } from "path";
import { Task } from "../../types";
export default ((params, processor) => () => { export default ((params, processor) => () => {
const sourceDirectoryPath = normalize(join(processor.context.exported, String(params.directory || ""))); const sourceDirectoryPath = normalize(join(processor.context.exported, String(params.directory || "")));
const targetArchivePath = normalize(join(processor.context.release, params.archive)); const targetArchivePath = normalize(join(processor.context.release, params.archive));

@ -62,3 +62,16 @@ interface Task {
interface Tasks { interface Tasks {
readonly [taskName: string]: Task; readonly [taskName: string]: Task;
} }
export {
Message,
MessagesRoot,
Report,
ReportResult,
Task,
TaskInfo,
TaskProcessor,
TaskProcessorCore,
TaskProcessorCallback,
Tasks
}
Loading…
Cancel
Save