Rename CLI and registry references to jpm
Updates tooling branding and configuration to use the jpm name and related defaults. - Aligns CLI messaging and docs to reference jpm instead of previous name. - Updates registry entry defaults (repository URL, destination path). - Changes temporary working directory prefix used during fetch operations. - Adds project SDK configuration entries for the IDE. - Adjusts README usage instructions to match the renamed commands. These changes keep tooling, docs, and runtime behavior consistent with the jpm namespace.
This commit is contained in:
Generated
+1
@@ -4,6 +4,7 @@
|
|||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
||||||
</content>
|
</content>
|
||||||
|
<orderEntry type="jdk" jdkName="uv (jpm)" jdkType="Python SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
Generated
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
<component name="Black">
|
<component name="Black">
|
||||||
<option name="sdkName" value="uv (jeAddons)" />
|
<option name="sdkName" value="uv (jeAddons)" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" />
|
<component name="ProjectRootManager" version="2" project-jdk-name="uv (jpm)" project-jdk-type="Python SDK" />
|
||||||
<component name="RuffConfiguration">
|
<component name="RuffConfiguration">
|
||||||
<option name="enabled" value="true" />
|
<option name="enabled" value="true" />
|
||||||
<option name="inspections" value="false" />
|
<option name="inspections" value="false" />
|
||||||
|
|||||||
@@ -2,21 +2,21 @@
|
|||||||
|
|
||||||
Clone a file or folder from Git repositories into your current project.
|
Clone a file or folder from Git repositories into your current project.
|
||||||
|
|
||||||
`add` is registry-based (like `shadcn add`): you manage entries in a dict.
|
`add` is registry-based: you manage entries in a dict.
|
||||||
|
|
||||||
## Usage with uvx
|
## Usage with uvx
|
||||||
|
|
||||||
1. Edit `jeAddons/registry.py` and add entries to `REGISTRY`.
|
1. Edit `jpm/registry.py` and add entries to `REGISTRY`.
|
||||||
2. Run:
|
2. Run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uvx jeaddons add <name> [--ref <branch-or-tag>] [--dest <target-dir>] [--force]
|
uvx jpm add <name> [--ref <branch-or-tag>] [--dest <target-dir>] [--force]
|
||||||
```
|
```
|
||||||
|
|
||||||
3. See available names:
|
3. See available names:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uvx jeaddons list
|
uvx jpm list
|
||||||
```
|
```
|
||||||
|
|
||||||
## Registry example
|
## Registry example
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ def add(
|
|||||||
entry = get_registry_entry(name)
|
entry = get_registry_entry(name)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
typer.echo(f"Unknown registry entry: '{name}'.")
|
typer.echo(f"Unknown registry entry: '{name}'.")
|
||||||
typer.echo("Run `jeaddons list` to show available entries.")
|
typer.echo("Run `jpm list` to show available entries.")
|
||||||
raise typer.Exit(1)
|
raise typer.Exit(1)
|
||||||
|
|
||||||
repo = entry.get("repo")
|
repo = entry.get("repo")
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ from pathlib import Path
|
|||||||
|
|
||||||
|
|
||||||
def fetch_path(repo_url: str, repo_path: str, dest: Path, ref: str = "HEAD", force: bool = False):
|
def fetch_path(repo_url: str, repo_path: str, dest: Path, ref: str = "HEAD", force: bool = False):
|
||||||
with tempfile.TemporaryDirectory(prefix="jeaddons-") as tmp:
|
with tempfile.TemporaryDirectory(prefix="jpm-") as tmp:
|
||||||
tmp_path = Path(tmp)
|
tmp_path = Path(tmp)
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
["git", "clone", "--filter=blob:none", "--no-checkout", "--depth", "1", repo_url, str(tmp_path)]
|
["git", "clone", "--filter=blob:none", "--no-checkout", "--depth", "1", repo_url, str(tmp_path)]
|
||||||
|
|||||||
+2
-2
@@ -12,10 +12,10 @@ class RegistryEntry(TypedDict, total=False):
|
|||||||
# Key = addon name you pass to `jpm add <name>`.
|
# Key = addon name you pass to `jpm add <name>`.
|
||||||
REGISTRY: dict[str, RegistryEntry] = {
|
REGISTRY: dict[str, RegistryEntry] = {
|
||||||
"AddOn_CYCLE800_Turning": {
|
"AddOn_CYCLE800_Turning": {
|
||||||
"repo": "xxx",
|
"repo": "https://dev.azure.com/janus-engineering-customers/AddonPool/_git/addon_B-Axis_Turning_tnc640",
|
||||||
"path": "AddOn_CYCLE800_Turning/",
|
"path": "AddOn_CYCLE800_Turning/",
|
||||||
"ref": "main",
|
"ref": "main",
|
||||||
"dest": "AddOn/AddOn_CYCLE800_Turning/",
|
"dest": "AddOn/",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user