Skip to content

Commit

Permalink
Merge pull request #166 from garden-io/no-more-index-ts
Browse files Browse the repository at this point in the history
chore: rename all index.ts files
  • Loading branch information
edvald authored Jun 14, 2018
2 parents 17a50d1 + 029e4de commit 5362c33
Show file tree
Hide file tree
Showing 63 changed files with 2,083 additions and 580 deletions.
2,499 changes: 2,002 additions & 497 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/build-dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
import * as Rsync from "rsync"
import { GARDEN_DIR_NAME } from "./constants"
import { ConfigurationError } from "./exceptions"
import { execRsyncCmd } from "./util"
import { execRsyncCmd } from "./util/util"
import {
BuildCopySpec,
Module,
Expand Down
6 changes: 3 additions & 3 deletions src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import * as sywac from "sywac"
import { merge, intersection } from "lodash"
import { resolve } from "path"
import { safeDump } from "js-yaml"
import { coreCommands } from "../commands"
import { coreCommands } from "../commands/commands"
import stringify = require("json-stringify-safe")

import { DeepPrimitiveMap } from "../types/common"
import {
enumToArray,
shutdown,
sleep,
} from "../util"
} from "../util/util"
import {
BooleanParameter,
Command,
Expand All @@ -35,7 +35,7 @@ import {
} from "../exceptions"
import { Garden } from "../garden"

import { RootLogNode, getLogger } from "../logger"
import { RootLogNode, getLogger } from "../logger/logger"
import { LogLevel, LoggerType } from "../logger/types"
import { BasicTerminalWriter } from "../logger/writers/basic-terminal-writer"
import { FancyTerminalWriter } from "../logger/writers/fancy-terminal-writer"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
ParameterValues,
StringParameter,
} from "./base"
import { splitFirst } from "../util"
import { splitFirst } from "../util/util"
import { ParameterError, RuntimeError } from "../exceptions"
import { EntryStyle } from "../logger/types"
import { pick } from "lodash"
Expand Down
6 changes: 3 additions & 3 deletions src/commands/index.ts → src/commands/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
import { Command } from "./base"
import { BuildCommand } from "./build"
import { CallCommand } from "./call"
import { ConfigCommand } from "./config"
import { ConfigCommand } from "./config/config"
import { DeployCommand } from "./deploy"
import { DevCommand } from "./dev"
import { EnvironmentCommand } from "./environment"
import { EnvironmentCommand } from "./environment/environment"
import { LoginCommand } from "./login"
import { LogoutCommand } from "./logout"
import { LogsCommand } from "./logs"
import { PushCommand } from "./push"
import { RunCommand } from "./run"
import { RunCommand } from "./run/run"
import { ScanCommand } from "./scan"
import { StatusCommand } from "./status"
import { TestCommand } from "./test"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/commands/run/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
uniq,
flatten,
} from "lodash"
import { printRuntimeContext } from "./index"
import { printRuntimeContext } from "./run"
import dedent = require("dedent")

export const runArgs = {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/run/index.ts → src/commands/run/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { safeDump } from "js-yaml"
import { PluginContext } from "../../plugin-context"
import { RuntimeContext } from "../../types/service"
import { highlightYaml } from "../../util"
import { highlightYaml } from "../../util/util"
import { Command } from "../base"
import { RunModuleCommand } from "./module"
import { RunServiceCommand } from "./service"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/run/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
ParameterValues,
StringParameter,
} from "../base"
import { printRuntimeContext } from "./index"
import { printRuntimeContext } from "./run"
import dedent = require("dedent")

export const runArgs = {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/run/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ import { RunResult } from "../../types/plugin/outputs"
import {
findByName,
getNames,
} from "../../util"
} from "../../util/util"
import {
BooleanParameter,
Command,
CommandResult,
ParameterValues,
StringParameter,
} from "../base"
import { printRuntimeContext } from "./index"
import { printRuntimeContext } from "./run"
import dedent = require("dedent")

