Skip to content

Commit df32e21

Browse files
committed
release 1.2.1 - community extensions
1 parent 88332d3 commit df32e21

8 files changed

Lines changed: 40 additions & 22 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<p align="center">
88
<a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-green?style=for-the-badge"></a>
99
<a href="https://www.python.org/downloads/"><img alt="Python 3.11+" src="https://img.shields.io/badge/Python-3.11%2B-blue?style=for-the-badge&logo=python&logoColor=white"></a>
10-
<a href="../../releases/latest"><img alt="Latest release" src="https://img.shields.io/badge/Release-v1.2.0-blue?style=for-the-badge"></a>
10+
<a href="../../releases/latest"><img alt="Latest release" src="https://img.shields.io/badge/Release-v1.2.1-blue?style=for-the-badge"></a>
1111
<a href="https://discord.gg/cSUS88VdY9"><img alt="Join our Discord" src="https://img.shields.io/badge/Discord-Join%20the%20community-5865F2?logo=discord&logoColor=white&style=for-the-badge"></a>
1212
</p>
1313

core/extensions/.cache/registry.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
# PyPI name; the import package is `inline_core` (src/inline_core).
33
name = "inline-core"
4-
version = "1.2.0"
4+
version = "1.2.1"
55
description = "The generation engine behind Inline Studio."
66
readme = "README.md"
77
requires-python = ">=3.11"

core/src/inline_core/extensions/handlers.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ def status() -> dict[str, Any]:
5050
}
5151

5252
def versions(extension_id: str) -> dict[str, Any]:
53-
extension = ExtensionsRoot.resolve().extension(extension_id)
53+
extension = installer.paths.extension(extension_id)
5454
return {
5555
"extensionId": extension_id,
5656
"current": extension.current() or "",
5757
"versions": extension.installed_versions(),
5858
}
5959

6060
def registry_index(refresh: bool = False) -> dict[str, Any]:
61-
return _registry_index(refresh=refresh)
61+
return _registry_index(installer.paths, refresh=refresh)
6262

6363
reg("list", installer.list_packs)
6464
reg("status", status)
@@ -72,13 +72,12 @@ def registry_index(refresh: bool = False) -> dict[str, Any]:
7272
reg("registryIndex", registry_index)
7373

7474

75-
def _registry_index(*, refresh: bool) -> dict[str, Any]:
75+
def _registry_index(paths: ExtensionsRoot, *, refresh: bool) -> dict[str, Any]:
7676
"""The published extension list, from ``config.registry_url()``.
7777
7878
Cached on disk with its ETag: a refresh is a conditional GET, and an unreachable registry
7979
degrades to the cached entries marked ``stale`` rather than an empty dialog.
8080
"""
81-
paths = ExtensionsRoot.resolve()
8281
cached, etag = _read_cache(paths)
8382
if not refresh and cached is not None:
8483
return {"entries": cached, "stale": False}

core/src/inline_core/extensions/install.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@ def __init__(
146146
def state(self) -> StateStore:
147147
return self._state
148148

149+
@property
150+
def paths(self) -> ExtensionsRoot:
151+
"""The root this installer works in. Callers must use this rather than resolving from the
152+
environment, or they silently read and write a different directory."""
153+
return self._paths
154+
149155
# --- install ----------------------------------------------------------------------------------
150156

151157
async def install(self, request: InstallRequest) -> InstallResult:

core/tests/test_extension_install.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,3 +486,30 @@ def emit(self, event: Any) -> None:
486486

487487
written = list(takes_dir.glob("*.png"))
488488
assert len(written) == 1, "the run wrote exactly one take"
489+
490+
491+
def test_every_channel_uses_the_installers_root_not_the_environment(
492+
installer: Installer, tmp_path: Path
493+
) -> None:
494+
"""A regression guard: handlers once resolved the root from the environment, so `versions` and
495+
`registryIndex` read and wrote a different directory than the installer used - which quietly
496+
littered the repo's default `./extensions` during tests."""
497+
import asyncio
498+
499+
from inline_core.extensions.handlers import register_extension_handlers
500+
501+
rpc = RpcRouter()
502+
register_extension_handlers(rpc, installer)
503+
_install(installer, _make_repo(tmp_path, _renamed(MANIFEST, "root-extension")))
504+
505+
async def call(channel: str, args: list[Any]) -> Any:
506+
out = await rpc.dispatch(channel, args)
507+
assert out["ok"], out
508+
return out["value"]
509+
510+
versions = asyncio.run(call("ext:manage:versions", ["root-extension"]))
511+
assert versions["versions"], "versions must be read from the installer's own root"
512+
513+
# The registry cache must land under the installer's root, never the process default.
514+
asyncio.run(call("ext:manage:registryIndex", []))
515+
assert not (Path.cwd() / "extensions").exists(), "wrote to the default root instead"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "inline-studio",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "An experimentation layer for visual artists: a node canvas for building generative pipelines, served by the Inline Core engine.",
55
"author": "Inline Studio",
66
"license": "MIT",

packages/frontend/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "inline-studio-frontend"
3-
version = "1.2.0"
3+
version = "1.2.1"
44
description = "Prebuilt Inline Studio web UI (SPA), served by Inline Core. Mirrors comfyui-frontend-package."
55
requires-python = ">=3.9"
66
readme = "README.md"

0 commit comments

Comments
 (0)