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.
@@ -1,77 +0,0 @@
1
- import inquirer from 'inquirer';
2
- import chalk from 'chalk';
3
- import { section, divider } from './ui.js';
4
-
5
- const NDA_TEXT = `
6
- ${chalk.white.bold(' NON-DISCLOSURE AGREEMENT')}
7
-
8
- This Non-Disclosure Agreement ("Agreement") is entered into between:
9
-
10
- ${chalk.gray(' Disclosing Party:')} PixelStack Labs ("Company")
11
- ${chalk.gray(' Receiving Party:')} You ("Recipient")
12
-
13
- ${divider()}
14
-
15
- ${chalk.bold('1. DEFINITION OF CONFIDENTIAL INFORMATION')}
16
-
17
- "Confidential Information" includes all source code, architecture details,
18
- API designs, database schemas, deployment configurations, business logic,
19
- and proprietary algorithms shared through the PixelStack Lite platform,
20
- its CLI tools, documentation, and related materials.
21
-
22
- ${divider()}
23
-
24
- ${chalk.bold('2. OBLIGATIONS OF RECIPIENT')}
25
-
26
- The Recipient agrees to:
27
- a) Hold all Confidential Information in strict confidence
28
- b) Not disclose Confidential Information to any third party
29
- c) Use Confidential Information solely for authorized evaluation
30
- d) Not reverse-engineer, decompile, or create derivative works
31
- e) Return or destroy all materials upon request
32
-
33
- ${divider()}
34
-
35
- ${chalk.bold('3. TERM')}
36
-
37
- This Agreement remains effective for 2 (two) years from acceptance,
38
- or until the information ceases to be confidential, whichever is later.
39
-
40
- ${divider()}
41
-
42
- ${chalk.bold('4. GOVERNING LAW')}
43
-
44
- This Agreement shall be governed by the laws of the jurisdiction
45
- in which the Company operates.
46
-
47
- ${divider()}
48
- `;
49
-
50
- export async function showNDA(): Promise<boolean> {
51
- section('Legal Agreement');
52
-
53
- console.log(chalk.hex('#7C3AED').bold(' Before proceeding, please review the NDA:'));
54
- console.log('');
55
- console.log(NDA_TEXT);
56
-
57
- const { accepted } = await inquirer.prompt([
58
- {
59
- type: 'confirm',
60
- name: 'accepted',
61
- message: chalk.white('Do you accept the Non-Disclosure Agreement?'),
62
- default: false,
63
- },
64
- ]);
65
-
66
- console.log('');
67
-
68
- if (!accepted) {
69
- console.log(chalk.gray(' Installation cancelled. You must accept the NDA to continue.'));
70
- console.log('');
71
- return false;
72
- }
73
-
74
- console.log(chalk.green(' ✔ NDA accepted. Proceeding...'));
75
- console.log('');
76
- return true;
77
- }
@@ -1,107 +0,0 @@
1
- import { execSync } from 'child_process';
2
- import chalk from 'chalk';
3
- import { success, error, warn, info, section } from './ui.js';
4
-
5
- interface Requirement {
6
- name: string;
7
- command: string;
8
- minVersion?: string;
9
- required: boolean;
10
- installHint: string;
11
- }
12
-
13
- interface CheckResult {
14
- name: string;
15
- installed: boolean;
16
- version?: string;
17
- meetsMin?: boolean;
18
- required: boolean;
19
- minVersion?: string;
20
- installHint: string;
21
- }
22
-
23
- const REQUIREMENTS: Requirement[] = [
24
- {
25
- name: 'Node.js',
26
- command: 'node --version',
27
- minVersion: '22.0.0',
28
- required: true,
29
- installHint: 'Install Node.js 22+: https://nodejs.org/',
30
- },
31
- {
32
- name: 'Docker',
33
- command: 'docker --version',
34
- required: true,
35
- installHint: 'Install Docker: https://docs.docker.com/get-docker/',
36
- },
37
- {
38
- name: 'Docker Compose',
39
- command: 'docker compose version',
40
- required: true,
41
- installHint: 'Install Docker Compose: https://docs.docker.com/compose/install/',
42
- },
43
- {
44
- name: 'pnpm',
45
- command: 'pnpm --version',
46
- minVersion: '9.0.0',
47
- required: false,
48
- installHint: 'Install pnpm: npm install -g pnpm@9',
49
- },
50
- ];
51
-
52
- function parseVersion(output: string): string {
53
- return output.replace(/^[^\d]*/, '').split('+')[0].trim();
54
- }
55
-
56
- function compareVersions(a: string, b: string): number {
57
- const pa = a.split('.').map(Number);
58
- const pb = b.split('.').map(Number);
59
- for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
60
- const na = pa[i] || 0;
61
- const nb = pb[i] || 0;
62
- if (na > nb) return 1;
63
- if (na < nb) return -1;
64
- }
65
- return 0;
66
- }
67
-
68
- function checkRequirement(req: Requirement): CheckResult {
69
- try {
70
- const output = execSync(req.command, { encoding: 'utf-8', stdio: 'pipe' }).trim();
71
- const version = parseVersion(output);
72
- const meetsMin = req.minVersion ? compareVersions(version, req.minVersion) >= 0 : true;
73
- return { name: req.name, installed: true, version, meetsMin, required: req.required, minVersion: req.minVersion, installHint: req.installHint };
74
- } catch {
75
- return { name: req.name, installed: false, required: req.required, installHint: req.installHint };
76
- }
77
- }
78
-
79
- export async function checkRequirements(): Promise<boolean> {
80
- section('System Requirements');
81
-
82
- const results = REQUIREMENTS.map(checkRequirement);
83
- let allPassed = true;
84
-
85
- for (const r of results) {
86
- if (!r.installed) {
87
- error(`${chalk.bold(r.name)} not found`);
88
- info(r.installHint);
89
- if (r.required) allPassed = false;
90
- } else if (r.meetsMin === false) {
91
- warn(`${chalk.bold(r.name)} ${r.version} — requires ${r.minVersion}+`);
92
- info(r.installHint);
93
- if (r.required) allPassed = false;
94
- } else {
95
- success(`${chalk.bold(r.name)} ${chalk.gray(r.version || '')}`);
96
- }
97
- }
98
-
99
- console.log('');
100
-
101
- if (!allPassed) {
102
- error('Missing required dependencies. Please install them and try again.');
103
- return false;
104
- }
105
-
106
- return true;
107
- }
package/src/modules/ui.ts DELETED
@@ -1,35 +0,0 @@
1
- import chalk from 'chalk';
2
-
3
- export function banner(): void {
4
- console.log(chalk.hex('#7C3AED')('┌─────────────────────────────────────────────┐'));
5
- console.log(chalk.hex('#7C3AED')('│') + chalk.white.bold(' PixelStack Lite Installer ') + chalk.hex('#7C3AED')('│'));
6
- console.log(chalk.hex('#7C3AED')('│') + chalk.gray(' v0.1.0 — Single Container ') + chalk.hex('#7C3AED')('│'));
7
- console.log(chalk.hex('#7C3AED')('└─────────────────────────────────────────────┘'));
8
- console.log('');
9
- }
10
-
11
- export function success(msg: string): void {
12
- console.log(chalk.green(' ✔ ') + msg);
13
- }
14
-
15
- export function error(msg: string): void {
16
- console.log(chalk.red(' ✘ ') + msg);
17
- }
18
-
19
- export function warn(msg: string): void {
20
- console.log(chalk.yellow(' ⚠ ') + msg);
21
- }
22
-
23
- export function info(msg: string): void {
24
- console.log(chalk.cyan(' ℹ ') + msg);
25
- }
26
-
27
- export function divider(): void {
28
- console.log(chalk.gray(' ───────────────────────────────────────────'));
29
- }
30
-
31
- export function section(title: string): void {
32
- console.log('');
33
- console.log(chalk.hex('#7C3AED').bold(` ▸ ${title}`));
34
- console.log('');
35
- }
package/tsconfig.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "NodeNext",
5
- "moduleResolution": "NodeNext",
6
- "outDir": "dist",
7
- "rootDir": "src",
8
- "strict": true,
9
- "esModuleInterop": true,
10
- "skipLibCheck": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "declaration": true,
13
- "resolveJsonModule": true
14
- },
15
- "include": ["src"]
16
- }