devs-common 3.4.1__tar.gz → 4.0.1__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.
Files changed (46) hide show
  1. {devs_common-3.4.1 → devs_common-4.0.1}/PKG-INFO +1 -1
  2. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/devcontainer.json +1 -0
  3. devs_common-4.0.1/devs_common/templates/extensions/README.md +13 -0
  4. devs_common-4.0.1/devs_common/templates/extensions/devs-bridge-drop.vsix +0 -0
  5. devs_common-4.0.1/devs_common/templates/extensions/install.sh +79 -0
  6. devs_common-4.0.1/devs_common/templates/scripts/install-bridge-drop.sh +30 -0
  7. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/scripts/setup-workspace.sh +5 -0
  8. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/utils/devcontainer.py +1 -1
  9. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common.egg-info/PKG-INFO +1 -1
  10. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common.egg-info/SOURCES.txt +4 -0
  11. {devs_common-3.4.1 → devs_common-4.0.1}/pyproject.toml +1 -1
  12. {devs_common-3.4.1 → devs_common-4.0.1}/LICENSE +0 -0
  13. {devs_common-3.4.1 → devs_common-4.0.1}/README.md +0 -0
  14. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/__init__.py +0 -0
  15. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/config.py +0 -0
  16. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/core/__init__.py +0 -0
  17. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/core/container.py +0 -0
  18. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/core/project.py +0 -0
  19. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/core/workspace.py +0 -0
  20. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/devs_config.py +0 -0
  21. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/exceptions.py +0 -0
  22. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/Dockerfile +0 -0
  23. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/scripts/copy-ssh.sh +0 -0
  24. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/scripts/post-create-wrapper.sh +0 -0
  25. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/scripts/python-venv-integration.sh +0 -0
  26. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/scripts/screenshot-webapp.sh +0 -0
  27. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/scripts/start-tunnel.sh +0 -0
  28. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/scripts/tunnel-status.sh +0 -0
  29. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/scripts/webapp-screenshot.py +0 -0
  30. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/sudo-scripts/init-firewall.sh +0 -0
  31. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/sudo-scripts/setup-devs-env.sh +0 -0
  32. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/sudo-scripts/setup-vscode-cache.sh +0 -0
  33. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/sudo-scripts/start-services.sh +0 -0
  34. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/templates/vscode-settings-reference.md +0 -0
  35. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/utils/__init__.py +0 -0
  36. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/utils/config_hash.py +0 -0
  37. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/utils/console.py +0 -0
  38. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/utils/devcontainer_template.py +0 -0
  39. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/utils/docker_client.py +0 -0
  40. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/utils/file_utils.py +0 -0
  41. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/utils/git_utils.py +0 -0
  42. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common/utils/repo_cache.py +0 -0
  43. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common.egg-info/dependency_links.txt +0 -0
  44. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common.egg-info/requires.txt +0 -0
  45. {devs_common-3.4.1 → devs_common-4.0.1}/devs_common.egg-info/top_level.txt +0 -0
  46. {devs_common-3.4.1 → devs_common-4.0.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devs-common
3
- Version: 3.4.1
3
+ Version: 4.0.1
4
4
  Summary: Shared utilities for devs package ecosystem
5
5
  Author: Dan Lester
6
6
  License-Expression: MIT
@@ -99,6 +99,7 @@
99
99
  },
100
100
  "workspaceFolder": "/workspaces/${localEnv:WORKSPACE_FOLDER_NAME}",
101
101
  "postCreateCommand": "/usr/local/bin/post-create-wrapper.sh",
102
+ "postAttachCommand": "/usr/local/bin/install-bridge-drop.sh",
102
103
  "forwardPorts": [],
103
104
  "portsAttributes": {
104
105
  "3306": {
@@ -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`.
@@ -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
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env bash
2
+ # Fetch the latest devs-bridge-drop.vsix from GitHub Releases and install it.
3
+ # Intended to be invoked from devcontainer postAttachCommand — by that point
4
+ # VS Code Server is up and 'code' resolves to the Server-aware shim that
5
+ # installs into ~/.vscode-server/extensions/.
6
+ set -uo pipefail
7
+
8
+ echo "Installing devs-bridge-drop extension..."
9
+
10
+ if ! command -v code >/dev/null 2>&1; then
11
+ echo "⚠️ Skipping devs-bridge-drop install: 'code' CLI not on PATH"
12
+ exit 0
13
+ fi
14
+
15
+ tmp_vsix="/tmp/devs-bridge-drop.vsix"
16
+ vsix_url="https://github.com/ideonate/devs/releases/latest/download/devs-bridge-drop.vsix"
17
+
18
+ if ! curl -fsSL "$vsix_url" -o "$tmp_vsix"; then
19
+ echo "⚠️ Could not download $vsix_url (continuing)"
20
+ exit 0
21
+ fi
22
+
23
+ if code --install-extension "$tmp_vsix" --force; then
24
+ echo "✓ Installed devs-bridge-drop"
25
+ else
26
+ echo "⚠️ 'code --install-extension' failed for devs-bridge-drop (continuing)"
27
+ fi
28
+
29
+ rm -f "$tmp_vsix"
30
+ exit 0
@@ -280,6 +280,11 @@ else
280
280
  echo "No package.json found in root directory"
281
281
  fi
282
282
 
283
+ # Note: devs-bridge-drop is installed by postAttachCommand (install-bridge-drop.sh)
284
+ # rather than here, because the 'code' CLI baked into /usr/local/bin (used for
285
+ # tunnels) doesn't write to the same extensions dir VS Code Server reads from.
286
+ # By postAttachCommand time, VS Code Server's own 'code' shim is on PATH.
287
+
283
288
  echo "Workspace setup complete!"
284
289
  echo ""
285
290
  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'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devs-common
3
- Version: 3.4.1
3
+ Version: 4.0.1
4
4
  Summary: Shared utilities for devs package ecosystem
5
5
  Author: Dan Lester
6
6
  License-Expression: MIT
@@ -17,7 +17,11 @@ 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
24
+ devs_common/templates/scripts/install-bridge-drop.sh
21
25
  devs_common/templates/scripts/post-create-wrapper.sh
22
26
  devs_common/templates/scripts/python-venv-integration.sh
23
27
  devs_common/templates/scripts/screenshot-webapp.sh
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "devs-common"
7
- version = "3.4.1"
7
+ version = "4.0.1"
8
8
  description = "Shared utilities for devs package ecosystem"
9
9
  authors = [
10
10
  {name = "Dan Lester"},
File without changes
File without changes
File without changes