fix: Rename freeflowuniverse to incubaid
This commit is contained in:
@@ -4,9 +4,9 @@ This directory contains various utilities and tools for code development.
|
||||
|
||||
## Available Tools
|
||||
|
||||
* `utils.v`: General utility functions.
|
||||
* `vvet.v`: V language vetting tool.
|
||||
* `vtest.v`: V language testing tool.
|
||||
* `utils.v`: General utility functions.
|
||||
* `vvet.v`: V language vetting tool.
|
||||
* `vtest.v`: V language testing tool.
|
||||
|
||||
## Usage Examples
|
||||
|
||||
@@ -15,14 +15,14 @@ This directory contains various utilities and tools for code development.
|
||||
To vet your Vlang code for common issues and best practices, you can use the `vvet.v` tool.
|
||||
|
||||
```v
|
||||
import freeflowuniverse.herolib.core.develop.codetools { list_v_files }
|
||||
import incubaid.herolib.core.develop.codetools { list_v_files }
|
||||
v run lib/develop/codetools/vvet.v your_file.v
|
||||
```
|
||||
|
||||
|
||||
### Testing Vlang Code with `vtest.v`
|
||||
|
||||
```v
|
||||
import freeflowuniverse.herolib.core.de.vlang_utils { list_v_files }
|
||||
import incubaid.herolib.core.de.vlang_utils { list_v_files }
|
||||
v run lib/develop/codetools/vtest.v your_test_file.v
|
||||
To run tests for your Vlang code, use the `vtest.v` tool.
|
||||
|
||||
@@ -42,4 +42,4 @@ import lib.develop.codetools.utils
|
||||
fn main() {
|
||||
// Example usage of a utility function
|
||||
println(utils.greet("World"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module code
|
||||
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.code.vlang_utils { list_v_files }
|
||||
import incubaid.herolib.ui.console
|
||||
import incubaid.herolib.core.code.vlang_utils { list_v_files }
|
||||
import os
|
||||
|
||||
// ===== V LANGUAGE TOOLS =====
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module code
|
||||
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import incubaid.herolib.ui.console
|
||||
import os
|
||||
|
||||
// vet_file runs v vet on a single file
|
||||
|
||||
@@ -12,7 +12,7 @@ The CodeWalker module provides functionality to walk through directories and cre
|
||||
## Usage
|
||||
|
||||
```v
|
||||
import freeflowuniverse.herolib.lib.lang.codewalker
|
||||
import incubaid.herolib.lib.lang.codewalker
|
||||
|
||||
mut cw := codewalker.new('/tmp/adir')!
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module codewalker
|
||||
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import incubaid.herolib.core.pathlib
|
||||
|
||||
pub struct CodeWalker {
|
||||
pub mut:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module codewalker
|
||||
|
||||
import os
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import incubaid.herolib.core.pathlib
|
||||
|
||||
fn test_parse_basic() {
|
||||
mut cw := new(CodeWalkerArgs{})!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module codewalker
|
||||
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import incubaid.herolib.core.pathlib
|
||||
|
||||
pub struct FileMap {
|
||||
pub mut:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Git Tools Module
|
||||
|
||||
## GitTools HeroScript
|
||||
## GitTools HeroScript
|
||||
|
||||
### `!!git.define`
|
||||
|
||||
@@ -23,11 +23,11 @@ Clones a Git repository from a specified URL into the configured coderoot.
|
||||
|
||||
```heroscript
|
||||
!!git.clone
|
||||
url: 'https://github.com/freeflowuniverse/test_repo.git'
|
||||
url: 'https://github.com/incubaid/test_repo.git'
|
||||
pull: true // Optional: if true, pulls latest changes after cloning
|
||||
reset: false // Optional: if true, resets the repository before cloning/pulling
|
||||
light: true // Optional: if true, clones only the last history (default: is from git structure as defined above)
|
||||
recursive: false // Optional: if true, also clones submodules (default: false)
|
||||
light: true // Optional: if true, clones only the last history (default: is from git structure as defined above)
|
||||
recursive: false // Optional: if true, also clones submodules (default: false)
|
||||
```
|
||||
|
||||
### `!!git.repo_action`
|
||||
@@ -36,12 +36,12 @@ Performs various Git operations on an existing repository, the filter matches mo
|
||||
|
||||
```heroscript
|
||||
!!git.repo_action
|
||||
filter: 'freeflowuniverse/test_repo'
|
||||
action: 'pull' // pull, commit, push, reset, branch_create, branch_switch, tag_create, tag_switch, delete
|
||||
message: 'feat: Added new feature' // Optional: for 'commit' action
|
||||
branchname: 'feature-branch' // Optional: for 'branch_create' or 'branch_switch' actions
|
||||
tagname: 'v1.0.0' // Optional: for 'tag_create' or 'tag_switch' actions
|
||||
submodules: true // Optional: for 'pull' action, if true, also updates submodules
|
||||
filter: 'incubaid/test_repo'
|
||||
action: 'pull' // pull, commit, push, reset, branch_create, branch_switch, tag_create, tag_switch, delete
|
||||
message: 'feat: Added new feature' // Optional: for 'commit' action
|
||||
branchname: 'feature-branch' // Optional: for 'branch_create' or 'branch_switch' actions
|
||||
tagname: 'v1.0.0' // Optional: for 'tag_create' or 'tag_switch' actions
|
||||
submodules: true // Optional: for 'pull' action, if true, also updates submodules
|
||||
error_ignore: false // Optional: if true, ignores errors during the action and continue for the next repo
|
||||
```
|
||||
|
||||
@@ -49,15 +49,15 @@ Performs various Git operations on an existing repository, the filter matches mo
|
||||
|
||||
- `filter` (string, **required**): A substring to filter repositories by name or relative path. This can match multiple repositories.
|
||||
- `action` (string, **required**): The Git operation to perform. Valid values:
|
||||
- `pull`: Pulls latest changes from the remote.
|
||||
- `commit`: Commits staged changes. Requires `message`.
|
||||
- `push`: Pushes local commits to the remote.
|
||||
- `reset`: Resets all local changes (hard reset).
|
||||
- `branch_create`: Creates a new branch. Requires `branchname`.
|
||||
- `branch_switch`: Switches to an existing branch. Requires `branchname`.
|
||||
- `tag_create`: Creates a new tag. Requires `tagname`.
|
||||
- `tag_switch`: Switches to an existing tag. Requires `tagname`.
|
||||
- `delete`: Deletes the local repository.
|
||||
- `pull`: Pulls latest changes from the remote.
|
||||
- `commit`: Commits staged changes. Requires `message`.
|
||||
- `push`: Pushes local commits to the remote.
|
||||
- `reset`: Resets all local changes (hard reset).
|
||||
- `branch_create`: Creates a new branch. Requires `branchname`.
|
||||
- `branch_switch`: Switches to an existing branch. Requires `branchname`.
|
||||
- `tag_create`: Creates a new tag. Requires `tagname`.
|
||||
- `tag_switch`: Switches to an existing tag. Requires `tagname`.
|
||||
- `delete`: Deletes the local repository.
|
||||
|
||||
### `!!git.list`
|
||||
|
||||
@@ -65,17 +65,17 @@ Lists known Git repositories managed by the `gittools` module.
|
||||
|
||||
```heroscript
|
||||
!!git.list
|
||||
filter: 'my_project' // Optional: filter by repository name or path
|
||||
filter: 'my_project' // Optional: filter by repository name or path
|
||||
reload: true //if true then will check the status of those repo's against the remote's
|
||||
```
|
||||
|
||||
### `!!git.reload`
|
||||
### `!!git.reload`
|
||||
|
||||
Forces a reload of all Git repositories in the cache, re-scanning the `coderoot` and updating their statuses.
|
||||
|
||||
```heroscript
|
||||
!!git.reload
|
||||
filter: 'my_project' // Optional: filter by repository name or path
|
||||
filter: 'my_project' // Optional: filter by repository name or path
|
||||
```
|
||||
|
||||
## Get a specific path starting from url
|
||||
@@ -83,12 +83,12 @@ Forces a reload of all Git repositories in the cache, re-scanning the `coderoot`
|
||||
below is powerful command, will get the repo, put on right location, you can force a pull or even reset everything
|
||||
|
||||
```v
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
// path string
|
||||
// git_url string
|
||||
// git_reset bool
|
||||
// git_root string
|
||||
// git_pull bool
|
||||
import incubaid.herolib.develop.gittools
|
||||
// path string
|
||||
// git_url string
|
||||
// git_reset bool
|
||||
// git_root string
|
||||
// git_pull bool
|
||||
// currentdir bool // can use currentdir, if true, will use current directory as base path if not giturl or path specified
|
||||
mydocs_path:=gittools.path(
|
||||
pull:true,
|
||||
@@ -106,20 +106,20 @@ pub struct GitPathGetArgs {
|
||||
pub mut:
|
||||
someotherparams string // you can add other params here if you want
|
||||
//gittools will use these params to find the right path
|
||||
path string
|
||||
git_url string
|
||||
git_reset bool
|
||||
git_root string
|
||||
git_pull bool
|
||||
path string
|
||||
git_url string
|
||||
git_reset bool
|
||||
git_root string
|
||||
git_pull bool
|
||||
}
|
||||
pub fn something(args GitPathGetArgs) !string{
|
||||
mut path := gittools.path(path: args.path, git_url: args.git_url, git_reset: args.git_reset, git_root: args.git_root, git_pull: args.git_pull)!
|
||||
if !path.is_dir() {
|
||||
return error('path is not a directory')
|
||||
}
|
||||
if path.file_exists('.site') {
|
||||
move_site_to_collection(mut path)!
|
||||
}
|
||||
if !path.is_dir() {
|
||||
return error('path is not a directory')
|
||||
}
|
||||
if path.file_exists('.site') {
|
||||
move_site_to_collection(mut path)!
|
||||
}
|
||||
return path.path
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ pub fn something(args GitPathGetArgs) !string{
|
||||
### Repository Management
|
||||
|
||||
```v
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
import incubaid.herolib.develop.gittools
|
||||
|
||||
// Initialize with code root directory
|
||||
mut gs := gittools.new(coderoot: '~/code')!
|
||||
@@ -256,19 +256,19 @@ pub mut:
|
||||
// GitStatus holds all live status information for a repository.
|
||||
pub struct GitStatus {
|
||||
pub mut:
|
||||
// State from local and remote (`git fetch`)
|
||||
branches map[string]string // branch name -> commit hash
|
||||
tags map[string]string // tag name -> commit hash
|
||||
|
||||
// Current local state
|
||||
branch string // The current checked-out branch
|
||||
tag string // The current checked-out tag (if any)
|
||||
ahead int // Commits ahead of remote
|
||||
behind int // Commits behind remote
|
||||
|
||||
// Overall status
|
||||
has_changes bool // True if there are uncommitted local changes
|
||||
error string // Error message if any status update fails
|
||||
// State from local and remote (`git fetch`)
|
||||
branches map[string]string // branch name -> commit hash
|
||||
tags map[string]string // tag name -> commit hash
|
||||
|
||||
// Current local state
|
||||
branch string // The current checked-out branch
|
||||
tag string // The current checked-out tag (if any)
|
||||
ahead int // Commits ahead of remote
|
||||
behind int // Commits behind remote
|
||||
|
||||
// Overall status
|
||||
has_changes bool // True if there are uncommitted local changes
|
||||
error string // Error message if any status update fails
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module gittools
|
||||
|
||||
import os
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import incubaid.herolib.core.pathlib
|
||||
import incubaid.herolib.ui.console
|
||||
|
||||
__global (
|
||||
gsinstances map[string]&GitStructure
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module gittools
|
||||
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import incubaid.herolib.core.pathlib
|
||||
|
||||
// GitLocation uniquely identifies a Git repository, its online URL, and its location in the filesystem.
|
||||
@[heap]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module gittools
|
||||
|
||||
import os
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import incubaid.herolib.core.pathlib
|
||||
|
||||
fn test_gitlocation_from_url() {
|
||||
mut gs := GitStructure{}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module gittools
|
||||
|
||||
import crypto.md5
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
// import freeflowuniverse.herolib.ui.console
|
||||
import incubaid.herolib.core.pathlib
|
||||
// import incubaid.herolib.ui.console
|
||||
import os
|
||||
import json
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module gittools
|
||||
|
||||
import freeflowuniverse.herolib.ui as gui
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import incubaid.herolib.ui as gui
|
||||
import incubaid.herolib.core.pathlib
|
||||
import incubaid.herolib.ui.console
|
||||
import os
|
||||
|
||||
pub const gitcmds = 'clone,commit,pull,push,delete,reload,list,edit,sourcetree,path,exists'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module gittools
|
||||
|
||||
// import freeflowuniverse.herolib.core.redisclient
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
// import incubaid.herolib.core.redisclient
|
||||
import incubaid.herolib.ui.console
|
||||
// import time
|
||||
|
||||
// ReposGetArgs defines arguments to retrieve repositories from the git structure.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module gittools
|
||||
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import incubaid.herolib.ui.console
|
||||
|
||||
// Check and return the status of a repository (whether it needs a commit, pull, or push)
|
||||
fn get_repo_status(gr GitRepo) !string {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// lib/develop/gittools/repository.v
|
||||
module gittools
|
||||
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import incubaid.herolib.ui.console
|
||||
import incubaid.herolib.osal.core as osal
|
||||
import os
|
||||
|
||||
// commit stages all changes and commits them with the provided message.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module gittools
|
||||
|
||||
import json
|
||||
import freeflowuniverse.herolib.core.redisclient
|
||||
import incubaid.herolib.core.redisclient
|
||||
|
||||
fn redis_get() &redisclient.Redis {
|
||||
mut redis_client := redisclient.core_get() or { panic(err) }
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module gittools
|
||||
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import incubaid.herolib.ui.console
|
||||
import os
|
||||
// import freeflowuniverse.herolib.core.pathlib
|
||||
// import incubaid.herolib.core.pathlib
|
||||
|
||||
@[params]
|
||||
pub struct GitCloneArgs {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module gittools
|
||||
|
||||
import time
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import incubaid.herolib.ui.console
|
||||
// import os
|
||||
|
||||
@[params]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
module gittools
|
||||
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.develop.vscode
|
||||
import freeflowuniverse.herolib.develop.sourcetree
|
||||
import incubaid.herolib.core.pathlib
|
||||
import incubaid.herolib.ui.console
|
||||
import incubaid.herolib.develop.vscode
|
||||
import incubaid.herolib.develop.sourcetree
|
||||
import os
|
||||
|
||||
@[params]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module tests
|
||||
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import incubaid.herolib.develop.gittools
|
||||
import incubaid.herolib.osal.core as osal
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module tests
|
||||
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import incubaid.herolib.osal.core as osal
|
||||
import os
|
||||
import time
|
||||
|
||||
@@ -34,7 +34,7 @@ fn create_new_file(repo_path string) !string {
|
||||
fn setup_repo() !GittoolsTests {
|
||||
ts := GittoolsTests{
|
||||
coderoot: '/tmp/code'
|
||||
repo_url: 'https://github.com/freeflowuniverse/test_repo.git'
|
||||
repo_url: 'https://github.com/incubaid/test_repo.git'
|
||||
}
|
||||
|
||||
if os.exists(ts.coderoot) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module heroprompt
|
||||
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import incubaid.herolib.core.pathlib
|
||||
import os
|
||||
|
||||
pub struct HeropromptChild {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module heroprompt
|
||||
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook { PlayBook }
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import incubaid.herolib.core.base
|
||||
import incubaid.herolib.core.playbook { PlayBook }
|
||||
import incubaid.herolib.ui.console
|
||||
import json
|
||||
|
||||
__global (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module heroprompt
|
||||
|
||||
import time
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import incubaid.herolib.core.playbook
|
||||
|
||||
pub const version = '0.0.0'
|
||||
const singleton = false
|
||||
|
||||
@@ -3,8 +3,8 @@ module heroprompt
|
||||
import rand
|
||||
import time
|
||||
import os
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.develop.codewalker
|
||||
import incubaid.herolib.core.pathlib
|
||||
import incubaid.herolib.develop.codewalker
|
||||
|
||||
// Selection API
|
||||
@[params]
|
||||
|
||||
@@ -5,7 +5,7 @@ To get started
|
||||
```v
|
||||
|
||||
|
||||
import freeflowuniverse.herolib.develop.heroprompt
|
||||
import incubaid.herolib.develop.heroprompt
|
||||
|
||||
// Example Usage:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module luadns
|
||||
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
import incubaid.herolib.develop.gittools
|
||||
|
||||
struct LuaDNS {
|
||||
pub mut:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module luadns
|
||||
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
import incubaid.herolib.core.pathlib
|
||||
import incubaid.herolib.develop.gittools
|
||||
|
||||
// returns the directory of the git repository for the dns
|
||||
pub fn (dns LuaDNS) directory() !pathlib.Path {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module luadns
|
||||
|
||||
import os
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import incubaid.herolib.core.pathlib
|
||||
|
||||
fn parse_dns_configs(directory_path string) ![]DNSConfig {
|
||||
mut configs := []DNSConfig{}
|
||||
|
||||
@@ -43,10 +43,11 @@ Display the recorded timeline:
|
||||
|
||||
## Dependencies
|
||||
|
||||
• Redis: Requires a Redis server for data storage.
|
||||
• Redis Client: Uses freeflowuniverse.herolib.core.redisclient.
|
||||
• Redis: Requires a Redis server for data storage.
|
||||
• Redis Client: Uses incubaid.herolib.core.redisclient.
|
||||
|
||||
## Example
|
||||
|
||||
```
|
||||
mut timer := performance.new('example_process')
|
||||
|
||||
@@ -61,4 +62,4 @@ timer.epoch_end()
|
||||
timer.timeline()
|
||||
```
|
||||
|
||||
This will output a detailed timeline with duration bars for each event.
|
||||
This will output a detailed timeline with duration bars for each event.
|
||||
|
||||
@@ -4,7 +4,7 @@ import arrays
|
||||
import time
|
||||
import sync
|
||||
import term // For color coding
|
||||
import freeflowuniverse.herolib.core.redisclient
|
||||
import incubaid.herolib.core.redisclient
|
||||
|
||||
// Struct to represent a timer for measuring process performance
|
||||
@[noinit]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
## sourcetree
|
||||
|
||||
```v
|
||||
import freeflowuniverse.herolib.develop.sourcetree
|
||||
import incubaid.herolib.develop.sourcetree
|
||||
|
||||
//will look for git in location if not found will give error
|
||||
sourcetree.open(path:"/tmp/something")!
|
||||
|
||||
```
|
||||
|
||||
- if path not specified will chose current path
|
||||
- if path not specified will chose current path
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module sourcetree
|
||||
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import incubaid.herolib.osal.core as osal
|
||||
import os
|
||||
// import freeflowuniverse.herolib.ui.console
|
||||
// import incubaid.herolib.ui.console
|
||||
|
||||
@[params]
|
||||
pub struct OpenArgs {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
## visual studio code
|
||||
|
||||
```v
|
||||
import freeflowuniverse.herolib.develop.vscode
|
||||
import incubaid.herolib.develop.vscode
|
||||
|
||||
vscode.open(path:"/tmp/something")!
|
||||
|
||||
```
|
||||
|
||||
- if path not specified will chose current path
|
||||
- if path not specified will chose current path
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module vscode
|
||||
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import incubaid.herolib.osal.core as osal
|
||||
import os
|
||||
|
||||
pub struct VSCodeHelper {
|
||||
|
||||
@@ -21,21 +21,21 @@ A Visual Studio Code extension for viewing OurDB files line by line. This extens
|
||||
```
|
||||
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||
|
||||
import freeflowuniverse.herolib.develop.vscode_extensions.ourdb
|
||||
import incubaid.herolib.develop.vscode_extensions.ourdb
|
||||
|
||||
// This example shows how to use the ourdb module to install or uninstall the VSCode extension
|
||||
|
||||
// Install the extension
|
||||
ourdb.install_extension() or {
|
||||
eprintln('Failed to install extension: ${err}')
|
||||
exit(1)
|
||||
eprintln('Failed to install extension: ${err}')
|
||||
exit(1)
|
||||
}
|
||||
|
||||
// To uninstall, uncomment the following lines:
|
||||
/*
|
||||
ourdb.uninstall_extension() or {
|
||||
eprintln('Failed to uninstall extension: ${err}')
|
||||
exit(1)
|
||||
eprintln('Failed to uninstall extension: ${err}')
|
||||
exit(1)
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ The extension creates a dedicated output channel for logging:
|
||||
3. You'll see detailed logs about the extension's activity, including file processing and any errors
|
||||
|
||||
If you don't see "OurDB Viewer" in the dropdown, try:
|
||||
|
||||
- Restarting VSCode
|
||||
- Opening an .ourdb file (which should activate the extension)
|
||||
- Reinstalling the extension using the provided installation scripts
|
||||
@@ -108,6 +109,7 @@ The extension now includes a custom editor that can handle binary .ourdb files d
|
||||
## File Format
|
||||
|
||||
This extension reads OurDB files according to the following format:
|
||||
|
||||
- 2 bytes: Data size (little-endian)
|
||||
- 4 bytes: CRC32 checksum
|
||||
- 6 bytes: Previous record location
|
||||
@@ -124,6 +126,7 @@ To modify or enhance this extension:
|
||||
- Open an .ourdb file in the development window to test
|
||||
|
||||
3. Package using `vsce package` if you want to create a VSIX file:
|
||||
|
||||
```
|
||||
npm install -g @vscode/vsce
|
||||
vsce package
|
||||
|
||||
Reference in New Issue
Block a user