Skip to content

Commit

Permalink
#691: updated ktlint dep
Browse files Browse the repository at this point in the history
  • Loading branch information
uweschaefer committed Mar 2, 2020
1 parent c7bd95b commit 9d227b0
Show file tree
Hide file tree
Showing 70 changed files with 123 additions and 123 deletions.
Expand Up @@ -17,12 +17,12 @@ package org.factcast.schema.registry.cli

import io.micronaut.configuration.picocli.PicocliRunner
import io.micronaut.core.annotation.Introspected
import kotlin.system.exitProcess
import org.factcast.schema.registry.cli.commands.Build
import org.factcast.schema.registry.cli.commands.Validate
import org.factcast.schema.registry.cli.utils.BANNER
import picocli.CommandLine
import picocli.CommandLine.Command
import kotlin.system.exitProcess

@Command(
name = "fc-schema",
Expand All @@ -44,4 +44,4 @@ class Application : Runnable {
exitProcess(exitCode)
}
}
}
}
Expand Up @@ -15,11 +15,11 @@
*/
package org.factcast.schema.registry.cli.commands

import picocli.CommandLine.Command
import picocli.CommandLine.Option
import java.nio.file.Paths
import javax.inject.Inject
import kotlin.system.exitProcess
import picocli.CommandLine.Command
import picocli.CommandLine.Option

@Command(
name = "build",
Expand Down
Expand Up @@ -20,4 +20,4 @@ import java.nio.file.Path
interface CommandService {
fun build(sourceRoot: Path, outputRoot: Path): Int
fun validate(sourceRoot: Path): Int
}
}
Expand Up @@ -15,15 +15,15 @@
*/
package org.factcast.schema.registry.cli.commands

import java.io.IOException
import java.nio.file.Path
import javax.inject.Singleton
import mu.KotlinLogging
import org.factcast.schema.registry.cli.fs.FileSystemService
import org.factcast.schema.registry.cli.project.ProjectService
import org.factcast.schema.registry.cli.registry.DistributionCreatorService
import org.factcast.schema.registry.cli.validation.ValidationService
import org.factcast.schema.registry.cli.validation.formatErrors
import java.io.IOException
import java.nio.file.Path
import javax.inject.Singleton

private val logger = KotlinLogging.logger {}

Expand Down Expand Up @@ -94,4 +94,4 @@ class CommandServiceImpl(

1
}
}
}
Expand Up @@ -15,11 +15,11 @@
*/
package org.factcast.schema.registry.cli.commands

import picocli.CommandLine.Command
import picocli.CommandLine.Option
import java.nio.file.Paths
import javax.inject.Inject
import kotlin.system.exitProcess
import picocli.CommandLine.Command
import picocli.CommandLine.Option

@Command(
name = "validate",
Expand All @@ -40,4 +40,4 @@ class Validate : Runnable {

exitProcess(exitCode)
}
}
}
Expand Up @@ -23,4 +23,4 @@ import io.micronaut.context.annotation.Factory
class JsonSchemaFactoryConfiguration {
@Bean
fun factory() = JsonSchemaFactory.byDefault()
}
}
Expand Up @@ -22,4 +22,4 @@ data class Event(
val descriptionPath: Path,
val versions: List<Version>,
val transformations: List<Transformation>
)
)
Expand Up @@ -17,4 +17,4 @@ package org.factcast.schema.registry.cli.domain

import java.nio.file.Path

class Namespace(val name: String, val descriptionPath: Path, val events: List<Event>)
class Namespace(val name: String, val descriptionPath: Path, val events: List<Event>)
Expand Up @@ -17,4 +17,4 @@ package org.factcast.schema.registry.cli.domain

import java.nio.file.Path

data class Project(val description: Path?, val namespaces: List<Namespace>)
data class Project(val description: Path?, val namespaces: List<Namespace>)
Expand Up @@ -16,7 +16,6 @@
package org.factcast.schema.registry.cli.fs

import com.github.fge.jackson.JsonLoader
import org.apache.commons.io.FileUtils
import java.io.File
import java.io.IOException
import java.net.JarURLConnection
Expand All @@ -26,6 +25,7 @@ import java.nio.file.Files
import java.nio.file.Path
import javax.inject.Singleton
import kotlin.streams.toList
import org.apache.commons.io.FileUtils

@Singleton
class FileSystemServiceImpl : FileSystemService {
Expand Down Expand Up @@ -105,4 +105,4 @@ class FileSystemServiceImpl : FileSystemService {
}
}
}
}
}
Expand Up @@ -15,11 +15,11 @@
*/
package org.factcast.schema.registry.cli.js

