zerostart-cli 0.0.46 → 0.0.48
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/.eslintrc.json +20 -0
- package/README.md +7 -0
- package/eslint_out.txt +13 -0
- package/lint_out.txt +22 -0
- package/out/cli.js +38 -10
- package/out/extension.js +2 -1
- package/out/services/GitHubServiceCLI.js +7 -1
- package/package.json +1 -1
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"parser": "@typescript-eslint/parser",
|
|
4
|
+
"plugins": [
|
|
5
|
+
"@typescript-eslint"
|
|
6
|
+
],
|
|
7
|
+
"extends": [
|
|
8
|
+
"eslint:recommended",
|
|
9
|
+
"plugin:@typescript-eslint/recommended"
|
|
10
|
+
],
|
|
11
|
+
"env": {
|
|
12
|
+
"node": true,
|
|
13
|
+
"es2020": true
|
|
14
|
+
},
|
|
15
|
+
"rules": {
|
|
16
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
17
|
+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }]
|
|
18
|
+
},
|
|
19
|
+
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
|
|
20
|
+
}
|
package/README.md
CHANGED
|
@@ -96,6 +96,13 @@ zerostart ml-py my-model
|
|
|
96
96
|
| `zerostart test` | Set up a testing framework |
|
|
97
97
|
| `zerostart add [feature]` | Add features to an existing project |
|
|
98
98
|
|
|
99
|
+
### Development Commands
|
|
100
|
+
|
|
101
|
+
| Command | Description |
|
|
102
|
+
| :--- | :--- |
|
|
103
|
+
| `npm run lint` | Run ESLint to check for code issues |
|
|
104
|
+
| `npm run compile` | Compile TypeScript into JavaScript |
|
|
105
|
+
|
|
99
106
|
### Deployment
|
|
100
107
|
|
|
101
108
|
| Command | Description |
|
package/eslint_out.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
package/out/cli.js
CHANGED
|
@@ -185,7 +185,7 @@ async function initializeProject(name, language, type, options) {
|
|
|
185
185
|
program
|
|
186
186
|
.name('zerostart')
|
|
187
187
|
.description('Create and deploy a complete project with one command')
|
|
188
|
-
.version('0.0.
|
|
188
|
+
.version('0.0.48');
|
|
189
189
|
// zerostart init [project-name]
|
|
190
190
|
program
|
|
191
191
|
.command('init [project-name]')
|
|
@@ -523,7 +523,7 @@ program
|
|
|
523
523
|
return;
|
|
524
524
|
}
|
|
525
525
|
const latestVersion = stdout.trim();
|
|
526
|
-
const currentVersion = '0.0.
|
|
526
|
+
const currentVersion = '0.0.48';
|
|
527
527
|
if (latestVersion === currentVersion) {
|
|
528
528
|
spinner.succeed(chalk_1.default.green('You are using the latest version!'));
|
|
529
529
|
}
|
|
@@ -639,11 +639,12 @@ async function startWizard(initialName) {
|
|
|
639
639
|
let language;
|
|
640
640
|
let github = false;
|
|
641
641
|
let githubToken = null;
|
|
642
|
+
let isPublic = false;
|
|
642
643
|
let cpInterface = 'both';
|
|
643
644
|
const BACK = '< Back';
|
|
644
645
|
const CAT_WEB = '🌐 Web Development (React, TS, HTML/CSS)';
|
|
645
646
|
const CAT_CP = '🏆 Competitive Programming (C++, Java, Python)';
|
|
646
|
-
while (step > 0 && step <=
|
|
647
|
+
while (step > 0 && step <= 7) {
|
|
647
648
|
// ── STEP 1: Category ────────────────────────────────────────────────
|
|
648
649
|
if (step === 1) {
|
|
649
650
|
const ans = await inquirer_1.default.prompt([{
|
|
@@ -743,12 +744,39 @@ async function startWizard(initialName) {
|
|
|
743
744
|
else {
|
|
744
745
|
cpInterface = ans.cpInterface;
|
|
745
746
|
github = false;
|
|
746
|
-
step =
|
|
747
|
+
step = 8; // CP projects skip to execution
|
|
747
748
|
}
|
|
748
749
|
}
|
|
749
|
-
// ── STEP 5:
|
|
750
|
+
// ── STEP 5: Public or Private? ───────────────────────────────────────
|
|
750
751
|
}
|
|
751
752
|
else if (step === 5) {
|
|
753
|
+
if (github) {
|
|
754
|
+
const ans = await inquirer_1.default.prompt([{
|
|
755
|
+
type: 'list',
|
|
756
|
+
name: 'isPublic',
|
|
757
|
+
message: 'Repository visibility:',
|
|
758
|
+
choices: [
|
|
759
|
+
{ name: '🔓 Public (everyone can see)', value: true },
|
|
760
|
+
{ name: '🔒 Private (only you can see)', value: false },
|
|
761
|
+
new inquirer_1.default.Separator(),
|
|
762
|
+
{ name: BACK, value: 'back' }
|
|
763
|
+
],
|
|
764
|
+
default: false
|
|
765
|
+
}]);
|
|
766
|
+
if (ans.isPublic === 'back') {
|
|
767
|
+
step--;
|
|
768
|
+
}
|
|
769
|
+
else {
|
|
770
|
+
isPublic = ans.isPublic;
|
|
771
|
+
step++;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
else {
|
|
775
|
+
step++;
|
|
776
|
+
}
|
|
777
|
+
// ── STEP 6: GitHub Token ────────────────────────────────────────────
|
|
778
|
+
}
|
|
779
|
+
else if (step === 6) {
|
|
752
780
|
if (github) {
|
|
753
781
|
showGitHubTokenHelp();
|
|
754
782
|
console.log(chalk_1.default.gray(' 💡 Tip: ') + chalk_1.default.white('Your token can be saved and reused for all future ZeroStart projects.'));
|
|
@@ -781,16 +809,16 @@ async function startWizard(initialName) {
|
|
|
781
809
|
}
|
|
782
810
|
else {
|
|
783
811
|
spinner.fail(chalk_1.default.red('Invalid token or no internet. Please try again.'));
|
|
784
|
-
// Stay on step
|
|
812
|
+
// Stay on step 6 to retry
|
|
785
813
|
}
|
|
786
814
|
}
|
|
787
815
|
}
|
|
788
816
|
else {
|
|
789
817
|
step++; // No GitHub — skip token step
|
|
790
818
|
}
|
|
791
|
-
// ── STEP
|
|
819
|
+
// ── STEP 7: Run locally or Deploy to Vercel? (Web Dev only) ────────
|
|
792
820
|
}
|
|
793
|
-
else if (step ===
|
|
821
|
+
else if (step === 7) {
|
|
794
822
|
const deployAns = await inquirer_1.default.prompt([{
|
|
795
823
|
type: 'list',
|
|
796
824
|
name: 'action',
|
|
@@ -814,14 +842,14 @@ async function startWizard(initialName) {
|
|
|
814
842
|
}
|
|
815
843
|
}
|
|
816
844
|
// ── Execute the project creation ─────────────────────────────────────────
|
|
817
|
-
if ((step >
|
|
845
|
+
if ((step > 7 || step === 8) && name && language) {
|
|
818
846
|
let type = types_1.ProjectType.WebApp;
|
|
819
847
|
if (language === types_1.ProjectLanguage.TypeScript)
|
|
820
848
|
type = types_1.ProjectType.CLITool;
|
|
821
849
|
if (category === CAT_CP)
|
|
822
850
|
type = types_1.ProjectType.DSAPractice;
|
|
823
851
|
const projectPath = await initializeProject(name, language, type, {
|
|
824
|
-
isPublic:
|
|
852
|
+
isPublic: isPublic,
|
|
825
853
|
createRemote: !!githubToken,
|
|
826
854
|
githubToken,
|
|
827
855
|
authMethod: 'none',
|
package/out/extension.js
CHANGED
|
@@ -42,6 +42,7 @@ function activate(context) {
|
|
|
42
42
|
// Set default auto-select family attempt timeout to 1000ms if available
|
|
43
43
|
// This helps with connection issues in dual-stack (IPv4/IPv6) environments
|
|
44
44
|
try {
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
45
46
|
const net = require('net');
|
|
46
47
|
if (typeof net.setDefaultAutoSelectFamilyAttemptTimeout === 'function') {
|
|
47
48
|
net.setDefaultAutoSelectFamilyAttemptTimeout(1000);
|
|
@@ -51,7 +52,7 @@ function activate(context) {
|
|
|
51
52
|
catch (error) {
|
|
52
53
|
console.warn('Failed to set auto-select family attempt timeout:', error);
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
+
const disposable = vscode.commands.registerCommand('zerostart.create', async (projectName) => {
|
|
55
56
|
const projectManager = new ProjectManager_1.ProjectManager();
|
|
56
57
|
await projectManager.start(projectName);
|
|
57
58
|
});
|
|
@@ -59,7 +59,13 @@ class GitHubServiceCLI {
|
|
|
59
59
|
return `https://${this.token}@github.com/${user.login}/${config.name}.git`;
|
|
60
60
|
}
|
|
61
61
|
catch (error) {
|
|
62
|
-
|
|
62
|
+
if (error.response) {
|
|
63
|
+
console.error(`GitHub API Error (${error.status}): ${error.message}`);
|
|
64
|
+
// console.debug(`Response:`, error.response.data);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
console.error(`GitHub API Error: ${error.message}`);
|
|
68
|
+
}
|
|
63
69
|
// Don't throw, just return undefined so the process continues locally
|
|
64
70
|
return undefined;
|
|
65
71
|
}
|