@cortexa/core 0.7.0 → 1.0.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexa/core",
3
- "version": "0.7.0",
3
+ "version": "1.0.1",
4
4
  "description": "The intelligence layer that turns any database into a self-analyzing, self-explaining system.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -17,9 +17,11 @@
17
17
  "cortexa": "./dist/cli/index.js"
18
18
  },
19
19
  "files": [
20
- "dist"
20
+ "dist",
21
+ "scripts"
21
22
  ],
22
23
  "scripts": {
24
+ "postinstall": "node scripts/postinstall.js || true",
23
25
  "build": "tsup",
24
26
  "dev": "tsup --watch",
25
27
  "test": "vitest run",
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env node
2
+
3
+ const RESET = '\x1b[0m';
4
+ const BOLD = '\x1b[1m';
5
+ const DIM = '\x1b[2m';
6
+
7
+ function rgb(r, g, b) {
8
+ return `\x1b[38;2;${r};${g};${b}m`;
9
+ }
10
+
11
+ function gradientLine(text, from, to) {
12
+ const len = text.length || 1;
13
+ let result = '';
14
+ for (let i = 0; i < text.length; i++) {
15
+ const t = i / (len - 1);
16
+ const r = Math.round(from[0] + (to[0] - from[0]) * t);
17
+ const g = Math.round(from[1] + (to[1] - from[1]) * t);
18
+ const b = Math.round(from[2] + (to[2] - from[2]) * t);
19
+ result += rgb(r, g, b) + text[i];
20
+ }
21
+ return result + RESET;
22
+ }
23
+
24
+ const LOGO_LINES = [
25
+ ' ___ ___ ___ _____ _____ __ _ ',
26
+ ' / __/ _ \\| _ \\_ _| __\\ \\/ / /_\\ ',
27
+ '| (_| (_) | / | | | _| > < / _ \\ ',
28
+ ' \\___\\___/|_|_\\ |_| |___/_/\\_\\/_/ \\_\\',
29
+ ];
30
+
31
+ const LINE_COLORS = [
32
+ [[0, 210, 190], [60, 170, 255]],
33
+ [[0, 200, 200], [90, 150, 255]],
34
+ [[0, 190, 210], [120, 130, 255]],
35
+ [[0, 170, 230], [160, 100, 255]],
36
+ ];
37
+
38
+ try {
39
+ // Build the full banner as a single string to maximize chances npm displays it
40
+ let banner = '\n';
41
+ for (let i = 0; i < LOGO_LINES.length; i++) {
42
+ banner += ` ${BOLD}${gradientLine(LOGO_LINES[i], LINE_COLORS[i][0], LINE_COLORS[i][1])}\n`;
43
+ }
44
+ banner += `\n ${DIM}The intelligence layer between data and decisions.${RESET}\n`;
45
+ banner += ` ${DIM}Get started: npx cortexa init${RESET}\n`;
46
+ console.log(banner);
47
+ } catch {
48
+ // Silently ignore - postinstall banners should never fail the install
49
+ }