jupyterlab-basic-terminal-extension 1.0.4__py3-none-any.whl
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.
- jupyterlab_basic_terminal_extension/__init__.py +36 -0
- jupyterlab_basic_terminal_extension/_version.py +4 -0
- jupyterlab_basic_terminal_extension/routes.py +108 -0
- jupyterlab_basic_terminal_extension/tests/__init__.py +1 -0
- jupyterlab_basic_terminal_extension/tests/test_routes.py +67 -0
- jupyterlab_basic_terminal_extension-1.0.4.data/data/etc/jupyter/jupyter_server_config.d/jupyterlab_basic_terminal_extension.json +7 -0
- jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/install.json +5 -0
- jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/package.json +215 -0
- jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/static/728.a25d41edb6143d6a757e.js +1 -0
- jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/static/750.02aabe6e0e0039a3f480.js +1 -0
- jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/static/remoteEntry.045071124c199f15feec.js +1 -0
- jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/static/style.js +4 -0
- jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/static/third-party-licenses.json +16 -0
- jupyterlab_basic_terminal_extension-1.0.4.dist-info/METADATA +98 -0
- jupyterlab_basic_terminal_extension-1.0.4.dist-info/RECORD +17 -0
- jupyterlab_basic_terminal_extension-1.0.4.dist-info/WHEEL +4 -0
- jupyterlab_basic_terminal_extension-1.0.4.dist-info/licenses/LICENSE +29 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
try:
|
|
2
|
+
from ._version import __version__
|
|
3
|
+
except ImportError:
|
|
4
|
+
# Fallback when using the package in dev mode without installing
|
|
5
|
+
# in editable mode with pip. It is highly recommended to install
|
|
6
|
+
# the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
|
|
7
|
+
import warnings
|
|
8
|
+
warnings.warn("Importing 'jupyterlab_basic_terminal_extension' outside a proper installation.")
|
|
9
|
+
__version__ = "dev"
|
|
10
|
+
from .routes import setup_route_handlers
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _jupyter_labextension_paths():
|
|
14
|
+
return [{
|
|
15
|
+
"src": "labextension",
|
|
16
|
+
"dest": "jupyterlab_basic_terminal_extension"
|
|
17
|
+
}]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _jupyter_server_extension_points():
|
|
21
|
+
return [{
|
|
22
|
+
"module": "jupyterlab_basic_terminal_extension"
|
|
23
|
+
}]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _load_jupyter_server_extension(server_app):
|
|
27
|
+
"""Registers the API handler to receive HTTP requests from the frontend extension.
|
|
28
|
+
|
|
29
|
+
Parameters
|
|
30
|
+
----------
|
|
31
|
+
server_app: jupyterlab.labapp.LabApp
|
|
32
|
+
JupyterLab application instance
|
|
33
|
+
"""
|
|
34
|
+
setup_route_handlers(server_app.web_app)
|
|
35
|
+
name = "jupyterlab_basic_terminal_extension"
|
|
36
|
+
server_app.log.info(f"Registered {name} server extension")
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""Tornado API handlers for the basic terminal extension."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import json
|
|
5
|
+
import os
|
|
6
|
+
|
|
7
|
+
import tornado
|
|
8
|
+
from jupyter_server.base.handlers import APIHandler
|
|
9
|
+
from jupyter_server.utils import url_path_join
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
URL_PREFIX = "jupyterlab-basic-terminal-extension"
|
|
13
|
+
|
|
14
|
+
# bash one-liner that polls `stty size` until the WebSocket client has resized
|
|
15
|
+
# the pty to a usable window (>=20x80), clears the screen, then `exec`s the
|
|
16
|
+
# real argv. The exec replaces bash so the pty's only process is the target -
|
|
17
|
+
# auto-close on exit still works. 5s timeout means if no client ever connects,
|
|
18
|
+
# we still launch rather than hanging the pty forever.
|
|
19
|
+
_INIT_WAITER = (
|
|
20
|
+
"for i in $(seq 1 50); do "
|
|
21
|
+
"read r c < <(stty size 2>/dev/null || echo '0 0'); "
|
|
22
|
+
'if [ "$r" -ge 20 ] && [ "$c" -ge 80 ]; then break; fi; '
|
|
23
|
+
"sleep 0.1; "
|
|
24
|
+
"done; "
|
|
25
|
+
"clear; "
|
|
26
|
+
'exec "$@"'
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _wrap_with_init(argv: list[str]) -> list[str]:
|
|
31
|
+
"""Prepend the terminal-init waiter so the spawned argv only starts once
|
|
32
|
+
the JL terminal widget has connected and sized the pty."""
|
|
33
|
+
return ["/bin/bash", "-c", _INIT_WAITER, "basic-terminal-init", *argv]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class LaunchTerminalHandler(APIHandler):
|
|
37
|
+
"""Spawn a JL terminal whose pty's only process is the supplied argv.
|
|
38
|
+
|
|
39
|
+
Bypasses ``terminal:create-new`` (which spawns the user's $SHELL) by
|
|
40
|
+
calling ``jupyter_server_terminals``' ``TerminalManager.create`` with
|
|
41
|
+
terminado's per-call ``shell_command`` kwarg. A short bash waiter
|
|
42
|
+
(``_INIT_WAITER``) ``exec``s into the caller-supplied argv only after
|
|
43
|
+
the WebSocket client has resized the pty to a usable window, so dialog /
|
|
44
|
+
TUI utilities see a real terminal size at launch instead of the pty's
|
|
45
|
+
default. After exec the pty's only process is the target - when it
|
|
46
|
+
exits, the JL tab closes.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
@tornado.web.authenticated
|
|
50
|
+
async def post(self) -> None:
|
|
51
|
+
try:
|
|
52
|
+
body = json.loads(self.request.body or b"{}")
|
|
53
|
+
except json.JSONDecodeError:
|
|
54
|
+
self.set_status(400)
|
|
55
|
+
self.finish(json.dumps({"error": "invalid_json"}))
|
|
56
|
+
return
|
|
57
|
+
|
|
58
|
+
argv = body.get("argv")
|
|
59
|
+
if (
|
|
60
|
+
not isinstance(argv, list)
|
|
61
|
+
or not argv
|
|
62
|
+
or not all(isinstance(a, str) and a for a in argv)
|
|
63
|
+
):
|
|
64
|
+
self.set_status(400)
|
|
65
|
+
self.finish(json.dumps({"error": "invalid_argv"}))
|
|
66
|
+
return
|
|
67
|
+
|
|
68
|
+
cwd = body.get("cwd")
|
|
69
|
+
if cwd is not None:
|
|
70
|
+
if not isinstance(cwd, str) or not os.path.isdir(cwd):
|
|
71
|
+
self.set_status(400)
|
|
72
|
+
self.finish(json.dumps({"error": "invalid_cwd"}))
|
|
73
|
+
return
|
|
74
|
+
|
|
75
|
+
terminal_manager = self.settings.get("terminal_manager")
|
|
76
|
+
if terminal_manager is None:
|
|
77
|
+
self.set_status(503)
|
|
78
|
+
self.finish(json.dumps({"error": "terminal_service_unavailable"}))
|
|
79
|
+
return
|
|
80
|
+
|
|
81
|
+
kwargs: dict = {"shell_command": _wrap_with_init(argv)}
|
|
82
|
+
if cwd is not None:
|
|
83
|
+
kwargs["cwd"] = cwd
|
|
84
|
+
model = terminal_manager.create(**kwargs)
|
|
85
|
+
|
|
86
|
+
name = (
|
|
87
|
+
model.get("name") if isinstance(model, dict) else getattr(model, "name", None)
|
|
88
|
+
)
|
|
89
|
+
if not isinstance(name, str):
|
|
90
|
+
self.set_status(500)
|
|
91
|
+
self.finish(json.dumps({"error": "terminal_create_failed"}))
|
|
92
|
+
return
|
|
93
|
+
|
|
94
|
+
self.finish(json.dumps({"terminal_name": name}))
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def setup_route_handlers(web_app) -> None:
|
|
98
|
+
host_pattern = ".*$"
|
|
99
|
+
base_url = web_app.settings["base_url"]
|
|
100
|
+
|
|
101
|
+
handlers = [
|
|
102
|
+
(
|
|
103
|
+
url_path_join(base_url, URL_PREFIX, "launch-terminal"),
|
|
104
|
+
LaunchTerminalHandler,
|
|
105
|
+
),
|
|
106
|
+
]
|
|
107
|
+
|
|
108
|
+
web_app.add_handlers(host_pattern, handlers)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Python unit tests for jupyterlab_basic_terminal_extension."""
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
URL_PATH = ("jupyterlab-basic-terminal-extension", "launch-terminal")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
async def _post(jp_fetch, body):
|
|
10
|
+
return await jp_fetch(
|
|
11
|
+
*URL_PATH,
|
|
12
|
+
method="POST",
|
|
13
|
+
body=json.dumps(body),
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
async def test_invalid_json(jp_fetch):
|
|
18
|
+
with pytest.raises(Exception) as exc:
|
|
19
|
+
await jp_fetch(
|
|
20
|
+
*URL_PATH,
|
|
21
|
+
method="POST",
|
|
22
|
+
body="not json",
|
|
23
|
+
)
|
|
24
|
+
assert "400" in str(exc.value)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@pytest.mark.parametrize(
|
|
28
|
+
"body",
|
|
29
|
+
[
|
|
30
|
+
{},
|
|
31
|
+
{"argv": []},
|
|
32
|
+
{"argv": "echo hello"},
|
|
33
|
+
{"argv": [""]},
|
|
34
|
+
{"argv": [123]},
|
|
35
|
+
],
|
|
36
|
+
)
|
|
37
|
+
async def test_invalid_argv(jp_fetch, body):
|
|
38
|
+
with pytest.raises(Exception) as exc:
|
|
39
|
+
await _post(jp_fetch, body)
|
|
40
|
+
assert "400" in str(exc.value)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
async def test_invalid_cwd(jp_fetch):
|
|
44
|
+
with pytest.raises(Exception) as exc:
|
|
45
|
+
await _post(
|
|
46
|
+
jp_fetch,
|
|
47
|
+
{"argv": ["echo", "hi"], "cwd": "/this/path/does/not/exist/xyz"},
|
|
48
|
+
)
|
|
49
|
+
assert "400" in str(exc.value)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
async def test_launch_returns_terminal_name(jp_fetch, tmp_path):
|
|
53
|
+
response = await _post(
|
|
54
|
+
jp_fetch,
|
|
55
|
+
{"argv": ["echo", "hello"], "cwd": str(tmp_path)},
|
|
56
|
+
)
|
|
57
|
+
assert response.code == 200
|
|
58
|
+
payload = json.loads(response.body)
|
|
59
|
+
assert isinstance(payload.get("terminal_name"), str)
|
|
60
|
+
assert payload["terminal_name"]
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
async def test_launch_without_cwd(jp_fetch):
|
|
64
|
+
response = await _post(jp_fetch, {"argv": ["echo", "hello"]})
|
|
65
|
+
assert response.code == 200
|
|
66
|
+
payload = json.loads(response.body)
|
|
67
|
+
assert isinstance(payload.get("terminal_name"), str)
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jupyterlab_basic_terminal_extension",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Jupyterlab extension to make a command that allows launching a utility terminal that runs without shell. This can be used to start and show console utilities, that when finished - close the terminal window / tab",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"jupyter",
|
|
7
|
+
"jupyterlab",
|
|
8
|
+
"jupyterlab-extension"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/stellarshenson/jupyterlab_basic_terminal_extension",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/stellarshenson/jupyterlab_basic_terminal_extension/issues"
|
|
13
|
+
},
|
|
14
|
+
"license": "BSD-3-Clause",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Stellars Henson",
|
|
17
|
+
"email": "konrad.jelen@gmail.com"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
21
|
+
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
|
|
22
|
+
"src/**/*.{ts,tsx}"
|
|
23
|
+
],
|
|
24
|
+
"main": "lib/index.js",
|
|
25
|
+
"types": "lib/index.d.ts",
|
|
26
|
+
"style": "style/index.css",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/stellarshenson/jupyterlab_basic_terminal_extension.git"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "jlpm build:lib && jlpm build:labextension:dev",
|
|
33
|
+
"build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
|
|
34
|
+
"build:labextension": "jupyter labextension build .",
|
|
35
|
+
"build:labextension:dev": "jupyter labextension build --development True .",
|
|
36
|
+
"build:lib": "tsc --sourceMap",
|
|
37
|
+
"build:lib:prod": "tsc",
|
|
38
|
+
"clean": "jlpm clean:lib",
|
|
39
|
+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
|
|
40
|
+
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
|
|
41
|
+
"clean:labextension": "rimraf jupyterlab_basic_terminal_extension/labextension jupyterlab_basic_terminal_extension/_version.py",
|
|
42
|
+
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
|
|
43
|
+
"eslint": "jlpm eslint:check --fix",
|
|
44
|
+
"eslint:check": "eslint . --cache --ext .ts,.tsx",
|
|
45
|
+
"install:extension": "jlpm build",
|
|
46
|
+
"lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
|
|
47
|
+
"lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
|
|
48
|
+
"prettier": "jlpm prettier:base --write --list-different",
|
|
49
|
+
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
|
|
50
|
+
"prettier:check": "jlpm prettier:base --check",
|
|
51
|
+
"stylelint": "jlpm stylelint:check --fix",
|
|
52
|
+
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
|
|
53
|
+
"test": "jest --coverage",
|
|
54
|
+
"watch": "run-p watch:src watch:labextension",
|
|
55
|
+
"watch:src": "tsc -w --sourceMap",
|
|
56
|
+
"watch:labextension": "jupyter labextension watch ."
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@jupyterlab/application": "^4.0.0",
|
|
60
|
+
"@jupyterlab/coreutils": "^6.0.0",
|
|
61
|
+
"@jupyterlab/services": "^7.0.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@jupyterlab/builder": "^4.0.0",
|
|
65
|
+
"@jupyterlab/testutils": "^4.0.0",
|
|
66
|
+
"@types/jest": "^29.2.0",
|
|
67
|
+
"@types/json-schema": "^7.0.11",
|
|
68
|
+
"@types/react": "^18.0.26",
|
|
69
|
+
"@types/react-addons-linked-state-mixin": "^0.14.22",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
71
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
72
|
+
"css-loader": "^6.7.1",
|
|
73
|
+
"eslint": "^8.36.0",
|
|
74
|
+
"eslint-config-prettier": "^8.8.0",
|
|
75
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
76
|
+
"jest": "^29.2.0",
|
|
77
|
+
"mkdirp": "^1.0.3",
|
|
78
|
+
"npm-run-all2": "^7.0.1",
|
|
79
|
+
"prettier": "^3.0.0",
|
|
80
|
+
"rimraf": "^5.0.1",
|
|
81
|
+
"source-map-loader": "^1.0.2",
|
|
82
|
+
"style-loader": "^3.3.1",
|
|
83
|
+
"stylelint": "^15.10.1",
|
|
84
|
+
"stylelint-config-recommended": "^13.0.0",
|
|
85
|
+
"stylelint-config-standard": "^34.0.0",
|
|
86
|
+
"stylelint-csstree-validator": "^3.0.0",
|
|
87
|
+
"stylelint-prettier": "^4.0.0",
|
|
88
|
+
"typescript": "~5.8.0",
|
|
89
|
+
"yjs": "^13.5.0"
|
|
90
|
+
},
|
|
91
|
+
"resolutions": {
|
|
92
|
+
"lib0": "0.2.111"
|
|
93
|
+
},
|
|
94
|
+
"sideEffects": [
|
|
95
|
+
"style/*.css",
|
|
96
|
+
"style/index.js"
|
|
97
|
+
],
|
|
98
|
+
"styleModule": "style/index.js",
|
|
99
|
+
"publishConfig": {
|
|
100
|
+
"access": "public"
|
|
101
|
+
},
|
|
102
|
+
"jupyterlab": {
|
|
103
|
+
"discovery": {
|
|
104
|
+
"server": {
|
|
105
|
+
"managers": [
|
|
106
|
+
"pip"
|
|
107
|
+
],
|
|
108
|
+
"base": {
|
|
109
|
+
"name": "jupyterlab_basic_terminal_extension"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"extension": true,
|
|
114
|
+
"outputDir": "jupyterlab_basic_terminal_extension/labextension",
|
|
115
|
+
"_build": {
|
|
116
|
+
"load": "static/remoteEntry.045071124c199f15feec.js",
|
|
117
|
+
"extension": "./extension",
|
|
118
|
+
"style": "./style"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"eslintIgnore": [
|
|
122
|
+
"node_modules",
|
|
123
|
+
"dist",
|
|
124
|
+
"coverage",
|
|
125
|
+
"**/*.d.ts",
|
|
126
|
+
"tests",
|
|
127
|
+
"**/__tests__",
|
|
128
|
+
"ui-tests"
|
|
129
|
+
],
|
|
130
|
+
"eslintConfig": {
|
|
131
|
+
"extends": [
|
|
132
|
+
"eslint:recommended",
|
|
133
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
134
|
+
"plugin:@typescript-eslint/recommended",
|
|
135
|
+
"plugin:prettier/recommended"
|
|
136
|
+
],
|
|
137
|
+
"parser": "@typescript-eslint/parser",
|
|
138
|
+
"parserOptions": {
|
|
139
|
+
"project": "tsconfig.json",
|
|
140
|
+
"sourceType": "module"
|
|
141
|
+
},
|
|
142
|
+
"plugins": [
|
|
143
|
+
"@typescript-eslint"
|
|
144
|
+
],
|
|
145
|
+
"rules": {
|
|
146
|
+
"@typescript-eslint/naming-convention": [
|
|
147
|
+
"error",
|
|
148
|
+
{
|
|
149
|
+
"selector": "interface",
|
|
150
|
+
"format": [
|
|
151
|
+
"PascalCase"
|
|
152
|
+
],
|
|
153
|
+
"custom": {
|
|
154
|
+
"regex": "^I[A-Z]",
|
|
155
|
+
"match": true
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"@typescript-eslint/no-unused-vars": [
|
|
160
|
+
"warn",
|
|
161
|
+
{
|
|
162
|
+
"args": "none"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
166
|
+
"@typescript-eslint/no-namespace": "off",
|
|
167
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
168
|
+
"@typescript-eslint/quotes": [
|
|
169
|
+
"error",
|
|
170
|
+
"single",
|
|
171
|
+
{
|
|
172
|
+
"avoidEscape": true,
|
|
173
|
+
"allowTemplateLiterals": false
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"curly": [
|
|
177
|
+
"error",
|
|
178
|
+
"all"
|
|
179
|
+
],
|
|
180
|
+
"eqeqeq": "error",
|
|
181
|
+
"prefer-arrow-callback": "error"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"prettier": {
|
|
185
|
+
"singleQuote": true,
|
|
186
|
+
"trailingComma": "none",
|
|
187
|
+
"arrowParens": "avoid",
|
|
188
|
+
"endOfLine": "auto",
|
|
189
|
+
"overrides": [
|
|
190
|
+
{
|
|
191
|
+
"files": "package.json",
|
|
192
|
+
"options": {
|
|
193
|
+
"tabWidth": 4
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
"stylelint": {
|
|
199
|
+
"extends": [
|
|
200
|
+
"stylelint-config-recommended",
|
|
201
|
+
"stylelint-config-standard",
|
|
202
|
+
"stylelint-prettier/recommended"
|
|
203
|
+
],
|
|
204
|
+
"plugins": [
|
|
205
|
+
"stylelint-csstree-validator"
|
|
206
|
+
],
|
|
207
|
+
"rules": {
|
|
208
|
+
"csstree/validator": true,
|
|
209
|
+
"property-no-vendor-prefix": null,
|
|
210
|
+
"selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$",
|
|
211
|
+
"selector-no-vendor-prefix": null,
|
|
212
|
+
"value-no-vendor-prefix": null
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkjupyterlab_basic_terminal_extension=self.webpackChunkjupyterlab_basic_terminal_extension||[]).push([[728],{475(e,t,n){n.d(t,{A:()=>s});var r=n(601),a=n.n(r),o=n(314),i=n.n(o)()(a());i.push([e.id,"/*\n See the JupyterLab Developer Guide for useful CSS Patterns:\n\n https://jupyterlab.readthedocs.io/en/stable/developer/css.html\n*/\n",""]);const s=i},314(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,a,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(i[c]=!0)}for(var u=0;u<e.length;u++){var l=[].concat(e[u]);r&&i[l[0]]||(void 0!==o&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),a&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=a):l[4]="".concat(a)),t.push(l))}},t}},601(e){e.exports=function(e){return e[1]}},72(e){var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},i=[],s=0;s<e.length;s++){var c=e[s],u=r.base?c[0]+r.base:c[0],l=o[u]||0,p="".concat(u," ").concat(l);o[u]=l+1;var f=n(p),d={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==f)t[f].references++,t[f].updater(d);else{var v=a(d,r);r.byIndex=s,t.splice(s,0,{identifier:p,updater:v,references:1})}i.push(p)}return i}function a(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,a){var o=r(e=e||[],a=a||{});return function(e){e=e||[];for(var i=0;i<o.length;i++){var s=n(o[i]);t[s].references--}for(var c=r(e,a),u=0;u<o.length;u++){var l=n(o[u]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}o=c}}},659(e){var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540(e){e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56(e,t,n){e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},825(e){e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var a=void 0!==n.layer;a&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,a&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113(e){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},728(e,t,n){var r=n(72),a=n.n(r),o=n(825),i=n.n(o),s=n(659),c=n.n(s),u=n(56),l=n.n(u),p=n(540),f=n.n(p),d=n(113),v=n.n(d),h=n(475),m={};m.styleTagTransform=v(),m.setAttributes=l(),m.insert=c().bind(null,"head"),m.domAPI=i(),m.insertStyleElement=f(),a()(h.A,m),h.A&&h.A.locals&&h.A.locals}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkjupyterlab_basic_terminal_extension=self.webpackChunkjupyterlab_basic_terminal_extension||[]).push([[750],{750(e,n,t){t.r(n),t.d(n,{default:()=>o});var a=t(842),s=t(697);const i="basic-terminal:launch",o={id:"jupyterlab_basic_terminal_extension:plugin",description:"Launch a JupyterLab terminal whose pty runs a utility directly with no shell. The tab is focused on launch and closes when the process exits.",autoStart:!0,activate:e=>{e.commands.addCommand(i,{label:"Launch utility terminal (shell-less)",caption:"Spawn a JupyterLab terminal whose only process is the supplied argv. Tab is focused on launch and closes when the process exits.",execute:async n=>{var t,o,r,l,c;const{argv:d,cwd:u}=n;if(!Array.isArray(d)||0===d.length)throw new Error(`${i}: argv must be a non-empty string array`);const h=await async function(e,n,t={}){const i=a.URLExt.join(n.baseUrl,"jupyterlab-basic-terminal-extension",e);let o;try{o=await s.ServerConnection.makeRequest(i,t,n)}catch(e){throw new s.ServerConnection.NetworkError(e)}let r=await o.text();if(r.length>0)try{r=JSON.parse(r)}catch(e){console.log("Not a JSON response body.",o)}if(!o.ok)throw new s.ServerConnection.ResponseError(o,r.message||r);return r}("launch-terminal",e.serviceManager.serverSettings,{method:"POST",body:JSON.stringify({argv:d,cwd:u})}),p=await e.commands.execute("terminal:open",{name:h.terminal_name});(null==p?void 0:p.id)&&e.shell.activateById(p.id);const m=null===(t=null==p?void 0:p.content)||void 0===t?void 0:t.session;if(m){const e=()=>{p&&!p.isDisposed&&p.dispose()};null===(r=null===(o=m.disposed)||void 0===o?void 0:o.connect)||void 0===r||r.call(o,e),null===(c=null===(l=m.connectionStatusChanged)||void 0===l?void 0:l.connect)||void 0===c||c.call(l,(n,t)=>{"disconnected"===t&&e()})}return p}})}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,n,o,a,i,u,l,s,f,p,d,c,h,v,b,g,m,y={770(e,r,t){var n={"./index":()=>t.e(750).then(()=>()=>t(750)),"./extension":()=>t.e(750).then(()=>()=>t(750)),"./style":()=>t.e(728).then(()=>()=>t(728))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then(()=>{throw new Error('Module "'+e+'" does not exist in container.')}),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},_={};function w(e){var r=_[e];if(void 0!==r)return r.exports;var t=_[e]={id:e,exports:{}};return y[e](t,t.exports,w),t.exports}w.m=y,w.c=_,w.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return w.d(r,{a:r}),r},w.d=(e,r)=>{for(var t in r)w.o(r,t)&&!w.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},w.f={},w.e=e=>Promise.all(Object.keys(w.f).reduce((r,t)=>(w.f[t](e,r),r),[])),w.u=e=>e+"."+{728:"a25d41edb6143d6a757e",750:"02aabe6e0e0039a3f480"}[e]+".js?v="+{728:"a25d41edb6143d6a757e",750:"02aabe6e0e0039a3f480"}[e],w.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),w.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="jupyterlab_basic_terminal_extension:",w.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,u;if(void 0!==o)for(var l=document.getElementsByTagName("script"),s=0;s<l.length;s++){var f=l[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+o){i=f;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",w.nc&&i.setAttribute("nonce",w.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var p=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(e=>e(n)),r)return r(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),u&&document.head.appendChild(i)}},w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{w.S={};var e={},r={};w.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];w.o(w.S,t)||(w.S[t]={});var a=w.S[t],i="jupyterlab_basic_terminal_extension",u=[];return"default"===t&&((e,r,t,n)=>{var o=a[e]=a[e]||{},u=o[r];(!u||!u.loaded&&(1!=!u.eager?n:i>u.from))&&(o[r]={get:()=>w.e(750).then(()=>()=>w(750)),from:i,eager:!1})})("jupyterlab_basic_terminal_extension","1.0.4"),e[t]=u.length?Promise.all(u).then(()=>e[t]=1):1}}})(),(()=>{var e;w.g.importScripts&&(e=w.g.location+"");var r=w.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),w.p=e})(),t=e=>{var r=e=>e.split(".").map(e=>+e==e?+e:e),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=e[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[n],u=(typeof i)[0];if(a!=u)return"o"==a&&"n"==u||"s"==u||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}},o=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,a=1;a<e.length;a++)n--,t+="u"==(typeof(u=e[a]))[0]?"-":(n>0?".":"")+(n=2,u);return t}var i=[];for(a=1;a<e.length;a++){var u=e[a];i.push(0===u?"not("+l()+")":1===u?"("+l()+" || "+l()+")":2===u?i.pop()+" "+i.pop():o(u))}return l();function l(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,u=1,l=!0;;u++,i++){var s,f,p=u<e.length?(typeof e[u])[0]:"";if(i>=r.length||"o"==(f=(typeof(s=r[i]))[0]))return!l||("u"==p?u>n&&!o:""==p!=o);if("u"==f){if(!l||"u"!=p)return!1}else if(l)if(p==f)if(u<=n){if(s!=e[u])return!1}else{if(o?s>e[u]:s<e[u])return!1;s!=e[u]&&(l=!1)}else if("s"!=p&&"n"!=p){if(o||u<=n)return!1;l=!1,u--}else{if(u<=n||f<p!=o)return!1;l=!1}else"s"!=p&&"n"!=p&&(l=!1,u--)}}var d=[],c=d.pop.bind(d);for(i=1;i<e.length;i++){var h=e[i];d.push(1==h?c()|c():2==h?c()&c():h?a(h,r):!c())}return!!c()},i=(e,r)=>e&&w.o(e,r),u=e=>(e.loaded=1,e.get()),l=e=>Object.keys(e).reduce((r,t)=>(e[t].eager&&(r[t]=e[t]),r),{}),s=(e,r,t)=>{var o=t?l(e[r]):e[r];return Object.keys(o).reduce((e,r)=>!e||!o[e].loaded&&n(e,r)?r:e,0)},f=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",p=e=>{throw new Error(e)},d=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},c=(e,r,t)=>t?t():((e,r)=>p("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),h=(e=>function(r,t,n,o,a){var i=w.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,w.S[r],t,!1,o,a)):e(r,w.S[r],t,n,o,a)})((e,r,t,n,o,l)=>{if(!i(r,t))return c(e,t,l);var p=s(r,t,n);return a(o,p)||d(f(r,t,p,o)),u(r[t][p])}),v={},b={697:()=>h("default","@jupyterlab/services",!1,[1,7,5,7]),842:()=>h("default","@jupyterlab/coreutils",!1,[1,6,5,7])},g={750:[697,842]},m={},w.f.consumes=(e,r)=>{w.o(g,e)&&g[e].forEach(e=>{if(w.o(v,e))return r.push(v[e]);if(!m[e]){var t=r=>{v[e]=0,w.m[e]=t=>{delete w.c[e],t.exports=r()}};m[e]=!0;var n=r=>{delete v[e],w.m[e]=t=>{throw delete w.c[e],r}};try{var o=b[e]();o.then?r.push(v[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}})},(()=>{var e={901:0};w.f.j=(r,t)=>{var n=w.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else{var o=new Promise((t,o)=>n=e[r]=[t,o]);t.push(n[2]=o);var a=w.p+w.u(r),i=new Error;w.l(a,t=>{if(w.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}},"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,u]=t,l=0;if(a.some(r=>0!==e[r])){for(n in i)w.o(i,n)&&(w.m[n]=i[n]);u&&u(w)}for(r&&r(t);l<a.length;l++)o=a[l],w.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=self.webpackChunkjupyterlab_basic_terminal_extension=self.webpackChunkjupyterlab_basic_terminal_extension||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),w.nc=void 0;var S=w(770);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB).jupyterlab_basic_terminal_extension=S})();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": [
|
|
3
|
+
{
|
|
4
|
+
"name": "css-loader",
|
|
5
|
+
"versionInfo": "6.11.0",
|
|
6
|
+
"licenseId": "MIT",
|
|
7
|
+
"extractedText": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "style-loader",
|
|
11
|
+
"versionInfo": "3.3.4",
|
|
12
|
+
"licenseId": "MIT",
|
|
13
|
+
"extractedText": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: jupyterlab_basic_terminal_extension
|
|
3
|
+
Version: 1.0.4
|
|
4
|
+
Summary: Jupyterlab extension to make a command that allows launching a utility terminal that runs without shell. This can be used to start and show console utilities, that when finished - close the terminal window / tab
|
|
5
|
+
Project-URL: Homepage, https://github.com/stellarshenson/jupyterlab_basic_terminal_extension
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/stellarshenson/jupyterlab_basic_terminal_extension/issues
|
|
7
|
+
Project-URL: Repository, https://github.com/stellarshenson/jupyterlab_basic_terminal_extension.git
|
|
8
|
+
Author-email: Stellars Henson <konrad.jelen@gmail.com>
|
|
9
|
+
License: BSD 3-Clause License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2026, Stellars Henson
|
|
12
|
+
All rights reserved.
|
|
13
|
+
|
|
14
|
+
Redistribution and use in source and binary forms, with or without
|
|
15
|
+
modification, are permitted provided that the following conditions are met:
|
|
16
|
+
|
|
17
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
18
|
+
list of conditions and the following disclaimer.
|
|
19
|
+
|
|
20
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
21
|
+
this list of conditions and the following disclaimer in the documentation
|
|
22
|
+
and/or other materials provided with the distribution.
|
|
23
|
+
|
|
24
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
25
|
+
contributors may be used to endorse or promote products derived from
|
|
26
|
+
this software without specific prior written permission.
|
|
27
|
+
|
|
28
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
29
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
30
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
31
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
32
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
33
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
34
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
35
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
36
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
37
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
38
|
+
License-File: LICENSE
|
|
39
|
+
Keywords: jupyter,jupyterlab,jupyterlab-extension
|
|
40
|
+
Classifier: Framework :: Jupyter
|
|
41
|
+
Classifier: Framework :: Jupyter :: JupyterLab
|
|
42
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: 4
|
|
43
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
|
|
44
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
|
|
45
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
46
|
+
Classifier: Programming Language :: Python
|
|
47
|
+
Classifier: Programming Language :: Python :: 3
|
|
48
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
49
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
50
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
51
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
52
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
53
|
+
Requires-Python: >=3.10
|
|
54
|
+
Requires-Dist: jupyter-server<3,>=2.4.0
|
|
55
|
+
Provides-Extra: dev
|
|
56
|
+
Requires-Dist: jupyterlab>=4; extra == 'dev'
|
|
57
|
+
Provides-Extra: test
|
|
58
|
+
Requires-Dist: coverage; extra == 'test'
|
|
59
|
+
Requires-Dist: pytest; extra == 'test'
|
|
60
|
+
Requires-Dist: pytest-asyncio; extra == 'test'
|
|
61
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
62
|
+
Requires-Dist: pytest-jupyter[server]>=0.6.0; extra == 'test'
|
|
63
|
+
Description-Content-Type: text/markdown
|
|
64
|
+
|
|
65
|
+
# jupyterlab_basic_terminal_extension
|
|
66
|
+
|
|
67
|
+
[](https://github.com/stellarshenson/jupyterlab_basic_terminal_extension/actions/workflows/build.yml)
|
|
68
|
+
[](https://www.npmjs.com/package/jupyterlab_basic_terminal_extension)
|
|
69
|
+
[](https://pypi.org/project/jupyterlab-basic-terminal-extension/)
|
|
70
|
+
[](https://pepy.tech/project/jupyterlab-basic-terminal-extension)
|
|
71
|
+
[](https://jupyterlab.readthedocs.io/en/stable/)
|
|
72
|
+
[](https://kolomolo.com)
|
|
73
|
+
[](https://www.paypal.com/donate/?hosted_button_id=B4KPBJDLLXTSA)
|
|
74
|
+
|
|
75
|
+
Launch a utility terminal in JupyterLab that runs without a shell. Perfect for spawning short-lived console utilities that close their tab automatically when the underlying process exits, instead of leaving behind an idle shell prompt.
|
|
76
|
+
|
|
77
|
+
## Features
|
|
78
|
+
|
|
79
|
+
- **Shell-less terminal command** - Adds a JupyterLab command that opens a terminal bound directly to a utility process, with no surrounding shell
|
|
80
|
+
- **Auto-close on exit** - Terminal tab closes as soon as the utility process finishes, keeping the workspace tidy
|
|
81
|
+
- **Server extension companion** - Python `jupyter_server` extension exposes the route used by the frontend to spawn the process
|
|
82
|
+
- **JupyterLab 4 native** - Built against `@jupyterlab/application` 4.x and ships as a prebuilt federated extension
|
|
83
|
+
|
|
84
|
+
## Installation
|
|
85
|
+
|
|
86
|
+
Requires JupyterLab 4.0.0 or higher.
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pip install jupyterlab_basic_terminal_extension
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Uninstall
|
|
93
|
+
|
|
94
|
+
To remove the extension, execute:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
pip uninstall jupyterlab_basic_terminal_extension
|
|
98
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
jupyterlab_basic_terminal_extension/__init__.py,sha256=FNmAtoXK_GLepiITZbABgrX7gMUo2gkVqua9jqkW_YU,1202
|
|
2
|
+
jupyterlab_basic_terminal_extension/_version.py,sha256=qawcJnswOsIZF1nf1JHHIiM0w4Y3souwUaofPBBUMhA,171
|
|
3
|
+
jupyterlab_basic_terminal_extension/routes.py,sha256=MM0Y5H7yaQab_A1MtQgQAxvddvSa0mSvxQ0eAoG8RB0,3724
|
|
4
|
+
jupyterlab_basic_terminal_extension/tests/__init__.py,sha256=_pYL7qozKyPMihefojtSvoC3tG16goidUZMhuzuUwVo,65
|
|
5
|
+
jupyterlab_basic_terminal_extension/tests/test_routes.py,sha256=qDP25b92gWsSGPna_FXfxp2F49vGX8oRp65hMHqG6tY,1632
|
|
6
|
+
jupyterlab_basic_terminal_extension-1.0.4.data/data/etc/jupyter/jupyter_server_config.d/jupyterlab_basic_terminal_extension.json,sha256=cgp4rcKfBdsQadEgZUIope3J7iM_GvfrH5ph-D8kwzE,110
|
|
7
|
+
jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/package.json,sha256=F4NbuFOjQq-_D5-RVD8LMJcpHqHW3rLs4b2W_syUPAU,6414
|
|
8
|
+
jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/static/728.a25d41edb6143d6a757e.js,sha256=ol1B7bYUPWp1fi_081oFNgq25ATEHTU990ZmiA6SV9g,4023
|
|
9
|
+
jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/static/750.02aabe6e0e0039a3f480.js,sha256=Aqq-bg4AOaP0gAk2wJTFzZ5AbMngGFP_AxwE0ukbywQ,1815
|
|
10
|
+
jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/static/remoteEntry.045071124c199f15feec.js,sha256=BFBxEkwZnxX-7LPi0jwqn0c__p6hZXszXAvaKaOeWpw,6749
|
|
11
|
+
jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/static/style.js,sha256=d2etdyPDCqY6GRkQU7r2kksKuwuV6UgsRz7_UdoNJ4E,178
|
|
12
|
+
jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/static/third-party-licenses.json,sha256=W6N2sSD7tQihMqQk64F9xMd1Flfr2KO97esAiHUOYdM,2453
|
|
13
|
+
jupyterlab_basic_terminal_extension-1.0.4.data/data/share/jupyter/labextensions/jupyterlab_basic_terminal_extension/install.json,sha256=bf9w2ZT2nIUNwnp35qYx9d4RwG5F_lEudMBrxAHngtY,231
|
|
14
|
+
jupyterlab_basic_terminal_extension-1.0.4.dist-info/METADATA,sha256=6gsaiNlxzDndCkqX_GJRLMHG1IJgiFNupiYbPzBNSlk,5675
|
|
15
|
+
jupyterlab_basic_terminal_extension-1.0.4.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
16
|
+
jupyterlab_basic_terminal_extension-1.0.4.dist-info/licenses/LICENSE,sha256=5WO6BCE6llvhQT-r4BgmmbzCtABwpeGuJse1ab3HXFo,1523
|
|
17
|
+
jupyterlab_basic_terminal_extension-1.0.4.dist-info/RECORD,,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Stellars Henson
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|