import org.factcast.schema.registry.cli.fs.FileSystemService
import java.nio.file.Path
import javax.inject.Singleton
import javax.script.Invocable
import javax.script.ScriptEngineManager
import org.factcast.schema.registry.cli.fs.FileSystemService

@Singleton
class JsFunctionNashornExecutor(
Expand All @@ -39,4 +39,4 @@ class JsFunctionNashornExecutor(

return data
}
}
}
Expand Up @@ -15,9 +15,9 @@
*/
package org.factcast.schema.registry.cli.project

import org.factcast.schema.registry.cli.project.structure.ProjectFolder
import java.nio.file.Path
import org.factcast.schema.registry.cli.project.structure.ProjectFolder

interface ProjectService {
fun detectProject(basePath: Path): ProjectFolder
}
}
Expand Up @@ -16,16 +16,16 @@
package org.factcast.schema.registry.cli.project.impl

import com.google.common.annotations.VisibleForTesting
import java.nio.file.NoSuchFileException
import java.nio.file.Path
import javax.inject.Singleton
import org.factcast.schema.registry.cli.fs.FileSystemService
import org.factcast.schema.registry.cli.project.ProjectService
import org.factcast.schema.registry.cli.project.structure.EventFolder
import org.factcast.schema.registry.cli.project.structure.EventVersionFolder
import org.factcast.schema.registry.cli.project.structure.NamespaceFolder
import org.factcast.schema.registry.cli.project.structure.ProjectFolder
import org.factcast.schema.registry.cli.project.structure.TransformationFolder
import java.nio.file.NoSuchFileException
import java.nio.file.Path
import javax.inject.Singleton

const val VERSIONS_FOLDER = "versions"
const val TRANSFORMATIONS_FOLDER = "transformations"
Expand Down Expand Up @@ -134,4 +134,4 @@ class ProjectServiceImpl(private val fileSystem: FileSystemService) :
null
}
}
}
}
Expand Up @@ -16,13 +16,13 @@
package org.factcast.schema.registry.cli.project.structure

import io.micronaut.core.annotation.Introspected
import org.factcast.schema.registry.cli.domain.Event
import org.factcast.schema.registry.cli.validation.NO_DESCRIPTION
import org.factcast.schema.registry.cli.validation.NO_EVENT_VERSIONS
import java.nio.file.Path
import javax.validation.Valid
import javax.validation.constraints.NotEmpty
import javax.validation.constraints.NotNull
import org.factcast.schema.registry.cli.domain.Event
import org.factcast.schema.registry.cli.validation.NO_DESCRIPTION
import org.factcast.schema.registry.cli.validation.NO_EVENT_VERSIONS

@Introspected
data class EventFolder(
Expand All @@ -48,4 +48,4 @@ fun EventFolder.toEvent(): Event = Event(
description!!,
versionFolders.map(EventVersionFolder::toEventVersion),
transformationFolders.map(TransformationFolder::toTransformation)
)
)
Expand Up @@ -16,15 +16,15 @@
package org.factcast.schema.registry.cli.project.structure

import io.micronaut.core.annotation.Introspected
import java.nio.file.Path
import javax.validation.constraints.NotEmpty
import javax.validation.constraints.NotNull
import org.factcast.schema.registry.cli.domain.Example
import org.factcast.schema.registry.cli.domain.Version
import org.factcast.schema.registry.cli.validation.NO_DESCRIPTION
import org.factcast.schema.registry.cli.validation.NO_EXAMPLES
import org.factcast.schema.registry.cli.validation.NO_SCHEMA
import org.factcast.schema.registry.cli.validation.validators.ValidVersionFolder
import java.nio.file.Path
import javax.validation.constraints.NotEmpty
import javax.validation.constraints.NotNull

@Introspected
data class EventVersionFolder(
Expand Down Expand Up @@ -52,4 +52,4 @@ fun EventVersionFolder.toEventVersion() =
description!!,
examples.map { example ->
Example(example.fileName.toString(), example)
})
})
Expand Up @@ -21,4 +21,4 @@ import java.nio.file.Path
@Introspected
interface Folder {
val path: Path
}
}
Expand Up @@ -16,13 +16,13 @@
package org.factcast.schema.registry.cli.project.structure

