package catalogue // The session environment is a collection of typed items (design 57 L3, issue 795): a variable is an item with // kind=variable and name=, a PATH entry one with kind=path and at=start|end, each a template whose text is the // value or the entry. Where node-env is not handed the controller renders the items as the old form was rendered; // where it is, it names the collection for the client, which fills the same files (mesh-catalog's provisioner client // holds that half against the same golden files). testdata/environment holds the environment of the catalogue's five // contributors as the old form composed it, with all five and with zsh alone. type envDecl struct{ module, item, name, value string } func environmentOfTheCatalogue() []envDecl { return []envDecl{ {"adwaita", "gtk-theme", "GTK_THEME", "Adwaita:dark"}, {"adwaita", "gtk2-rc-files", "GTK2_RC_FILES", "/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc"}, {"adwaita", "qt-qpa-platformtheme", "QT_QPA_PLATFORMTHEME", "qt6ct"}, {"adwaita", "qt-style-override", "QT_STYLE_OVERRIDE", "Fusion"}, {"adwaita", "qt-select", "QT_SELECT", "6"}, {"adwaita", "xcursor-theme", "XCURSOR_THEME", "Adwaita"}, {"adwaita", "xcursor-size", "XCURSOR_SIZE", "24"}, {"clipmenu", "cm-selections", "CM_SELECTIONS", "clipboard"}, {"clipmenu", "cm-max-clips", "CM_MAX_CLIPS", "500"}, {"clipmenu", "cm-histlength", "CM_HISTLENGTH", "15"}, {"i3", "xdg-current-desktop", "XDG_CURRENT_DESKTOP", "i3"}, {"i3", "xdg-session-desktop", "XDG_SESSION_DESKTOP", "i3"}, {"xterm", "terminal", "TERMINAL", "xterm"}, {"zsh", "editor", "EDITOR", "vim"}, {"zsh", "visual", "VISUAL", "vim"}, {"zsh", "xdg-config-home", "XDG_CONFIG_HOME", "${machine:account-home}/.config"}, {"zsh", "path-local-bin", "path:10", "${machine:account-home}/.local/bin"}, {"zsh", "path-scripts", "path:20", "${machine:account-home}/scripts"}, {"zsh", "path-scripts-bin", "path:30", "${machine:account-home}/scripts/bin"}, } } const environmentCollector = `{"module":"node-env","version":"1","moved":true, "claims":[{"name":"node-environment","scope":"node"}], "build":{"artifacts":[{"name":"files","kind":"archive","from":"files"}]}, "resources":[{"id":"posix","type":"file","path":"/home/op/.config/mesh/environment.sh","template":"files/posix"}, {"id":"systemd","type":"file","path":"/home/op/.config/environment.d/50-mesh.conf","template":"files/systemd"}]}`