@meridiona/meridian 1.17.0 → 1.18.0
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/bin/meridian.js +28 -9
- package/package.json +2 -2
package/bin/meridian.js
CHANGED
|
@@ -85,15 +85,34 @@ if (typeof process.getuid === 'function' && process.getuid() === 0) {
|
|
|
85
85
|
if (cmd === 'setup' || cmd === 'install') {
|
|
86
86
|
const bundle = resolveBundle();
|
|
87
87
|
run('bash', [path.join(bundle, 'scripts', 'meridian-npm-setup.sh'), bundle, ...rest]);
|
|
88
|
-
} else if (cmd === 'update') {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
88
|
+
} else if (cmd === 'update' || cmd === '_update-continue') {
|
|
89
|
+
if (cmd === 'update') {
|
|
90
|
+
// Step 1: update the thin launcher only. The current process runs the OLD
|
|
91
|
+
// launcher in memory — fixes to also install darwin-arm64 may only be in the
|
|
92
|
+
// NEW launcher on disk. Re-exec the newly installed launcher so step 2 always
|
|
93
|
+
// uses the latest code, even when invoked by an old launcher.
|
|
94
|
+
console.log('meridian update: downloading latest release…');
|
|
95
|
+
console.log(' The package includes a pre-built Python venv (~160 MB).');
|
|
96
|
+
console.log(' First update after 1.15.0 will take ~1-3 min; subsequent updates are faster.');
|
|
97
|
+
const _start = Date.now();
|
|
98
|
+
const up = spawnSync('npm', ['install', '-g', '@meridiona/meridian@latest'], { stdio: 'inherit' });
|
|
99
|
+
if (up.status) process.exit(up.status);
|
|
100
|
+
console.log(` Launcher updated in ${Math.round((Date.now() - _start) / 1000)}s`);
|
|
101
|
+
// Re-exec the freshly installed launcher to continue with the correct code.
|
|
102
|
+
const npmRoot = (spawnSync('npm', ['root', '-g'], { encoding: 'utf8' }).stdout || '').trim();
|
|
103
|
+
const newLauncher = path.join(npmRoot, '@meridiona', 'meridian', 'bin', 'meridian.js');
|
|
104
|
+
if (fs.existsSync(newLauncher)) {
|
|
105
|
+
const r = spawnSync(process.execPath, [newLauncher, '_update-continue'], { stdio: 'inherit' });
|
|
106
|
+
process.exit(r.status ?? 1);
|
|
107
|
+
}
|
|
108
|
+
// Fallback: new launcher not found, continue in this process.
|
|
109
|
+
}
|
|
110
|
+
// Step 2 (runs in new launcher): install bundle + run setup.
|
|
111
|
+
const _bundleStart = Date.now();
|
|
112
|
+
const bup = spawnSync('npm', ['install', '-g', '@meridiona/meridian-darwin-arm64@latest'],
|
|
113
|
+
{ stdio: 'inherit', env: { ...process.env } });
|
|
114
|
+
if (bup.status) process.exit(bup.status);
|
|
115
|
+
console.log(` Bundle downloaded in ${Math.round((Date.now() - _bundleStart) / 1000)}s`);
|
|
97
116
|
const bundle = resolveBundle();
|
|
98
117
|
run('bash', [path.join(bundle, 'scripts', 'meridian-npm-setup.sh'), bundle, '--skip-permissions']);
|
|
99
118
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meridiona/meridian",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "Your project management, written by your work — local-first PM automation from real dev activity (macOS, Apple Silicon).",
|
|
5
5
|
"homepage": "https://github.com/Meridiona/meridian",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node": ">=18"
|
|
25
25
|
},
|
|
26
26
|
"optionalDependencies": {
|
|
27
|
-
"@meridiona/meridian-darwin-arm64": "1.
|
|
27
|
+
"@meridiona/meridian-darwin-arm64": "1.18.0"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|