fix: Rename freeflowuniverse to incubaid

This commit is contained in:
Mahmoud-Emad
2025-10-12 12:30:19 +03:00
parent 801c4abb43
commit 8f2d187b17
1593 changed files with 8753 additions and 8300 deletions

View File

@@ -15,7 +15,7 @@ The client works with Redis as a backend storage system, where document collecti
### Creating a Client
```v
import freeflowuniverse.herolib.web.doctreeclient
import incubaid.herolib.web.doctreeclient
// Create a new DocTreeClient instance
mut client := doctreeclient.new()!
@@ -96,8 +96,8 @@ Here's a complete example that demonstrates how to use DocTreeClient with a docu
```v
module main
import freeflowuniverse.herolib.web.doctreeclient
import freeflowuniverse.herolib.data.doctree
import incubaid.herolib.web.doctreeclient
import incubaid.herolib.data.doctree
fn main() {
// First, populate Redis with doctree data

View File

@@ -1,7 +1,7 @@
module doctreeclient
import freeflowuniverse.herolib.core.pathlib
import freeflowuniverse.herolib.core.texttools
import incubaid.herolib.core.pathlib
import incubaid.herolib.core.texttools
import os
// List of recognized image file extensions

View File

@@ -1,8 +1,8 @@
module doctreeclient
import freeflowuniverse.herolib.data.doctree
import freeflowuniverse.herolib.core.base
import freeflowuniverse.herolib.core.pathlib
import incubaid.herolib.data.doctree
import incubaid.herolib.core.base
import incubaid.herolib.core.pathlib
import os
fn test_doctree_client() ! {

View File

@@ -1,6 +1,6 @@
module doctreeclient
import freeflowuniverse.herolib.core.base
import incubaid.herolib.core.base
pub fn new() !&DocTreeClient {
mut context := base.context()!

View File

@@ -1,6 +1,6 @@
module doctreeclient
import freeflowuniverse.herolib.core.redisclient
import incubaid.herolib.core.redisclient
// Combined config structure
pub struct DocTreeClient {

View File

@@ -1,7 +1,7 @@
module docusaurus
import os
import freeflowuniverse.herolib.core.pathlib
import incubaid.herolib.core.pathlib
__global (
docusaurus_sites map[string]&DocSite

View File

@@ -1,11 +1,9 @@
module docusaurus
import freeflowuniverse.herolib.core.pathlib
import freeflowuniverse.herolib.core.base
import freeflowuniverse.herolib.core.texttools
import freeflowuniverse.herolib.web.site { Site, SiteConfig }
import freeflowuniverse.herolib.osal.core as osal
import freeflowuniverse.herolib.ui.console
import incubaid.herolib.core.pathlib
import incubaid.herolib.web.site
import incubaid.herolib.osal.core as osal
import incubaid.herolib.ui.console
@[heap]
pub struct DocSite {

View File

@@ -1,6 +1,6 @@
module docusaurus
import freeflowuniverse.herolib.web.site
import incubaid.herolib.web.site
// IS THE ONE AS USED BY DOCUSAURUS

View File

@@ -1,10 +1,10 @@
module docusaurus
import freeflowuniverse.herolib.core.pathlib
import incubaid.herolib.core.pathlib
import json
import os
import freeflowuniverse.herolib.osal.core as osal
import freeflowuniverse.herolib.ui.console
import incubaid.herolib.osal.core as osal
import incubaid.herolib.ui.console
pub fn (mut docsite DocSite) generate() ! {
if docsite.generated {

View File

@@ -1,10 +1,10 @@
module docusaurus
import freeflowuniverse.herolib.core.pathlib
import freeflowuniverse.herolib.web.doctreeclient
import freeflowuniverse.herolib.web.site { Page, Section, Site }
import freeflowuniverse.herolib.data.markdown.tools as markdowntools
import freeflowuniverse.herolib.ui.console
import incubaid.herolib.core.pathlib
import incubaid.herolib.web.doctreeclient
import incubaid.herolib.web.site { Page, Section, Site }
import incubaid.herolib.data.markdown.tools as markdowntools
import incubaid.herolib.ui.console
// THIS CODE GENERATES A DOCUSAURUS SITE FROM A DOCTREECLIENT AND SITE DEFINITION

View File

@@ -1,10 +1,10 @@
module docusaurus
import freeflowuniverse.herolib.develop.gittools
import incubaid.herolib.develop.gittools
import os
import freeflowuniverse.herolib.core.pathlib
import freeflowuniverse.herolib.ui.console
import freeflowuniverse.herolib.core.texttools.regext
import incubaid.herolib.core.pathlib
import incubaid.herolib.ui.console
import incubaid.herolib.core.texttools.regext
pub fn (mut docsite DocSite) import() ! {
for importparams in docsite.website.siteconfig.imports {

View File

@@ -1,14 +1,14 @@
module docusaurus
import freeflowuniverse.herolib.core.base
import freeflowuniverse.herolib.core.texttools
import incubaid.herolib.core.base
import incubaid.herolib.core.texttools
// Store the Docusaurus site structure in Redis for link processing
// This maps collection:page to their actual Docusaurus paths
pub fn (mut docsite DocSite) store_site_structure() ! {
mut context := base.context()!
mut redis := context.redis()!
// Store mapping of collection:page to docusaurus path (without .md extension)
for page in docsite.website.pages {
parts := page.src.split(':')
@@ -17,22 +17,22 @@ pub fn (mut docsite DocSite) store_site_structure() ! {
}
collection_name := texttools.name_fix(parts[0])
page_name := texttools.name_fix(parts[1])
// Calculate the docusaurus path (without .md extension for URLs)
mut doc_path := page.path
// Handle empty or root path
if doc_path.trim_space() == '' || doc_path == '/' {
doc_path = page_name
} else if doc_path.ends_with('/') {
doc_path += page_name
}
// Remove .md extension if present for URL paths
if doc_path.ends_with('.md') {
doc_path = doc_path[..doc_path.len - 3]
}
// Store in Redis with key format: collection:page.md
key := '${collection_name}:${page_name}.md'
redis.hset('doctree_docusaurus_paths', key, doc_path)!

View File

@@ -1,9 +1,9 @@
module docusaurus
import freeflowuniverse.herolib.core.pathlib
import freeflowuniverse.herolib.core.texttools
import freeflowuniverse.herolib.web.site
import freeflowuniverse.herolib.ui.console
import incubaid.herolib.core.pathlib
import incubaid.herolib.core.texttools
import incubaid.herolib.web.site
import incubaid.herolib.ui.console
@[params]
pub struct AddArgs {

View File

@@ -1,10 +1,10 @@
module docusaurus
import os
import freeflowuniverse.herolib.core.pathlib
import freeflowuniverse.herolib.develop.gittools
import freeflowuniverse.herolib.osal.core as osal
import freeflowuniverse.herolib.installers.web.bun
import incubaid.herolib.core.pathlib
import incubaid.herolib.develop.gittools
import incubaid.herolib.osal.core as osal
import incubaid.herolib.installers.web.bun
fn install(c DocusaurusConfig) ! {
mut gs := gittools.new()!
@@ -17,7 +17,7 @@ fn install(c DocusaurusConfig) ! {
template_path := gs.get_path(
pull: c.template_update
reset: c.reset
url: 'https://github.com/freeflowuniverse/docusaurus_template/src/branch/main/template'
url: 'https://github.com/incubaid/docusaurus_template/src/branch/main/template'
)!
mut template_path0 := pathlib.get_dir(path: template_path, create: false)!

View File

@@ -1,8 +1,8 @@
module docusaurus
import os
import freeflowuniverse.herolib.core.pathlib
import freeflowuniverse.herolib.core.base // For context and Redis, if test needs to manage it
import incubaid.herolib.core.pathlib
import incubaid.herolib.core.base // For context and Redis, if test needs to manage it
import time
const test_heroscript_content = '!!site.config\n name:"Kristof"\n title:"Internet Geek"\n tagline:"Internet Geek"\n url:"https://friends.threefold.info"\n url_home:"docs/"\n base_url:"/kristof/"\n favicon:"img/favicon.png"\n image:"img/tf_graph.png"\n copyright:"Kristof"\n\n!!site.config_meta\n description:"ThreeFold is laying the foundation for a geo aware Web 4, the next generation of the Internet."\n image:"https://threefold.info/kristof/img/tf_graph.png"\n title:"ThreeFold Technology Vision"\n\n!!site.build_dest\n ssh_name:"production"\n path:"/root/hero/www/info/kristof"\n\n!!site.navbar\n title:"Kristof = Chief Executive Geek"\n logo_alt:"Kristof Logo"\n logo_src:"img/logo.svg"\n logo_src_dark:"img/logo.svg"\n\n!!site.navbar_item\n label:"ThreeFold Technology"\n href:"https://threefold.info/kristof/"\n position:"right"\n\n!!site.navbar_item\n label:"ThreeFold.io"\n href:"https://threefold.io"\n position:"right"\n\n!!site.footer\n style:"dark"\n\n!!site.footer_item\n title:"Docs"\n label:"Introduction"\n href:"/docs"\n\n!!site.footer_item\n title:"Docs"\n label:"TFGrid V4 Docs"\n href:"https://docs.threefold.io/"\n\n!!site.footer_item\n title:"Community"\n label:"Telegram"\n href:"https://t.me/threefold"\n\n!!site.footer_item\n title:"Community"\n label:"X"\n href:"https://x.com/threefold_io"\n\n!!site.footer_item\n title:"Links"\n label:"ThreeFold.io"\n href:"https://threefold.io"\n'

View File

@@ -1,7 +1,7 @@
module docusaurus
import freeflowuniverse.herolib.core.playbook { PlayBook }
import freeflowuniverse.herolib.web.site
import incubaid.herolib.core.playbook { PlayBook }
import incubaid.herolib.web.site
import os
pub fn play(mut plbook PlayBook) ! {

View File

@@ -2,7 +2,7 @@ module docusaurus
// not longer working because is coming from doctree
// import freeflowuniverse.herolib.osal.notifier
// import incubaid.herolib.osal.notifier
// import os
// fn watch_docs(docs_path string, path_src string, path_build string) ! {

View File

@@ -4,7 +4,7 @@ import veb
import time
import json
import log
import freeflowuniverse.herolib.ui.console
import incubaid.herolib.ui.console
const agent = 'Email Authentication Controller'

View File

@@ -5,7 +5,7 @@ import crypto.hmac
import crypto.sha256
import encoding.hex
import encoding.base64
import freeflowuniverse.herolib.clients.mailclient { MailClient }
import incubaid.herolib.clients.mailclient { MailClient }
pub struct StatelessAuthenticator {
pub:

View File

@@ -1,6 +1,6 @@
module site
import freeflowuniverse.herolib.core.texttools
import incubaid.herolib.core.texttools
__global (
websites map[string]&Site

View File

@@ -1,8 +1,8 @@
module site
import os
import freeflowuniverse.herolib.core.playbook { PlayBook }
import freeflowuniverse.herolib.core.texttools
import incubaid.herolib.core.playbook { PlayBook }
import incubaid.herolib.core.texttools
import time
pub fn play(mut plbook PlayBook) ! {

View File

@@ -1,6 +1,6 @@
module site
import freeflowuniverse.herolib.core.playbook { PlayBook }
import incubaid.herolib.core.playbook { PlayBook }
// plays the sections & pages
fn play_pages(mut plbook PlayBook, mut site Site) ! {

View File

@@ -1,6 +1,5 @@
# Site Module
## config heroscript
```yaml
@@ -99,7 +98,7 @@
## factory
```v
import freeflowuniverse.herolib.web.site
import incubaid.herolib.web.site
mut mysite := site.new()!
```
@@ -107,8 +106,8 @@ mut mysite := site.new()!
## how to use with plbook
```v
import freeflowuniverse.herolib.core.playbook
import freeflowuniverse.herolib.web.site
import incubaid.herolib.core.playbook
import incubaid.herolib.web.site
// path string
// text string
// git_url string
@@ -296,4 +295,4 @@ site.play(mut plbook)!
}
]
}
```
```

View File

@@ -3,7 +3,7 @@ module ui
import veb
import os
import json
import freeflowuniverse.herolib.develop.heroprompt as hp
import incubaid.herolib.develop.heroprompt as hp
// Types
struct DirResp {