@mean-weasel/lineage 0.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - Initial public extraction of Lineage as a local-first creative lineage workspace.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mean Weasel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # Lineage
2
+
3
+ Lineage is a local-first workspace for reviewing creative assets, branching variations, choosing next bases, and handing a clear work packet to humans or agents.
4
+
5
+ ## Package Channels
6
+
7
+ Lineage is packaged as `@mean-weasel/lineage`. Use the stable npm tag when you want the current public package, and use the `next` tag when you intentionally want a development channel build:
8
+
9
+ ```bash
10
+ npm install -g @mean-weasel/lineage
11
+ npm install -g @mean-weasel/lineage@next
12
+ ```
13
+
14
+ The stable and development channels are intended to coexist conceptually, with `lineage` for stable installs and `lineage-dev` for development installs. The current public package includes the CLI bridge bins for help and version checks:
15
+
16
+ ```bash
17
+ lineage --help
18
+ lineage --version
19
+ lineage-dev --help
20
+ lineage-dev --version
21
+ ```
22
+
23
+ Both bins can also run the bundled production server:
24
+
25
+ ```bash
26
+ lineage start
27
+ lineage-dev start
28
+ ```
29
+
30
+ By default, `lineage start` listens on `127.0.0.1:5197` and stores SQLite state in a stable Lineage runtime directory. `lineage-dev start` listens on `127.0.0.1:5198` and uses a separate development SQLite file. Override those defaults with `--port`, `--host`, `--db`, or `LINEAGE_HOME`:
31
+
32
+ ```bash
33
+ lineage start --port 6123 --db ~/.lineage/lineage.sqlite
34
+ ```
35
+
36
+ ## Local Development
37
+
38
+ ```bash
39
+ npm ci
40
+ npm run dev
41
+ npm run ci
42
+ ```
43
+
44
+ `npm run dev` starts the local development server from source. `npm run ci` runs the full local verification gate.
45
+
46
+ ## Release Checks
47
+
48
+ Use `next` for dogfooding builds and `latest` for the stable public channel:
49
+
50
+ ```bash
51
+ npm run release:dry-run -- --tag next
52
+ npm run release:next
53
+ npm run release:dry-run -- --tag latest
54
+ npm run release:latest
55
+ ```
56
+
57
+ The release script verifies package metadata, changelog version coverage, public-readiness scans, install smoke, browser smoke, audit, and package contents before publishing. GitHub Actions runs CI on pull requests and `main`; publishing is manual through the Release workflow using npm trusted publishing and provenance. The GitHub workflow publishes new dogfood versions to `next` and new stable versions to `latest`. `release:promote-latest` is kept for authenticated local/package-owner dist-tag maintenance, but the token-free trusted publishing path uses immutable publishes instead of mutating dist-tags.
58
+
59
+ ## Demo Fixture
60
+
61
+ Source checkouts and installed packages include a synthetic public demo catalog at `fixtures/demo-project/assets/catalog.json`. When `demo-project/assets/catalog.json` does not exist in the repo root, Lineage uses that fixture so the demo project can load without private storage or customer data.
62
+
63
+ If you create a real `demo-project/assets/catalog.json`, that root project catalog overrides the packaged fixture. The fixture keeps S3-shaped metadata for realistic catalog structure, but default previews are generated local SVG data URLs and do not call storage.
64
+
65
+ ## Data And Privacy
66
+
67
+ Lineage stores local workspace state in a SQLite database on your machine. Public fixtures are synthetic and must not contain private names, credentials, presigned URLs, real customer content, private campaign data, or real media. Keep private catalogs and media outside public package fixtures.
@@ -0,0 +1,143 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/cli/lineageCli.ts
4
+ import { existsSync, mkdirSync, readFileSync } from "node:fs";
5
+ import { homedir, platform } from "node:os";
6
+ import { dirname, join, resolve } from "node:path";
7
+ import { spawn } from "node:child_process";
8
+ import { fileURLToPath } from "node:url";
9
+ var signalExitCodes = {
10
+ SIGINT: 130,
11
+ SIGTERM: 143
12
+ };
13
+ function packageRoot() {
14
+ return resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");
15
+ }
16
+ function packageVersion() {
17
+ try {
18
+ const packageInfo = JSON.parse(readFileSync(join(packageRoot(), "package.json"), "utf8"));
19
+ return packageInfo.version || "0.0.0";
20
+ } catch {
21
+ return "0.0.0";
22
+ }
23
+ }
24
+ function dataRoot(displayName) {
25
+ if (process.env.LINEAGE_HOME) return process.env.LINEAGE_HOME;
26
+ if (platform() === "darwin") return join(homedir(), "Library", "Application Support", displayName);
27
+ if (platform() === "win32") return join(process.env.APPDATA || join(homedir(), "AppData", "Roaming"), displayName);
28
+ return join(process.env.XDG_DATA_HOME || join(homedir(), ".local", "share"), displayName.toLowerCase().replace(/\s+/g, "-"));
29
+ }
30
+ function readOption(args, name) {
31
+ const prefix = `${name}=`;
32
+ const inline = args.find((arg) => arg.startsWith(prefix));
33
+ if (inline) return inline.slice(prefix.length);
34
+ const index = args.indexOf(name);
35
+ if (index >= 0) return args[index + 1];
36
+ return void 0;
37
+ }
38
+ function resolveStartOptions(config, args) {
39
+ const runtimeDir = dataRoot(config.displayName);
40
+ const rawPort = readOption(args, "--port") || process.env.PORT || String(config.defaultPort);
41
+ const port = Number(rawPort);
42
+ if (!Number.isInteger(port) || port < 1 || port > 65535) {
43
+ throw new Error(`Invalid port: ${rawPort}`);
44
+ }
45
+ return {
46
+ dbPath: readOption(args, "--db") || process.env.LINEAGE_DB || join(runtimeDir, `${config.binName}.sqlite`),
47
+ host: readOption(args, "--host") || process.env.HOST || "127.0.0.1",
48
+ json: args.includes("--json"),
49
+ open: args.includes("--open"),
50
+ port
51
+ };
52
+ }
53
+ function printHelp(config) {
54
+ console.log(`${config.binName} ${packageVersion()}
55
+
56
+ Usage:
57
+ ${config.binName} start [--port <port>] [--host <host>] [--db <path>] [--open] [--json]
58
+ ${config.binName} --help
59
+ ${config.binName} --version
60
+
61
+ ${config.displayName} runs the bundled Lineage server for the ${config.channel} channel.`);
62
+ }
63
+ function openBrowser(url) {
64
+ const command = platform() === "darwin" ? "open" : platform() === "win32" ? "cmd" : "xdg-open";
65
+ const args = platform() === "win32" ? ["/c", "start", "", url] : [url];
66
+ const opener = spawn(command, args, { detached: true, stdio: "ignore" });
67
+ opener.unref();
68
+ }
69
+ function start(config, args) {
70
+ let options;
71
+ const json = args.includes("--json");
72
+ try {
73
+ options = resolveStartOptions(config, args);
74
+ } catch (error) {
75
+ const message = error instanceof Error ? error.message : String(error);
76
+ if (json) console.error(JSON.stringify({ ok: false, error: message }, null, 2));
77
+ else console.error(`${config.binName}: ${message}`);
78
+ process.exit(1);
79
+ }
80
+ const serverPath = join(packageRoot(), "dist", "server.js");
81
+ if (!existsSync(serverPath)) {
82
+ const message = `Missing bundled server at ${serverPath}. Run npm run build before using ${config.binName} start from a source checkout.`;
83
+ if (options.json) console.error(JSON.stringify({ ok: false, error: message }, null, 2));
84
+ else console.error(`${config.binName}: ${message}`);
85
+ process.exit(1);
86
+ }
87
+ mkdirSync(dirname(options.dbPath), { recursive: true });
88
+ const url = `http://${options.host}:${options.port}`;
89
+ if (options.json) {
90
+ console.log(JSON.stringify({ channel: config.channel, dbPath: options.dbPath, host: options.host, port: options.port, status: "starting", url }, null, 2));
91
+ } else {
92
+ console.log(`${config.displayName} starting at ${url}`);
93
+ console.log(`SQLite: ${options.dbPath}`);
94
+ }
95
+ if (options.open) openBrowser(url);
96
+ const child = spawn(process.execPath, [serverPath], {
97
+ env: {
98
+ ...process.env,
99
+ HOST: options.host,
100
+ LINEAGE_CHANNEL: config.channel,
101
+ LINEAGE_DB: options.dbPath,
102
+ NODE_ENV: "production",
103
+ PORT: String(options.port)
104
+ },
105
+ stdio: "inherit"
106
+ });
107
+ let forwardedSignal;
108
+ const stop = (signal) => {
109
+ forwardedSignal = signal;
110
+ child.kill(signal);
111
+ };
112
+ process.once("SIGINT", stop);
113
+ process.once("SIGTERM", stop);
114
+ child.on("exit", (code) => process.exit(code ?? (forwardedSignal ? signalExitCodes[forwardedSignal] || 1 : 0)));
115
+ child.on("error", (error) => {
116
+ console.error(`${config.binName}: failed to start server: ${error.message}`);
117
+ process.exit(1);
118
+ });
119
+ }
120
+ function runLineageCli(config, args = process.argv.slice(2)) {
121
+ if (args.includes("--help") || args.includes("-h") || args.length === 0) {
122
+ printHelp(config);
123
+ process.exit(0);
124
+ }
125
+ if (args.includes("--version") || args.includes("-v")) {
126
+ console.log(packageVersion());
127
+ process.exit(0);
128
+ }
129
+ const [command] = args;
130
+ if (command === "start") {
131
+ start(config, args.slice(1));
132
+ return;
133
+ }
134
+ const json = args.includes("--json");
135
+ const message = `Unknown command: ${command}`;
136
+ if (json) console.error(JSON.stringify({ ok: false, command, error: message }, null, 2));
137
+ else console.error(`${config.binName}: ${message}`);
138
+ process.exit(1);
139
+ }
140
+
141
+ // src/cli/lineage-dev.ts
142
+ runLineageCli({ binName: "lineage-dev", channel: "development", defaultPort: 5198, displayName: "Lineage Dev" });
143
+ //# sourceMappingURL=lineage-dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/cli/lineageCli.ts", "../../src/cli/lineage-dev.ts"],
4
+ "sourcesContent": ["import { existsSync, mkdirSync, readFileSync } from 'node:fs';\nimport { homedir, platform } from 'node:os';\nimport { dirname, join, resolve } from 'node:path';\nimport { spawn } from 'node:child_process';\nimport { fileURLToPath } from 'node:url';\n\nexport interface LineageCliConfig {\n binName: 'lineage' | 'lineage-dev';\n channel: 'stable' | 'development';\n defaultPort: number;\n displayName: string;\n}\n\ninterface StartOptions {\n dbPath: string;\n host: string;\n json: boolean;\n open: boolean;\n port: number;\n}\n\nconst signalExitCodes: Partial<Record<NodeJS.Signals, number>> = {\n SIGINT: 130,\n SIGTERM: 143,\n};\n\nfunction packageRoot(): string {\n return resolve(dirname(fileURLToPath(import.meta.url)), '..', '..');\n}\n\nfunction packageVersion(): string {\n try {\n const packageInfo = JSON.parse(readFileSync(join(packageRoot(), 'package.json'), 'utf8')) as { version?: string };\n return packageInfo.version || '0.0.0';\n } catch {\n return '0.0.0';\n }\n}\n\nfunction dataRoot(displayName: string): string {\n if (process.env.LINEAGE_HOME) return process.env.LINEAGE_HOME;\n if (platform() === 'darwin') return join(homedir(), 'Library', 'Application Support', displayName);\n if (platform() === 'win32') return join(process.env.APPDATA || join(homedir(), 'AppData', 'Roaming'), displayName);\n return join(process.env.XDG_DATA_HOME || join(homedir(), '.local', 'share'), displayName.toLowerCase().replace(/\\s+/g, '-'));\n}\n\nfunction readOption(args: string[], name: string): string | undefined {\n const prefix = `${name}=`;\n const inline = args.find(arg => arg.startsWith(prefix));\n if (inline) return inline.slice(prefix.length);\n const index = args.indexOf(name);\n if (index >= 0) return args[index + 1];\n return undefined;\n}\n\nexport function resolveStartOptions(config: LineageCliConfig, args: string[]): StartOptions {\n const runtimeDir = dataRoot(config.displayName);\n const rawPort = readOption(args, '--port') || process.env.PORT || String(config.defaultPort);\n const port = Number(rawPort);\n if (!Number.isInteger(port) || port < 1 || port > 65535) {\n throw new Error(`Invalid port: ${rawPort}`);\n }\n return {\n dbPath: readOption(args, '--db') || process.env.LINEAGE_DB || join(runtimeDir, `${config.binName}.sqlite`),\n host: readOption(args, '--host') || process.env.HOST || '127.0.0.1',\n json: args.includes('--json'),\n open: args.includes('--open'),\n port,\n };\n}\n\nfunction printHelp(config: LineageCliConfig): void {\n console.log(`${config.binName} ${packageVersion()}\n\nUsage:\n ${config.binName} start [--port <port>] [--host <host>] [--db <path>] [--open] [--json]\n ${config.binName} --help\n ${config.binName} --version\n\n${config.displayName} runs the bundled Lineage server for the ${config.channel} channel.`);\n}\n\nfunction openBrowser(url: string): void {\n const command = platform() === 'darwin' ? 'open' : platform() === 'win32' ? 'cmd' : 'xdg-open';\n const args = platform() === 'win32' ? ['/c', 'start', '', url] : [url];\n const opener = spawn(command, args, { detached: true, stdio: 'ignore' });\n opener.unref();\n}\n\nfunction start(config: LineageCliConfig, args: string[]): void {\n let options: StartOptions;\n const json = args.includes('--json');\n try {\n options = resolveStartOptions(config, args);\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n if (json) console.error(JSON.stringify({ ok: false, error: message }, null, 2));\n else console.error(`${config.binName}: ${message}`);\n process.exit(1);\n }\n const serverPath = join(packageRoot(), 'dist', 'server.js');\n if (!existsSync(serverPath)) {\n const message = `Missing bundled server at ${serverPath}. Run npm run build before using ${config.binName} start from a source checkout.`;\n if (options.json) console.error(JSON.stringify({ ok: false, error: message }, null, 2));\n else console.error(`${config.binName}: ${message}`);\n process.exit(1);\n }\n\n mkdirSync(dirname(options.dbPath), { recursive: true });\n const url = `http://${options.host}:${options.port}`;\n if (options.json) {\n console.log(JSON.stringify({ channel: config.channel, dbPath: options.dbPath, host: options.host, port: options.port, status: 'starting', url }, null, 2));\n } else {\n console.log(`${config.displayName} starting at ${url}`);\n console.log(`SQLite: ${options.dbPath}`);\n }\n if (options.open) openBrowser(url);\n\n const child = spawn(process.execPath, [serverPath], {\n env: {\n ...process.env,\n HOST: options.host,\n LINEAGE_CHANNEL: config.channel,\n LINEAGE_DB: options.dbPath,\n NODE_ENV: 'production',\n PORT: String(options.port),\n },\n stdio: 'inherit',\n });\n\n let forwardedSignal: NodeJS.Signals | undefined;\n const stop = (signal: NodeJS.Signals) => {\n forwardedSignal = signal;\n child.kill(signal);\n };\n process.once('SIGINT', stop);\n process.once('SIGTERM', stop);\n child.on('exit', code => process.exit(code ?? (forwardedSignal ? signalExitCodes[forwardedSignal] || 1 : 0)));\n child.on('error', error => {\n console.error(`${config.binName}: failed to start server: ${error.message}`);\n process.exit(1);\n });\n}\n\nexport function runLineageCli(config: LineageCliConfig, args = process.argv.slice(2)): void {\n if (args.includes('--help') || args.includes('-h') || args.length === 0) {\n printHelp(config);\n process.exit(0);\n }\n\n if (args.includes('--version') || args.includes('-v')) {\n console.log(packageVersion());\n process.exit(0);\n }\n\n const [command] = args;\n if (command === 'start') {\n start(config, args.slice(1));\n return;\n }\n\n const json = args.includes('--json');\n const message = `Unknown command: ${command}`;\n if (json) console.error(JSON.stringify({ ok: false, command, error: message }, null, 2));\n else console.error(`${config.binName}: ${message}`);\n process.exit(1);\n}\n", "#!/usr/bin/env node\n\nimport { runLineageCli } from './lineageCli';\n\nrunLineageCli({ binName: 'lineage-dev', channel: 'development', defaultPort: 5198, displayName: 'Lineage Dev' });\n"],
5
+ "mappings": ";;;AAAA,SAAS,YAAY,WAAW,oBAAoB;AACpD,SAAS,SAAS,gBAAgB;AAClC,SAAS,SAAS,MAAM,eAAe;AACvC,SAAS,aAAa;AACtB,SAAS,qBAAqB;AAiB9B,IAAM,kBAA2D;AAAA,EAC/D,QAAQ;AAAA,EACR,SAAS;AACX;AAEA,SAAS,cAAsB;AAC7B,SAAO,QAAQ,QAAQ,cAAc,YAAY,GAAG,CAAC,GAAG,MAAM,IAAI;AACpE;AAEA,SAAS,iBAAyB;AAChC,MAAI;AACF,UAAM,cAAc,KAAK,MAAM,aAAa,KAAK,YAAY,GAAG,cAAc,GAAG,MAAM,CAAC;AACxF,WAAO,YAAY,WAAW;AAAA,EAChC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAAS,SAAS,aAA6B;AAC7C,MAAI,QAAQ,IAAI,aAAc,QAAO,QAAQ,IAAI;AACjD,MAA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AAW,GAAG;AACvE,cAAU,MAAM;AAChB,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,MAAI,KAAK,SAAS,WAAW,KAAK,KAAK,SAAS,IAAI,GAAG;AACrD,YAAQ,IAAI,eAAe,CAAC;AAC5B,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,QAAM,CAAC,OAAO,IAAI;AAClB,MAAI,YAAY,SAAS;AACvB,UAAM,QAAQ,KAAK,MAAM,CAAC,CAAC;AAC3B;AAAA,EACF;AAEA,QAAM,OAAO,KAAK,SAAS,QAAQ;AACnC,QAAM,UAAU,oBAAoB,OAAO;AAC3C,MAAI,KAAM,SAAQ,MAAM,KAAK,UAAU,EAAE,IAAI,OAAO,SAAS,OAAO,QAAQ,GAAG,MAAM,CAAC,CAAC;AAAA,MAClF,SAAQ,MAAM,GAAG,OAAO,OAAO,KAAK,OAAO,EAAE;AAClD,UAAQ,KAAK,CAAC;AAChB;;;AClKA,cAAc,EAAE,SAAS,eAAe,SAAS,eAAe,aAAa,MAAM,aAAa,cAAc,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,143 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/cli/lineageCli.ts
4
+ import { existsSync, mkdirSync, readFileSync } from "node:fs";
5
+ import { homedir, platform } from "node:os";
6
+ import { dirname, join, resolve } from "node:path";
7
+ import { spawn } from "node:child_process";
8
+ import { fileURLToPath } from "node:url";
9
+ var signalExitCodes = {
10
+ SIGINT: 130,
11
+ SIGTERM: 143
12
+ };
13
+ function packageRoot() {
14
+ return resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");
15
+ }
16
+ function packageVersion() {
17
+ try {
18
+ const packageInfo = JSON.parse(readFileSync(join(packageRoot(), "package.json"), "utf8"));
19
+ return packageInfo.version || "0.0.0";
20
+ } catch {
21
+ return "0.0.0";
22
+ }
23
+ }
24
+ function dataRoot(displayName) {
25
+ if (process.env.LINEAGE_HOME) return process.env.LINEAGE_HOME;
26
+ if (platform() === "darwin") return join(homedir(), "Library", "Application Support", displayName);
27
+ if (platform() === "win32") return join(process.env.APPDATA || join(homedir(), "AppData", "Roaming"), displayName);
28
+ return join(process.env.XDG_DATA_HOME || join(homedir(), ".local", "share"), displayName.toLowerCase().replace(/\s+/g, "-"));
29
+ }
30
+ function readOption(args, name) {
31
+ const prefix = `${name}=`;
32
+ const inline = args.find((arg) => arg.startsWith(prefix));
33
+ if (inline) return inline.slice(prefix.length);
34
+ const index = args.indexOf(name);
35
+ if (index >= 0) return args[index + 1];
36
+ return void 0;
37
+ }
38
+ function resolveStartOptions(config, args) {
39
+ const runtimeDir = dataRoot(config.displayName);
40
+ const rawPort = readOption(args, "--port") || process.env.PORT || String(config.defaultPort);
41
+ const port = Number(rawPort);
42
+ if (!Number.isInteger(port) || port < 1 || port > 65535) {
43
+ throw new Error(`Invalid port: ${rawPort}`);
44
+ }
45
+ return {
46
+ dbPath: readOption(args, "--db") || process.env.LINEAGE_DB || join(runtimeDir, `${config.binName}.sqlite`),
47
+ host: readOption(args, "--host") || process.env.HOST || "127.0.0.1",
48
+ json: args.includes("--json"),
49
+ open: args.includes("--open"),
50
+ port
51
+ };
52
+ }
53
+ function printHelp(config) {
54
+ console.log(`${config.binName} ${packageVersion()}
55
+
56
+ Usage:
57
+ ${config.binName} start [--port <port>] [--host <host>] [--db <path>] [--open] [--json]
58
+ ${config.binName} --help
59
+ ${config.binName} --version
60
+
61
+ ${config.displayName} runs the bundled Lineage server for the ${config.channel} channel.`);
62
+ }
63
+ function openBrowser(url) {
64
+ const command = platform() === "darwin" ? "open" : platform() === "win32" ? "cmd" : "xdg-open";
65
+ const args = platform() === "win32" ? ["/c", "start", "", url] : [url];
66
+ const opener = spawn(command, args, { detached: true, stdio: "ignore" });
67
+ opener.unref();
68
+ }
69
+ function start(config, args) {
70
+ let options;
71
+ const json = args.includes("--json");
72
+ try {
73
+ options = resolveStartOptions(config, args);
74
+ } catch (error) {
75
+ const message = error instanceof Error ? error.message : String(error);
76
+ if (json) console.error(JSON.stringify({ ok: false, error: message }, null, 2));
77
+ else console.error(`${config.binName}: ${message}`);
78
+ process.exit(1);
79
+ }
80
+ const serverPath = join(packageRoot(), "dist", "server.js");
81
+ if (!existsSync(serverPath)) {
82
+ const message = `Missing bundled server at ${serverPath}. Run npm run build before using ${config.binName} start from a source checkout.`;
83
+ if (options.json) console.error(JSON.stringify({ ok: false, error: message }, null, 2));
84
+ else console.error(`${config.binName}: ${message}`);
85
+ process.exit(1);
86
+ }
87
+ mkdirSync(dirname(options.dbPath), { recursive: true });
88
+ const url = `http://${options.host}:${options.port}`;
89
+ if (options.json) {
90
+ console.log(JSON.stringify({ channel: config.channel, dbPath: options.dbPath, host: options.host, port: options.port, status: "starting", url }, null, 2));
91
+ } else {
92
+ console.log(`${config.displayName} starting at ${url}`);
93
+ console.log(`SQLite: ${options.dbPath}`);
94
+ }
95
+ if (options.open) openBrowser(url);
96
+ const child = spawn(process.execPath, [serverPath], {
97
+ env: {
98
+ ...process.env,
99
+ HOST: options.host,
100
+ LINEAGE_CHANNEL: config.channel,
101
+ LINEAGE_DB: options.dbPath,
102
+ NODE_ENV: "production",
103
+ PORT: String(options.port)
104
+ },
105
+ stdio: "inherit"
106
+ });
107
+ let forwardedSignal;
108
+ const stop = (signal) => {
109
+ forwardedSignal = signal;
110
+ child.kill(signal);
111
+ };
112
+ process.once("SIGINT", stop);
113
+ process.once("SIGTERM", stop);
114
+ child.on("exit", (code) => process.exit(code ?? (forwardedSignal ? signalExitCodes[forwardedSignal] || 1 : 0)));
115
+ child.on("error", (error) => {
116
+ console.error(`${config.binName}: failed to start server: ${error.message}`);
117
+ process.exit(1);
118
+ });
119
+ }
120
+ function runLineageCli(config, args = process.argv.slice(2)) {
121
+ if (args.includes("--help") || args.includes("-h") || args.length === 0) {
122
+ printHelp(config);
123
+ process.exit(0);
124
+ }
125
+ if (args.includes("--version") || args.includes("-v")) {
126
+ console.log(packageVersion());
127
+ process.exit(0);
128
+ }
129
+ const [command] = args;
130
+ if (command === "start") {
131
+ start(config, args.slice(1));
132
+ return;
133
+ }
134
+ const json = args.includes("--json");
135
+ const message = `Unknown command: ${command}`;
136
+ if (json) console.error(JSON.stringify({ ok: false, command, error: message }, null, 2));
137
+ else console.error(`${config.binName}: ${message}`);
138
+ process.exit(1);
139
+ }
140
+
141
+ // src/cli/lineage.ts
142
+ runLineageCli({ binName: "lineage", channel: "stable", defaultPort: 5197, displayName: "Lineage" });
143
+ //# sourceMappingURL=lineage.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/cli/lineageCli.ts", "../../src/cli/lineage.ts"],
4
+ "sourcesContent": ["import { existsSync, mkdirSync, readFileSync } from 'node:fs';\nimport { homedir, platform } from 'node:os';\nimport { dirname, join, resolve } from 'node:path';\nimport { spawn } from 'node:child_process';\nimport { fileURLToPath } from 'node:url';\n\nexport interface LineageCliConfig {\n binName: 'lineage' | 'lineage-dev';\n channel: 'stable' | 'development';\n defaultPort: number;\n displayName: string;\n}\n\ninterface StartOptions {\n dbPath: string;\n host: string;\n json: boolean;\n open: boolean;\n port: number;\n}\n\nconst signalExitCodes: Partial<Record<NodeJS.Signals, number>> = {\n SIGINT: 130,\n SIGTERM: 143,\n};\n\nfunction packageRoot(): string {\n return resolve(dirname(fileURLToPath(import.meta.url)), '..', '..');\n}\n\nfunction packageVersion(): string {\n try {\n const packageInfo = JSON.parse(readFileSync(join(packageRoot(), 'package.json'), 'utf8')) as { version?: string };\n return packageInfo.version || '0.0.0';\n } catch {\n return '0.0.0';\n }\n}\n\nfunction dataRoot(displayName: string): string {\n if (process.env.LINEAGE_HOME) return process.env.LINEAGE_HOME;\n if (platform() === 'darwin') return join(homedir(), 'Library', 'Application Support', displayName);\n if (platform() === 'win32') return join(process.env.APPDATA || join(homedir(), 'AppData', 'Roaming'), displayName);\n return join(process.env.XDG_DATA_HOME || join(homedir(), '.local', 'share'), displayName.toLowerCase().replace(/\\s+/g, '-'));\n}\n\nfunction readOption(args: string[], name: string): string | undefined {\n const prefix = `${name}=`;\n const inline = args.find(arg => arg.startsWith(prefix));\n if (inline) return inline.slice(prefix.length);\n const index = args.indexOf(name);\n if (index >= 0) return args[index + 1];\n return undefined;\n}\n\nexport function resolveStartOptions(config: LineageCliConfig, args: string[]): StartOptions {\n const runtimeDir = dataRoot(config.displayName);\n const rawPort = readOption(args, '--port') || process.env.PORT || String(config.defaultPort);\n const port = Number(rawPort);\n if (!Number.isInteger(port) || port < 1 || port > 65535) {\n throw new Error(`Invalid port: ${rawPort}`);\n }\n return {\n dbPath: readOption(args, '--db') || process.env.LINEAGE_DB || join(runtimeDir, `${config.binName}.sqlite`),\n host: readOption(args, '--host') || process.env.HOST || '127.0.0.1',\n json: args.includes('--json'),\n open: args.includes('--open'),\n port,\n };\n}\n\nfunction printHelp(config: LineageCliConfig): void {\n console.log(`${config.binName} ${packageVersion()}\n\nUsage:\n ${config.binName} start [--port <port>] [--host <host>] [--db <path>] [--open] [--json]\n ${config.binName} --help\n ${config.binName} --version\n\n${config.displayName} runs the bundled Lineage server for the ${config.channel} channel.`);\n}\n\nfunction openBrowser(url: string): void {\n const command = platform() === 'darwin' ? 'open' : platform() === 'win32' ? 'cmd' : 'xdg-open';\n const args = platform() === 'win32' ? ['/c', 'start', '', url] : [url];\n const opener = spawn(command, args, { detached: true, stdio: 'ignore' });\n opener.unref();\n}\n\nfunction start(config: LineageCliConfig, args: string[]): void {\n let options: StartOptions;\n const json = args.includes('--json');\n try {\n options = resolveStartOptions(config, args);\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n if (json) console.error(JSON.stringify({ ok: false, error: message }, null, 2));\n else console.error(`${config.binName}: ${message}`);\n process.exit(1);\n }\n const serverPath = join(packageRoot(), 'dist', 'server.js');\n if (!existsSync(serverPath)) {\n const message = `Missing bundled server at ${serverPath}. Run npm run build before using ${config.binName} start from a source checkout.`;\n if (options.json) console.error(JSON.stringify({ ok: false, error: message }, null, 2));\n else console.error(`${config.binName}: ${message}`);\n process.exit(1);\n }\n\n mkdirSync(dirname(options.dbPath), { recursive: true });\n const url = `http://${options.host}:${options.port}`;\n if (options.json) {\n console.log(JSON.stringify({ channel: config.channel, dbPath: options.dbPath, host: options.host, port: options.port, status: 'starting', url }, null, 2));\n } else {\n console.log(`${config.displayName} starting at ${url}`);\n console.log(`SQLite: ${options.dbPath}`);\n }\n if (options.open) openBrowser(url);\n\n const child = spawn(process.execPath, [serverPath], {\n env: {\n ...process.env,\n HOST: options.host,\n LINEAGE_CHANNEL: config.channel,\n LINEAGE_DB: options.dbPath,\n NODE_ENV: 'production',\n PORT: String(options.port),\n },\n stdio: 'inherit',\n });\n\n let forwardedSignal: NodeJS.Signals | undefined;\n const stop = (signal: NodeJS.Signals) => {\n forwardedSignal = signal;\n child.kill(signal);\n };\n process.once('SIGINT', stop);\n process.once('SIGTERM', stop);\n child.on('exit', code => process.exit(code ?? (forwardedSignal ? signalExitCodes[forwardedSignal] || 1 : 0)));\n child.on('error', error => {\n console.error(`${config.binName}: failed to start server: ${error.message}`);\n process.exit(1);\n });\n}\n\nexport function runLineageCli(config: LineageCliConfig, args = process.argv.slice(2)): void {\n if (args.includes('--help') || args.includes('-h') || args.length === 0) {\n printHelp(config);\n process.exit(0);\n }\n\n if (args.includes('--version') || args.includes('-v')) {\n console.log(packageVersion());\n process.exit(0);\n }\n\n const [command] = args;\n if (command === 'start') {\n start(config, args.slice(1));\n return;\n }\n\n const json = args.includes('--json');\n const message = `Unknown command: ${command}`;\n if (json) console.error(JSON.stringify({ ok: false, command, error: message }, null, 2));\n else console.error(`${config.binName}: ${message}`);\n process.exit(1);\n}\n", "#!/usr/bin/env node\n\nimport { runLineageCli } from './lineageCli';\n\nrunLineageCli({ binName: 'lineage', channel: 'stable', defaultPort: 5197, displayName: 'Lineage' });\n"],
5
+ "mappings": ";;;AAAA,SAAS,YAAY,WAAW,oBAAoB;AACpD,SAAS,SAAS,gBAAgB;AAClC,SAAS,SAAS,MAAM,eAAe;AACvC,SAAS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