@meridiona/meridian 1.0.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 +55 -0
- package/package.json +32 -0
package/bin/meridian.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// meridian — normalises screenpipe activity into structured app sessions
|
|
3
|
+
//
|
|
4
|
+
// Thin launcher for the `@meridiona/meridian` npm package. The prebuilt app
|
|
5
|
+
// (daemon binary + dashboard + Python services + scripts) lives in the per-arch
|
|
6
|
+
// optional dependency. This shim:
|
|
7
|
+
// * `meridian setup` → copies the bundle to ~/.meridian/app + installs the
|
|
8
|
+
// daemons (prereqs, Python venv/MLX, launchd agents).
|
|
9
|
+
// * `meridian update` → reinstalls the latest npm package, then re-runs setup.
|
|
10
|
+
// * everything else → delegates to the installed CLI (start/stop/logs/…).
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
const path = require('path');
|
|
14
|
+
const fs = require('fs');
|
|
15
|
+
const os = require('os');
|
|
16
|
+
const { spawnSync } = require('child_process');
|
|
17
|
+
|
|
18
|
+
if (process.platform !== 'darwin' || process.arch !== 'arm64') {
|
|
19
|
+
console.error('Meridian runs on macOS Apple Silicon (arm64) only.');
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function resolveBundle() {
|
|
24
|
+
try {
|
|
25
|
+
return path.dirname(require.resolve('@meridiona/meridian-darwin-arm64/package.json'));
|
|
26
|
+
} catch {
|
|
27
|
+
console.error('Meridian: the prebuilt package @meridiona/meridian-darwin-arm64 is not installed.');
|
|
28
|
+
console.error('Reinstall with: npm install -g @meridiona/meridian');
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function run(file, args) {
|
|
34
|
+
const r = spawnSync(file, args, { stdio: 'inherit', env: process.env });
|
|
35
|
+
process.exit(r.status == null ? 1 : r.status);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const cmd = process.argv[2];
|
|
39
|
+
const rest = process.argv.slice(3);
|
|
40
|
+
|
|
41
|
+
if (cmd === 'setup' || cmd === 'install') {
|
|
42
|
+
const bundle = resolveBundle();
|
|
43
|
+
run('bash', [path.join(bundle, 'scripts', 'meridian-npm-setup.sh'), bundle, ...rest]);
|
|
44
|
+
} else if (cmd === 'update') {
|
|
45
|
+
const up = spawnSync('npm', ['install', '-g', '@meridiona/meridian@latest'], { stdio: 'inherit' });
|
|
46
|
+
if (up.status) process.exit(up.status);
|
|
47
|
+
const bundle = resolveBundle();
|
|
48
|
+
run('bash', [path.join(bundle, 'scripts', 'meridian-npm-setup.sh'), bundle, '--skip-permissions']);
|
|
49
|
+
} else {
|
|
50
|
+
// Prefer the CLI installed at ~/.meridian/app (post-setup); fall back to the
|
|
51
|
+
// bundle's copy (e.g. running a command before `meridian setup`).
|
|
52
|
+
const appCli = path.join(os.homedir(), '.meridian', 'app', 'scripts', 'meridian-cli.sh');
|
|
53
|
+
const cli = fs.existsSync(appCli) ? appCli : path.join(resolveBundle(), 'scripts', 'meridian-cli.sh');
|
|
54
|
+
run('bash', [cli, ...process.argv.slice(2)]);
|
|
55
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@meridiona/meridian",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Your project management, written by your work — local-first PM automation from real dev activity (macOS, Apple Silicon).",
|
|
5
|
+
"homepage": "https://github.com/Meridiona/meridian",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/Meridiona/meridian.git"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"bin": {
|
|
12
|
+
"meridian": "bin/meridian.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin/"
|
|
16
|
+
],
|
|
17
|
+
"os": [
|
|
18
|
+
"darwin"
|
|
19
|
+
],
|
|
20
|
+
"cpu": [
|
|
21
|
+
"arm64"
|
|
22
|
+
],
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18"
|
|
25
|
+
},
|
|
26
|
+
"optionalDependencies": {
|
|
27
|
+
"@meridiona/meridian-darwin-arm64": "1.0.0"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
}
|
|
32
|
+
}
|