export const runArgs = {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { safeDump } from "js-yaml"
import { PluginContext } from "../plugin-context"
import { DeepPrimitiveMap } from "../types/common"
import { highlightYaml } from "../util"
import { highlightYaml } from "../util/util"
import {
Command,
CommandResult,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
Command,
CommandResult,
} from "./base"
import { highlightYaml } from "../util"
import { highlightYaml } from "../util/util"

export class StatusCommand extends Command {
name = "status"
Expand Down
2 changes: 1 addition & 1 deletion src/config-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as yaml from "js-yaml"
import { get, isPlainObject, unset } from "lodash"
import { joiIdentifier, Primitive, validate } from "./types/common"
import { LocalConfigError } from "./exceptions"
import { dumpYaml } from "./util"
import { dumpYaml } from "./util/util"

export type ConfigValue = Primitive | Primitive[]

Expand Down
2 changes: 1 addition & 1 deletion src/docs/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import * as handlebars from "handlebars"
import { resolve } from "path"
import { GLOBAL_OPTIONS } from "../cli/cli"
import { coreCommands } from "../commands"
import { coreCommands } from "../commands/commands"
import { flatten } from "lodash"
import { describeParameters } from "../commands/base"

Expand Down
10 changes: 5 additions & 5 deletions src/garden.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
import {
builtinPlugins,
fixedPlugins,
} from "./plugins"
} from "./plugins/plugins"
import {
Module,
} from "./types/module"
Expand All @@ -42,14 +42,14 @@ import {
pluginSchema,
Provider,
RegisterPluginParam,
} from "./types/plugin"
} from "./types/plugin/plugin"
import { EnvironmentConfig } from "./types/project"
import {
findByName,
getIgnorer,
getNames,
scanDirectory,
} from "./util"
} from "./util/util"
import {
DEFAULT_NAMESPACE,
MODULE_CONFIG_FILENAME,
Expand All @@ -69,14 +69,14 @@ import {
import {
getLogger,
RootLogNode,
} from "./logger"
} from "./logger/logger"
import {
pluginActionNames,
PluginActions,
PluginFactory,
GardenPlugin,
ModuleActions,
} from "./types/plugin"
} from "./types/plugin/plugin"
import {
Environment,
joiIdentifier,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/logger/renderers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import hasAnsi = require("has-ansi")

import { duration } from "./util"
import { LogSymbolType, EntryStyle } from "./types"
import { LogEntry } from "./index"
import { LogEntry } from "./logger"

export type ToRender = string | ((...args: any[]) => string)
export type Renderer = [ToRender, any[]] | ToRender[]
Expand Down
2 changes: 1 addition & 1 deletion src/logger/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { LogEntryOpts, LogLevel } from "./types"
import { LogEntry, LogNode } from "."
import { LogEntry, LogNode } from "./logger"

export interface Node {
children: any[]
Expand Down
2 changes: 1 addition & 1 deletion src/logger/writers/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
LogLevel,
} from "../types"

import { LogEntry, RootLogNode } from "../index"
import { LogEntry, RootLogNode } from "../logger"

export interface WriterConfig {
level?: LogLevel
Expand Down
2 changes: 1 addition & 1 deletion src/logger/writers/basic-terminal-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import {
formatForTerminal,
} from "../renderers"
import { LogEntry, RootLogNode } from "../index"
import { LogEntry, RootLogNode } from "../logger"
import { validate } from "../util"
import { Writer } from "./base"

Expand Down
4 changes: 2 additions & 2 deletions src/logger/writers/fancy-terminal-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import {
leftPad,
renderMsg,
} from "../renderers"
import { LogEntry, RootLogNode } from "../index"
import { sleep } from "../../util"
import { LogEntry, RootLogNode } from "../logger"
import { sleep } from "../../util/util"
import { getChildEntries, getTerminalWidth, interceptStream, validate } from "../util"
import { Writer, WriterConfig } from "./base"

Expand Down
2 changes: 1 addition & 1 deletion src/logger/writers/file-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ensureDir, truncate } from "fs-extra"
import {
LogLevel,
} from "../types"
import { LogEntry } from "../index"
import { LogEntry } from "../logger"
import { Writer } from "./base"
import { validate } from "../util"
import {
Expand Down
4 changes: 2 additions & 2 deletions src/plugin-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
ModuleActions,
Provider,
ServiceActions,
} from "./types/plugin"
} from "./types/plugin/plugin"
import {
BuildResult,
BuildStatus,
Expand Down Expand Up @@ -86,7 +86,7 @@ import {
} from "lodash"
import {
Omit,
} from "./util"
} from "./util/util"
import { TreeVersion } from "./vcs/base"

