jac-super 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jac_super-0.1.0/PKG-INFO +44 -0
- jac_super-0.1.0/README.md +28 -0
- jac_super-0.1.0/jac_super/__init__.py +7 -0
- jac_super-0.1.0/jac_super/plugin/console.jac +22 -0
- jac_super-0.1.0/jac_super/plugin/impl/console.impl.jac +189 -0
- jac_super-0.1.0/jac_super.egg-info/PKG-INFO +44 -0
- jac_super-0.1.0/jac_super.egg-info/SOURCES.txt +11 -0
- jac_super-0.1.0/jac_super.egg-info/dependency_links.txt +1 -0
- jac_super-0.1.0/jac_super.egg-info/entry_points.txt +2 -0
- jac_super-0.1.0/jac_super.egg-info/requires.txt +2 -0
- jac_super-0.1.0/jac_super.egg-info/top_level.txt +1 -0
- jac_super-0.1.0/pyproject.toml +39 -0
- jac_super-0.1.0/setup.cfg +4 -0
jac_super-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: jac-super
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Enhanced console output for Jac CLI with Rich formatting
|
|
5
|
+
Author-email: Jason Mars <jason@mars.ninja>
|
|
6
|
+
Maintainer-email: Jason Mars <jason@mars.ninja>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Repository, https://github.com/Jaseci-Labs/jaseci
|
|
9
|
+
Project-URL: Homepage, https://jaseci.org
|
|
10
|
+
Project-URL: Documentation, https://jac-lang.org
|
|
11
|
+
Keywords: jac,jaclang,jaseci,console,rich,cli
|
|
12
|
+
Requires-Python: >=3.12
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Requires-Dist: jaclang>=0.9.9
|
|
15
|
+
Requires-Dist: rich>=13.0.0
|
|
16
|
+
|
|
17
|
+
# Jac Super
|
|
18
|
+
|
|
19
|
+
Enhanced console output plugin for Jac CLI with Rich formatting.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install jac-super
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Once installed, the plugin automatically registers and enhances all Jac CLI command output.
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
No configuration required. After installation, jac-super automatically enhances output for all Jac commands:
|
|
32
|
+
|
|
33
|
+
- `jac create` - Enhanced project creation messages
|
|
34
|
+
- `jac start` - Server startup and status messages
|
|
35
|
+
- `jac run` - Formatted execution output
|
|
36
|
+
- `jac config` - Styled configuration display
|
|
37
|
+
|
|
38
|
+
## Environment Variables
|
|
39
|
+
|
|
40
|
+
| Variable | Effect |
|
|
41
|
+
|----------|--------|
|
|
42
|
+
| `NO_COLOR` | Disables colors (fallback to base console) |
|
|
43
|
+
| `NO_EMOJI` | Disables emojis (uses text labels) |
|
|
44
|
+
| `TERM=dumb` | Disables both colors and emojis |
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Jac Super
|
|
2
|
+
|
|
3
|
+
Enhanced console output plugin for Jac CLI with Rich formatting.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install jac-super
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Once installed, the plugin automatically registers and enhances all Jac CLI command output.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
No configuration required. After installation, jac-super automatically enhances output for all Jac commands:
|
|
16
|
+
|
|
17
|
+
- `jac create` - Enhanced project creation messages
|
|
18
|
+
- `jac start` - Server startup and status messages
|
|
19
|
+
- `jac run` - Formatted execution output
|
|
20
|
+
- `jac config` - Styled configuration display
|
|
21
|
+
|
|
22
|
+
## Environment Variables
|
|
23
|
+
|
|
24
|
+
| Variable | Effect |
|
|
25
|
+
|----------|--------|
|
|
26
|
+
| `NO_COLOR` | Disables colors (fallback to base console) |
|
|
27
|
+
| `NO_EMOJI` | Disables emojis (uses text labels) |
|
|
28
|
+
| `TERM=dumb` | Disables both colors and emojis |
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Jac Super Console Plugin - Rich-enhanced console.
|
|
2
|
+
|
|
3
|
+
This plugin provides Rich-enhanced console output for Jac CLI.
|
|
4
|
+
It overrides the base console implementation to provide elegant,
|
|
5
|
+
colorful terminal output with themes, panels, tables, and spinners.
|
|
6
|
+
"""
|
|
7
|
+
import from jaclang.pycore.runtime { hookimpl, plugin_manager }
|
|
8
|
+
import from jaclang.cli.console { JacConsole as BaseJacConsole }
|
|
9
|
+
|
|
10
|
+
"""Jac Super Plugin for console enhancement."""
|
|
11
|
+
class JacSuperPlugin {
|
|
12
|
+
"""Get the Rich-enhanced console instance."""
|
|
13
|
+
@hookimpl
|
|
14
|
+
static def get_console -> BaseJacConsole {
|
|
15
|
+
return JacSuperConsole();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
# Register the plugin
|
|
20
|
+
with entry {
|
|
21
|
+
plugin_manager.register(JacSuperPlugin());
|
|
22
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"""Rich-enhanced console implementation for jac-super.
|
|
2
|
+
|
|
3
|
+
This module provides a Rich-based implementation of JacConsole that
|
|
4
|
+
inherits from the base console and overrides methods to use Rich
|
|
5
|
+
for elegant terminal output.
|
|
6
|
+
"""
|
|
7
|
+
import os;
|
|
8
|
+
import sys;
|
|
9
|
+
import from contextlib { contextmanager }
|
|
10
|
+
import from rich.console { Console as RichConsole }
|
|
11
|
+
import from rich.panel { Panel }
|
|
12
|
+
import from rich.table { Table }
|
|
13
|
+
import from rich.theme { Theme }
|
|
14
|
+
import from jaclang.cli.console { JacConsole as BaseJacConsole }
|
|
15
|
+
|
|
16
|
+
"""Rich-enhanced console that extends base JacConsole."""
|
|
17
|
+
class JacSuperConsole(BaseJacConsole) {
|
|
18
|
+
with entry {
|
|
19
|
+
JAC_THEME = Theme(
|
|
20
|
+
{
|
|
21
|
+
'success': 'bold green',
|
|
22
|
+
'error': 'bold red',
|
|
23
|
+
'warning': 'bold yellow',
|
|
24
|
+
'info': 'bold cyan',
|
|
25
|
+
'url': 'underline green',
|
|
26
|
+
'muted': 'dim white',
|
|
27
|
+
'highlight': 'bold cyan',
|
|
28
|
+
'time': 'yellow'
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
"""Initialize the Rich console with Jac theme."""
|
|
34
|
+
def init(self: JacSuperConsole) -> None {
|
|
35
|
+
# Call parent init first
|
|
36
|
+
BaseJacConsole.init(self);
|
|
37
|
+
# Initialize Rich consoles
|
|
38
|
+
self._console = RichConsole(theme=self.JAC_THEME);
|
|
39
|
+
self._console_stderr = RichConsole(theme=self.JAC_THEME, file=sys.stderr);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
"""Override print to use Rich console."""
|
|
43
|
+
def print(self: JacSuperConsole, *args: Any, **kwargs: Any) -> None {
|
|
44
|
+
# Extract style if provided, otherwise use default
|
|
45
|
+
style = kwargs.pop('style', None);
|
|
46
|
+
file = kwargs.pop('file', None);
|
|
47
|
+
# Use appropriate console based on file
|
|
48
|
+
console = self._console_stderr if (file == sys.stderr) else self._console;
|
|
49
|
+
if style {
|
|
50
|
+
console.print(*args, style=style, **kwargs);
|
|
51
|
+
} else {
|
|
52
|
+
console.print(*args, **kwargs);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
"""Override status to use Rich console status."""
|
|
57
|
+
def status(self: JacSuperConsole, *args: Any, **kwargs: Any) -> object {
|
|
58
|
+
return self._console.status(*args, **kwargs);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
"""Override success to use Rich styling."""
|
|
62
|
+
def success(self: JacSuperConsole, message: str, emoji: bool = True) -> None {
|
|
63
|
+
prefix = '✔' if (emoji and self.use_emoji) else '[SUCCESS]';
|
|
64
|
+
self._console.print(f"{prefix} {message}", style='success');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
"""Override error to use Rich styling with stderr."""
|
|
68
|
+
def error(
|
|
69
|
+
self: JacSuperConsole,
|
|
70
|
+
message: str,
|
|
71
|
+
hint: (str | None) = None,
|
|
72
|
+
emoji: bool = True
|
|
73
|
+
) -> None {
|
|
74
|
+
prefix = '✖' if (emoji and self.use_emoji) else '[ERROR]';
|
|
75
|
+
self._console_stderr.print(f"{prefix} Error: {message}", style='error');
|
|
76
|
+
if hint {
|
|
77
|
+
hint_prefix = '💡' if self.use_emoji else 'HINT:';
|
|
78
|
+
self._console_stderr.print(f"{hint_prefix} {hint}", style='info');
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
"""Override warning to use Rich styling."""
|
|
83
|
+
def warning(self: JacSuperConsole, message: str, emoji: bool = True) -> None {
|
|
84
|
+
prefix = '⚠' if (emoji and self.use_emoji) else '[WARNING]';
|
|
85
|
+
self._console.print(f"{prefix} {message}", style='warning');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
"""Override info to use Rich styling."""
|
|
89
|
+
def info(self: JacSuperConsole, message: str, emoji: bool = True) -> None {
|
|
90
|
+
prefix = 'ℹ' if (emoji and self.use_emoji) else '[INFO]';
|
|
91
|
+
self._console.print(f"{prefix} {message}", style='info');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
"""Override print_header to use Rich styling."""
|
|
95
|
+
def print_header(
|
|
96
|
+
self: JacSuperConsole, title: str, version: (str | None) = None
|
|
97
|
+
) -> None {
|
|
98
|
+
if version {
|
|
99
|
+
self._console.print(f"{title} v{version}", style='bold cyan');
|
|
100
|
+
} else {
|
|
101
|
+
self._console.print(f"{title}", style='bold cyan');
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
"""Override print_urls to use Rich URL styling."""
|
|
106
|
+
def print_urls(self: JacSuperConsole, urls: Any, symbol: str = '➜') -> None {
|
|
107
|
+
items = urls.items() if isinstance(urls, <>dict) else urls;
|
|
108
|
+
for (label, url) in items {
|
|
109
|
+
padded_label = f"{label}:".ljust(10);
|
|
110
|
+
self._console.print(f" {symbol} {padded_label} [url]{url}[/url]");
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
"""Override print_next_steps to use Rich Panel."""
|
|
115
|
+
def print_next_steps(
|
|
116
|
+
self: JacSuperConsole, steps: list[str], title: str = 'Next Steps'
|
|
117
|
+
) -> None {
|
|
118
|
+
content = '\n'.join(f" {i} {step}" for (i, step) in enumerate(steps, 1));
|
|
119
|
+
panel = Panel(content, title=title, border_style='cyan', padding=(0, 1));
|
|
120
|
+
self._console.print(panel);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
"""Override print_list to use Rich styling."""
|
|
124
|
+
def print_list(
|
|
125
|
+
self: JacSuperConsole,
|
|
126
|
+
items: list[str],
|
|
127
|
+
style: str = 'success',
|
|
128
|
+
symbol: str = '✔'
|
|
129
|
+
) -> None {
|
|
130
|
+
for item in items {
|
|
131
|
+
self._console.print(f" {symbol} {item}", style=style);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
"""Override print_table to use Rich Table."""
|
|
136
|
+
def print_table(
|
|
137
|
+
self: JacSuperConsole,
|
|
138
|
+
headers: list[str],
|
|
139
|
+
rows: list[list[str]],
|
|
140
|
+
title: (str | None) = None
|
|
141
|
+
) -> None {
|
|
142
|
+
table = Table(title=title, show_header=True, header_style='bold cyan');
|
|
143
|
+
for header in headers {
|
|
144
|
+
table.add_column(header);
|
|
145
|
+
}
|
|
146
|
+
for row in rows {
|
|
147
|
+
table.add_row(*row);
|
|
148
|
+
}
|
|
149
|
+
self._console.print(table);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
"""Override spinner to use Rich status."""
|
|
153
|
+
@contextmanager
|
|
154
|
+
def spinner(self: JacSuperConsole, text: str) -> object {
|
|
155
|
+
with self._console.status(f"[cyan]{text}[/cyan]", spinner='dots') as status {
|
|
156
|
+
yield status;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
"""Override print_elapsed_time to use Rich styling."""
|
|
161
|
+
def print_elapsed_time(self: JacSuperConsole, seconds: float) -> None {
|
|
162
|
+
if (seconds < 1) {
|
|
163
|
+
ms = seconds * 1000;
|
|
164
|
+
self._console.print(f" Done in {ms:.0f}ms", style='muted');
|
|
165
|
+
} else {
|
|
166
|
+
self._console.print(f" Done in {seconds:.1f}s", style='muted');
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
"""Override print_file_change to use Rich styling."""
|
|
171
|
+
def print_file_change(
|
|
172
|
+
self: JacSuperConsole, filepath: str, action: str = 'changed'
|
|
173
|
+
) -> None {
|
|
174
|
+
import from datetime { datetime }
|
|
175
|
+
timestamp = datetime.now().strftime('%H:%M:%S');
|
|
176
|
+
emoji_map = {'changed': '⚡', 'created': '✨', 'deleted': '🗑️'};
|
|
177
|
+
emoji = emoji_map.get(action, '📝');
|
|
178
|
+
self._console.print(
|
|
179
|
+
f"[{timestamp}] {emoji} {action.capitalize()}: {filepath}", style='info'
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
"""Override print_watching to use Rich styling."""
|
|
184
|
+
def print_watching(self: JacSuperConsole, pattern: str, count: int) -> None {
|
|
185
|
+
watch_emoji = '👀' if self.use_emoji else '[WATCHING]';
|
|
186
|
+
self._console.print(f"{watch_emoji} Watching for changes...", style='info');
|
|
187
|
+
self._console.print(f" Monitoring: {pattern} ({count} files)", style='muted');
|
|
188
|
+
}
|
|
189
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: jac-super
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Enhanced console output for Jac CLI with Rich formatting
|
|
5
|
+
Author-email: Jason Mars <jason@mars.ninja>
|
|
6
|
+
Maintainer-email: Jason Mars <jason@mars.ninja>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Repository, https://github.com/Jaseci-Labs/jaseci
|
|
9
|
+
Project-URL: Homepage, https://jaseci.org
|
|
10
|
+
Project-URL: Documentation, https://jac-lang.org
|
|
11
|
+
Keywords: jac,jaclang,jaseci,console,rich,cli
|
|
12
|
+
Requires-Python: >=3.12
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Requires-Dist: jaclang>=0.9.9
|
|
15
|
+
Requires-Dist: rich>=13.0.0
|
|
16
|
+
|
|
17
|
+
# Jac Super
|
|
18
|
+
|
|
19
|
+
Enhanced console output plugin for Jac CLI with Rich formatting.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install jac-super
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Once installed, the plugin automatically registers and enhances all Jac CLI command output.
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
No configuration required. After installation, jac-super automatically enhances output for all Jac commands:
|
|
32
|
+
|
|
33
|
+
- `jac create` - Enhanced project creation messages
|
|
34
|
+
- `jac start` - Server startup and status messages
|
|
35
|
+
- `jac run` - Formatted execution output
|
|
36
|
+
- `jac config` - Styled configuration display
|
|
37
|
+
|
|
38
|
+
## Environment Variables
|
|
39
|
+
|
|
40
|
+
| Variable | Effect |
|
|
41
|
+
|----------|--------|
|
|
42
|
+
| `NO_COLOR` | Disables colors (fallback to base console) |
|
|
43
|
+
| `NO_EMOJI` | Disables emojis (uses text labels) |
|
|
44
|
+
| `TERM=dumb` | Disables both colors and emojis |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
jac_super/__init__.py
|
|
4
|
+
jac_super.egg-info/PKG-INFO
|
|
5
|
+
jac_super.egg-info/SOURCES.txt
|
|
6
|
+
jac_super.egg-info/dependency_links.txt
|
|
7
|
+
jac_super.egg-info/entry_points.txt
|
|
8
|
+
jac_super.egg-info/requires.txt
|
|
9
|
+
jac_super.egg-info/top_level.txt
|
|
10
|
+
jac_super/plugin/console.jac
|
|
11
|
+
jac_super/plugin/impl/console.impl.jac
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
jac_super
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "jac-super"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Enhanced console output for Jac CLI with Rich formatting"
|
|
5
|
+
authors = [{name = "Jason Mars", email = "jason@mars.ninja"}]
|
|
6
|
+
maintainers = [{name = "Jason Mars", email = "jason@mars.ninja"}]
|
|
7
|
+
license = "MIT"
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
keywords = [
|
|
10
|
+
"jac",
|
|
11
|
+
"jaclang",
|
|
12
|
+
"jaseci",
|
|
13
|
+
"console",
|
|
14
|
+
"rich",
|
|
15
|
+
"cli",
|
|
16
|
+
]
|
|
17
|
+
requires-python = ">=3.12"
|
|
18
|
+
dependencies = [
|
|
19
|
+
"jaclang>=0.9.9",
|
|
20
|
+
"rich>=13.0.0",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[project.urls]
|
|
24
|
+
Repository = "https://github.com/Jaseci-Labs/jaseci"
|
|
25
|
+
Homepage = "https://jaseci.org"
|
|
26
|
+
Documentation = "https://jac-lang.org"
|
|
27
|
+
|
|
28
|
+
[project.entry-points."jac"]
|
|
29
|
+
console = "jac_super.plugin.console:JacSuperPlugin"
|
|
30
|
+
|
|
31
|
+
[tool.setuptools.packages.find]
|
|
32
|
+
include = ["jac_super*"]
|
|
33
|
+
|
|
34
|
+
[tool.setuptools.package-data]
|
|
35
|
+
"*" = ["*.jac", "*.impl/*.jac"]
|
|
36
|
+
|
|
37
|
+
[build-system]
|
|
38
|
+
requires = ["setuptools>=61.0"]
|
|
39
|
+
build-backend = "setuptools.build_meta"
|