diff --git a/internal/cmd/beta/run_cmd.go b/internal/cmd/beta/run_cmd.go index 0cea98ec3..51a2d3d86 100644 --- a/internal/cmd/beta/run_cmd.go +++ b/internal/cmd/beta/run_cmd.go @@ -9,8 +9,8 @@ import ( "github.com/stateful/runme/v3/internal/command" "github.com/stateful/runme/v3/internal/config/autoconfig" - "github.com/stateful/runme/v3/internal/document" "github.com/stateful/runme/v3/internal/project" + "github.com/stateful/runme/v3/pkg/document" ) func runCmd(*commonFlags) *cobra.Command { diff --git a/internal/cmd/common.go b/internal/cmd/common.go index 0be65ef3a..6839a8573 100644 --- a/internal/cmd/common.go +++ b/internal/cmd/common.go @@ -16,13 +16,13 @@ import ( "github.com/spf13/cobra" "go.uber.org/zap" - "github.com/stateful/runme/v3/internal/document" - "github.com/stateful/runme/v3/internal/document/identity" "github.com/stateful/runme/v3/internal/project" "github.com/stateful/runme/v3/internal/runner/client" "github.com/stateful/runme/v3/internal/tui" "github.com/stateful/runme/v3/internal/tui/prompt" runnerv1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/runner/v1" + "github.com/stateful/runme/v3/pkg/document" + "github.com/stateful/runme/v3/pkg/document/identity" ) const envStackDepth = "__RUNME_STACK_DEPTH" diff --git a/internal/cmd/fmt.go b/internal/cmd/fmt.go index d28286fe3..2a903b1fa 100644 --- a/internal/cmd/fmt.go +++ b/internal/cmd/fmt.go @@ -13,10 +13,10 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/stateful/runme/v3/internal/document" - "github.com/stateful/runme/v3/internal/document/editor" - "github.com/stateful/runme/v3/internal/document/identity" "github.com/stateful/runme/v3/internal/renderer/cmark" + "github.com/stateful/runme/v3/pkg/document" + "github.com/stateful/runme/v3/pkg/document/editor" + "github.com/stateful/runme/v3/pkg/document/identity" ) func fmtCmd() *cobra.Command { diff --git a/internal/cmd/server.go b/internal/cmd/server.go index de32db255..f6cd8c2a8 100644 --- a/internal/cmd/server.go +++ b/internal/cmd/server.go @@ -15,7 +15,6 @@ import ( "github.com/stateful/runme/v3/internal/command" "github.com/stateful/runme/v3/internal/config" - "github.com/stateful/runme/v3/internal/document/editor/editorservice" "github.com/stateful/runme/v3/internal/project/projectservice" "github.com/stateful/runme/v3/internal/runner" runnerv2service "github.com/stateful/runme/v3/internal/runnerv2service" @@ -24,6 +23,7 @@ import ( projectv1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/project/v1" runnerv1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/runner/v1" runnerv2alpha1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/runner/v2alpha1" + "github.com/stateful/runme/v3/pkg/document/editor/editorservice" ) func serverCmd() *cobra.Command { diff --git a/internal/command/command_unix_test.go b/internal/command/command_unix_test.go index 3bb96cfb9..3d4555028 100644 --- a/internal/command/command_unix_test.go +++ b/internal/command/command_unix_test.go @@ -14,9 +14,9 @@ import ( "go.uber.org/zap/zaptest" "github.com/stateful/runme/v3/internal/config" - "github.com/stateful/runme/v3/internal/document" - "github.com/stateful/runme/v3/internal/document/identity" runnerv2alpha1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/runner/v2alpha1" + "github.com/stateful/runme/v3/pkg/document" + "github.com/stateful/runme/v3/pkg/document/identity" ) func init() { diff --git a/internal/command/config_code_block.go b/internal/command/config_code_block.go index 0c8e3934e..0aa2acf9d 100644 --- a/internal/command/config_code_block.go +++ b/internal/command/config_code_block.go @@ -5,8 +5,8 @@ import ( "path/filepath" "strings" - "github.com/stateful/runme/v3/internal/document" runnerv2alpha1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/runner/v2alpha1" + "github.com/stateful/runme/v3/pkg/document" ) func NewProgramConfigFromCodeBlock(block *document.CodeBlock) (*ProgramConfig, error) { diff --git a/internal/project/project.go b/internal/project/project.go index 5fbc7335d..d931f4ce6 100644 --- a/internal/project/project.go +++ b/internal/project/project.go @@ -16,8 +16,8 @@ import ( "github.com/stateful/godotenv" "go.uber.org/zap" - "github.com/stateful/runme/v3/internal/document" - "github.com/stateful/runme/v3/internal/document/identity" + "github.com/stateful/runme/v3/pkg/document" + "github.com/stateful/runme/v3/pkg/document/identity" ) type LoadEventType uint8 diff --git a/internal/project/task.go b/internal/project/task.go index b47aa08e7..a9e093809 100644 --- a/internal/project/task.go +++ b/internal/project/task.go @@ -6,7 +6,7 @@ import ( "github.com/pkg/errors" - "github.com/stateful/runme/v3/internal/document" + "github.com/stateful/runme/v3/pkg/document" ) // Task is struct representing a [document.CodeBlock] within the context of a project. diff --git a/internal/renderer/cmark/cmark.go b/internal/renderer/cmark/cmark.go index c93b8551b..3b55702b7 100644 --- a/internal/renderer/cmark/cmark.go +++ b/internal/renderer/cmark/cmark.go @@ -9,7 +9,7 @@ import ( "github.com/pkg/errors" "github.com/yuin/goldmark/ast" - "github.com/stateful/runme/v3/internal/document/constants" + "github.com/stateful/runme/v3/pkg/document/constants" ) type NodeSourceProvider func(ast.Node) ([]byte, bool) diff --git a/internal/runner/client/client.go b/internal/runner/client/client.go index 1ddc40b84..8389faed7 100644 --- a/internal/runner/client/client.go +++ b/internal/runner/client/client.go @@ -10,10 +10,10 @@ import ( "github.com/go-git/go-billy/v5/osfs" "github.com/muesli/cancelreader" "github.com/pkg/errors" - "github.com/stateful/runme/v3/internal/document" "github.com/stateful/runme/v3/internal/project" "github.com/stateful/runme/v3/internal/runner" runnerv1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/runner/v1" + "github.com/stateful/runme/v3/pkg/document" "go.uber.org/zap" ) diff --git a/internal/runner/client/client_local.go b/internal/runner/client/client_local.go index 791f8662e..30dc5a368 100644 --- a/internal/runner/client/client_local.go +++ b/internal/runner/client/client_local.go @@ -11,11 +11,11 @@ import ( "github.com/muesli/cancelreader" "github.com/pkg/errors" - "github.com/stateful/runme/v3/internal/document" "github.com/stateful/runme/v3/internal/project" "github.com/stateful/runme/v3/internal/runner" "github.com/stateful/runme/v3/internal/system" runnerv1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/runner/v1" + "github.com/stateful/runme/v3/pkg/document" "go.uber.org/zap" ) diff --git a/internal/runner/shell.go b/internal/runner/shell.go index 85061ffbc..334895761 100644 --- a/internal/runner/shell.go +++ b/internal/runner/shell.go @@ -15,8 +15,8 @@ import ( "github.com/pkg/errors" - "github.com/stateful/runme/v3/internal/document" "github.com/stateful/runme/v3/internal/system" + "github.com/stateful/runme/v3/pkg/document" ) type Shell struct { diff --git a/internal/server/server.go b/internal/server/server.go index ea9bc10ce..eba5dbaa4 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -14,13 +14,13 @@ import ( "google.golang.org/grpc/reflection" "github.com/stateful/runme/v3/internal/command" - "github.com/stateful/runme/v3/internal/document/editor/editorservice" "github.com/stateful/runme/v3/internal/project/projectservice" "github.com/stateful/runme/v3/internal/runnerv2service" runmetls "github.com/stateful/runme/v3/internal/tls" parserv1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/parser/v1" projectv1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/project/v1" runnerv2alpha1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/runner/v2alpha1" + "github.com/stateful/runme/v3/pkg/document/editor/editorservice" ) const ( diff --git a/internal/document/attributes.go b/pkg/document/attributes.go similarity index 100% rename from internal/document/attributes.go rename to pkg/document/attributes.go diff --git a/internal/document/attributes_test.go b/pkg/document/attributes_test.go similarity index 100% rename from internal/document/attributes_test.go rename to pkg/document/attributes_test.go diff --git a/internal/document/block.go b/pkg/document/block.go similarity index 100% rename from internal/document/block.go rename to pkg/document/block.go diff --git a/internal/document/block_test.go b/pkg/document/block_test.go similarity index 100% rename from internal/document/block_test.go rename to pkg/document/block_test.go diff --git a/internal/document/constants/constants.go b/pkg/document/constants/constants.go similarity index 100% rename from internal/document/constants/constants.go rename to pkg/document/constants/constants.go diff --git a/internal/document/document.go b/pkg/document/document.go similarity index 98% rename from internal/document/document.go rename to pkg/document/document.go index d89c4b38a..7467f3e4b 100644 --- a/internal/document/document.go +++ b/pkg/document/document.go @@ -11,8 +11,8 @@ import ( "github.com/yuin/goldmark/parser" "github.com/yuin/goldmark/text" - "github.com/stateful/runme/v3/internal/document/constants" "github.com/stateful/runme/v3/internal/renderer/cmark" + "github.com/stateful/runme/v3/pkg/document/constants" ) var DefaultAttributeParser = newFailoverAttributeParser( diff --git a/internal/document/document_test.go b/pkg/document/document_test.go similarity index 99% rename from internal/document/document_test.go rename to pkg/document/document_test.go index 6e83c9c5e..7be3976e6 100644 --- a/internal/document/document_test.go +++ b/pkg/document/document_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/stateful/runme/v3/internal/document/identity" "github.com/stateful/runme/v3/internal/renderer/cmark" + "github.com/stateful/runme/v3/pkg/document/identity" ) var testIdentityResolver = identity.NewResolver(identity.DefaultLifecycleIdentity) diff --git a/internal/document/editor/cell.go b/pkg/document/editor/cell.go similarity index 99% rename from internal/document/editor/cell.go rename to pkg/document/editor/cell.go index bd469a277..6ac8cde7d 100644 --- a/internal/document/editor/cell.go +++ b/pkg/document/editor/cell.go @@ -14,8 +14,8 @@ import ( "github.com/yuin/goldmark/ast" - "github.com/stateful/runme/v3/internal/document" "github.com/stateful/runme/v3/internal/ulid" + "github.com/stateful/runme/v3/pkg/document" ) const ( diff --git a/internal/document/editor/cell_test.go b/pkg/document/editor/cell_test.go similarity index 99% rename from internal/document/editor/cell_test.go rename to pkg/document/editor/cell_test.go index 8d65aab3b..cc9951945 100644 --- a/internal/document/editor/cell_test.go +++ b/pkg/document/editor/cell_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/stateful/runme/v3/internal/document" + "github.com/stateful/runme/v3/pkg/document" ) var ( diff --git a/internal/document/editor/editor.go b/pkg/document/editor/editor.go similarity index 94% rename from internal/document/editor/editor.go rename to pkg/document/editor/editor.go index 8a1db29fa..a30a4d5b4 100644 --- a/internal/document/editor/editor.go +++ b/pkg/document/editor/editor.go @@ -7,9 +7,9 @@ import ( "github.com/pkg/errors" - "github.com/stateful/runme/v3/internal/document" - "github.com/stateful/runme/v3/internal/document/constants" - "github.com/stateful/runme/v3/internal/document/identity" + "github.com/stateful/runme/v3/pkg/document" + "github.com/stateful/runme/v3/pkg/document/constants" + "github.com/stateful/runme/v3/pkg/document/identity" ) const ( diff --git a/internal/document/editor/editor_test.go b/pkg/document/editor/editor_test.go similarity index 97% rename from internal/document/editor/editor_test.go rename to pkg/document/editor/editor_test.go index d853c12ea..de28ca435 100644 --- a/internal/document/editor/editor_test.go +++ b/pkg/document/editor/editor_test.go @@ -10,11 +10,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/stateful/runme/v3/internal/document" - "github.com/stateful/runme/v3/internal/document/constants" - "github.com/stateful/runme/v3/internal/document/identity" "github.com/stateful/runme/v3/internal/ulid" "github.com/stateful/runme/v3/internal/version" + "github.com/stateful/runme/v3/pkg/document" + "github.com/stateful/runme/v3/pkg/document/constants" + "github.com/stateful/runme/v3/pkg/document/identity" ) var ( diff --git a/internal/document/editor/editorservice/service.go b/pkg/document/editor/editorservice/service.go similarity index 97% rename from internal/document/editor/editorservice/service.go rename to pkg/document/editor/editorservice/service.go index bdecb3e66..7b6387a1c 100644 --- a/internal/document/editor/editorservice/service.go +++ b/pkg/document/editor/editorservice/service.go @@ -7,10 +7,10 @@ import ( "go.uber.org/zap" - "github.com/stateful/runme/v3/internal/document" - "github.com/stateful/runme/v3/internal/document/editor" - "github.com/stateful/runme/v3/internal/document/identity" parserv1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/parser/v1" + "github.com/stateful/runme/v3/pkg/document" + "github.com/stateful/runme/v3/pkg/document/editor" + "github.com/stateful/runme/v3/pkg/document/identity" ) type parserServiceServer struct { diff --git a/internal/document/editor/editorservice/service_test.go b/pkg/document/editor/editorservice/service_test.go similarity index 100% rename from internal/document/editor/editorservice/service_test.go rename to pkg/document/editor/editorservice/service_test.go diff --git a/internal/document/frontmatter.go b/pkg/document/frontmatter.go similarity index 100% rename from internal/document/frontmatter.go rename to pkg/document/frontmatter.go diff --git a/internal/document/identity.go b/pkg/document/identity.go similarity index 100% rename from internal/document/identity.go rename to pkg/document/identity.go diff --git a/internal/document/identity/resolver.go b/pkg/document/identity/resolver.go similarity index 100% rename from internal/document/identity/resolver.go rename to pkg/document/identity/resolver.go diff --git a/internal/document/identity/resolver_test.go b/pkg/document/identity/resolver_test.go similarity index 100% rename from internal/document/identity/resolver_test.go rename to pkg/document/identity/resolver_test.go diff --git a/internal/document/node.go b/pkg/document/node.go similarity index 100% rename from internal/document/node.go rename to pkg/document/node.go diff --git a/internal/document/node_test.go b/pkg/document/node_test.go similarity index 97% rename from internal/document/node_test.go rename to pkg/document/node_test.go index a1ad8e028..696e92e00 100644 --- a/internal/document/node_test.go +++ b/pkg/document/node_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/stateful/runme/v3/internal/document/identity" + "github.com/stateful/runme/v3/pkg/document/identity" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/internal/document/parser.go b/pkg/document/parser.go similarity index 100% rename from internal/document/parser.go rename to pkg/document/parser.go diff --git a/internal/document/parser_frontmatter.go b/pkg/document/parser_frontmatter.go similarity index 100% rename from internal/document/parser_frontmatter.go rename to pkg/document/parser_frontmatter.go diff --git a/internal/document/parser_test.go b/pkg/document/parser_test.go similarity index 100% rename from internal/document/parser_test.go rename to pkg/document/parser_test.go diff --git a/pkg/project/document.go b/pkg/project/document.go index 6250b8ef4..6817ab1c1 100644 --- a/pkg/project/document.go +++ b/pkg/project/document.go @@ -8,8 +8,8 @@ import ( "github.com/go-git/go-billy/v5/osfs" "github.com/go-git/go-billy/v5/util" "github.com/pkg/errors" - "github.com/stateful/runme/v3/internal/document" - "github.com/stateful/runme/v3/internal/document/identity" + "github.com/stateful/runme/v3/pkg/document" + "github.com/stateful/runme/v3/pkg/document/identity" ) func ReadMarkdownFile(filepath string, fs billy.Basic) ([]byte, error) { diff --git a/pkg/project/formatter.go b/pkg/project/formatter.go index 43a3a6146..b67e350ff 100644 --- a/pkg/project/formatter.go +++ b/pkg/project/formatter.go @@ -11,10 +11,10 @@ import ( "time" "github.com/pkg/errors" - "github.com/stateful/runme/v3/internal/document" - "github.com/stateful/runme/v3/internal/document/editor" - "github.com/stateful/runme/v3/internal/document/identity" "github.com/stateful/runme/v3/internal/renderer/cmark" + "github.com/stateful/runme/v3/pkg/document" + "github.com/stateful/runme/v3/pkg/document/editor" + "github.com/stateful/runme/v3/pkg/document/identity" ) type funcOutput func(string, []byte) error diff --git a/pkg/project/project.go b/pkg/project/project.go index 9844179a5..423abcfb5 100644 --- a/pkg/project/project.go +++ b/pkg/project/project.go @@ -15,7 +15,7 @@ import ( "github.com/go-git/go-git/v5/plumbing/format/gitignore" "github.com/pkg/errors" "github.com/stateful/godotenv" - "github.com/stateful/runme/v3/internal/document" + "github.com/stateful/runme/v3/pkg/document" ) type CodeBlock struct { diff --git a/pkg/project/project_test.go b/pkg/project/project_test.go index 099da363b..7a2c4da4b 100644 --- a/pkg/project/project_test.go +++ b/pkg/project/project_test.go @@ -13,8 +13,8 @@ import ( "github.com/go-git/go-billy/v5/util" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/storage/filesystem" - "github.com/stateful/runme/v3/internal/document" - "github.com/stateful/runme/v3/internal/document/identity" + "github.com/stateful/runme/v3/pkg/document" + "github.com/stateful/runme/v3/pkg/document/identity" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/web/main_js.go b/web/main_js.go index 6aab09f7b..b8ccb42f8 100644 --- a/web/main_js.go +++ b/web/main_js.go @@ -4,8 +4,8 @@ import ( "encoding/json" "syscall/js" - "github.com/stateful/runme/v3/internal/document/editor" - "github.com/stateful/runme/v3/internal/document/identity" + "github.com/stateful/runme/v3/pkg/document/editor" + "github.com/stateful/runme/v3/pkg/document/identity" ) // These are variables so that they can be set during the build time.