@byline/cli 6.0.0 → 6.0.2

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@byline/cli",
3
3
  "private": false,
4
4
  "license": "MPL-2.0",
5
- "version": "6.0.0",
5
+ "version": "6.0.2",
6
6
  "engines": {
7
7
  "node": ">=20.9.0"
8
8
  },
@@ -61,7 +61,7 @@
61
61
  "typescript": "^7.0.2",
62
62
  "unified": "^11.0.5",
63
63
  "vitest": "^5.0.0",
64
- "@byline/core": "6.0.0"
64
+ "@byline/core": "6.0.2"
65
65
  },
66
66
  "publishConfig": {
67
67
  "access": "public",
@@ -1,11 +0,0 @@
1
- export interface PgConn {
2
- host: string;
3
- port: number;
4
- user: string;
5
- password: string;
6
- database: string;
7
- }
8
- export declare function buildPgUrl(c: PgConn): string;
9
- export declare function parsePgUrl(raw: string): PgConn;
10
- export declare function withDatabase(c: PgConn, database: string): PgConn;
11
- //# sourceMappingURL=pg-url.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pg-url.d.ts","sourceRoot":"","sources":["../../src/lib/pg-url.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAI5C;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAY9C;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEhE"}
@@ -1,22 +0,0 @@
1
- export function buildPgUrl(c) {
2
- const u = encodeURIComponent(c.user);
3
- const p = encodeURIComponent(c.password);
4
- return `postgresql://${u}:${p}@${c.host}:${c.port}/${encodeURIComponent(c.database)}`;
5
- }
6
- export function parsePgUrl(raw) {
7
- const url = new URL(raw);
8
- if (url.protocol !== 'postgresql:' && url.protocol !== 'postgres:') {
9
- throw new Error(`expected postgresql:// URL, got ${url.protocol}`);
10
- }
11
- return {
12
- host: url.hostname,
13
- port: url.port ? Number(url.port) : 5432,
14
- user: decodeURIComponent(url.username),
15
- password: decodeURIComponent(url.password),
16
- database: url.pathname.replace(/^\//, '') || 'postgres',
17
- };
18
- }
19
- export function withDatabase(c, database) {
20
- return { ...c, database };
21
- }
22
- //# sourceMappingURL=pg-url.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pg-url.js","sourceRoot":"","sources":["../../src/lib/pg-url.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,UAAU,CAAC,CAAS;IAClC,MAAM,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IACpC,MAAM,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;IACxC,OAAO,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,kBAAkB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAA;AACvF,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;IACxB,IAAI,GAAG,CAAC,QAAQ,KAAK,aAAa,IAAI,GAAG,CAAC,QAAQ,KAAK,WAAW,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CAAC,mCAAmC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAA;IACpE,CAAC;IACD,OAAO;QACL,IAAI,EAAE,GAAG,CAAC,QAAQ;QAClB,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;QACxC,IAAI,EAAE,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC;QACtC,QAAQ,EAAE,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC1C,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,UAAU;KACxD,CAAA;AACH,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,CAAS,EAAE,QAAgB;IACtD,OAAO,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAA;AAC3B,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { Phase, PhaseId } from '../types.js';
2
- export declare function stubPhase(id: PhaseId, title: string): Phase;
3
- //# sourceMappingURL=stub.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stub.d.ts","sourceRoot":"","sources":["../../src/phases/stub.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAEjD,wBAAgB,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,CAoB3D"}
@@ -1,25 +0,0 @@
1
- export function stubPhase(id, title) {
2
- return {
3
- id,
4
- title,
5
- defaultMode: 'confirm',
6
- async detect(ctx) {
7
- return ctx.state.isComplete(id) ? 'done' : 'pending';
8
- },
9
- async plan() {
10
- return {
11
- writes: [],
12
- commands: [],
13
- notes: [`${id}: not yet implemented in @byline/cli ${currentVersion()}`],
14
- };
15
- },
16
- async apply(_plan, ctx) {
17
- ctx.logger.warn(`${id} — phase is stubbed; please follow the manual instructions in docs`);
18
- return { state: 'pending' };
19
- },
20
- };
21
- }
22
- function currentVersion() {
23
- return '0.1.0';
24
- }
25
- //# sourceMappingURL=stub.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stub.js","sourceRoot":"","sources":["../../src/phases/stub.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,SAAS,CAAC,EAAW,EAAE,KAAa;IAClD,OAAO;QACL,EAAE;QACF,KAAK;QACL,WAAW,EAAE,SAAS;QACtB,KAAK,CAAC,MAAM,CAAC,GAAY;YACvB,OAAO,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;QACtD,CAAC;QACD,KAAK,CAAC,IAAI;YACR,OAAO;gBACL,MAAM,EAAE,EAAE;gBACV,QAAQ,EAAE,EAAE;gBACZ,KAAK,EAAE,CAAC,GAAG,EAAE,wCAAwC,cAAc,EAAE,EAAE,CAAC;aACzE,CAAA;QACH,CAAC;QACD,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG;YACpB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,oEAAoE,CAAC,CAAA;YAC1F,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAA;QAC7B,CAAC;KACF,CAAA;AACH,CAAC;AAED,SAAS,cAAc;IACrB,OAAO,OAAO,CAAA;AAChB,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function renderSnippet(title: string, body: string, lang?: string): string;
2
- //# sourceMappingURL=snippet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snippet.d.ts","sourceRoot":"","sources":["../../src/ui/snippet.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,SAAK,GAAG,MAAM,CAI5E"}
@@ -1,7 +0,0 @@
1
- import pc from 'picocolors';
2
- export function renderSnippet(title, body, lang = '') {
3
- const header = pc.dim(`--- ${title}${lang ? ` (${lang})` : ''} ---`);
4
- const footer = pc.dim('---');
5
- return `${header}\n${body}\n${footer}`;
6
- }
7
- //# sourceMappingURL=snippet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snippet.js","sourceRoot":"","sources":["../../src/ui/snippet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,MAAM,UAAU,aAAa,CAAC,KAAa,EAAE,IAAY,EAAE,IAAI,GAAG,EAAE;IAClE,MAAM,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,OAAO,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IACpE,MAAM,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAC5B,OAAO,GAAG,MAAM,KAAK,IAAI,KAAK,MAAM,EAAE,CAAA;AACxC,CAAC"}