refactor(module): migrate module path from forge.lthn.ai to dappco.re
Update module path from forge.lthn.ai/core/go-html to dappco.re/go/core/html. Migrate all .go import paths, update dependency versions (core v0.5.0, log v0.1.0, io v0.2.0), and add replace directives for local development. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
666e3a68c6
commit
c525437ed6
18 changed files with 39 additions and 35 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
dist/
|
|
||||||
.core/
|
|
||||||
.idea/
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
*.log
|
||||||
|
.core/
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
Agent instructions for `go-html`. Module path: `forge.lthn.ai/core/go-html`
|
Agent instructions for `go-html`. Module path: `dappco.re/go/core/html`
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
|
|
@ -40,8 +40,9 @@ Files guarded with `//go:build !js` are excluded from WASM:
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
- `forge.lthn.ai/core/go-i18n` (replace directive → `../go-i18n`)
|
- `dappco.re/go/core/i18n` (replace directive → local go-i18n)
|
||||||
- `forge.lthn.ai/core/go-inference` (indirect, via go-i18n)
|
- `forge.lthn.ai/core/go-inference` (indirect, via go-i18n; not yet migrated)
|
||||||
|
- `forge.lthn.ai/core/go-log` (indirect, via go-i18n; not yet migrated)
|
||||||
- Both `go-i18n` and `go-inference` must be cloned alongside this repo for builds
|
- Both `go-i18n` and `go-inference` must be cloned alongside this repo for builds
|
||||||
- Go 1.26+ required (uses `range` over integers, `iter.Seq`, `maps.Keys`, `slices.Collect`)
|
- Go 1.26+ required (uses `range` over integers, `iter.Seq`, `maps.Keys`, `slices.Collect`)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
i18n "forge.lthn.ai/core/go-i18n"
|
i18n "dappco.re/go/core/i18n"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ import (
|
||||||
goio "io"
|
goio "io"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"forge.lthn.ai/core/go-html/codegen"
|
"dappco.re/go/core/html/codegen"
|
||||||
log "forge.lthn.ai/core/go-log"
|
log "dappco.re/go/core/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func run(r goio.Reader, w goio.Writer) error {
|
func run(r goio.Reader, w goio.Writer) error {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"syscall/js"
|
"syscall/js"
|
||||||
|
|
||||||
html "forge.lthn.ai/core/go-html"
|
html "dappco.re/go/core/html"
|
||||||
)
|
)
|
||||||
|
|
||||||
// renderToString builds an HLCRF layout from JS arguments and returns HTML.
|
// renderToString builds an HLCRF layout from JS arguments and returns HTML.
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ package main
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"forge.lthn.ai/core/go-html/codegen"
|
"dappco.re/go/core/html/codegen"
|
||||||
log "forge.lthn.ai/core/go-log"
|
log "dappco.re/go/core/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// buildComponentJS takes a JSON slot map and returns the WC bundle JS string.
|
// buildComponentJS takes a JSON slot map and returns the WC bundle JS string.
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
coreio "forge.lthn.ai/core/go-io"
|
coreio "dappco.re/go/core/io"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
log "forge.lthn.ai/core/go-log"
|
log "dappco.re/go/core/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// wcTemplate is the Web Component class template.
|
// wcTemplate is the Web Component class template.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package html
|
package html
|
||||||
|
|
||||||
import i18n "forge.lthn.ai/core/go-i18n"
|
import i18n "dappco.re/go/core/i18n"
|
||||||
|
|
||||||
// Context carries rendering state through the node tree.
|
// Context carries rendering state through the node tree.
|
||||||
type Context struct {
|
type Context struct {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
i18n "forge.lthn.ai/core/go-i18n"
|
i18n "dappco.re/go/core/i18n"
|
||||||
)
|
)
|
||||||
|
|
||||||
// --- Unicode / RTL edge cases ---
|
// --- Unicode / RTL edge cases ---
|
||||||
|
|
|
||||||
20
go.mod
20
go.mod
|
|
@ -1,19 +1,27 @@
|
||||||
module forge.lthn.ai/core/go-html
|
module dappco.re/go/core/html
|
||||||
|
|
||||||
go 1.26.0
|
go 1.26.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
forge.lthn.ai/core/go-i18n v0.1.8
|
dappco.re/go/core/i18n v0.1.8
|
||||||
forge.lthn.ai/core/go-io v0.1.6
|
dappco.re/go/core/io v0.2.0
|
||||||
forge.lthn.ai/core/go-log v0.0.4
|
dappco.re/go/core/log v0.1.0
|
||||||
github.com/stretchr/testify v1.11.1
|
github.com/stretchr/testify v1.11.1
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
forge.lthn.ai/core/go v0.3.3 // indirect
|
dappco.re/go/core v0.5.0 // indirect
|
||||||
forge.lthn.ai/core/go-inference v0.1.7 // indirect
|
forge.lthn.ai/core/go-inference v0.1.4 // indirect
|
||||||
|
forge.lthn.ai/core/go-log v0.0.4 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||||
golang.org/x/text v0.35.0 // indirect
|
golang.org/x/text v0.35.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
|
replace (
|
||||||
|
dappco.re/go/core => ../../../../core/go
|
||||||
|
dappco.re/go/core/i18n => ../../../../core/go-i18n
|
||||||
|
dappco.re/go/core/io => ../../../../core/go-io
|
||||||
|
dappco.re/go/core/log => ../../../../core/go-log
|
||||||
|
)
|
||||||
|
|
|
||||||
10
go.sum
10
go.sum
|
|
@ -1,11 +1,5 @@
|
||||||
forge.lthn.ai/core/go v0.3.3 h1:kYYZ2nRYy0/Be3cyuLJspRjLqTMxpckVyhb/7Sw2gd0=
|
forge.lthn.ai/core/go-inference v0.1.4 h1:fuAgWbqsEDajHniqAKyvHYbRcBrkGEiGSqR2pfTMRY0=
|
||||||
forge.lthn.ai/core/go v0.3.3/go.mod h1:Cp4ac25pghvO2iqOu59t1GyngTKVOzKB5/VPdhRi9CQ=
|
forge.lthn.ai/core/go-inference v0.1.4/go.mod h1:jfWz+IJX55wAH98+ic6FEqqGB6/P31CHlg7VY7pxREw=
|
||||||
forge.lthn.ai/core/go-i18n v0.1.8 h1:+G/w5KVmu9NUoS//fRUseBKHQO+sNeB+RSlmhlz7OYM=
|
|
||||||
forge.lthn.ai/core/go-i18n v0.1.8/go.mod h1:4IdsNILKU7nVSJf8gEjD+Iu2YfqpM0hrRNJFclPJI/k=
|
|
||||||
forge.lthn.ai/core/go-inference v0.1.7 h1:9Dy6v03jX5ZRH3n5iTzlYyGtucuBIgSe+S7GWvBzx9Q=
|
|
||||||
forge.lthn.ai/core/go-inference v0.1.7/go.mod h1:jfWz+IJX55wAH98+ic6FEqqGB6/P31CHlg7VY7pxREw=
|
|
||||||
forge.lthn.ai/core/go-io v0.1.6 h1:RByYeP829HFqR2yLg5iBM5dGHKzPFYc+udl/Y1DZIRs=
|
|
||||||
forge.lthn.ai/core/go-io v0.1.6/go.mod h1:3MSuQZuzhCi6aefECQ/LxhM8ooVLam1KgEvgeEjYZVc=
|
|
||||||
forge.lthn.ai/core/go-log v0.0.4 h1:KTuCEPgFmuM8KJfnyQ8vPOU1Jg654W74h8IJvfQMfv0=
|
forge.lthn.ai/core/go-log v0.0.4 h1:KTuCEPgFmuM8KJfnyQ8vPOU1Jg654W74h8IJvfQMfv0=
|
||||||
forge.lthn.ai/core/go-log v0.0.4/go.mod h1:r14MXKOD3LF/sI8XUJQhRk/SZHBE7jAFVuCfgkXoZPw=
|
forge.lthn.ai/core/go-log v0.0.4/go.mod h1:r14MXKOD3LF/sI8XUJQhRk/SZHBE7jAFVuCfgkXoZPw=
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package html
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
i18n "forge.lthn.ai/core/go-i18n"
|
i18n "dappco.re/go/core/i18n"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIntegration_RenderThenReverse(t *testing.T) {
|
func TestIntegration_RenderThenReverse(t *testing.T) {
|
||||||
|
|
|
||||||
2
node.go
2
node.go
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"slices"
|
"slices"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
i18n "forge.lthn.ai/core/go-i18n"
|
i18n "dappco.re/go/core/i18n"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Node is anything renderable.
|
// Node is anything renderable.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
i18n "forge.lthn.ai/core/go-i18n"
|
i18n "dappco.re/go/core/i18n"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRawNode_Render(t *testing.T) {
|
func TestRawNode_Render(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ package html
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"forge.lthn.ai/core/go-i18n/reversal"
|
"dappco.re/go/core/i18n/reversal"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StripTags removes HTML tags from rendered output, returning plain text.
|
// StripTags removes HTML tags from rendered output, returning plain text.
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ package html
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
i18n "forge.lthn.ai/core/go-i18n"
|
i18n "dappco.re/go/core/i18n"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStripTags_Simple(t *testing.T) {
|
func TestStripTags_Simple(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
i18n "forge.lthn.ai/core/go-i18n"
|
i18n "dappco.re/go/core/i18n"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRender_FullPage(t *testing.T) {
|
func TestRender_FullPage(t *testing.T) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue