oh-my-devpod 0.15.6 → 0.15.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-devpod",
3
- "version": "0.15.6",
3
+ "version": "0.15.8",
4
4
  "description": "Ubuntu productivity tool manager with the omd terminal interface",
5
5
  "license": "MIT",
6
6
  "author": "zhangdw156",
package/runtime/VERSION CHANGED
@@ -1 +1 @@
1
- 0.15.6
1
+ 0.15.8
package/runtime/bin/omd CHANGED
Binary file
@@ -3,6 +3,7 @@ set -euo pipefail
3
3
 
4
4
  source_dir="${OHMYDEVPOD_LAZYVIM_SOURCE_DIR:-/opt/vendor/nvim/lazyvim-starter}"
5
5
  overlay_dir="${OHMYDEVPOD_NVM_OVERLAY_DIR:-}"
6
+ plugin_archive="${OHMYDEVPOD_LAZYVIM_PLUGIN_ARCHIVE:-}"
6
7
  config_dir="${OHMYDEVPOD_NVM_CONFIG_DIR:-${XDG_CONFIG_HOME:-${HOME}/.config}/nvim}"
7
8
  data_dir="${OHMYDEVPOD_NVM_DATA_DIR:-${XDG_DATA_HOME:-${HOME}/.local/share}/nvim}"
8
9
  state_dir="${OHMYDEVPOD_NVM_STATE_DIR:-${XDG_STATE_HOME:-${HOME}/.local/state}/nvim}"
@@ -18,6 +19,19 @@ if [[ ! -d "${source_dir}" ]]; then
18
19
  exit 1
19
20
  fi
20
21
 
22
+ if [[ -n "${plugin_archive}" ]]; then
23
+ plugin_dir="$(dirname "${plugin_archive}")"
24
+ [[ "$(basename "${plugin_archive}")" == "plugins.tar.gz" &&
25
+ -f "${plugin_dir}/plugins.lock.json" ]] || {
26
+ echo "Missing or invalid LazyVim plugin bundle" >&2
27
+ exit 1
28
+ }
29
+ (cd "${plugin_dir}" && sha256sum -c SHA256SUMS) || {
30
+ echo "LazyVim plugin archive verification failed" >&2
31
+ exit 1
32
+ }
33
+ fi
34
+
21
35
  if [[ -z "${starter_commit}" && -f "${source_dir}/.oh-my-devpod-source-commit" ]]; then
22
36
  starter_commit="$(<"${source_dir}/.oh-my-devpod-source-commit")"
23
37
  fi
@@ -52,6 +66,11 @@ cp -R "${source_dir}" "${config_dir}"
52
66
  if [[ -n "${overlay_dir}" && -d "${overlay_dir}" ]]; then
53
67
  cp -R "${overlay_dir}/." "${config_dir}"
54
68
  fi
69
+ if [[ -n "${plugin_archive}" ]]; then
70
+ mkdir -p "${config_dir}/.omd-plugins"
71
+ tar -xzf "${plugin_archive}" -C "${config_dir}/.omd-plugins"
72
+ cp "${plugin_dir}/plugins.lock.json" "${config_dir}/.omd-plugins/plugins.lock.json"
73
+ fi
55
74
  rm -rf "${config_dir}/.git"
56
75
  rm -f "${config_dir}/.oh-my-devpod-source-commit"
57
76
 
@@ -28,8 +28,16 @@ real_brew="${prefix}/bin/brew"
28
28
  stable_gateway="${libexec_dir}/brew-gateway"
29
29
  lock_file="${state_dir}/locks/mutation.lock"
30
30
  brew_noninteractive=0
31
+ inventory_snapshot=""
31
32
  declare -a forwarded_env=()
32
33
 
