devs-common 3.4.0__tar.gz → 4.0.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.
- {devs_common-3.4.0 → devs_common-4.0.0}/PKG-INFO +1 -1
- devs_common-4.0.0/devs_common/templates/extensions/README.md +13 -0
- devs_common-4.0.0/devs_common/templates/extensions/devs-bridge-drop.vsix +0 -0
- devs_common-4.0.0/devs_common/templates/extensions/install.sh +79 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/scripts/setup-workspace.sh +14 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/utils/devcontainer.py +1 -1
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common.egg-info/PKG-INFO +1 -1
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common.egg-info/SOURCES.txt +3 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/pyproject.toml +1 -1
- {devs_common-3.4.0 → devs_common-4.0.0}/LICENSE +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/README.md +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/__init__.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/config.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/core/__init__.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/core/container.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/core/project.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/core/workspace.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/devs_config.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/exceptions.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/Dockerfile +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/devcontainer.json +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/scripts/copy-ssh.sh +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/scripts/post-create-wrapper.sh +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/scripts/python-venv-integration.sh +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/scripts/screenshot-webapp.sh +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/scripts/start-tunnel.sh +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/scripts/tunnel-status.sh +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/scripts/webapp-screenshot.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/sudo-scripts/init-firewall.sh +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/sudo-scripts/setup-devs-env.sh +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/sudo-scripts/setup-vscode-cache.sh +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/sudo-scripts/start-services.sh +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/vscode-settings-reference.md +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/utils/__init__.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/utils/config_hash.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/utils/console.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/utils/devcontainer_template.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/utils/docker_client.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/utils/file_utils.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/utils/git_utils.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common/utils/repo_cache.py +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common.egg-info/dependency_links.txt +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common.egg-info/requires.txt +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/devs_common.egg-info/top_level.txt +0 -0
- {devs_common-3.4.0 → devs_common-4.0.0}/setup.cfg +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Bundled VS Code extensions
|
|
2
|
+
|
|
3
|
+
Built `.vsix` files placed in this directory are mounted into every devcontainer at `/usr/local/devs-extensions/` (read-only) and installed by `setup-workspace.sh` on container creation.
|
|
4
|
+
|
|
5
|
+
Build artifacts are gitignored. Produce them with:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
./scripts/build-extension.sh
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
This compiles `packages/vscode-bridge-drop/` and drops the resulting `devs-bridge-drop.vsix` here. Re-run after editing the extension to pick up changes on the next `devs start`.
|
|
12
|
+
|
|
13
|
+
`scripts/bump-and-publish.py` runs the build script automatically before producing PyPI wheels, so released `devs-common` wheels always include the current `.vsix`.
|
|
Binary file
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Install every bundled .vsix in this directory.
|
|
3
|
+
# Intended to be invoked from a devcontainer postCreateCommand or postAttachCommand.
|
|
4
|
+
# Self-contained — does not depend on anything outside this directory.
|
|
5
|
+
set -uo pipefail
|
|
6
|
+
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
+
|
|
9
|
+
shopt -s nullglob
|
|
10
|
+
vsix_files=("$SCRIPT_DIR"/*.vsix)
|
|
11
|
+
shopt -u nullglob
|
|
12
|
+
|
|
13
|
+
if [ ${#vsix_files[@]} -eq 0 ]; then
|
|
14
|
+
echo "[devs-extensions] no .vsix files found in $SCRIPT_DIR"
|
|
15
|
+
exit 0
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
install_with_code_cli() {
|
|
19
|
+
local vsix="$1"
|
|
20
|
+
code --install-extension "$vsix" --force
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
install_by_unpacking() {
|
|
24
|
+
# Fallback when 'code' CLI isn't on PATH yet (e.g. third-party image that
|
|
25
|
+
# doesn't bake in the CLI, when running before VS Code Server attaches).
|
|
26
|
+
# VS Code Server scans ~/.vscode-server/extensions/<publisher>.<name>-<version>/
|
|
27
|
+
local vsix="$1"
|
|
28
|
+
local home_dir="${HOME:-/root}"
|
|
29
|
+
local ext_root="$home_dir/.vscode-server/extensions"
|
|
30
|
+
mkdir -p "$ext_root"
|
|
31
|
+
|
|
32
|
+
local tmp
|
|
33
|
+
tmp="$(mktemp -d)"
|
|
34
|
+
if ! unzip -q "$vsix" -d "$tmp" 2>/dev/null; then
|
|
35
|
+
if command -v python3 >/dev/null 2>&1; then
|
|
36
|
+
python3 -c "import zipfile,sys; zipfile.ZipFile(sys.argv[1]).extractall(sys.argv[2])" "$vsix" "$tmp" || {
|
|
37
|
+
rm -rf "$tmp"; return 1
|
|
38
|
+
}
|
|
39
|
+
else
|
|
40
|
+
rm -rf "$tmp"
|
|
41
|
+
return 1
|
|
42
|
+
fi
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# .vsix layout: extension/package.json + extension/...
|
|
46
|
+
local manifest="$tmp/extension/package.json"
|
|
47
|
+
if [ ! -f "$manifest" ]; then
|
|
48
|
+
rm -rf "$tmp"
|
|
49
|
+
return 1
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
local publisher name version
|
|
53
|
+
publisher=$(python3 -c "import json,sys; print(json.load(open(sys.argv[1]))['publisher'])" "$manifest")
|
|
54
|
+
name=$(python3 -c "import json,sys; print(json.load(open(sys.argv[1]))['name'])" "$manifest")
|
|
55
|
+
version=$(python3 -c "import json,sys; print(json.load(open(sys.argv[1]))['version'])" "$manifest")
|
|
56
|
+
|
|
57
|
+
local target="$ext_root/${publisher}.${name}-${version}"
|
|
58
|
+
rm -rf "$target"
|
|
59
|
+
mv "$tmp/extension" "$target"
|
|
60
|
+
rm -rf "$tmp"
|
|
61
|
+
echo "[devs-extensions] unpacked into $target"
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
for vsix in "${vsix_files[@]}"; do
|
|
65
|
+
name="$(basename "$vsix")"
|
|
66
|
+
echo "[devs-extensions] installing $name"
|
|
67
|
+
if command -v code >/dev/null 2>&1; then
|
|
68
|
+
if install_with_code_cli "$vsix"; then
|
|
69
|
+
continue
|
|
70
|
+
fi
|
|
71
|
+
echo "[devs-extensions] 'code --install-extension' failed for $name; trying fallback unpack"
|
|
72
|
+
fi
|
|
73
|
+
if install_by_unpacking "$vsix"; then
|
|
74
|
+
echo "[devs-extensions] installed $name via unpack fallback"
|
|
75
|
+
else
|
|
76
|
+
echo "[devs-extensions] ⚠️ failed to install $name (continuing)"
|
|
77
|
+
fi
|
|
78
|
+
done
|
|
79
|
+
exit 0
|
|
@@ -280,6 +280,20 @@ else
|
|
|
280
280
|
echo "No package.json found in root directory"
|
|
281
281
|
fi
|
|
282
282
|
|
|
283
|
+
# Install the devs-bridge-drop extension from the latest GitHub release.
|
|
284
|
+
# Same one-liner third-party devcontainers can drop into their own
|
|
285
|
+
# postAttachCommand — exercising one install path keeps it tested.
|
|
286
|
+
if command -v code >/dev/null 2>&1; then
|
|
287
|
+
tmp_vsix="/tmp/devs-bridge-drop.vsix"
|
|
288
|
+
if curl -fsSL "https://github.com/ideonate/devs/releases/latest/download/devs-bridge-drop.vsix" -o "$tmp_vsix" 2>/dev/null; then
|
|
289
|
+
code --install-extension "$tmp_vsix" --force || \
|
|
290
|
+
echo "⚠️ Failed to install devs-bridge-drop (continuing)"
|
|
291
|
+
rm -f "$tmp_vsix"
|
|
292
|
+
else
|
|
293
|
+
echo "⚠️ Could not download devs-bridge-drop.vsix (continuing)"
|
|
294
|
+
fi
|
|
295
|
+
fi
|
|
296
|
+
|
|
283
297
|
echo "Workspace setup complete!"
|
|
284
298
|
echo ""
|
|
285
299
|
echo "Discovered environments:"
|
|
@@ -77,7 +77,7 @@ def prepare_devcontainer_environment(
|
|
|
77
77
|
bridge_mount_path = Path.home() / '.devs' / 'bridge' / f"{project_name}-{dev_name}"
|
|
78
78
|
bridge_mount_path.mkdir(parents=True, exist_ok=True)
|
|
79
79
|
env['DEVS_BRIDGE_MOUNT_PATH'] = str(bridge_mount_path)
|
|
80
|
-
|
|
80
|
+
|
|
81
81
|
# Pass debug mode to container scripts
|
|
82
82
|
if debug:
|
|
83
83
|
env['DEVS_DEBUG'] = 'true'
|
|
@@ -17,6 +17,9 @@ devs_common/core/workspace.py
|
|
|
17
17
|
devs_common/templates/Dockerfile
|
|
18
18
|
devs_common/templates/devcontainer.json
|
|
19
19
|
devs_common/templates/vscode-settings-reference.md
|
|
20
|
+
devs_common/templates/extensions/README.md
|
|
21
|
+
devs_common/templates/extensions/devs-bridge-drop.vsix
|
|
22
|
+
devs_common/templates/extensions/install.sh
|
|
20
23
|
devs_common/templates/scripts/copy-ssh.sh
|
|
21
24
|
devs_common/templates/scripts/post-create-wrapper.sh
|
|
22
25
|
devs_common/templates/scripts/python-venv-integration.sh
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/scripts/post-create-wrapper.sh
RENAMED
|
File without changes
|
{devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/scripts/python-venv-integration.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/sudo-scripts/setup-devs-env.sh
RENAMED
|
File without changes
|
{devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/sudo-scripts/setup-vscode-cache.sh
RENAMED
|
File without changes
|
{devs_common-3.4.0 → devs_common-4.0.0}/devs_common/templates/sudo-scripts/start-services.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|