pixelstart 0.0.1 → 1.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/dist/index.js CHANGED
@@ -1,16 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import chalk from 'chalk';
3
3
  import { showLogo } from './modules/logo.js';
4
- import { banner, section, error, info } from './modules/ui.js';
4
+ import { banner, section, success, error, info } from './modules/ui.js';
5
5
  import { checkRequirements } from './modules/requirements.js';
6
6
  import { showNDA } from './modules/nda.js';
7
- import { showLicense } from './modules/license.js';
8
7
  import { initProject } from './modules/init.js';
9
- const VERSION = '0.1.0';
8
+ const VERSION = '1.1.0';
10
9
  async function main() {
11
10
  const args = process.argv.slice(2);
12
11
  const command = args[0];
13
- // --help / --version work without logo
14
12
  if (command === '--help' || command === '-h') {
15
13
  printHelp();
16
14
  return;
@@ -19,25 +17,16 @@ async function main() {
19
17
  console.log(`pixelstart v${VERSION}`);
20
18
  return;
21
19
  }
22
- // Interactive flow — show logo + banner
23
20
  showLogo();
24
21
  banner();
25
- // Step 1: Check requirements
26
22
  const reqsOk = await checkRequirements();
27
23
  if (!reqsOk) {
28
24
  process.exit(1);
29
25
  }
30
- // Step 2: NDA
31
26
  const ndaOk = await showNDA();
32
27
  if (!ndaOk) {
33
28
  process.exit(0);
34
29
  }
35
- // Step 3: License
36
- const tier = await showLicense();
37
- if (!tier) {
38
- process.exit(0);
39
- }
40
- // Step 4: Init project (if `init` command or no command)
41
30
  if (!command || command === 'init') {
42
31
  await initProject();
43
32
  }
@@ -46,12 +35,52 @@ async function main() {
46
35
  info(`Command "${command}" will be available after project initialization.`);
47
36
  console.log('');
48
37
  }
38
+ else if (command === 'pull') {
39
+ await retryPull();
40
+ }
49
41
  else {
50
42
  error(`Unknown command: ${command}`);
51
43
  info('Run `pixelstart --help` for usage.');
52
44
  process.exit(1);
53
45
  }
54
46
  }
47
+ async function retryPull() {
48
+ section('Pull Docker Image');
49
+ const inquirer = await import('inquirer');
50
+ const { validateLicense, exchangeDownloadToken } = await import('./modules/license.js');
51
+ const { key } = await inquirer.default.prompt([
52
+ {
53
+ type: 'input',
54
+ name: 'key',
55
+ message: chalk.white('License key:'),
56
+ validate: (input) => input.trim().length > 0 || 'License key is required',
57
+ },
58
+ ]);
59
+ console.log('');
60
+ info('Validating license...');
61
+ const licenseResult = await validateLicense(key.trim(), 'latest');
62
+ if (!licenseResult)
63
+ return;
64
+ success('License validated!');
65
+ console.log('');
66
+ info('Generating download token...');
67
+ const downloadResult = await exchangeDownloadToken(licenseResult.downloadToken);
68
+ if (!downloadResult)
69
+ return;
70
+ console.log('');
71
+ info('Pulling Docker image...');
72
+ const { execSync } = await import('child_process');
73
+ try {
74
+ execSync(downloadResult.dockerCommand, { stdio: 'inherit' });
75
+ console.log('');
76
+ success(`Docker image ${chalk.bold(downloadResult.image)} pulled successfully!`);
77
+ }
78
+ catch {
79
+ error('Docker pull failed. You can retry manually:');
80
+ console.log('');
81
+ console.log(chalk.white(` ${downloadResult.dockerCommand}`));
82
+ }
83
+ }
55
84
  function printHelp() {
56
85
  console.log(`
57
86
  ${chalk.hex('#7C3AED').bold('pixelstart')} v${VERSION}
@@ -61,6 +90,7 @@ function printHelp() {
61
90
 
62
91
  ${chalk.gray('Commands:')}
63
92
  init Scaffold a new PixelStack Lite project
93
+ pull Pull Docker image with license key
64
94
  up Start all services
65
95
  down Stop all services
66
96
  status Show service status
@@ -73,10 +103,10 @@ function printHelp() {
73
103
  ${chalk.gray('Examples:')}
74
104
  pixelstart Launch interactive installer
75
105
  pixelstart init Create a new project
106
+ pixelstart pull Pull Docker image
76
107
  pixelstart up Start services
77
108
  `);
78
109
  }
79
- // Catch unhandled errors gracefully
80
110
  process.on('unhandledRejection', (err) => {
81
111
  console.error('');
82
112
  error(`Unexpected error: ${err}`);
@@ -1,8 +1,10 @@
1
+ import { execSync } from 'child_process';
1
2
  import fs from 'fs';
2
3
  import path from 'path';
3
4
  import inquirer from 'inquirer';
4
5
  import chalk from 'chalk';
5
6
  import { section, success, error, info } from './ui.js';
7
+ import { validateLicense, exchangeDownloadToken } from './license.js';
6
8
  export async function initProject() {
7
9
  section('Project Setup');
8
10
  const config = await inquirer.prompt([
@@ -36,6 +38,12 @@ export async function initProject() {
36
38
  mask: '*',
37
39
  validate: (input) => input.length >= 8 || 'Min 8 characters',
38
40
  },
41
+ {
42
+ type: 'input',
43
+ name: 'licenseKey',
44
+ message: chalk.white('License key:'),
45
+ validate: (input) => input.trim().length > 0 || 'License key is required',
46
+ },
39
47
  ]);
40
48
  console.log('');
41
49
  info(`Creating project in ${chalk.bold(config.directory)}`);
@@ -71,15 +79,52 @@ data/
71
79
  `);
72
80
  success('Created .gitignore');
73
81
  console.log('');
74
- success(`Project "${chalk.bold(config.name)}" created!`);
82
+ info('Validating license...');
83
+ console.log('');
84
+ const licenseResult = await validateLicense(config.licenseKey.trim(), 'latest');
85
+ if (!licenseResult) {
86
+ error('License validation failed. Project files created but Docker image not downloaded.');
87
+ info('You can retry later with: pixelstart pull');
88
+ printNextSteps(config);
89
+ return;
90
+ }
91
+ success('License validated!');
92
+ info(`Remaining downloads today: ${chalk.bold(String(licenseResult.remainingDownloads))}`);
93
+ console.log('');
94
+ info('Generating download token...');
95
+ const downloadResult = await exchangeDownloadToken(licenseResult.downloadToken);
96
+ if (!downloadResult) {
97
+ error('Failed to generate download token. Project files created but Docker image not downloaded.');
98
+ info('You can retry later with: pixelstart pull');
99
+ printNextSteps(config);
100
+ return;
101
+ }
75
102
  console.log('');
76
- info(`Next steps:`);
77
- console.log(chalk.white(` cd ${config.directory}`));
78
- console.log(chalk.white(' pixelstart up'));
103
+ info('Pulling Docker image...');
79
104
  console.log('');
105
+ try {
106
+ execSync(downloadResult.dockerCommand, { stdio: 'inherit' });
107
+ console.log('');
108
+ success(`Docker image ${chalk.bold(downloadResult.image)} pulled successfully!`);
109
+ }
110
+ catch (err) {
111
+ error('Docker pull failed. You can retry manually:');
112
+ console.log('');
113
+ console.log(chalk.white(` ${downloadResult.dockerCommand}`));
114
+ }
115
+ console.log('');
116
+ success(`Project "${chalk.bold(config.name)}" created!`);
117
+ printNextSteps(config);
80
118
  }
81
119
  catch (err) {
82
120
  error(`Failed to create project: ${err}`);
83
121
  process.exit(1);
84
122
  }
85
123
  }
124
+ function printNextSteps(config) {
125
+ console.log('');
126
+ info('Next steps:');
127
+ console.log(chalk.white(` cd ${config.directory}`));
128
+ console.log(chalk.white(' pixelstart up'));
129
+ console.log('');
130
+ }
@@ -1,5 +1,19 @@
1
- export declare function showLicense(): Promise<string | null>;
2
- export declare function getLicenseInfo(): {
3
- tier: string;
4
- features: string[];
5
- };
1
+ export interface LicenseValidation {
2
+ success: boolean;
3
+ downloadToken: string;
4
+ expiresAt: string;
5
+ imageTag: string;
6
+ remainingDownloads: number;
7
+ }
8
+ export interface DownloadResult {
9
+ success: boolean;
10
+ dockerCommand: string;
11
+ image: string;
12
+ tag: string;
13
+ }
14
+ export declare function validateLicense(licenseKey: string, imageTag: string): Promise<LicenseValidation | null>;
15
+ export declare function exchangeDownloadToken(token: string): Promise<DownloadResult | null>;
16
+ export declare function showLicense(): Promise<{
17
+ key: string;
18
+ imageTag: string;
19
+ } | null>;
@@ -1,76 +1,79 @@
1
- import inquirer from 'inquirer';
2
1
  import chalk from 'chalk';
3
- import { section, success, info } from './ui.js';
4
- const LICENSE_TIERS = [
5
- {
6
- name: 'Community Free',
7
- value: 'community',
8
- description: 'Basic features, single project, community support',
9
- },
10
- {
11
- name: 'Pro — $29/mo',
12
- value: 'pro',
13
- description: 'Unlimited projects, priority support, custom themes',
14
- },
15
- {
16
- name: 'Enterprise — Custom',
17
- value: 'enterprise',
18
- description: 'Self-hosted, SLA, dedicated support, custom integrations',
19
- },
20
- ];
2
+ import { section, success, error, info } from './ui.js';
3
+ const SUPABASE_URL = 'https://qnuzhgozszftvvxsnaos.supabase.co';
4
+ const ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InFudXpoZ296c3pmdHZ2eHNuYW9zIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODM0MjEwODMsImV4cCI6MjA5ODk5NzA4M30.q3mgpAS8nm1OtvnlKuOgTEi_vLmb46bV0sf3bS-fSCg';
5
+ const EDGE_FUNCTION = `${SUPABASE_URL}/functions/v1/proxy-package`;
6
+ export async function validateLicense(licenseKey, imageTag) {
7
+ try {
8
+ const res = await fetch(EDGE_FUNCTION, {
9
+ method: 'POST',
10
+ headers: {
11
+ 'Content-Type': 'application/json',
12
+ 'apikey': ANON_KEY,
13
+ },
14
+ body: JSON.stringify({ license: licenseKey, imageTag }),
15
+ });
16
+ const data = await res.json();
17
+ if (!res.ok || data.error) {
18
+ error(data.error || 'License validation failed');
19
+ if (data.details)
20
+ info(data.details);
21
+ return null;
22
+ }
23
+ return data;
24
+ }
25
+ catch (err) {
26
+ error(`Network error: ${err}`);
27
+ return null;
28
+ }
29
+ }
30
+ export async function exchangeDownloadToken(token) {
31
+ try {
32
+ const res = await fetch(EDGE_FUNCTION, {
33
+ method: 'POST',
34
+ headers: {
35
+ 'Content-Type': 'application/json',
36
+ 'apikey': ANON_KEY,
37
+ },
38
+ body: JSON.stringify({ downloadToken: token }),
39
+ });
40
+ const data = await res.json();
41
+ if (!res.ok || data.error) {
42
+ error(data.error || 'Token exchange failed');
43
+ if (data.details)
44
+ info(data.details);
45
+ return null;
46
+ }
47
+ return data;
48
+ }
49
+ catch (err) {
50
+ error(`Network error: ${err}`);
51
+ return null;
52
+ }
53
+ }
21
54
  export async function showLicense() {
22
55
  section('License');
23
- console.log(chalk.white(' Choose your PixelStack Lite license tier:'));
56
+ console.log(chalk.white(' Enter your PixelStack license key to download the image.'));
24
57
  console.log('');
25
- for (const tier of LICENSE_TIERS) {
26
- const isActive = tier.value === 'community';
27
- const marker = isActive ? chalk.green('●') : chalk.gray('○');
28
- console.log(` ${marker} ${chalk.bold(tier.name)}`);
29
- console.log(` ${chalk.gray(tier.description)}`);
30
- console.log('');
31
- }
32
- const { tier } = await inquirer.prompt([
58
+ const { key } = await import('inquirer').then(m => m.default.prompt([
33
59
  {
34
- type: 'list',
35
- name: 'tier',
36
- message: chalk.white('Select a license tier:'),
37
- choices: LICENSE_TIERS,
38
- default: 'community',
60
+ type: 'input',
61
+ name: 'key',
62
+ message: chalk.white('License key:'),
63
+ validate: (input) => input.trim().length > 0 || 'License key is required',
39
64
  },
40
- ]);
65
+ ]));
41
66
  console.log('');
42
- if (tier === 'community') {
43
- success('Community license activated');
44
- info('No key required. Run `pixelstart init` to get started.');
45
- }
46
- else if (tier === 'pro') {
47
- const { key } = await inquirer.prompt([
48
- {
49
- type: 'input',
50
- name: 'key',
51
- message: chalk.white('Enter your Pro license key:'),
52
- validate: (input) => input.length > 0 || 'License key is required',
53
- },
54
- ]);
55
- if (key) {
56
- success('Pro license activated');
57
- info('Your license key has been validated and saved.');
58
- }
59
- }
60
- else {
61
- info('Enterprise inquiries: contact@pixelstack.dev');
67
+ info('Validating license...');
68
+ console.log('');
69
+ const result = await validateLicense(key.trim(), 'latest');
70
+ if (!result) {
71
+ error('License validation failed.');
72
+ console.log('');
73
+ return null;
62
74
  }
75
+ success('License validated!');
76
+ info(`Remaining downloads today: ${chalk.bold(String(result.remainingDownloads))}`);
63
77
  console.log('');
64
- return tier;
65
- }
66
- export function getLicenseInfo() {
67
- return {
68
- tier: 'community',
69
- features: [
70
- 'PixelStack Lite (single container)',
71
- 'Up to 1 project',
72
- 'Community support via GitHub Issues',
73
- 'Standard themes and components',
74
- ],
75
- };
78
+ return { key: key.trim(), imageTag: result.imageTag };
76
79
  }
@@ -1,16 +1,14 @@
1
1
  import chalk from 'chalk';
2
+ const P = '#7C3AED';
2
3
  export const logo = `
3
- ${chalk.hex('#7C3AED').bold(' ╔══════════════════════════════════╗')}
4
- ${chalk.hex('#7C3AED').bold(' ║ ║')}
5
- ${chalk.hex('#7C3AED').bold(' ║ ██████╗ ██╗██╗ ██╗███████╗██╗ ██████╗ ██████╗ ')}
6
- ${chalk.hex('#7C3AED').bold(' ║ ██╔══██╗██║╚██╗██╔╝██╔════╝██║ ██╔═══██╗██╔════╝ ')}
7
- ${chalk.hex('#7C3AED').bold(' ║ ██████╔╝██║ ╚███╔╝ █████╗ ██║ ██║ ██║██║ ███╗')}
8
- ${chalk.hex('#7C3AED').bold(' ║ ██╔═══╝ ██║ ██╔██╗ ██╔══╝ ██║ ██║ ██║██║ ██║')}
9
- ${chalk.hex('#7C3AED').bold(' ║ ██║ ██║██╔╝ ██╗███████╗███████╗╚██████╔╝╚██████╔╝')}
10
- ${chalk.hex('#7C3AED').bold(' ║ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ')}
11
- ${chalk.hex('#7C3AED').bold(' ║ ║')}
12
- ${chalk.hex('#7C3AED').bold(' ╚══════════════════════════════════╝')}
13
- ${chalk.gray(' Digital Experience Platform')}
4
+ ${chalk.hex(P).bold('███╗ ███╗██╗██╗ ██╗██╗ ██╗███████╗██████╗ ')}
5
+ ${chalk.hex(P).bold('████╗ ████║██║██║ ██║╚██╗██╔╝██╔════╝██╔══██╗')}
6
+ ${chalk.hex(P).bold('██╔████╔██║██║██║ ██║ ╚███╔╝ █████╗ ██████╔╝')}
7
+ ${chalk.hex(P).bold('██║╚██╔╝██║██║██║ ██║ ██╔██╗ ██╔══╝ ██╔══██╗')}
8
+ ${chalk.hex(P).bold('██║ ╚═╝ ██║██║███████╗██║██╔╝ ██╗███████╗██║ ██║')}
9
+ ${chalk.hex(P).bold('╚═╝ ╚═╝╚═╝╚══════╝╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝')}
10
+ ${chalk.gray(' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
11
+ ${chalk.gray(' DIGITAL EXPERIENCE PLATFORM')}
14
12
  `;
15
13
  export function showLogo() {
16
14
  console.clear();
@@ -1,70 +1,179 @@
1
1
  import inquirer from 'inquirer';
2
2
  import chalk from 'chalk';
3
- import { section, divider } from './ui.js';
4
- const NDA_TEXT = `
5
- ${chalk.white.bold(' NON-DISCLOSURE AGREEMENT')}
6
-
7
- This Non-Disclosure Agreement ("Agreement") is entered into between:
8
-
9
- ${chalk.gray(' Disclosing Party:')} PixelStack Labs ("Company")
10
- ${chalk.gray(' Receiving Party:')} You ("Recipient")
11
-
12
- ${divider()}
13
-
14
- ${chalk.bold('1. DEFINITION OF CONFIDENTIAL INFORMATION')}
15
-
16
- "Confidential Information" includes all source code, architecture details,
17
- API designs, database schemas, deployment configurations, business logic,
18
- and proprietary algorithms shared through the PixelStack Lite platform,
19
- its CLI tools, documentation, and related materials.
20
-
21
- ${divider()}
22
-
23
- ${chalk.bold('2. OBLIGATIONS OF RECIPIENT')}
24
-
25
- The Recipient agrees to:
26
- a) Hold all Confidential Information in strict confidence
27
- b) Not disclose Confidential Information to any third party
28
- c) Use Confidential Information solely for authorized evaluation
29
- d) Not reverse-engineer, decompile, or create derivative works
30
- e) Return or destroy all materials upon request
31
-
32
- ${divider()}
33
-
34
- ${chalk.bold('3. TERM')}
35
-
36
- This Agreement remains effective for 2 (two) years from acceptance,
37
- or until the information ceases to be confidential, whichever is later.
38
-
39
- ${divider()}
40
-
41
- ${chalk.bold('4. GOVERNING LAW')}
42
-
43
- This Agreement shall be governed by the laws of the jurisdiction
44
- in which the Company operates.
45
-
46
- ${divider()}
47
- `;
3
+ import { section, dividerLine } from './ui.js';
4
+ const V = '#7C3AED';
5
+ const R = '#EF4444';
6
+ const Y = '#EAB308';
7
+ const G = '#22C55E';
8
+ const C = '#06B6D4';
9
+ const GR = '#6B7280';
10
+ function c(hex, text) {
11
+ return String(chalk.hex(hex)(text));
12
+ }
13
+ function cb(hex, text) {
14
+ return String(chalk.hex(hex).bold(text));
15
+ }
16
+ function renderNDA() {
17
+ const lines = [];
18
+ lines.push('');
19
+ lines.push(cb(V, ' ╔══════════════════════════════════════════════════════════════╗'));
20
+ lines.push(cb(V, ' ║') + cb('#FFFFFF', ' PIXELSTACK — NON-DISCLOSURE AGREEMENT ') + cb(V, '║'));
21
+ lines.push(cb(V, ' ╚══════════════════════════════════════════════════════════════╝'));
22
+ lines.push('');
23
+ lines.push(cb(R, ' ⚠ THIS IS A LEGALLY BINDING AGREEMENT. READ EVERY SECTION CAREFULLY.'));
24
+ lines.push('');
25
+ lines.push(c(GR, ' Before using PixelStack Lite, its CLI tools, source code, or any'));
26
+ lines.push(c(GR, ' related materials, you MUST read and accept this agreement.'));
27
+ lines.push('');
28
+ lines.push(dividerLine());
29
+ // 1. PARTIES
30
+ lines.push(cb(V, '\n 1. PARTIES'));
31
+ lines.push(c('#FFFFFF', ' This Non-Disclosure Agreement ("Agreement") is entered into between:'));
32
+ lines.push('');
33
+ lines.push(c(C, ' Disclosing Party: PixelStack Labs ("Company")'));
34
+ lines.push(c(C, ' Receiving Party: The individual or entity using PixelStack ("Recipient")'));
35
+ lines.push('');
36
+ lines.push(c(Y, ' Effective Date: Upon acceptance via CLI interaction.'));
37
+ lines.push('');
38
+ // 2. DEFINITION
39
+ lines.push(dividerLine());
40
+ lines.push(cb(V, ' 2. DEFINITION OF CONFIDENTIAL INFORMATION'));
41
+ lines.push(c('#FFFFFF', ' "Confidential Information" means any and all proprietary data, including'));
42
+ lines.push(c('#FFFFFF', ' but not limited to:'));
43
+ lines.push('');
44
+ lines.push(c(C, ' (a) Source code, object code, and binary files'));
45
+ lines.push(c(C, ' (b) Architecture, system design, and deployment configurations'));
46
+ lines.push(c(C, ' (c) API endpoints, authentication mechanisms, and security models'));
47
+ lines.push(c(C, ' (d) Database schemas, migrations, and seed data'));
48
+ lines.push(c(C, ' (e) Business logic, algorithms, and proprietary workflows'));
49
+ lines.push(c(C, ' (f) License keys, access tokens, and authentication credentials'));
50
+ lines.push(c(C, ' (g) Documentation, guides, and internal communications'));
51
+ lines.push(c(C, ' (h) Any derivative works or modifications thereof'));
52
+ lines.push('');
53
+ lines.push(cb(R, ' >>> ALL ABOVE ARE CONFIDENTIAL. NO EXCEPTIONS. <<<'));
54
+ lines.push('');
55
+ // 3. RESTRICTIONS
56
+ lines.push(dividerLine());
57
+ lines.push(cb(V, ' 3. STRICT PROHIBITIONS'));
58
+ lines.push(c('#FFFFFF', ' The Recipient SHALL NOT, under any circumstances:'));
59
+ lines.push('');
60
+ lines.push(cb(R, ' (a) Copy, duplicate, or reproduce Confidential Information'));
61
+ lines.push(cb(R, ' (b) Disclose, publish, or share with any third party'));
62
+ lines.push(cb(R, ' (c) Reverse-engineer, decompile, or disassemble any software'));
63
+ lines.push(cb(R, ' (d) Create derivative works, forks, or competing products'));
64
+ lines.push(cb(R, ' (e) Remove or alter any proprietary notices or watermarks'));
65
+ lines.push(cb(R, ' (f) Use Confidential Information for any unauthorized purpose'));
66
+ lines.push(cb(R, ' (g) Share license keys, download tokens, or access credentials'));
67
+ lines.push(cb(R, ' (h) Host, publish, or distribute the software on any registry'));
68
+ lines.push('');
69
+ lines.push(cb(R, ' ⚠ VIOLATION OF ANY PROHIBITION MAY RESULT IN LEGAL ACTION.'));
70
+ lines.push('');
71
+ // 4. PERMITTED USE
72
+ lines.push(dividerLine());
73
+ lines.push(cb(V, ' 4. PERMITTED USE'));
74
+ lines.push(c('#FFFFFF', ' Recipient is granted a LIMITED, NON-TRANSFERABLE, REVOCABLE license to:'));
75
+ lines.push('');
76
+ lines.push(c(C, ' (a) Install and use PixelStack Lite for internal evaluation only'));
77
+ lines.push(c(C, ' (b) Access documentation for the purpose of authorized testing'));
78
+ lines.push(c(C, ' (c) Provide feedback to the Company (which becomes Company property)'));
79
+ lines.push('');
80
+ lines.push(cb(Y, ' This license does NOT grant ownership or redistribution rights.'));
81
+ lines.push('');
82
+ // 5. OBLIGATIONS
83
+ lines.push(dividerLine());
84
+ lines.push(cb(V, ' 5. RECIPIENT OBLIGATIONS'));
85
+ lines.push(c('#FFFFFF', ' The Recipient agrees to:'));
86
+ lines.push('');
87
+ lines.push(c(C, ' (a) Protect Confidential Information with at least the same degree'));
88
+ lines.push(c(C, ' of care used to protect their own confidential information'));
89
+ lines.push(c(C, ' (b) Limit access to personnel with a legitimate need-to-know'));
90
+ lines.push(c(C, ' (c) Not transfer or assign this Agreement or any rights herein'));
91
+ lines.push(c(C, ' (d) Immediately notify the Company of any unauthorized disclosure'));
92
+ lines.push(c(C, ' (e) Return or destroy all Confidential Information upon request'));
93
+ lines.push(c(C, ' (f) Cooperate with the Company in investigating any breach'));
94
+ lines.push('');
95
+ // 6. INTELLECTUAL PROPERTY
96
+ lines.push(dividerLine());
97
+ lines.push(cb(V, ' 6. INTELLECTUAL PROPERTY'));
98
+ lines.push(c('#FFFFFF', ' All Confidential Information remains the sole property of the Company.'));
99
+ lines.push(c('#FFFFFF', ' Nothing in this Agreement grants the Recipient any rights in the'));
100
+ lines.push(c('#FFFFFF', ' Company\'s intellectual property, including but not limited to:'));
101
+ lines.push('');
102
+ lines.push(c(C, ' (a) Patents, trademarks, copyrights, and trade secrets'));
103
+ lines.push(c(C, ' (b) Any derivative works or improvements thereof'));
104
+ lines.push(c(C, ' (c) Any data, analytics, or insights derived from the software'));
105
+ lines.push('');
106
+ lines.push(cb(R, ' >>> YOU OWN NOTHING. ALL RIGHTS RESERVED BY THE COMPANY. <<<'));
107
+ lines.push('');
108
+ // 7. BREACH
109
+ lines.push(dividerLine());
110
+ lines.push(cb(V, ' 7. BREACH AND REMEDIES'));
111
+ lines.push(c('#FFFFFF', ' In the event of a breach or threatened breach:'));
112
+ lines.push('');
113
+ lines.push(c(C, ' (a) The Company may seek immediate injunctive relief'));
114
+ lines.push(c(C, ' (b) The Recipient shall be liable for all damages, costs, and'));
115
+ lines.push(c(C, ' attorney\'s fees incurred by the Company'));
116
+ lines.push(c(C, ' (c) The Company may terminate all access and licenses immediately'));
117
+ lines.push(c(C, ' (d) The Recipient shall cooperate fully in any legal proceedings'));
118
+ lines.push('');
119
+ lines.push(cb(R, ' ⚠ BREACH MAY RESULT IN IRREVERSIBLE LEGAL CONSEQUENCES.'));
120
+ lines.push('');
121
+ // 8. TERM
122
+ lines.push(dividerLine());
123
+ lines.push(cb(V, ' 8. TERM AND TERMINATION'));
124
+ lines.push(c(C, ' (a) This Agreement is effective from the date of acceptance'));
125
+ lines.push(c(C, ' (b) Remains in force for 3 (three) years from acceptance'));
126
+ lines.push(c(C, ' (c) Confidentiality obligations survive termination indefinitely'));
127
+ lines.push(c(C, ' (d) The Company may terminate at any time with written notice'));
128
+ lines.push(c(C, ' (e) Upon termination, all materials must be destroyed within 7 days'));
129
+ lines.push('');
130
+ // 9. GOVERNING LAW
131
+ lines.push(dividerLine());
132
+ lines.push(cb(V, ' 9. GOVERNING LAW AND JURISDICTION'));
133
+ lines.push(c(C, ' (a) This Agreement is governed by applicable international laws'));
134
+ lines.push(c(C, ' (b) Any disputes shall be resolved through binding arbitration'));
135
+ lines.push(c(C, ' (c) The prevailing party is entitled to recover all costs'));
136
+ lines.push(c(C, ' (d) Injunctive relief may be sought in any court of competent'));
137
+ lines.push(c(C, ' jurisdiction without prior notice to the Recipient'));
138
+ lines.push('');
139
+ // 10. DISCLAIMER
140
+ lines.push(dividerLine());
141
+ lines.push(cb(V, ' 10. DISCLAIMER OF WARRANTIES'));
142
+ lines.push(cb(R, ' THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.'));
143
+ lines.push(cb(R, ' THE COMPANY DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,'));
144
+ lines.push(cb(R, ' INCLUDING BUT NOT LIMITED TO MERCHANTABILITY, FITNESS FOR A'));
145
+ lines.push(cb(R, ' PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE COMPANY SHALL'));
146
+ lines.push(cb(R, ' NOT BE LIABLE FOR ANY DAMAGES ARISING FROM USE OF THE SOFTWARE.'));
147
+ lines.push('');
148
+ // FINAL
149
+ lines.push(dividerLine());
150
+ lines.push('');
151
+ lines.push(cb(R, ' ╔══════════════════════════════════════════════════════════════╗'));
152
+ lines.push(cb(R, ' ║') + cb('#FFFFFF', ' BY ACCEPTING THIS AGREEMENT, YOU ACKNOWLEDGE THAT YOU ') + cb(R, '║'));
153
+ lines.push(cb(R, ' ║') + cb('#FFFFFF', ' HAVE READ, UNDERSTAND, AND AGREE TO ALL TERMS HEREIN. ') + cb(R, '║'));
154
+ lines.push(cb(R, ' ║') + cb('#FFFFFF', ' VIOLATION MAY RESULT IN LEGAL ACTION AND FINES. ') + cb(R, '║'));
155
+ lines.push(cb(R, ' ╚══════════════════════════════════════════════════════════════╝'));
156
+ lines.push('');
157
+ return lines.join('\n');
158
+ }
48
159
  export async function showNDA() {
49
160
  section('Legal Agreement');
50
- console.log(chalk.hex('#7C3AED').bold(' Before proceeding, please review the NDA:'));
51
- console.log('');
52
- console.log(NDA_TEXT);
161
+ console.log(renderNDA());
53
162
  const { accepted } = await inquirer.prompt([
54
163
  {
55
164
  type: 'confirm',
56
165
  name: 'accepted',
57
- message: chalk.white('Do you accept the Non-Disclosure Agreement?'),
166
+ message: cb(R, ' I have read and accept all terms of this agreement:'),
58
167
  default: false,
59
168
  },
60
169
  ]);
61
170
  console.log('');
62
171
  if (!accepted) {
63
- console.log(chalk.gray(' Installation cancelled. You must accept the NDA to continue.'));
172
+ console.log(cb(R, ' Installation cancelled. You must accept the NDA to continue.'));
64
173
  console.log('');
65
174
  return false;
66
175
  }
67
- console.log(chalk.green(' ✔ NDA accepted. Proceeding...'));
176
+ console.log(cb(G, ` ✔ NDA accepted at ${new Date().toISOString()}`));
68
177
  console.log('');
69
178
  return true;
70
179
  }