import io.micronaut.core.annotation.Introspected
import org.factcast.schema.registry.cli.domain.Namespace
import org.factcast.schema.registry.cli.validation.NO_DESCRIPTION
import org.factcast.schema.registry.cli.validation.NO_EVENTS
import java.nio.file.Path
import javax.validation.Valid
import javax.validation.constraints.NotEmpty
import javax.validation.constraints.NotNull
import org.factcast.schema.registry.cli.domain.Namespace
import org.factcast.schema.registry.cli.validation.NO_DESCRIPTION
import org.factcast.schema.registry.cli.validation.NO_EVENTS

@Introspected
data class NamespaceFolder(
Expand Down
Expand Up @@ -16,13 +16,13 @@
package org.factcast.schema.registry.cli.project.structure

import io.micronaut.core.annotation.Introspected
import org.factcast.schema.registry.cli.domain.Project
import org.factcast.schema.registry.cli.validation.NO_DESCRIPTION
import org.factcast.schema.registry.cli.validation.NO_NAMESPACES
import java.nio.file.Path
import javax.validation.Valid
import javax.validation.constraints.NotEmpty
import javax.validation.constraints.NotNull
import org.factcast.schema.registry.cli.domain.Project
import org.factcast.schema.registry.cli.validation.NO_DESCRIPTION
import org.factcast.schema.registry.cli.validation.NO_NAMESPACES

@Introspected
data class ProjectFolder(
Expand All @@ -43,4 +43,4 @@ data class ProjectFolder(
fun ProjectFolder.toProject() =
Project(
description, namespaces.map(NamespaceFolder::toNamespace)
)
)
Expand Up @@ -16,11 +16,11 @@
package org.factcast.schema.registry.cli.project.structure

import io.micronaut.core.annotation.Introspected
import java.nio.file.Path
import javax.validation.constraints.NotNull
import org.factcast.schema.registry.cli.domain.Transformation
import org.factcast.schema.registry.cli.validation.NO_TRANSFORMATION_FILE
import org.factcast.schema.registry.cli.validation.validators.ValidTransformationFolder
import java.nio.file.Path
import javax.validation.constraints.NotNull

@Introspected
data class TransformationFolder(
Expand Down
Expand Up @@ -15,9 +15,9 @@
*/
package org.factcast.schema.registry.cli.registry

import org.factcast.schema.registry.cli.domain.Project
import java.nio.file.Path
import org.factcast.schema.registry.cli.domain.Project

interface DistributionCreatorService {
fun createDistributable(outputPath: Path, project: Project)
}
}
Expand Up @@ -15,9 +15,9 @@
*/
package org.factcast.schema.registry.cli.registry

import org.factcast.schema.registry.cli.domain.Project
import java.nio.file.Path
import org.factcast.schema.registry.cli.domain.Project

interface FactcastIndexCreator {
fun createFactcastIndex(contentBase: Path, project: Project)
}
}
Expand Up @@ -20,4 +20,4 @@ import org.factcast.schema.registry.cli.registry.index.Index

interface IndexFileCalculator {
fun calculateIndex(project: Project): Index
}
}
Expand Up @@ -15,9 +15,9 @@
*/
package org.factcast.schema.registry.cli.registry

import org.factcast.schema.registry.cli.domain.Project
import java.nio.file.Path
import org.factcast.schema.registry.cli.domain.Project

interface StaticPageCreator {
fun createPage(outputPath: Path, project: Project)
}
}
Expand Up @@ -26,4 +26,4 @@ interface TemplateService {
fun loadEventTemplate(namespace: Namespace, event: Event): String
fun loadVersionTemplate(namespace: Namespace, event: Event, version: Version): String
fun loadTransformationsTemplate(namespace: Namespace, event: Event): String
}
}
Expand Up @@ -15,13 +15,13 @@
*/
package org.factcast.schema.registry.cli.registry.impl

import java.nio.file.Path
import java.nio.file.Paths
import javax.inject.Singleton
import org.factcast.schema.registry.cli.domain.Project
import org.factcast.schema.registry.cli.registry.DistributionCreatorService
import org.factcast.schema.registry.cli.registry.FactcastIndexCreator
import org.factcast.schema.registry.cli.registry.StaticPageCreator
import java.nio.file.Path
import java.nio.file.Paths
import javax.inject.Singleton

@Singleton
class DistributionCreatorServiceImpl(
Expand All @@ -34,4 +34,4 @@ class DistributionCreatorServiceImpl(
val indexPath = outputPath.resolve(Paths.get("static", "registry"))
factcastIndexCreator.createFactcastIndex(indexPath, project)
}
}
}

0 comments on commit 9d227b0

Please sign in to comment.