export type PluginContextGuard = {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { join } from "path"
import { ConfigurationError } from "../exceptions"
import {
GardenPlugin,
} from "../types/plugin"
} from "../types/plugin/plugin"
import {
BuildModuleParams,
GetModuleBuildStatusParams,
Expand All @@ -40,7 +40,7 @@ import {
ServiceConfig,
} from "../types/service"
import { DEFAULT_PORT_PROTOCOL } from "../constants"
import { splitFirst } from "../util"
import { splitFirst } from "../util/util"
import { keyBy } from "lodash"
import {
genericModuleSpecSchema,
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/generic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "../types/common"
import {
GardenPlugin,
} from "../types/plugin"
} from "../types/plugin/plugin"
import {
Module,
ModuleConfig,
Expand All @@ -39,7 +39,7 @@ import {
BaseTestSpec,
baseTestSpecSchema,
} from "../types/test"
import { spawn } from "../util"
import { spawn } from "../util/util"

export const name = "generic"

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/google/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { GenericTestSpec } from "../generic"
import { GCloud } from "./gcloud"
import {
Provider,
} from "../../types/plugin"
} from "../../types/plugin/plugin"

export const GOOGLE_CLOUD_DEFAULT_REGION = "us-central1"

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/google/gcloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { spawn } from "child_process"
import { extend } from "lodash"
import { spawnPty } from "../../util"
import { spawnPty } from "../../util/util"

export interface GCloudParams {
data?: Buffer,
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/google/google-app-engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import {
ContainerModuleSpec,
ContainerServiceSpec,
} from "../container"
import { dumpYaml } from "../../util"
import { dumpYaml } from "../../util/util"
import {
GardenPlugin,
} from "../../types/plugin"
} from "../../types/plugin/plugin"

export interface GoogleAppEngineServiceSpec extends ContainerServiceSpec {
project?: string
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/google/google-cloud-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {
} from "./common"
import {
GardenPlugin,
} from "../../types/plugin"
} from "../../types/plugin/plugin"

export interface GcfServiceSpec extends GoogleCloudServiceSpec {
function: string,
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/kubernetes/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
helpers,
} from "../container"
import { values, every, uniq } from "lodash"
import { deserializeKeys, serializeKeys, splitFirst, sleep } from "../../util"
import { deserializeKeys, serializeKeys, splitFirst, sleep } from "../../util/util"
import { ServiceStatus } from "../../types/service"
import { joiIdentifier } from "../../types/common"
import {
Expand All @@ -66,7 +66,7 @@ import {
checkDeploymentStatus,
} from "./status"

import { name as providerName } from "./index"
import { name as providerName } from "./kubernetes"

const MAX_STORED_USERNAMES = 5

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/kubernetes/ingress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*/

import { PluginContext } from "../../plugin-context"
import { findByName } from "../../util"
import { findByName } from "../../util/util"
import { ContainerService } from "../container"
import { KubernetesProvider } from "./index"
import { KubernetesProvider } from "./kubernetes"

export async function createIngress(ctx: PluginContext, provider: KubernetesProvider, service: ContainerService) {
// FIXME: ingresses don't get updated when deployment is already running (rethink status check)
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/kubernetes/kubectl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import chalk from "chalk"
import { ChildProcess, spawn } from "child_process"
import { extend } from "lodash"
import { spawnPty } from "../../util"
import { spawnPty } from "../../util/util"
import { RuntimeError } from "../../exceptions"
import { getLogger } from "../../logger"
import { getLogger } from "../../logger/logger"
import hasAnsi = require("has-ansi")

export interface KubectlParams {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { validate } from "../../types/common"
import {
GardenPlugin,
Provider,
} from "../../types/plugin"
} from "../../types/plugin/plugin"
import {
ProviderConfig,
providerConfigBase,
Expand Down
Loading

0 comments on commit 5362c33

Please sign in to comment.