@zalom/plastic 2.0.0-alpha.28 → 2.0.0-alpha.29
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/README.md
CHANGED
|
@@ -66,7 +66,7 @@ The files are plain Markdown in a Git repository that you own. See
|
|
|
66
66
|
|
|
67
67
|
## Installation
|
|
68
68
|
|
|
69
|
-
Plastic needs Ruby
|
|
69
|
+
Plastic needs Ruby 4.0 or later. The npm path also needs Node.js 18 or later, because `npx`
|
|
70
70
|
fetches the package. After the install, the `plastic` command runs on Ruby alone.
|
|
71
71
|
|
|
72
72
|
### npm (recommended)
|
|
@@ -77,6 +77,14 @@ npx -y @zalom/plastic install --claude
|
|
|
77
77
|
|
|
78
78
|
Replace `--claude` with `--codex` for Codex CLI, or pass both flags.
|
|
79
79
|
|
|
80
|
+
The npm path puts the command at `~/.plastic/bin/plastic` and does not change your `PATH`.
|
|
81
|
+
Link the command into a directory that is on your `PATH`:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
mkdir -p ~/.local/bin
|
|
85
|
+
ln -sf ~/.plastic/bin/plastic ~/.local/bin/plastic
|
|
86
|
+
```
|
|
87
|
+
|
|
80
88
|
### Alpha channel
|
|
81
89
|
|
|
82
90
|
Plastic 2.0 is on the alpha channel.
|
|
@@ -103,7 +111,7 @@ macOS ships Ruby 2.6, which is too old. Install a newer Ruby first:
|
|
|
103
111
|
|
|
104
112
|
```bash
|
|
105
113
|
curl https://mise.run | sh
|
|
106
|
-
mise use --global ruby@
|
|
114
|
+
mise use --global ruby@4.0
|
|
107
115
|
```
|
|
108
116
|
|
|
109
117
|
### Verify the installation
|
package/package.json
CHANGED
package/scripts/lib/backup.rb
CHANGED
|
@@ -6,6 +6,7 @@ require "json"
|
|
|
6
6
|
require "tmpdir"
|
|
7
7
|
require "zlib"
|
|
8
8
|
require_relative "store_sync"
|
|
9
|
+
require_relative "worktree"
|
|
9
10
|
|
|
10
11
|
module Plastic
|
|
11
12
|
module Backup
|
|
@@ -25,6 +26,7 @@ module Plastic
|
|
|
25
26
|
missing = DATABASES.reject { |name| File.exist?(File.join(home, name)) }
|
|
26
27
|
raise Missing, missing.join(", ") unless missing.empty?
|
|
27
28
|
|
|
29
|
+
Worktree.ensure_gitignored(home, "backups/")
|
|
28
30
|
Dir.mktmpdir("plastic-backup") do |work|
|
|
29
31
|
DATABASES.each { |name| Sqlite.call(File.join(home, name), "VACUUM INTO #{Sqlite.quote(File.join(work, name))};", readonly: true) }
|
|
30
32
|
FileUtils.cp(ROOT_FILES.map { |name| File.join(home, name) }.select { |path| File.exist?(path) }, work)
|
|
@@ -9,8 +9,8 @@ module Plastic
|
|
|
9
9
|
class CLI
|
|
10
10
|
module Commands
|
|
11
11
|
class Install < InstallerVerb
|
|
12
|
-
USAGE_LINE = "plastic install [--claude] [--codex] [--hermes] [--all] [--reinstall] [--force] [--advisor NAME] [--no-advisor] [--statusline]"
|
|
13
|
-
FLAGS = %w[--claude --codex --hermes --all --reinstall --force --advisor --no-advisor --statusline].freeze
|
|
12
|
+
USAGE_LINE = "plastic install [--claude] [--codex] [--hermes] [--all] [--reinstall] [--force] [--advisor NAME] [--no-advisor] [--statusline] [--ledger-action NAME]"
|
|
13
|
+
FLAGS = %w[--claude --codex --hermes --all --reinstall --force --advisor --no-advisor --statusline --ledger-action].freeze
|
|
14
14
|
|
|
15
15
|
SCRIPT = "install.rb"
|
|
16
16
|
AFTER = "plastic version"
|
package/scripts/lib/preflight.rb
CHANGED
|
@@ -14,9 +14,9 @@ require_relative "version_number"
|
|
|
14
14
|
module Preflight
|
|
15
15
|
module_function
|
|
16
16
|
|
|
17
|
-
RUBY_FLOOR = "
|
|
17
|
+
RUBY_FLOOR = "4.0.0"
|
|
18
18
|
NODE_FLOOR = 18
|
|
19
|
-
RUBY_PIN = "
|
|
19
|
+
RUBY_PIN = "4.0"
|
|
20
20
|
|
|
21
21
|
def check(ruby_version:, node_version:, git_present:, mise_present:)
|
|
22
22
|
messages = []
|