@apso/cli 0.0.43 → 0.0.45

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.
@@ -51,12 +51,18 @@ class New extends base_command_1.default {
51
51
  fs.mkdirSync(projectPath);
52
52
  }
53
53
  shelljs_1.default.cd(projectPath);
54
- if (process.env.APSO_GIT_PAT) {
55
- shelljs_1.default.exec(`git clone --depth=1 --branch=main https://${process.env.APSO_GIT_PAT}:@github.com/mavric/apso-service-template.git ${projectPath}`);
56
- }
57
- else {
58
- shelljs_1.default.exec(`git clone --depth=1 --branch=main git@github.com:mavric/apso-service-template.git ${projectPath}`);
54
+ // Execute git clone and capture the result using HTTPS
55
+ const cloneResult = shelljs_1.default.exec(`git clone --depth=1 --branch=main https://github.com/apsoai/service-template.git ${projectPath}`, { silent: true }); // Use silent: true to suppress default output
56
+ // Check if the command failed
57
+ if (cloneResult.code !== 0) {
58
+ // Provide a more generic error message for clone failures
59
+ this.error(`Failed to clone the template repository from GitHub.\n` +
60
+ `Error Output:\n${cloneResult.stderr}\n\n` +
61
+ `Please check your network connection and ensure the repository exists at https://github.com/apsoai/service-template.git\n\n` +
62
+ `If the problem persists, please remove the partially created directory "${projectPath}" and try again.`);
63
+ // Throwing error via this.error will stop execution
59
64
  }
65
+ // If clone was successful, proceed to remove the .git directory
60
66
  shelljs_1.default.exec(`rm -rf ${projectPath}/.git`);
61
67
  shelljs_1.default.cd(this.CURR_DIR);
62
68
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.43",
2
+ "version": "0.0.45",
3
3
  "commands": {
4
4
  "server:new": {
5
5
  "id": "server:new",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apso/cli",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "description": "Apso CLI",
5
5
  "author": "Apso by Mavric - @mavric",
6
6
  "bin": {