34
+ cleanup() {
35
+ [[ -z "${inventory_snapshot}" ]] || rm -f "${inventory_snapshot}"
36
+ }
37
+ trap cleanup EXIT
38
+ trap 'exit 130' INT
39
+ trap 'exit 143' TERM
40
+
33
41
  fail() {
34
42
  printf 'brew: shared Linuxbrew gateway: %s\n' "$*" >&2
35
43
  exit 1
@@ -291,9 +299,11 @@ run_backend() {
291
299
  validate_inventory_records
292
300
  home="$(service_home "$(service_user)")"
293
301
  prepare_backend_working_directory "${home}"
294
- before="${state_dir}/.inventory-before.$$"
295
302
  if is_inventory_mutation "${1:-}"; then
296
303
  mutates=1
304
+ before="$(mktemp "${inventory_dir}/.inventory-before.XXXXXX")" ||
305
+ fail "cannot create shared inventory snapshot"
306
+ inventory_snapshot="${before}"
297
307
  snapshot_formulae "${before}"
298
308
  fi
299
309
 
@@ -307,6 +317,7 @@ run_backend() {
307
317
  if [[ "${mutates}" == "1" ]]; then
308
318
  reconcile_inventory "${before}"
309
319
  rm -f "${before}"
320
+ inventory_snapshot=""
310
321
  fi
311
322
  return "${status}"
312
323
  }
@@ -16,6 +16,7 @@ name = "Micromamba"
16
16
  description = "Lightweight Conda-compatible package manager"
17
17
  category = "foundation"
18
18
  module = "modules/core/micromamba.sh"
19
+ provider = "linuxbrew"
19
20
  requires = []
20
21
  install_requires = ["linuxbrew"]
21
22
  uninstall = true
@@ -26,6 +27,7 @@ name = "Zsh"
26
27
  description = "Interactive shell"
27
28
  category = "foundation"
28
29
  module = "modules/core/zsh.sh"
30
+ provider = "linuxbrew"
29
31
  requires = []
30
32
  install_requires = ["linuxbrew"]
31
33
  uninstall = true
@@ -36,6 +38,7 @@ name = "uv"
36
38
  description = "Fast Python package and project manager"
37
39
  category = "foundation"
38
40
  module = "modules/core/uv.sh"
41
+ provider = "linuxbrew"
39
42
  requires = []
40
43
  install_requires = ["linuxbrew"]
41
44
  uninstall = true
@@ -46,6 +49,7 @@ name = "Git"
46
49
  description = "Version control client"
47
50
  category = "development"
48
51
  module = "modules/tools/git.sh"
52
+ provider = "linuxbrew"
49
53
  requires = []
50
54
  install_requires = ["linuxbrew"]
51
55
  uninstall = true
@@ -56,6 +60,7 @@ name = "GitHub CLI"
56
60
  description = "Official command-line client for GitHub"
57
61
  category = "development"
58
62
  module = "modules/tools/gh.sh"
63
+ provider = "linuxbrew"
59
64
  requires = []
60
65
  install_requires = ["linuxbrew"]
61
66
  uninstall = true
@@ -76,6 +81,7 @@ name = "ripgrep"
76
81
  description = "Fast recursive text search"
77
82
  category = "terminal"
78
83
  module = "modules/tools/ripgrep.sh"
84
+ provider = "linuxbrew"
79
85
  requires = []
80
86
  install_requires = ["linuxbrew"]
81
87
  uninstall = true
@@ -86,6 +92,7 @@ name = "fzf"
86
92
  description = "Interactive fuzzy finder"
87
93
  category = "terminal"
88
94
  module = "modules/tools/fzf.sh"
95
+ provider = "linuxbrew"
89
96
  requires = []
90
97
  install_requires = ["linuxbrew"]
91
98
  uninstall = true
@@ -96,6 +103,7 @@ name = "bat"
96
103
  description = "Syntax-aware cat replacement"
97
104
  category = "terminal"
98
105
  module = "modules/tools/bat.sh"
106
+ provider = "linuxbrew"
99
107
  requires = []
100
108
  install_requires = ["linuxbrew"]
101
109
  uninstall = true
@@ -106,6 +114,7 @@ name = "fd"
106
114
  description = "Friendly and fast find replacement"
107
115
  category = "terminal"
108
116
  module = "modules/tools/fd.sh"
117
+ provider = "linuxbrew"
109
118
  requires = []
110
119
  install_requires = ["linuxbrew"]
111
120
  uninstall = true
@@ -116,6 +125,7 @@ name = "jq"
116
125
  description = "JSON processor"
117
126
  category = "terminal"
118
127
  module = "modules/tools/jq.sh"
128
+ provider = "linuxbrew"
119
129
  requires = []
120
130
  install_requires = ["linuxbrew"]
121
131
  uninstall = true
@@ -126,6 +136,7 @@ name = "yq"
126
136
  description = "YAML, JSON, XML, CSV, TOML, and properties processor"
127
137
  category = "terminal"
128
138
  module = "modules/tools/yq.sh"
139
+ provider = "linuxbrew"
129
140
  requires = []
130
141
  install_requires = ["linuxbrew"]
131
142
  uninstall = true
@@ -136,6 +147,7 @@ name = "Atuin"
136
147
  description = "Shell history search and synchronization"
137
148
  category = "terminal"
138
149
  module = "modules/tools/atuin.sh"
150
+ provider = "linuxbrew"
139
151
  requires = []
140
152
  install_requires = ["linuxbrew"]
141
153
  uninstall = true
@@ -146,6 +158,7 @@ name = "Zellij"
146
158
  description = "Terminal workspace and multiplexer"
147
159
  category = "terminal"
148
160
  module = "modules/tools/zellij.sh"
161
+ provider = "linuxbrew"
149
162
  requires = []
150
163
  install_requires = ["linuxbrew"]
151
164
  uninstall = true
@@ -156,6 +169,7 @@ name = "Yazi"
156
169
  description = "Terminal file manager"
157
170
  category = "terminal"
158
171
  module = "modules/tools/yazi.sh"
172
+ provider = "linuxbrew"
159
173
  requires = []
160
174
  install_requires = ["linuxbrew"]
161
175
  uninstall = true
@@ -166,6 +180,7 @@ name = "btop"
166
180
  description = "Interactive resource monitor"
167
181
  category = "terminal"
168
182
  module = "modules/tools/btop.sh"
183
+ provider = "linuxbrew"
169
184
  requires = []
170
185
  install_requires = ["linuxbrew"]
171
186
  uninstall = true
@@ -176,6 +191,7 @@ name = "witr"
176
191
  description = "Trace processes, ports, containers, and files to their launch chain"
177
192
  category = "terminal"
178
193
  module = "modules/tools/witr.sh"
194
+ provider = "linuxbrew"
179
195
  requires = []
180
196
  install_requires = ["linuxbrew"]
181
197
  uninstall = true
@@ -186,6 +202,7 @@ name = "Neovim"
186
202
  description = "Modern terminal editor"
187
203
  category = "editor"
188
204
  module = "modules/tools/neovim.sh"
205
+ provider = "linuxbrew"
189
206
  requires = []
190
207
  install_requires = ["linuxbrew"]
191
208
  uninstall = true
@@ -0,0 +1,20 @@
1
+ -- The China profile loads pinned plugins shipped with OMD.
2
+ local bundle = vim.fn.stdpath("config") .. "/.omd-plugins"
3
+ vim.opt.rtp:prepend(bundle .. "/lazy.nvim")
4
+ local plugins = vim.json.decode(table.concat(vim.fn.readfile(bundle .. "/plugins.lock.json"), "\n"))
5
+ local spec = {
6
+ { "LazyVim/LazyVim", dir = bundle .. "/LazyVim", import = "lazyvim.plugins" },
7
+ { import = "plugins" },
8
+ }
9
+ for name, plugin in pairs(plugins) do
10
+ spec[#spec + 1] = { plugin.repo, name = name, dir = bundle .. "/" .. name, pin = true, build = false }
11
+ end
12
+ require("lazy").setup({
13
+ spec = spec,
14
+ defaults = { lazy = false, version = false },
15
+ install = { missing = false, colorscheme = { "tokyonight", "habamax" } },
16
+ checker = { enabled = false },
17
+ change_detection = { notify = false },
18
+ rocks = { enabled = false },
19
+ pkg = { enabled = false },
20
+ })
@@ -0,0 +1,23 @@
1
+ -- External tools and parsers can be installed explicitly when needed.
2
+ return {
3
+ { "mason-org/mason.nvim", enabled = false },
4
+ { "mason-org/mason-lspconfig.nvim", enabled = false },
5
+ {
6
+ "nvim-treesitter/nvim-treesitter",
7
+ opts = function(_, opts)
8
+ opts.ensure_installed = {}
9
+ end,
10
+ },
11
+ { "saghen/blink.cmp", opts = { fuzzy = { implementation = "lua" } } },
12
+ {
13
+ "neovim/nvim-lspconfig",
14
+ opts = function(_, opts)
15
+ for _, server in pairs(opts.servers) do
16
+ if type(server) == "table" then
17
+ server.mason = false
18
+ end
19
+ end
20
+ opts.servers.lua_ls = { enabled = vim.fn.executable("lua-language-server") == 1, mason = false }
21
+ end,
22
+ },
23
+ }
@@ -293,13 +293,13 @@ omd_source_env_is_managed() {
293
293
  }
294
294
 
295
295
  omd_uv_config_is_managed() {
296
- local path="$1" contents
296
+ local path="$1" contents expected
297
+ [[ ! -L "${path}" ]] || return 1
297
298
  [[ ! -e "${path}" ]] && return 0
298
- head -n 1 "${path}" 2>/dev/null |
299
- grep -Fq '# Generated by oh-my-devpod.' &&
300
- return 0
301
299
  contents="$(cat "${path}" 2>/dev/null)" || return 1
302
- [[ "${contents}" == $'[[index]]\nurl = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"\ndefault = true' ]]
300
+ expected=$'[[index]]\nurl = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"\ndefault = true'
301
+ [[ "${contents}" == "${expected}" ||
302
+ "${contents}" == "# Generated by oh-my-devpod. Use omd --source github or gitee to change this profile."$'\n'"${expected}" ]]
303
303
  }
304
304
 
305
305
  omd_validate_source_config_ownership() {
@@ -308,11 +308,6 @@ omd_validate_source_config_ownership() {
308
308
  omd_warn "Refusing to overwrite user-managed source environment: ${config_dir}/env"
309
309
  return 1
310
310
  fi
311
- if [[ "${source}" == "gitee" ]] &&
312
- ! omd_uv_config_is_managed "${config_dir}/uv.toml"; then
313
- omd_warn "Refusing to overwrite user-managed uv configuration: ${config_dir}/uv.toml"
314
- return 1
315
- fi
316
311
  }
317
312
 
318
313
  omd_persist_source() {
@@ -340,7 +335,6 @@ omd_persist_source() {
340
335
  'export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.ustc.edu.cn/homebrew-core.git"' \
341
336
  'export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles"' \
342
337
  'export HOMEBREW_API_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles/api"' \
343
- 'export UV_CONFIG_FILE="${OHMYDEVPOD_CONFIG_DIR}/uv.toml"' \
344
338
  'export PIP_INDEX_URL="https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"' \
345
339
  'export CONDA_CHANNELS="conda-forge"' \
346
340
  'export MAMBA_CHANNEL_ALIAS="https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud"' \
@@ -348,17 +342,9 @@ omd_persist_source() {
348
342
  fi
349
343
  } | omd_atomic_write "${env_file}" || return 1
350
344
 
351
- if [[ "${mirror_profile}" == "cn" ]]; then
352
- cat <<'EOF' | omd_atomic_write "${config_dir}/uv.toml"
353
- # Generated by oh-my-devpod. Use omd --source github or gitee to change this profile.
354
- [[index]]
355
- url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
356
- default = true
357
- EOF
358
- else
359
- if omd_uv_config_is_managed "${config_dir}/uv.toml"; then
360
- rm -f "${config_dir}/uv.toml" || return 1
361
- fi
345
+ # Retire the old explicit override; native uv config keeps project discovery.
346
+ if omd_uv_config_is_managed "${config_dir}/uv.toml"; then
347
+ rm -f "${config_dir}/uv.toml" || return 1
362
348
  fi
363
349
  }
364
350
 
@@ -20,7 +20,7 @@ managed() {
20
20
  }
21
21
 
22
22
  install_or_update() {
23
- local action="$1" repo_root
23
+ local action="$1" repo_root overlay_dir plugin_archive=""
24
24
  shift
25
25
  omd_module_reject_unknown_flags "$@" || return
26
26
  if status && ! managed; then
@@ -32,8 +32,14 @@ install_or_update() {
32
32
  return 0
33
33
  fi
34
34
  repo_root="$(omd_module_repo_root)"
35
+ overlay_dir="${repo_root}/config/nvim"
36
+ if [[ "${OHMYDEVPOD_MIRROR_PROFILE:-upstream}" == "cn" ]]; then
37
+ overlay_dir="${repo_root}/config/nvim-cn"
38
+ plugin_archive="${repo_root}/vendor/nvim/plugins.tar.gz"
39
+ fi
35
40
  OHMYDEVPOD_LAZYVIM_SOURCE_DIR="${repo_root}/vendor/nvim/lazyvim-starter" \
36
- OHMYDEVPOD_NVM_OVERLAY_DIR="${repo_root}/config/nvim" \
41
+ OHMYDEVPOD_NVM_OVERLAY_DIR="${overlay_dir}" \
42
+ OHMYDEVPOD_LAZYVIM_PLUGIN_ARCHIVE="${plugin_archive}" \
37
43
  OHMYDEVPOD_NVM_CONFIG_DIR="${config_dir}" \
38
44
  OHMYDEVPOD_NVM_DATA_DIR="${data_dir}" \
39
45
  OHMYDEVPOD_NVM_STATE_DIR="${state_dir}" \
@@ -0,0 +1 @@
1
+ 830475fc6ccae8ec0833d6d154d9c309b16f997b6713ebda5b4cfe0fdb766f63 plugins.tar.gz
@@ -0,0 +1,122 @@
1
+ {
2
+ "LazyVim": {
3
+ "repo": "LazyVim/LazyVim",
4
+ "commit": "999700997f72227187d49d8b92667183dc7fc809"
5
+ },
6
+ "blink.cmp": {
7
+ "repo": "saghen/blink.cmp",
8
+ "commit": "78336bc89ee5365633bcf754d93df01678b5c08f"
9
+ },
10
+ "bufferline.nvim": {
11
+ "repo": "akinsho/bufferline.nvim",
12
+ "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3"
13
+ },
14
+ "catppuccin": {
15
+ "repo": "catppuccin/nvim",
16
+ "commit": "edefef779ab08ce1a4a404713e3012b0d202bd35"
17
+ },
18
+ "conform.nvim": {
19
+ "repo": "stevearc/conform.nvim",
20
+ "commit": "016802de402556da54c36bd7359b441266b01cdd"
21
+ },
22
+ "flash.nvim": {
23
+ "repo": "folke/flash.nvim",
24
+ "commit": "5f0f270fdc7c5b0c21d903ee85b9cb06f2ac636a"
25
+ },
26
+ "friendly-snippets": {
27
+ "repo": "rafamadriz/friendly-snippets",
28
+ "commit": "b4d01b0fdf3c9a549961c2f9ffe8dc09be166219"
29
+ },
30
+ "gitsigns.nvim": {
31
+ "repo": "lewis6991/gitsigns.nvim",
32
+ "commit": "f2421c550618d257048afa650413d9e542ddbe67"
33
+ },
34
+ "grug-far.nvim": {
35
+ "repo": "MagicDuck/grug-far.nvim",
36
+ "commit": "11595bf747edc270bce2069d1020502ad4ae56cf"
37
+ },
38
+ "lazy.nvim": {
39
+ "repo": "folke/lazy.nvim",
40
+ "commit": "85c7ff3711b730b4030d03144f6db6375044ae82"
41
+ },
42
+ "lazydev.nvim": {
43
+ "repo": "folke/lazydev.nvim",
44
+ "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d"
45
+ },
46
+ "lualine.nvim": {
47
+ "repo": "nvim-lualine/lualine.nvim",
48
+ "commit": "221ce6b2d999187044529f49da6554a92f740a96"
49
+ },
50
+ "mini.ai": {
51
+ "repo": "nvim-mini/mini.ai",
52
+ "commit": "cb02c5444613475b7edf0c8dc98264c1c857aa6e"
53
+ },
54
+ "mini.icons": {
55
+ "repo": "nvim-mini/mini.icons",
56
+ "commit": "98faae31e9be1cc054ae63485e58ceb185efcad0"
57
+ },
58
+ "mini.pairs": {
59
+ "repo": "nvim-mini/mini.pairs",
60
+ "commit": "b1c5a726921b7a8c9321e9a7a208aa0571de5810"
61
+ },
62
+ "noice.nvim": {
63
+ "repo": "folke/noice.nvim",
64
+ "commit": "7bfd942445fb63089b59f97ca487d605e715f155"
65
+ },
66
+ "nui.nvim": {
67
+ "repo": "MunifTanjim/nui.nvim",
68
+ "commit": "10fc361835c856ba4233ef5ea135b919bf3dce97"
69
+ },
70
+ "nvim-lint": {
71
+ "repo": "mfussenegger/nvim-lint",
72
+ "commit": "3d55c8f67c6ae5c15e1042571e107c7a3d5c5f4e"
73
+ },
74
+ "nvim-lspconfig": {
75
+ "repo": "neovim/nvim-lspconfig",
76
+ "commit": "ac9d2f7c4757db6320cab6697fe73e5e8adb2457"
77
+ },
78
+ "nvim-treesitter": {
79
+ "repo": "nvim-treesitter/nvim-treesitter",
80
+ "commit": "7caec274fd19c12b55902a5b795100d21531391f"
81
+ },
82
+ "nvim-treesitter-textobjects": {
83
+ "repo": "nvim-treesitter/nvim-treesitter-textobjects",
84
+ "commit": "5c7b0263797dfd1bd6202f2b219f3b53a80b2187"
85
+ },
86
+ "nvim-ts-autotag": {
87
+ "repo": "windwp/nvim-ts-autotag",
88
+ "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275"
89
+ },
90
+ "persistence.nvim": {
91
+ "repo": "folke/persistence.nvim",
92
+ "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c"
93
+ },
94
+ "plenary.nvim": {
95
+ "repo": "nvim-lua/plenary.nvim",
96
+ "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b"
97
+ },
98
+ "snacks.nvim": {
99
+ "repo": "folke/snacks.nvim",
100
+ "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2"
101
+ },
102
+ "todo-comments.nvim": {
103
+ "repo": "folke/todo-comments.nvim",
104
+ "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668"
105
+ },
106
+ "tokyonight.nvim": {
107
+ "repo": "folke/tokyonight.nvim",
108
+ "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6"
109
+ },
110
+ "trouble.nvim": {
111
+ "repo": "folke/trouble.nvim",
112
+ "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a"
113
+ },
114
+ "ts-comments.nvim": {
115
+ "repo": "folke/ts-comments.nvim",
116
+ "commit": "a59d6092213447450191122c9346f309161504cb"
117
+ },
118
+ "which-key.nvim": {
119
+ "repo": "folke/which-key.nvim",
120
+ "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a"
121
+ }
122
+ }