From bfd1a421f7868ed920c9f0f2bef33a0f565b45b0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Mar 2026 17:30:01 +0000 Subject: [PATCH 1/2] Initial plan From 803206337df4424a5c82c8cd906d6aa4b0e3d47c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Mar 2026 17:54:29 +0000 Subject: [PATCH 2/2] Add memvid.com devcontainer feature Co-authored-by: sebst <592313+sebst@users.noreply.github.com> Agent-Logs-Url: https://github.com/devcontainer-community/devcontainer-features/sessions/79cea410-c014-45bf-85eb-ced3d3d1e4f9 --- .github/workflows/test.yaml | 2 + src/memvid.com/devcontainer-feature.json | 15 ++++++++ src/memvid.com/install.sh | 49 ++++++++++++++++++++++++ test/memvid.com/test.sh | 8 ++++ 4 files changed, 74 insertions(+) create mode 100644 src/memvid.com/devcontainer-feature.json create mode 100755 src/memvid.com/install.sh create mode 100755 test/memvid.com/test.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3519f58..9763c64 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -39,6 +39,7 @@ jobs: - lazygit - jq - k9scli.io + - memvid.com - mosh.org - keybase.io - neovim.io @@ -104,6 +105,7 @@ jobs: - lazygit - jq - k9scli.io + - memvid.com - mosh.org - keybase.io - neovim.io diff --git a/src/memvid.com/devcontainer-feature.json b/src/memvid.com/devcontainer-feature.json new file mode 100644 index 0000000..d18b390 --- /dev/null +++ b/src/memvid.com/devcontainer-feature.json @@ -0,0 +1,15 @@ +{ + "name": "memvid.com", + "id": "memvid.com", + "version": "1.0.0", + "description": "Install \"memvid\" CLI", + "documentationURL": "https://github.com/devcontainer-community/devcontainer-features/tree/main/src/memvid.com", + "options": { + "version": { + "type": "string", + "default": "latest", + "proposals": ["latest"], + "description": "Version of \"memvid\" to install." + } + } +} diff --git a/src/memvid.com/install.sh b/src/memvid.com/install.sh new file mode 100755 index 0000000..4eb6627 --- /dev/null +++ b/src/memvid.com/install.sh @@ -0,0 +1,49 @@ +#!/bin/bash +set -o errexit +set -o pipefail +set -o noclobber +set -o nounset +set -o allexport +readonly name='memvid' +apt_get_update() { + if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then + echo "Running apt-get update..." + apt-get update -y + fi +} +apt_get_checkinstall() { + if ! dpkg -s "$@" >/dev/null 2>&1; then + apt_get_update + DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends --no-install-suggests --option 'Debug::pkgProblemResolver=true' --option 'Debug::pkgAcquire::Worker=1' "$@" + fi +} +apt_get_cleanup() { + apt-get clean + rm -rf /var/lib/apt/lists/* +} +echo_banner() { + local text="$1" + echo -e "\e[1m\e[97m\e[41m$text\e[0m" +} +utils_check_version() { + local version=$1 + if ! [[ "${version:-}" =~ ^(latest|[0-9]+\.[0-9]+\.[0-9]+)$ ]]; then + printf >&2 '=== [ERROR] Option "version" (value: "%s") is not "latest" or valid semantic version format "X.Y.Z" !\n' \ + "$version" + exit 1 + fi +} +install() { + utils_check_version "$VERSION" + apt_get_checkinstall nodejs npm ca-certificates + if [ "$VERSION" = 'latest' ]; then + npm install -g memvid-cli + else + npm install -g "memvid-cli@${VERSION}" + fi + apt_get_cleanup +} +echo_banner "devcontainer.community" +echo "Installing $name..." +install "$@" +echo "(*) Done!" diff --git a/test/memvid.com/test.sh b/test/memvid.com/test.sh new file mode 100755 index 0000000..e69de23 --- /dev/null +++ b/test/memvid.com/test.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -e + +source dev-container-features-test-lib + +check "execute command" bash -c "memvid --version | grep 'memvid'" + +reportResults