From d5fae877979b2e5afb476cf3603f0be32c0bde66 Mon Sep 17 00:00:00 2001 From: darwincereska Date: Thu, 13 Nov 2025 16:42:06 -0500 Subject: [PATCH] refactor(org-change): changed io.notevc to org.notevc --- build.gradle.kts | 12 ++++++------ src/main/kotlin/io/notevc/cli/CommandParser.kt | 1 - src/main/kotlin/io/notevc/cli/OutputFormatter.kt | 1 - src/main/kotlin/io/notevc/core/NoteSnapshot.kt | 1 - src/main/kotlin/io/notevc/core/Timeline.kt | 1 - src/main/kotlin/io/notevc/storage/FileStorage.kt | 1 - src/main/kotlin/io/notevc/storage/MetadataStorage.kt | 1 - src/main/kotlin/io/notevc/utils/TimeUtils.kt | 1 - src/main/kotlin/{io => org}/notevc/NoteVC.kt | 9 +++++---- src/main/kotlin/org/notevc/cli/CommandParser.kt | 1 + src/main/kotlin/org/notevc/cli/OutputFormatter.kt | 1 + .../{io => org}/notevc/commands/CommitCommand.kt | 10 +++++----- .../{io => org}/notevc/commands/DiffCommand.kt | 10 +++++----- .../{io => org}/notevc/commands/InitCommand.kt | 6 +++--- .../kotlin/{io => org}/notevc/commands/LogCommand.kt | 6 +++--- .../{io => org}/notevc/commands/RestoreCommand.kt | 6 +++--- .../{io => org}/notevc/commands/ShowCommand.kt | 6 +++--- .../{io => org}/notevc/commands/StatusCommand.kt | 10 +++++----- .../kotlin/{io => org}/notevc/core/BlockParser.kt | 4 ++-- .../kotlin/{io => org}/notevc/core/BlockStore.kt | 4 ++-- src/main/kotlin/org/notevc/core/NoteSnapshot.kt | 1 + .../kotlin/{io => org}/notevc/core/ObjectStore.kt | 4 ++-- .../kotlin/{io => org}/notevc/core/Repository.kt | 4 ++-- src/main/kotlin/org/notevc/core/Timeline.kt | 1 + src/main/kotlin/org/notevc/storage/FileStorage.kt | 1 + .../kotlin/org/notevc/storage/MetadataStorage.kt | 1 + .../kotlin/{io => org}/notevc/utils/ColorUtils.kt | 2 +- .../kotlin/{io => org}/notevc/utils/FileUtils.kt | 4 ++-- .../kotlin/{io => org}/notevc/utils/HashUtils.kt | 2 +- src/main/kotlin/org/notevc/utils/TimeUtils.kt | 1 + 30 files changed, 57 insertions(+), 56 deletions(-) delete mode 100644 src/main/kotlin/io/notevc/cli/CommandParser.kt delete mode 100644 src/main/kotlin/io/notevc/cli/OutputFormatter.kt delete mode 100644 src/main/kotlin/io/notevc/core/NoteSnapshot.kt delete mode 100644 src/main/kotlin/io/notevc/core/Timeline.kt delete mode 100644 src/main/kotlin/io/notevc/storage/FileStorage.kt delete mode 100644 src/main/kotlin/io/notevc/storage/MetadataStorage.kt delete mode 100644 src/main/kotlin/io/notevc/utils/TimeUtils.kt rename src/main/kotlin/{io => org}/notevc/NoteVC.kt (94%) create mode 100644 src/main/kotlin/org/notevc/cli/CommandParser.kt create mode 100644 src/main/kotlin/org/notevc/cli/OutputFormatter.kt rename src/main/kotlin/{io => org}/notevc/commands/CommitCommand.kt (98%) rename src/main/kotlin/{io => org}/notevc/commands/DiffCommand.kt (98%) rename src/main/kotlin/{io => org}/notevc/commands/InitCommand.kt (89%) rename src/main/kotlin/{io => org}/notevc/commands/LogCommand.kt (99%) rename src/main/kotlin/{io => org}/notevc/commands/RestoreCommand.kt (99%) rename src/main/kotlin/{io => org}/notevc/commands/ShowCommand.kt (99%) rename src/main/kotlin/{io => org}/notevc/commands/StatusCommand.kt (97%) rename src/main/kotlin/{io => org}/notevc/core/BlockParser.kt (98%) rename src/main/kotlin/{io => org}/notevc/core/BlockStore.kt (99%) create mode 100644 src/main/kotlin/org/notevc/core/NoteSnapshot.kt rename src/main/kotlin/{io => org}/notevc/core/ObjectStore.kt (98%) rename src/main/kotlin/{io => org}/notevc/core/Repository.kt (98%) create mode 100644 src/main/kotlin/org/notevc/core/Timeline.kt create mode 100644 src/main/kotlin/org/notevc/storage/FileStorage.kt create mode 100644 src/main/kotlin/org/notevc/storage/MetadataStorage.kt rename src/main/kotlin/{io => org}/notevc/utils/ColorUtils.kt (99%) rename src/main/kotlin/{io => org}/notevc/utils/FileUtils.kt (96%) rename src/main/kotlin/{io => org}/notevc/utils/HashUtils.kt (96%) create mode 100644 src/main/kotlin/org/notevc/utils/TimeUtils.kt diff --git a/build.gradle.kts b/build.gradle.kts index 5b145ed..b8b2fcb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,13 +9,13 @@ plugins { id("org.graalvm.buildtools.native") version "0.10.4" } -group = "io.notevc" -version = "1.0.4" +group = "org.notevc" +version = "1.0.5" buildConfig { buildConfigField("String", "VERSION", "\"${project.version}\"") buildConfigField("String", "BUILD_TIME", "\"${Instant.now()}\"") - packageName("io.notevc") + packageName("org.notevc") } repositories { @@ -32,13 +32,13 @@ dependencies { } application { - mainClass.set("io.notevc.NoteVCKt") + mainClass.set("org.notevc.NoteVCKt") } tasks.shadowJar { archiveClassifier.set("") manifest { - attributes(mapOf("Main-Class" to "io.notevc.NoteVCKt")) + attributes(mapOf("Main-Class" to "org.notevc.NoteVCKt")) } } @@ -46,7 +46,7 @@ graalvmNative { binaries { named("main") { imageName.set("notevc") - mainClass.set("io.notevc.NoteVCKt") + mainClass.set("org.notevc.NoteVCKt") buildArgs.addAll(listOf( "--no-fallback", diff --git a/src/main/kotlin/io/notevc/cli/CommandParser.kt b/src/main/kotlin/io/notevc/cli/CommandParser.kt deleted file mode 100644 index f6cf54d..0000000 --- a/src/main/kotlin/io/notevc/cli/CommandParser.kt +++ /dev/null @@ -1 +0,0 @@ -package io.notevc.cli diff --git a/src/main/kotlin/io/notevc/cli/OutputFormatter.kt b/src/main/kotlin/io/notevc/cli/OutputFormatter.kt deleted file mode 100644 index f6cf54d..0000000 --- a/src/main/kotlin/io/notevc/cli/OutputFormatter.kt +++ /dev/null @@ -1 +0,0 @@ -package io.notevc.cli diff --git a/src/main/kotlin/io/notevc/core/NoteSnapshot.kt b/src/main/kotlin/io/notevc/core/NoteSnapshot.kt deleted file mode 100644 index 06fd659..0000000 --- a/src/main/kotlin/io/notevc/core/NoteSnapshot.kt +++ /dev/null @@ -1 +0,0 @@ -package io.notevc.core diff --git a/src/main/kotlin/io/notevc/core/Timeline.kt b/src/main/kotlin/io/notevc/core/Timeline.kt deleted file mode 100644 index 06fd659..0000000 --- a/src/main/kotlin/io/notevc/core/Timeline.kt +++ /dev/null @@ -1 +0,0 @@ -package io.notevc.core diff --git a/src/main/kotlin/io/notevc/storage/FileStorage.kt b/src/main/kotlin/io/notevc/storage/FileStorage.kt deleted file mode 100644 index c8241f9..0000000 --- a/src/main/kotlin/io/notevc/storage/FileStorage.kt +++ /dev/null @@ -1 +0,0 @@ -package io.notevc.storage diff --git a/src/main/kotlin/io/notevc/storage/MetadataStorage.kt b/src/main/kotlin/io/notevc/storage/MetadataStorage.kt deleted file mode 100644 index c8241f9..0000000 --- a/src/main/kotlin/io/notevc/storage/MetadataStorage.kt +++ /dev/null @@ -1 +0,0 @@ -package io.notevc.storage diff --git a/src/main/kotlin/io/notevc/utils/TimeUtils.kt b/src/main/kotlin/io/notevc/utils/TimeUtils.kt deleted file mode 100644 index 5675552..0000000 --- a/src/main/kotlin/io/notevc/utils/TimeUtils.kt +++ /dev/null @@ -1 +0,0 @@ -package io.notevc.utils diff --git a/src/main/kotlin/io/notevc/NoteVC.kt b/src/main/kotlin/org/notevc/NoteVC.kt similarity index 94% rename from src/main/kotlin/io/notevc/NoteVC.kt rename to src/main/kotlin/org/notevc/NoteVC.kt index 8976392..1fb8fb8 100644 --- a/src/main/kotlin/io/notevc/NoteVC.kt +++ b/src/main/kotlin/org/notevc/NoteVC.kt @@ -1,8 +1,8 @@ -package io.notevc +package org.notevc -import io.notevc.core.Repository -import io.notevc.commands.* -import io.notevc.utils.ColorUtils +import org.notevc.core.Repository +import org.notevc.commands.* +import org.notevc.utils.ColorUtils fun main(args: Array) { // Parse global flags first (like --no-color) @@ -99,6 +99,7 @@ fun main(args: Array) { else -> { println("Usage: notevc [--no-color] init|commit|status|log|restore|diff|show|version") + println("For more info, visit: ${ColorUtils.bold("https://notevc.org")}") } } } diff --git a/src/main/kotlin/org/notevc/cli/CommandParser.kt b/src/main/kotlin/org/notevc/cli/CommandParser.kt new file mode 100644 index 0000000..243daff --- /dev/null +++ b/src/main/kotlin/org/notevc/cli/CommandParser.kt @@ -0,0 +1 @@ +package org.notevc.cli diff --git a/src/main/kotlin/org/notevc/cli/OutputFormatter.kt b/src/main/kotlin/org/notevc/cli/OutputFormatter.kt new file mode 100644 index 0000000..243daff --- /dev/null +++ b/src/main/kotlin/org/notevc/cli/OutputFormatter.kt @@ -0,0 +1 @@ +package org.notevc.cli diff --git a/src/main/kotlin/io/notevc/commands/CommitCommand.kt b/src/main/kotlin/org/notevc/commands/CommitCommand.kt similarity index 98% rename from src/main/kotlin/io/notevc/commands/CommitCommand.kt rename to src/main/kotlin/org/notevc/commands/CommitCommand.kt index d44a262..bab48be 100644 --- a/src/main/kotlin/io/notevc/commands/CommitCommand.kt +++ b/src/main/kotlin/org/notevc/commands/CommitCommand.kt @@ -1,13 +1,13 @@ -package io.notevc.commands +package org.notevc.commands -import io.notevc.core.* -import io.notevc.utils.FileUtils -import io.notevc.utils.HashUtils +import org.notevc.core.* +import org.notevc.utils.FileUtils +import org.notevc.utils.HashUtils import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import java.nio.file.Files import java.time.Instant -import io.notevc.utils.ColorUtils +import org.notevc.utils.ColorUtils import kotlin.io.path.* class CommitCommand { diff --git a/src/main/kotlin/io/notevc/commands/DiffCommand.kt b/src/main/kotlin/org/notevc/commands/DiffCommand.kt similarity index 98% rename from src/main/kotlin/io/notevc/commands/DiffCommand.kt rename to src/main/kotlin/org/notevc/commands/DiffCommand.kt index e809911..6760632 100644 --- a/src/main/kotlin/io/notevc/commands/DiffCommand.kt +++ b/src/main/kotlin/org/notevc/commands/DiffCommand.kt @@ -1,7 +1,7 @@ -package io.notevc.commands +package org.notevc.commands -import io.notevc.core.* -import io.notevc.utils.ColorUtils +import org.notevc.core.* +import org.notevc.utils.ColorUtils import kotlinx.serialization.json.Json import java.nio.file.Files import java.time.Instant @@ -245,7 +245,7 @@ class DiffCommand { } listOf(targetFile) } else { - io.notevc.utils.FileUtils.findMarkdownFiles(repo.path).map { + org.notevc.utils.FileUtils.findMarkdownFiles(repo.path).map { repo.path.relativize(it).toString() } } @@ -302,7 +302,7 @@ class DiffCommand { } listOf(targetFile) } else { - io.notevc.utils.FileUtils.findMarkdownFiles(repo.path).map { + org.notevc.utils.FileUtils.findMarkdownFiles(repo.path).map { repo.path.relativize(it).toString() } } diff --git a/src/main/kotlin/io/notevc/commands/InitCommand.kt b/src/main/kotlin/org/notevc/commands/InitCommand.kt similarity index 89% rename from src/main/kotlin/io/notevc/commands/InitCommand.kt rename to src/main/kotlin/org/notevc/commands/InitCommand.kt index c5cde77..2af2037 100644 --- a/src/main/kotlin/io/notevc/commands/InitCommand.kt +++ b/src/main/kotlin/org/notevc/commands/InitCommand.kt @@ -1,8 +1,8 @@ -package io.notevc.commands +package org.notevc.commands -import io.notevc.core.Repository +import org.notevc.core.Repository import java.nio.file.Path -import io.notevc.utils.ColorUtils +import org.notevc.utils.ColorUtils class InitCommand { fun execute(path: String?): Result { diff --git a/src/main/kotlin/io/notevc/commands/LogCommand.kt b/src/main/kotlin/org/notevc/commands/LogCommand.kt similarity index 99% rename from src/main/kotlin/io/notevc/commands/LogCommand.kt rename to src/main/kotlin/org/notevc/commands/LogCommand.kt index ee8b400..11cc6e9 100644 --- a/src/main/kotlin/io/notevc/commands/LogCommand.kt +++ b/src/main/kotlin/org/notevc/commands/LogCommand.kt @@ -1,10 +1,10 @@ -package io.notevc.commands +package org.notevc.commands -import io.notevc.core.* +import org.notevc.core.* import kotlinx.serialization.json.Json import java.nio.file.Files import java.time.Instant -import io.notevc.utils.ColorUtils +import org.notevc.utils.ColorUtils import java.time.ZoneId import java.time.format.DateTimeFormatter import kotlin.io.path.* diff --git a/src/main/kotlin/io/notevc/commands/RestoreCommand.kt b/src/main/kotlin/org/notevc/commands/RestoreCommand.kt similarity index 99% rename from src/main/kotlin/io/notevc/commands/RestoreCommand.kt rename to src/main/kotlin/org/notevc/commands/RestoreCommand.kt index 8a23d84..84c55a4 100644 --- a/src/main/kotlin/io/notevc/commands/RestoreCommand.kt +++ b/src/main/kotlin/org/notevc/commands/RestoreCommand.kt @@ -1,7 +1,7 @@ -package io.notevc.commands +package org.notevc.commands -import io.notevc.core.* -import io.notevc.utils.ColorUtils +import org.notevc.core.* +import org.notevc.utils.ColorUtils import kotlinx.serialization.json.Json import java.nio.file.Files import java.time.Instant diff --git a/src/main/kotlin/io/notevc/commands/ShowCommand.kt b/src/main/kotlin/org/notevc/commands/ShowCommand.kt similarity index 99% rename from src/main/kotlin/io/notevc/commands/ShowCommand.kt rename to src/main/kotlin/org/notevc/commands/ShowCommand.kt index e199f88..77affa0 100644 --- a/src/main/kotlin/io/notevc/commands/ShowCommand.kt +++ b/src/main/kotlin/org/notevc/commands/ShowCommand.kt @@ -1,7 +1,7 @@ -package io.notevc.commands +package org.notevc.commands -import io.notevc.core.* -import io.notevc.utils.ColorUtils +import org.notevc.core.* +import org.notevc.utils.ColorUtils import kotlinx.serialization.json.Json import java.nio.file.Files import java.time.Instant diff --git a/src/main/kotlin/io/notevc/commands/StatusCommand.kt b/src/main/kotlin/org/notevc/commands/StatusCommand.kt similarity index 97% rename from src/main/kotlin/io/notevc/commands/StatusCommand.kt rename to src/main/kotlin/org/notevc/commands/StatusCommand.kt index 53e2538..efb1fcf 100644 --- a/src/main/kotlin/io/notevc/commands/StatusCommand.kt +++ b/src/main/kotlin/org/notevc/commands/StatusCommand.kt @@ -1,9 +1,9 @@ -package io.notevc.commands +package org.notevc.commands -import io.notevc.core.* -import io.notevc.utils.FileUtils -import io.notevc.utils.ColorUtils -import io.notevc.core.Repository.Companion.NOTEVC_DIR +import org.notevc.core.* +import org.notevc.utils.FileUtils +import org.notevc.utils.ColorUtils +import org.notevc.core.Repository.Companion.NOTEVC_DIR import java.time.Instant class StatusCommand { diff --git a/src/main/kotlin/io/notevc/core/BlockParser.kt b/src/main/kotlin/org/notevc/core/BlockParser.kt similarity index 98% rename from src/main/kotlin/io/notevc/core/BlockParser.kt rename to src/main/kotlin/org/notevc/core/BlockParser.kt index 9a32188..58e11af 100644 --- a/src/main/kotlin/io/notevc/core/BlockParser.kt +++ b/src/main/kotlin/org/notevc/core/BlockParser.kt @@ -1,4 +1,4 @@ -package io.notevc.core +package org.notevc.core import kotlinx.serialization.Serializable @@ -123,7 +123,7 @@ class BlockParser { private fun generateBlockId(filePath: String, heading: String, order: Int): String { val cleanHeading = heading.replace(Regex("^#+\\s*"), "").trim() val baseId = "$filePath:$cleanHeading:$order" - return io.notevc.utils.HashUtils.sha256(baseId).take(12) + return org.notevc.utils.HashUtils.sha256(baseId).take(12) } // Reconstruct file from blocks diff --git a/src/main/kotlin/io/notevc/core/BlockStore.kt b/src/main/kotlin/org/notevc/core/BlockStore.kt similarity index 99% rename from src/main/kotlin/io/notevc/core/BlockStore.kt rename to src/main/kotlin/org/notevc/core/BlockStore.kt index 98b5ed9..35ce794 100644 --- a/src/main/kotlin/io/notevc/core/BlockStore.kt +++ b/src/main/kotlin/org/notevc/core/BlockStore.kt @@ -1,6 +1,6 @@ -package io.notevc.core +package org.notevc.core -import io.notevc.utils.HashUtils +import org.notevc.utils.HashUtils import kotlinx.serialization.Serializable import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json diff --git a/src/main/kotlin/org/notevc/core/NoteSnapshot.kt b/src/main/kotlin/org/notevc/core/NoteSnapshot.kt new file mode 100644 index 0000000..ce2eace --- /dev/null +++ b/src/main/kotlin/org/notevc/core/NoteSnapshot.kt @@ -0,0 +1 @@ +package org.notevc.core diff --git a/src/main/kotlin/io/notevc/core/ObjectStore.kt b/src/main/kotlin/org/notevc/core/ObjectStore.kt similarity index 98% rename from src/main/kotlin/io/notevc/core/ObjectStore.kt rename to src/main/kotlin/org/notevc/core/ObjectStore.kt index dc64675..e28f4ea 100644 --- a/src/main/kotlin/io/notevc/core/ObjectStore.kt +++ b/src/main/kotlin/org/notevc/core/ObjectStore.kt @@ -1,7 +1,7 @@ -package io.notevc.core +package org.notevc.core import java.nio.file.Files -import io.notevc.utils.HashUtils +import org.notevc.utils.HashUtils import java.nio.file.Path import java.io.ByteArrayOutputStream import java.util.zip.GZIPOutputStream diff --git a/src/main/kotlin/io/notevc/core/Repository.kt b/src/main/kotlin/org/notevc/core/Repository.kt similarity index 98% rename from src/main/kotlin/io/notevc/core/Repository.kt rename to src/main/kotlin/org/notevc/core/Repository.kt index 14fed74..b121fe2 100644 --- a/src/main/kotlin/io/notevc/core/Repository.kt +++ b/src/main/kotlin/org/notevc/core/Repository.kt @@ -1,9 +1,9 @@ -package io.notevc.core +package org.notevc.core import java.nio.file.Path import java.nio.file.Paths import kotlin.io.path.* -import io.notevc.BuildConfig +import org.notevc.BuildConfig import kotlinx.serialization.* import kotlinx.serialization.json.Json import kotlinx.serialization.encodeToString diff --git a/src/main/kotlin/org/notevc/core/Timeline.kt b/src/main/kotlin/org/notevc/core/Timeline.kt new file mode 100644 index 0000000..ce2eace --- /dev/null +++ b/src/main/kotlin/org/notevc/core/Timeline.kt @@ -0,0 +1 @@ +package org.notevc.core diff --git a/src/main/kotlin/org/notevc/storage/FileStorage.kt b/src/main/kotlin/org/notevc/storage/FileStorage.kt new file mode 100644 index 0000000..a56cb86 --- /dev/null +++ b/src/main/kotlin/org/notevc/storage/FileStorage.kt @@ -0,0 +1 @@ +package org.notevc.storage diff --git a/src/main/kotlin/org/notevc/storage/MetadataStorage.kt b/src/main/kotlin/org/notevc/storage/MetadataStorage.kt new file mode 100644 index 0000000..a56cb86 --- /dev/null +++ b/src/main/kotlin/org/notevc/storage/MetadataStorage.kt @@ -0,0 +1 @@ +package org.notevc.storage diff --git a/src/main/kotlin/io/notevc/utils/ColorUtils.kt b/src/main/kotlin/org/notevc/utils/ColorUtils.kt similarity index 99% rename from src/main/kotlin/io/notevc/utils/ColorUtils.kt rename to src/main/kotlin/org/notevc/utils/ColorUtils.kt index 0a5e883..2bb4434 100644 --- a/src/main/kotlin/io/notevc/utils/ColorUtils.kt +++ b/src/main/kotlin/org/notevc/utils/ColorUtils.kt @@ -1,4 +1,4 @@ -package io.notevc.utils +package org.notevc.utils object ColorUtils { // ANSI color codes diff --git a/src/main/kotlin/io/notevc/utils/FileUtils.kt b/src/main/kotlin/org/notevc/utils/FileUtils.kt similarity index 96% rename from src/main/kotlin/io/notevc/utils/FileUtils.kt rename to src/main/kotlin/org/notevc/utils/FileUtils.kt index 50ff311..390e6e9 100644 --- a/src/main/kotlin/io/notevc/utils/FileUtils.kt +++ b/src/main/kotlin/org/notevc/utils/FileUtils.kt @@ -1,10 +1,10 @@ -package io.notevc.utils +package org.notevc.utils import java.nio.file.Files import java.nio.file.Path import java.time.Instant import kotlin.io.path.* -import io.notevc.core.Repository.Companion.NOTEVC_DIR +import org.notevc.core.Repository.Companion.NOTEVC_DIR object FileUtils { // Find all markdown files in directory (recursively) diff --git a/src/main/kotlin/io/notevc/utils/HashUtils.kt b/src/main/kotlin/org/notevc/utils/HashUtils.kt similarity index 96% rename from src/main/kotlin/io/notevc/utils/HashUtils.kt rename to src/main/kotlin/org/notevc/utils/HashUtils.kt index b3f8304..53f4c19 100644 --- a/src/main/kotlin/io/notevc/utils/HashUtils.kt +++ b/src/main/kotlin/org/notevc/utils/HashUtils.kt @@ -1,4 +1,4 @@ -package io.notevc.utils +package org.notevc.utils import java.security.MessageDigest diff --git a/src/main/kotlin/org/notevc/utils/TimeUtils.kt b/src/main/kotlin/org/notevc/utils/TimeUtils.kt new file mode 100644 index 0000000..25b4ea9 --- /dev/null +++ b/src/main/kotlin/org/notevc/utils/TimeUtils.kt @@ -0,0 +1 @@ +package org.notevc.utils