zerostart-cli 0.0.48 → 0.0.49
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/out/cli.js +112 -0
- package/package.json +3 -3
- package/eslint_out.txt +0 -13
- package/lint_out.txt +0 -22
package/out/cli.js
CHANGED
|
@@ -143,6 +143,34 @@ async function initializeProject(name, language, type, options) {
|
|
|
143
143
|
console.log(chalk_1.default.bold.green(' ✅ Success! Your project is ready!'));
|
|
144
144
|
console.log(chalk_1.default.gray(' Location: ') + chalk_1.default.cyan(projectPath));
|
|
145
145
|
console.log();
|
|
146
|
+
console.log(chalk_1.default.green(' ✨ Pro Tip: Try our new VS Code Extension for a better integrated experience! Search "ZeroStart" in the VS Code Marketplace.'));
|
|
147
|
+
console.log();
|
|
148
|
+
try {
|
|
149
|
+
const { installExtension } = await inquirer_1.default.prompt([{
|
|
150
|
+
type: 'confirm',
|
|
151
|
+
name: 'installExtension',
|
|
152
|
+
message: 'Would you like to install the ZeroStart VS Code extension?',
|
|
153
|
+
default: false
|
|
154
|
+
}]);
|
|
155
|
+
if (installExtension) {
|
|
156
|
+
const extSpinner = (0, ora_1.default)({ text: 'Installing VS Code extension...', color: 'cyan' }).start();
|
|
157
|
+
await new Promise((resolve) => {
|
|
158
|
+
(0, child_process_1.exec)('code --install-extension zerostart.zerostart-vscode', (error) => {
|
|
159
|
+
if (error) {
|
|
160
|
+
extSpinner.warn(chalk_1.default.yellow('Failed to install automatically. Please install it manually from the extensions tab (ID: zerostart.zerostart-vscode).'));
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
extSpinner.succeed(chalk_1.default.green('VS Code extension installed successfully!'));
|
|
164
|
+
}
|
|
165
|
+
resolve();
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
console.log();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
catch (e) {
|
|
172
|
+
// Ignore prompt errors if any
|
|
173
|
+
}
|
|
146
174
|
// ── CP languages: open browser + interactive terminal ─────────────
|
|
147
175
|
if (type === types_1.ProjectType.DSAPractice && [types_1.ProjectLanguage.Python, types_1.ProjectLanguage.Java, types_1.ProjectLanguage.CPP].includes(language)) {
|
|
148
176
|
const cpChoice = options.cpInterface || 'both';
|
|
@@ -546,6 +574,90 @@ program
|
|
|
546
574
|
console.log(chalk_1.default.gray(' Explore commands, templates, and deployment guides at the site.'));
|
|
547
575
|
openUrl(docsUrl);
|
|
548
576
|
});
|
|
577
|
+
// zerostart info / stats
|
|
578
|
+
program
|
|
579
|
+
.command('stats')
|
|
580
|
+
.alias('info')
|
|
581
|
+
.description('Show live stats for ZeroStart')
|
|
582
|
+
.action(async () => {
|
|
583
|
+
showBanner();
|
|
584
|
+
const spinner = (0, ora_1.default)({ text: 'Fetching live stats...', color: 'cyan' }).start();
|
|
585
|
+
const currentVersion = program.version() || '0.0.48';
|
|
586
|
+
let latestVersion = currentVersion;
|
|
587
|
+
let npmDownloads = '890+';
|
|
588
|
+
let vscodeInstalls = '50+';
|
|
589
|
+
// Helper to fetch using https
|
|
590
|
+
const https = require('https');
|
|
591
|
+
const fetchJSON = (url, options = {}) => {
|
|
592
|
+
return new Promise((resolve, reject) => {
|
|
593
|
+
const req = https.request(url, options, (res) => {
|
|
594
|
+
let data = '';
|
|
595
|
+
res.on('data', (chunk) => data += chunk);
|
|
596
|
+
res.on('end', () => {
|
|
597
|
+
try {
|
|
598
|
+
resolve(JSON.parse(data));
|
|
599
|
+
}
|
|
600
|
+
catch (e) {
|
|
601
|
+
resolve(null);
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
});
|
|
605
|
+
req.on('error', () => resolve(null));
|
|
606
|
+
if (options.body)
|
|
607
|
+
req.write(options.body);
|
|
608
|
+
req.end();
|
|
609
|
+
});
|
|
610
|
+
};
|
|
611
|
+
try {
|
|
612
|
+
// Get NPM Downloads (last-month)
|
|
613
|
+
const npmData = await fetchJSON('https://api.npmjs.org/downloads/point/last-month/zerostart-cli');
|
|
614
|
+
if (npmData && npmData.downloads) {
|
|
615
|
+
npmDownloads = npmData.downloads.toLocaleString() + '+';
|
|
616
|
+
}
|
|
617
|
+
// Get VS Code Installs via Marketplace Query
|
|
618
|
+
const bodyStr = JSON.stringify({
|
|
619
|
+
filters: [{ criteria: [{ filterType: 7, value: 'zerostart.zerostart-vscode' }] }],
|
|
620
|
+
flags: 2
|
|
621
|
+
});
|
|
622
|
+
const vsData = await fetchJSON('https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery', {
|
|
623
|
+
method: 'POST',
|
|
624
|
+
headers: {
|
|
625
|
+
'Accept': 'application/json;api-version=3.0-preview.1',
|
|
626
|
+
'Content-Type': 'application/json',
|
|
627
|
+
'Content-Length': Buffer.byteLength(bodyStr)
|
|
628
|
+
},
|
|
629
|
+
body: bodyStr
|
|
630
|
+
});
|
|
631
|
+
if (vsData && vsData.results && vsData.results[0] && vsData.results[0].extensions && vsData.results[0].extensions[0]) {
|
|
632
|
+
const ext = vsData.results[0].extensions[0];
|
|
633
|
+
const stat = ext.statistics.find((s) => s.statisticName === 'install');
|
|
634
|
+
if (stat)
|
|
635
|
+
vscodeInstalls = stat.value.toLocaleString() + '+';
|
|
636
|
+
}
|
|
637
|
+
// Get latest version
|
|
638
|
+
latestVersion = await new Promise((resolve) => {
|
|
639
|
+
(0, child_process_1.exec)('npm view zerostart-cli version', (error, stdout) => {
|
|
640
|
+
if (error || !stdout)
|
|
641
|
+
resolve(currentVersion);
|
|
642
|
+
else
|
|
643
|
+
resolve(stdout.trim());
|
|
644
|
+
});
|
|
645
|
+
});
|
|
646
|
+
spinner.stop();
|
|
647
|
+
console.log(chalk_1.default.bold.cyan(' 📊 Live Stats:'));
|
|
648
|
+
console.log(chalk_1.default.gray(' ----------------------------------------'));
|
|
649
|
+
console.log(chalk_1.default.gray(' NPM Downloads (Last Month): ') + chalk_1.default.white(npmDownloads));
|
|
650
|
+
console.log(chalk_1.default.gray(' VS Code Installs: ') + chalk_1.default.white(vscodeInstalls));
|
|
651
|
+
console.log(chalk_1.default.gray(' Latest Version: ') + chalk_1.default.white('v' + Math.max(0, parseInt(latestVersion.replace('v', ''), 10)) ? latestVersion : latestVersion));
|
|
652
|
+
console.log(chalk_1.default.gray(' ----------------------------------------\n'));
|
|
653
|
+
if (latestVersion && latestVersion !== currentVersion && latestVersion !== 'unknown') {
|
|
654
|
+
console.log(chalk_1.default.bold.yellow(` A new version of ZeroStart is available! Run `) + chalk_1.default.cyan(`npm i -g zerostart-cli`) + chalk_1.default.bold.yellow(` to update.`));
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
catch (e) {
|
|
658
|
+
spinner.fail(chalk_1.default.red('Failed to fetch some stats.'));
|
|
659
|
+
}
|
|
660
|
+
});
|
|
549
661
|
// Standalone deployment commands
|
|
550
662
|
program
|
|
551
663
|
.command('deploy-vercel')
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"name": "zerostart-cli",
|
|
3
3
|
"displayName": "ZeroStart",
|
|
4
4
|
"bin": {
|
|
5
|
-
"zerostart": "
|
|
5
|
+
"zerostart": "out/cli.js"
|
|
6
6
|
},
|
|
7
7
|
"description": "Create and deploy a complete project with one command.",
|
|
8
|
-
"version": "0.0.
|
|
8
|
+
"version": "0.0.49",
|
|
9
9
|
"engines": {
|
|
10
10
|
"vscode": "^1.85.0"
|
|
11
11
|
},
|
|
@@ -49,4 +49,4 @@
|
|
|
49
49
|
"openai": "^6.25.0",
|
|
50
50
|
"ora": "^5.4.1"
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
}
|
package/eslint_out.txt
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Oops! Something went wrong! :(
|
|
3
|
-
|
|
4
|
-
ESLint: 8.57.1
|
|
5
|
-
|
|
6
|
-
ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:
|
|
7
|
-
|
|
8
|
-
npm init @eslint/config
|
|
9
|
-
|
|
10
|
-
ESLint looked for configuration files in C:\Users\R B KUSHAAL NAYAK\Desktop\Projects\ZeroStart\src and its ancestors. If it found none, it then looked in your home directory.
|
|
11
|
-
|
|
12
|
-
If you think you already have a configuration file or if you need more help, please stop by the ESLint Discord server: https://eslint.org/chat
|
|
13
|
-
|
package/lint_out.txt
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> zerostart-cli@0.0.48 lint
|
|
3
|
-
> eslint src --ext ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
C:\Users\R B KUSHAAL NAYAK\Desktop\Projects\ZeroStart\src\cli.ts
|
|
7
|
-
536:64 warning 'stderr' is defined but never used. Allowed unused args must match /^_/u @typescript-eslint/no-unused-vars
|
|
8
|
-
|
|
9
|
-
C:\Users\R B KUSHAAL NAYAK\Desktop\Projects\ZeroStart\src\extension.ts
|
|
10
|
-
11:21 error Require statement not part of import statement @typescript-eslint/no-var-requires
|
|
11
|
-
20:9 error 'disposable' is never reassigned. Use 'const' instead prefer-const
|
|
12
|
-
|
|
13
|
-
C:\Users\R B KUSHAAL NAYAK\Desktop\Projects\ZeroStart\src\managers\ProjectManager.ts
|
|
14
|
-
4:13 warning 'fs' is defined but never used @typescript-eslint/no-unused-vars
|
|
15
|
-
103:33 warning 'token' is defined but never used. Allowed unused args must match /^_/u @typescript-eslint/no-unused-vars
|
|
16
|
-
|
|
17
|
-
C:\Users\R B KUSHAAL NAYAK\Desktop\Projects\ZeroStart\src\services\GitHubServiceCLI.ts
|
|
18
|
-
41:27 warning 'repo' is assigned a value but never used @typescript-eslint/no-unused-vars
|
|
19
|
-
|
|
20
|
-
Γ£û 6 problems (2 errors, 4 warnings)
|
|
21
|
-
1 error and 0 warnings potentially fixable with the `--fix` option.
|
|
22
|
-
|