brignano 2.0.0 → 2.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/dist/card.js +1 -2
- package/dist/env.js +0 -14
- package/dist/live.js +1 -1
- package/package.json +5 -5
- package/readme.md +10 -4
package/dist/card.js
CHANGED
|
@@ -3,7 +3,7 @@ import chalk from 'chalk';
|
|
|
3
3
|
import { animateBanner, renderBanner } from './banner.js';
|
|
4
4
|
import { renderCard } from './cardBox.js';
|
|
5
5
|
import { funFacts, pick, profile, taglines } from './data.js';
|
|
6
|
-
import {
|
|
6
|
+
import { isInteractive, parseFlags, readVersion, shouldAnimate, shouldFetchLive, unknownFlags, } from './env.js';
|
|
7
7
|
import { fetchLive } from './live.js';
|
|
8
8
|
import { promptForAction, sendEmail, viewResume } from './menu.js';
|
|
9
9
|
import { renderQr } from './qrcode.js';
|
|
@@ -60,7 +60,6 @@ async function main() {
|
|
|
60
60
|
// Kick off the live fetch early (don't await yet) so its timeout budget
|
|
61
61
|
// overlaps the banner render. Skipped entirely when non-interactive/CI.
|
|
62
62
|
const livePromise = shouldFetchLive(flags) ? fetchLive() : Promise.resolve(null);
|
|
63
|
-
clearConsole();
|
|
64
63
|
// Banner first: an animated violet shimmer when we can animate, otherwise the
|
|
65
64
|
// static gradient.
|
|
66
65
|
if (animate) {
|
package/dist/env.js
CHANGED
|
@@ -69,17 +69,3 @@ export function shouldAnimate(flags) {
|
|
|
69
69
|
export function shouldFetchLive(flags) {
|
|
70
70
|
return isInteractive(flags);
|
|
71
71
|
}
|
|
72
|
-
export function clearConsole() {
|
|
73
|
-
const out = process.stdout;
|
|
74
|
-
if (typeof out.clear === 'function') {
|
|
75
|
-
try {
|
|
76
|
-
out.clear();
|
|
77
|
-
}
|
|
78
|
-
catch {
|
|
79
|
-
/* ignore */
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
if (process.stdout.isTTY) {
|
|
83
|
-
process.stdout.write('\u001b[2J\u001b[0f');
|
|
84
|
-
}
|
|
85
|
-
}
|
package/dist/live.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { profile } from './data.js';
|
|
2
2
|
const API = 'https://api.github.com';
|
|
3
3
|
const HEADERS = {
|
|
4
|
-
'User-Agent': '
|
|
4
|
+
'User-Agent': 'brignano',
|
|
5
5
|
Accept: 'application/vnd.github+json',
|
|
6
6
|
};
|
|
7
7
|
// Fetches live GitHub stats with a hard timeout. ANY failure (timeout, offline,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brignano",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/brignano/
|
|
25
|
+
"url": "git+https://github.com/brignano/card.git"
|
|
26
26
|
},
|
|
27
27
|
"author": "Anthony Brignano <anthonybrignano@gmail.com> (https://brignano.io/)",
|
|
28
28
|
"license": "ISC",
|
|
29
29
|
"bugs": {
|
|
30
|
-
"url": "https://github.com/brignano/
|
|
30
|
+
"url": "https://github.com/brignano/card/issues"
|
|
31
31
|
},
|
|
32
|
-
"homepage": "https://github.com/brignano/
|
|
32
|
+
"homepage": "https://github.com/brignano/card#readme",
|
|
33
33
|
"keywords": [
|
|
34
34
|
"npx",
|
|
35
35
|
"business-card",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"resume",
|
|
39
39
|
"vcard"
|
|
40
40
|
],
|
|
41
|
-
"description": "
|
|
41
|
+
"description": "An interactive terminal business card for Anthony Brignano — run `npx brignano`",
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public",
|
|
44
44
|
"provenance": true
|
package/readme.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# npx
|
|
1
|
+
# npx brignano
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/brignano)
|
|
4
4
|
[](https://www.npmjs.com/package/brignano)
|
|
5
|
-
[](https://github.com/brignano/card/actions/workflows/ci.yml)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
An interactive terminal business card for Anthony Brignano. Run it with `npx` to get a gradient ASCII-art intro, a styled card with **live GitHub stats**, and quick actions — copy my email, open my socials, save my contact, or grab a scannable QR code.
|
|
@@ -68,13 +68,19 @@ npx brignano --no-prompt # card only (useful in CI/scripts)
|
|
|
68
68
|
## Local development
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
git clone https://github.com/brignano/
|
|
72
|
-
cd
|
|
71
|
+
git clone https://github.com/brignano/card.git
|
|
72
|
+
cd card
|
|
73
73
|
npm install
|
|
74
74
|
npm run build
|
|
75
75
|
node dist/card.js
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
+
> **Running it inside this repo:** `npx brignano` resolves to *this* package's
|
|
79
|
+
> `bin` (`dist/`), not the published one — and `dist/` is gitignored. On a fresh
|
|
80
|
+
> clone it will exit silently until you build. Use `npm run dev` (runs the
|
|
81
|
+
> TypeScript directly, no build step), or `npm run build` first. To exercise the
|
|
82
|
+
> published package instead, run `npx brignano` from any other directory.
|
|
83
|
+
|
|
78
84
|
Source lives in `src/` (split into small modules — `card.ts` is the entry/`bin`
|
|
79
85
|
target) and compiles to `dist/` via `tsc`. `npm run dev` runs the TypeScript
|
|
80
86
|
directly through `tsx`; `npm run lint` and `npm run format` use
|